:root {
  --accent: #1558a7;
  --accent-light: #e8f0f9;
  --text: #1c1e21;
  --muted: #5f6672;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

header.site {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(6px); z-index: 10;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 650; text-decoration: none; color: var(--text); font-size: 17px; }
.brand span { color: var(--accent); }
nav.main a { text-decoration: none; color: var(--muted); margin-left: 28px; font-size: 15.5px; }
nav.main a:hover, nav.main a.active { color: var(--accent); }
nav.main a.lang {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 14px; font-size: 13.5px; color: var(--accent);
}
nav.main a.lang:hover { background: var(--accent-light); }

.hero { padding: 72px 0 56px; }
.hero .row { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.hero img.avatar { width: 108px; height: 108px; border-radius: 50%; border: 3px solid var(--accent-light); }
.hero h1 { font-size: 40px; line-height: 1.15; letter-spacing: -0.5px; }
.hero .tagline { color: var(--accent); font-weight: 550; margin-top: 6px; font-size: 19px; }
.hero p.intro { max-width: 720px; margin-top: 20px; color: var(--muted); font-size: 17.5px; }
.hero .cta { margin-top: 26px; }
.btn {
  display: inline-block; text-decoration: none; font-size: 15.5px; font-weight: 550;
  padding: 10px 20px; border-radius: 8px; margin-right: 12px;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #10437f; }
.btn.ghost { color: var(--accent); border: 1.5px solid var(--accent); }
.btn.ghost:hover { background: var(--accent-light); }

section.projects { padding: 8px 0 72px; }
h2.section { font-size: 26px; margin-bottom: 24px; letter-spacing: -0.3px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.card {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg);
  text-decoration: none; color: var(--text); display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: 0 6px 24px rgba(16, 44, 84, 0.12); transform: translateY(-2px); }
.card .thumb { aspect-ratio: 16/10; background: var(--bg-soft); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 18.5px; line-height: 1.3; }
.card .meta { font-size: 13.5px; color: var(--accent); font-weight: 550; }
.card p { font-size: 15px; color: var(--muted); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12.5px; background: var(--accent-light); color: var(--accent);
  padding: 3px 10px; border-radius: 999px; font-weight: 550;
}

article.project { padding: 48px 0 72px; max-width: 820px; margin: 0 auto; }
.crumb { font-size: 14.5px; margin-bottom: 18px; }
.crumb a { color: var(--accent); text-decoration: none; }
article.project h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.4px; }
.projmeta { color: var(--muted); font-size: 15.5px; margin: 10px 0 6px; }
.projmeta b { color: var(--text); font-weight: 600; }
article.project h2 { font-size: 22px; margin: 36px 0 12px; letter-spacing: -0.2px; }
article.project p { margin: 12px 0; }
article.project ul, article.project ol { margin: 12px 0 12px 24px; }
article.project li { margin: 6px 0; }
figure { margin: 24px 0; }
figure img, figure video { width: 100%; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
article.project figure img { max-height: 560px; object-fit: contain; }
.figrow figure img { aspect-ratio: 4 / 3; object-fit: contain; padding: 6px; box-sizing: border-box; }
figure figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; text-align: center; }
.figrow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.figrow figure { margin: 8px 0; }
.glance {
  background: var(--bg-soft); border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 22px 0 6px;
}
.glance .glance-label {
  font-size: 12.5px; font-weight: 650; color: var(--accent);
  letter-spacing: 0.5px; margin-bottom: 10px;
}
.glance dl { display: grid; grid-template-columns: 110px 1fr; row-gap: 8px; margin: 0; }
.glance dt { color: var(--muted); font-weight: 600; font-size: 14.5px; }
.glance dd { margin: 0; font-size: 14.5px; }
.glance .lead { margin: 0 0 12px; font-size: 15px; }
.glance ol { margin: 0; padding-left: 1.4em; display: grid; row-gap: 8px; }
.glance ol li { font-size: 14.5px; padding-left: 3px; line-height: 1.55; }
.glance ol li::marker { color: var(--accent); font-weight: 650; }
@media (max-width: 640px) {
  .glance dl { grid-template-columns: 1fr; row-gap: 2px; }
  .glance dd { margin-bottom: 8px; }
}
.callout {
  background: var(--bg-soft); border-left: 4px solid var(--accent);
  padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 20px 0; font-size: 15.5px;
}
.callout a { color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 24px 0; }
.stat { background: var(--bg-soft); border-radius: 10px; padding: 14px 16px; }
.stat .num { font-size: 24px; font-weight: 650; color: var(--accent); }
.stat .lbl { font-size: 13.5px; color: var(--muted); }

.about { padding: 56px 0 72px; max-width: 820px; margin: 0 auto; }
.about h1 { font-size: 34px; margin-bottom: 8px; }
.about h2 { font-size: 21px; margin: 32px 0 10px; }
.about .contactrow { margin-top: 28px; }
.timeline { border-left: 2px solid var(--border); padding-left: 22px; margin: 16px 0; }
.timeline .item { margin-bottom: 18px; position: relative; }
.timeline .item::before {
  content: ""; position: absolute; left: -28px; top: 8px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--accent);
}
.timeline .when { font-size: 13.5px; color: var(--muted); }
.timeline .what { font-weight: 600; }
.timeline p { font-size: 15.5px; color: var(--muted); margin-top: 2px; }

footer.site { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 14.5px; }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer.site a { color: var(--accent); text-decoration: none; }

@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .figrow { grid-template-columns: 1fr; }
  nav.main a { margin-left: 16px; }
}
