/* ------------------------------------------------------------------ fonts
   Design system: VoltAgent-inspired (getdesign.md) — void-black canvas,
   single electric-green accent, hairline cards, Inter + mono, dark-only. */
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap; src:url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/inter-700.woff2') format('woff2'); }

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: dark;            /* dark-canvas only — no light mode */
  --bg: #101010;                 /* canvas */
  --bg-2: #1a1a1a;               /* canvas-soft: code blocks, inputs */
  --ink: #f2f2f2;                /* default text */
  --ink-strong: #ffffff;         /* hero / high-emphasis */
  --muted: #bdbdbd;              /* body secondary */
  --faint: #8b949e;              /* captions, fine print */
  --line: #3d3a39;               /* hairline — the elevation system */
  --line-2: #5a5654;             /* hairline hover */
  --accent: #00d992;             /* electric green — CTA/status only */
  --accent-soft: #2fd6a1;
  --accent-deep: #10b981;        /* inline links in body copy */
  --glow: rgba(0, 217, 146, .10);
  --dash: rgba(79, 93, 117, .4); /* signature dashed divider */
  --code-bg: #1a1a1a;
  --good: #00d992;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: var(--sans);
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "calt", "rlig";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 22px; }
.wrap.wide { max-width: 1160px; }
.mono { font-family: var(--mono); }
::selection { background: var(--accent); color: #101010; }

a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); color: var(--ink-strong); }
h1 { font-size: clamp(34px, 5.6vw, 54px); font-weight: 400; letter-spacing: -.65px; line-height: 1.05; margin: 0 0 14px; }
h2 { font-size: clamp(24px, 3.6vw, 30px); font-weight: 400; letter-spacing: -.9px; line-height: 1.15; margin: 46px 0 14px; }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -.2px; line-height: 1.4; margin: 0 0 6px; }
p { margin: 0 0 16px; }

/* ------------------------------------------------------------------ header */
header.site {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 16, 16, .82);
  backdrop-filter: saturate(140%) blur(12px);
}
header.site .wrap { display: flex; align-items: center; gap: 14px; padding: 14px 22px; }
.brand { font-weight: 600; font-size: 16px; letter-spacing: -.2px; color: var(--ink-strong); }
.brand .dot { color: var(--accent); }
header.site nav { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
header.site nav a {
  color: var(--muted); font-size: 14px; font-weight: 500; position: relative; padding: 2px 0;
}
header.site nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 2px;
  background: var(--accent); transition: right .22s ease;
}
header.site nav a:hover { color: var(--ink-strong); }
header.site nav a:hover::after { right: 0; }

main { padding: 46px 0 72px; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: 30px 0 22px; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent); margin: 0 0 18px; display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); opacity: .8; }
.hero .role { font-size: clamp(17px, 2.3vw, 20px); font-weight: 500; color: var(--muted); margin: 0 0 18px; letter-spacing: -.2px; }
.hero p:last-child { color: var(--muted); max-width: 62ch; }

/* ------------------------------------------------------------------ grids + cards */
.grid { display: grid; gap: 14px; margin: 16px 0; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1023px) { .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
a.card:hover, .card:hover {
  border-color: var(--line-2);
  box-shadow: 0 0 15px rgba(92, 88, 85, .2), 0 0 24px var(--glow);
}
.card.flat, .card.flat:hover { box-shadow: none; border-color: var(--line); }
.card h3 { color: var(--ink-strong); }
.card .excerpt, .card p.excerpt { color: var(--muted); margin: 0 0 4px; font-size: 14.5px; line-height: 1.65; }
.card .date { font-family: var(--mono); color: var(--faint); font-size: 12px; letter-spacing: .04em; margin-bottom: 8px; }
.card .tech { font-family: var(--mono); color: var(--faint); font-size: 11.5px; line-height: 1.7; margin: auto 0 0; padding-top: 14px; }
.card .links { margin: 10px 0 0; font-size: 14px; font-weight: 600; }
.card .links a { margin-right: 16px; color: var(--accent-soft); }
.card .links a:hover { color: var(--accent); }

.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--faint); margin: 42px 0 10px; display: flex; align-items: center; gap: 10px;
}
.section-label::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }

/* ------------------------------------------------------------------ article */
.lede { color: var(--muted); font-size: 18px; line-height: 1.6; margin: 0 0 22px; }
.meta { color: var(--faint); font-size: 13px; font-family: var(--mono); margin: 0 0 32px; }
.meta a { color: var(--muted); }
.meta .sep { opacity: .5; margin: 0 9px; }
article p, main > .wrap > p { max-width: 66ch; }
article a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-deep) 55%, transparent); text-underline-offset: 3px; }
article a:hover { text-decoration-color: var(--accent); }

code {
  font-family: var(--mono); font-size: .85em;
  background: var(--bg-2);
  color: #f5f6f7; padding: 2px 7px; border-radius: 6px;
}
pre {
  background: var(--code-bg); color: #f5f6f7; border: 1px solid var(--line);
  border-radius: 8px; padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.55;
  font-family: var(--mono);
}
pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
blockquote { margin: 22px 0; padding: 4px 20px; border-left: 2px solid var(--accent); color: var(--muted); }

.tablewrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
th {
  color: var(--faint); background: var(--bg-2);
  font-size: 11.5px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
}
td.num, th.num { text-align: center; }
td.num { font-family: var(--mono); font-size: 13px; }
.kpi { color: var(--good); font-weight: 600; font-family: var(--mono); }
hr { border: none; border-top: 1px dashed var(--dash); margin: 40px 0; }

/* ------------------------------------------------------------------ footer */
footer.site { border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; margin-top: 20px; }
footer.site .wrap { padding: 28px 22px 140px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; text-align: center; gap: 4px; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent-soft); }
footer.site .sep { opacity: .45; margin: 0 8px; }

/* ------------------------------------------------------------------ portfolio extras */
.hidden { display: none !important; }

.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.headshot {
  width: 150px; height: 150px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line);
}
@media (max-width: 640px) { .hero-grid { grid-template-columns: 1fr; } .headshot { width: 112px; height: 112px; } }

.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-block; padding: 11px 18px; border-radius: 6px;
  font-weight: 600; font-size: 14.5px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line);
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { border-color: var(--line-2); color: var(--ink-strong); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #101010; }
.btn.primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: #101010; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 34px 0 8px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  text-align: center; padding: 20px 10px 16px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg);
}
.stat .n { font-family: var(--mono); font-weight: 600; font-size: 26px; letter-spacing: -.5px; color: var(--accent); }
.stat .l { color: var(--faint); font-size: 12.5px; margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 26px; }
.chip {
  font-size: 13px; padding: 5px 13px; border-radius: 9999px; color: var(--ink);
  border: 1px solid var(--line); background: var(--bg);
}

.xp { margin: 0 0 14px; }
.xp .top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.xp .org { font-family: var(--mono); font-size: 12.5px; color: var(--faint); letter-spacing: .02em; }
.xp ul { margin: 14px 0 2px; padding-left: 22px; color: var(--muted); font-size: 14.5px; }
.xp li { margin: 9px 0; line-height: 1.65; padding-left: 2px; }
.xp li::marker { color: var(--accent); }
.xp li strong { color: var(--ink-strong); font-weight: 600; }

.lang-btn {
  font: inherit; font-size: 12px; font-weight: 600; font-family: var(--mono); letter-spacing: .08em;
  color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 9999px;
  padding: 4px 12px; cursor: pointer; transition: color .18s ease, border-color .18s ease;
}
.lang-btn:hover { color: var(--accent); border-color: var(--accent); }

.contact-center { text-align: center; padding: 54px 0 72px; }
.contact-center h2 { margin: 0 0 14px; }
.contact-center p { margin: 0 auto 10px; max-width: 58ch; color: var(--muted); }
.contact-center .btns { justify-content: center; margin-top: 26px; }
.contact-center .btn { padding: 12px 22px; font-size: 15px; }

/* anchored sections must clear the sticky header */
section[id] { scroll-margin-top: 76px; }

/* ------------------------------------------------------------------ terminal mockup (hero) */
.term {
  width: 100%; max-width: 470px; overflow: hidden;
  background: #0c0d0c; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 0 28px var(--glow);
}
.term-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.term-bar .d { width: 10px; height: 10px; border-radius: 50%; background: #3d3a39; }
.term-bar .d.g { background: var(--accent); }
.term-bar .title { margin-left: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); letter-spacing: .05em; }
.term-body {
  margin: 0; padding: 16px 18px 18px; font-family: var(--mono);
  font-size: 12.5px; line-height: 1.85; color: #d9dee3; white-space: pre-wrap; word-break: break-word;
}
.term-body .p { color: var(--accent); }
.term-body .c { color: var(--faint); }
.term-body .k { color: var(--accent-soft); font-weight: 600; }
.caret {
  display: inline-block; width: 7px; height: 13px; margin-left: 2px;
  background: var(--accent); vertical-align: -2px;
  animation: caret-blink 1.1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .term { max-width: 100%; } }

/* about: photo beside the paragraph */
.about-grid { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: start; }
.about-grid .headshot { width: 160px; height: 160px; }
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } .about-grid .headshot { width: 120px; height: 120px; } }

/* signature dashed rhythm between portfolio sections */
main section + section { border-top: 1px dashed var(--dash); margin-top: 44px; padding-top: 6px; }
main section.hero + section, section.hero { border-top: none; }

/* wide container (portfolio pages): full-width bands, capped line lengths */
.wrap.wide .hero p { max-width: 64ch; }
.wrap.wide .headshot { width: 190px; height: 190px; }
.wrap.wide section p { max-width: 76ch; }
.wrap.wide .xp ul { max-width: 920px; }
.wrap.wide .contact-center p { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .wrap.wide .headshot { width: 112px; height: 112px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto; } }
