/* Layout concept: a dispatcher's board — headline and person on the left, a live road map on the right;
   sections below read like a logbook (label column + content). */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f2f0ee;
  --ink: #18161a;
  --muted: #5c5760;
  --line: #e3dfe1;
  --accent: #9d2235;          /* UARK cardinal */
  --accent-ink: #ffffff;
  --accent-soft: #f6e6e9;
  --map-ground: #f1f0ec;
  --map-bldg: #dcd9d3;
  --map-green: #dfe8d6;
  --map-road: #ffffff;
  --map-road-edge: #d6d2cc;
  --map-lot: #c9c4be;
  --t-free: #2f9e5a;          /* semantic traffic scale, kept separate from the accent */
  --t-light: #c9b22b;
  --t-slow: #e07b24;
  --t-jam: #c8323b;
  --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(24 22 26 / .06), 0 8px 28px rgb(24 22 26 / .07);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131215; --surface: #1b1a1e; --surface-2: #222026; --ink: #efecef; --muted: #aaa4ac;
    --line: #322f36; --accent: #e0566b; --accent-ink: #1a0b0e; --accent-soft: #3a1c22;
    --map-ground: #1d1c20; --map-bldg: #2c2a30; --map-green: #1f2a20; --map-road: #3a383f; --map-road-edge: #2a282e; --map-lot: #4a4650;
    --t-free: #45c27a; --t-light: #e2cb45; --t-slow: #f2964a; --t-jam: #ee5a62;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 17px/1 var(--font-display); text-decoration: none; letter-spacing: -.01em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 12px; letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta { color: var(--accent); font-weight: 600; }
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; padding-block: 56px 72px; align-items: start; }
@media (max-width: 980px) { .hero { grid-template-columns: 1fr; gap: 36px; padding-block: 32px 48px; } }
.avatar { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); box-shadow: var(--shadow); margin-bottom: 22px; }
.eyebrow { font: 500 12.5px/1.5 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.display { font-family: var(--font-display); font-weight: 850; font-stretch: 118%; font-size: clamp(54px, 8vw, 92px); line-height: .92; letter-spacing: -.035em; margin: 0 0 22px; text-wrap: balance; }
.lede { font-size: 20px; line-height: 1.5; margin: 0 0 14px; max-width: 34em; }
.sub { color: var(--muted); margin: 0 0 26px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 2px solid transparent; transition: transform .12s, background-color .12s; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); }
.icon-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .12s, color .12s; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* demo */
.demo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.demo-title { font: 750 21px/1.25 var(--font-display); font-stretch: 108%; margin: 0 0 4px; letter-spacing: -.01em; }
.demo-note { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.map-box { position: relative; border-radius: 10px; overflow: hidden; background: var(--map-ground); border: 1px solid var(--line); }
.map { display: block; width: 100%; height: auto; aspect-ratio: 1 / .86; }
.map .road { fill: none; stroke-linecap: round; stroke-linejoin: round; cursor: pointer; transition: stroke .25s; }
.map .road-case { fill: none; stroke: var(--surface); stroke-linecap: round; stroke-linejoin: round; }
.map .road.is-sel { filter: drop-shadow(0 0 6px rgb(0 0 0 / .25)); }
.map .lbl { font: 600 66px var(--font-mono); fill: var(--ink); paint-order: stroke; stroke: var(--map-ground); stroke-width: 14px; stroke-linejoin: round; pointer-events: none; }
.map .om { fill: var(--accent); }
.map .om-lbl { font: 700 60px var(--font-body); fill: var(--accent); paint-order: stroke; stroke: var(--map-ground); stroke-width: 12px; }
.legend { position: absolute; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 10px; background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: 500 12px/1.2 var(--font-mono); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; max-width: 240px; box-shadow: var(--shadow); }
.tip b { font-family: var(--font-mono); }
.controls { display: grid; gap: 12px; margin-top: 14px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days button { font: 600 13px var(--font-mono); padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.days button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.time-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.play { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; }
.play svg { width: 18px; height: 18px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.clock { font: 600 16px var(--font-mono); font-variant-numeric: tabular-nums; min-width: 6.2em; text-align: right; }
.readout { margin: 14px 0 0; font-size: 15px; line-height: 1.5; min-height: 3em; }
.readout b { font-family: var(--font-mono); font-weight: 600; }
.profile { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.profile-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.profile-sub { color: var(--muted); font-weight: 400; font-family: var(--font-mono); font-size: 12px; }
.profile-svg { width: 100%; height: 84px; display: block; margin-top: 6px; }
.fine { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }

/* sections */
.section { padding-block: 72px; }
.section-alt { background: var(--surface-2); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.h2 { font: 800 clamp(30px, 4vw, 40px)/1.05 var(--font-display); font-stretch: 112%; letter-spacing: -.025em; margin: 0; }
.sec-sub { margin: 0; color: var(--muted); max-width: 36em; }
.h3 { font: 700 21px/1.25 var(--font-display); font-stretch: 105%; margin: 0 0 8px; }
.h3 a { text-decoration: none; }
.h3 a:hover { color: var(--accent); }
.h4 { font: 600 12.5px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 12px; }
.tag { font: 500 12px/1.4 var(--font-mono); letter-spacing: .03em; color: var(--accent); margin: 0 0 8px; text-transform: uppercase; }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 820px) { .projects { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
@media (max-width: 820px) { .card-wide { grid-template-columns: 1fr; } }
.card-media { display: block; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.media-stats { display: grid; align-content: center; gap: 18px; padding: 28px; border-bottom: none; border-right: 1px solid var(--line); background: var(--accent); color: var(--accent-ink); }
@media (max-width: 820px) { .media-stats { border-right: none; } }
.stat b { display: block; font: 800 40px/1 var(--font-display); font-stretch: 115%; font-variant-numeric: tabular-nums; }
.stat span { font: 500 13px/1.4 var(--font-mono); opacity: .9; }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body p { margin: 0 0 8px; }
.mine { font-size: 14.5px; background: var(--accent-soft); border-radius: 8px; padding: 9px 12px; }
.more { margin-top: auto; font-weight: 600; color: var(--accent); text-decoration: none; }
.more:hover { text-decoration: underline; }

.job { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; }
@media (max-width: 720px) { .job { grid-template-columns: 1fr; gap: 8px; } }
.job-when { font: 600 14px var(--font-mono); margin: 4px 0 2px; }
.job-where { color: var(--muted); margin: 0; font-size: 14px; }
.job-main p { margin: 0 0 16px; max-width: 40em; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.kpi b { display: block; font: 800 28px/1 var(--font-display); font-stretch: 112%; color: var(--accent); font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.kpi span { font-size: 13.5px; color: var(--muted); line-height: 1.35; display: block; }
.list { margin: 0; padding-left: 20px; }
.list li { margin-bottom: 6px; }

.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-bottom: 36px; }
@media (max-width: 820px) { .skills { grid-template-columns: 1fr; } }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.courses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .courses { grid-template-columns: 1fr; } }
.course { border-top: 3px solid var(--accent); background: var(--surface); border-radius: 0 0 10px 10px; padding: 16px 18px; }
.course p { margin: 0; }
.code { font: 600 13px var(--font-mono); color: var(--accent); margin-bottom: 4px !important; }
.cname { font-weight: 600; margin-bottom: 6px !important; }
.cdesc { color: var(--muted); font-size: 14.5px; }

.foot { border-top: 1px solid var(--line); padding-block: 36px; }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-name { font: 800 22px/1 var(--font-display); font-stretch: 112%; margin: 0 0 6px; }
.foot .fine { max-width: 46em; margin: 0; }
.foot-links { display: flex; align-items: center; gap: 12px; }

/* project pages */
.page-hero { padding-block: 48px 24px; }
.back { font: 500 14px var(--font-mono); color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.page-title { font-family: var(--font-display); font-weight: 850; font-stretch: 115%; font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: -.03em; margin: 14px 0 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; font: 500 13px var(--font-mono); color: var(--muted); margin: 0 0 8px; padding: 0; list-style: none; }
.prose { max-width: 46em; }
.prose h2 { font: 800 28px/1.15 var(--font-display); font-stretch: 110%; margin: 48px 0 12px; letter-spacing: -.02em; }
.prose p, .prose li { font-size: 17px; }
.prose figure { margin: 24px 0; }
.prose figure img { border-radius: 10px; border: 1px solid var(--line); }
.prose figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.formula { font: 14px/1.7 var(--font-mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; overflow-x: auto; white-space: pre; }
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 10px 10px 0; }
@media (max-width: 600px) {
  .legend { position: static; border: none; border-top: 1px solid var(--line); border-radius: 0; background: var(--surface); justify-content: center; }
}
