:root {
  --bg: #ebece8;
  --fg: #111210;
  --muted: #6b6d68;
  --line: #cfd1cb;
  --card: #e2e4de;
  --accent: #1f4fd8;
  --gutter: clamp(20px, 4vw, 56px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111210; --fg: #ecede8; --muted: #8d8f89; --line: #2b2d29; --card: #1a1c19; --accent: #7aa2ff;
  }
}
:root[data-theme="dark"] {
  --bg: #111210; --fg: #ecede8; --muted: #8d8f89; --line: #2b2d29; --card: #1a1c19; --accent: #7aa2ff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  background: var(--bg); color: var(--fg);
  font-family: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
ul { list-style: none; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 14px var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); font-size: 14px;
}
.logo { font-weight: 600; text-decoration: none; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 28px; }
.nav a { text-decoration: none; }
.nav-links a:hover, .tools a:hover { color: var(--accent); }
.tools { display: flex; gap: 16px; justify-content: flex-end; align-items: center; }
.lang a { color: var(--muted); } .lang a[aria-current] { color: var(--fg); font-weight: 600; }
.theme { background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 99px; width: 30px; height: 30px; cursor: pointer; font-size: 14px; }

section { padding: clamp(64px, 10vw, 130px) var(--gutter); }
.eyebrow { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
h2 { font-size: clamp(30px, 4.6vw, 58px); font-weight: 500; letter-spacing: -.03em; line-height: 1.06; max-width: 18ch; }
.lede { color: var(--muted); max-width: 56ch; margin-top: 22px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; min-height: calc(100vh - 58px); padding-top: clamp(40px, 6vw, 80px); padding-bottom: 40px; }
.hero h1 { font-size: clamp(64px, 13vw, 190px); font-weight: 400; letter-spacing: -.055em; line-height: .88; }
.role { font-size: clamp(20px, 2.4vw, 30px); font-weight: 500; margin-top: 36px; letter-spacing: -.02em; }
.pitch { color: var(--muted); max-width: 46ch; margin-top: 14px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 99px; text-decoration: none; font-size: 15px; font-weight: 500; border: 1px solid var(--fg); cursor: pointer; font-family: inherit; }
.btn.solid { background: var(--fg); color: var(--bg); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.portrait img { width: 100%; max-height: 74vh; object-fit: cover; object-position: 50% 18%; filter: grayscale(1) contrast(1.05); display: block; }
.portrait figcaption { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 12px; }

/* layers */
.layers { margin-top: 56px; border-top: 1px solid var(--line); }
.layer { display: grid; grid-template-columns: 60px 200px 1fr 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.layer .n { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.layer h3 { font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.layer p { color: var(--muted); }
.layer .tech { font-size: 14px; color: var(--accent); }

/* toolkit */
.toolkit { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px 32px; margin-top: 56px; }
.toolkit h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.toolkit li { padding: 7px 0; border-top: 1px solid var(--line); }

/* experience */
.roles { margin-top: 56px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { display: grid; grid-template-columns: 140px 1fr auto; gap: 24px; padding: 26px 0; cursor: pointer; list-style: none; align-items: baseline; }
summary::-webkit-details-marker { display: none; }
summary .yrs { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
summary .co { font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; letter-spacing: -.02em; }
summary .co small { display: block; font-size: 15px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 2px; }
summary .plus { font-size: 24px; color: var(--muted); transition: transform .2s; }
details[open] .plus { transform: rotate(45deg); }
.detail { padding: 0 0 32px 164px; max-width: 900px; }
.detail p { color: var(--muted); margin-bottom: 16px; }
.detail li { padding: 6px 0 6px 18px; position: relative; }
.detail li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }
.stack { margin-top: 18px; font-size: 14px; color: var(--accent); }
.badge { display: inline-block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--accent); color: var(--accent); border-radius: 99px; padding: 1px 8px; margin-left: 8px; vertical-align: middle; }
.earlier li { padding: 10px 0; }
.earlier strong { font-weight: 500; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.about p { font-size: clamp(19px, 2vw, 24px); letter-spacing: -.01em; line-height: 1.45; }
.facts dt { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 22px; }
.facts dt:first-child { margin-top: 0; }
.facts dd { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-top: 4px; }

/* contact */
.contact { background: var(--fg); color: var(--bg); border-radius: 28px 28px 0 0; }
.contact h2 { font-size: clamp(44px, 8vw, 110px); max-width: none; }
.contact .lede { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; margin-top: 48px; }
.direct a { display: block; font-size: clamp(18px, 2.2vw, 26px); padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); text-decoration: none; }
.direct a:hover { color: var(--accent); }
.direct button { margin-top: 18px; }
form { display: grid; gap: 14px; }
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { font-size: 13px; color: color-mix(in srgb, var(--bg) 65%, transparent); display: grid; gap: 6px; }
input, select, textarea {
  font: inherit; color: var(--bg); background: transparent; border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent);
  border-radius: 10px; padding: 12px 14px; width: 100%;
}
select option { color: #111; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
.contact .btn { border-color: var(--bg); }
.contact .btn.solid { background: var(--bg); color: var(--fg); }
.send[hidden] { display: none; }
.send { border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent); border-radius: 14px; padding: 16px; display: grid; gap: 12px; }
.send-links { display: flex; flex-wrap: wrap; gap: 10px; }
.send-links .btn { padding: 9px 18px; background: transparent; color: var(--bg); }
.note { font-size: 13px; color: color-mix(in srgb, var(--bg) 55%, transparent); }
footer { background: var(--fg); color: color-mix(in srgb, var(--bg) 55%, transparent); padding: 28px var(--gutter); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

@media (max-width: 860px) {
  .nav { grid-template-columns: auto 1fr; }
  .nav-links { display: none; }
  .hero, .about, .contact-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .portrait { order: -1; max-width: 360px; }
  .layer { grid-template-columns: 36px 1fr; gap: 6px 14px; }
  .layer p, .layer .tech { grid-column: 2; }
  summary { grid-template-columns: 1fr auto; }
  summary .yrs { grid-column: 1; order: -1; }
  summary .plus { grid-row: 1 / span 2; grid-column: 2; }
  .detail { padding-left: 0; }
  form .row { grid-template-columns: 1fr; }
}
