:root {
  --bg: #0b0e13;
  --bg-elevated: #12161d;
  --surface: #171c24;
  --text: #f5f7f4;
  --muted: #a8b0b9;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #dfff49;
  --accent-soft: rgba(223, 255, 73, 0.12);
  --dark-on-accent: #11150a;
  --max-width: 1240px;
  --header-height: 82px;
  --font-display: "Manrope", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

html[data-theme="light"] {
  --bg: #f4f5f1;
  --bg-elevated: #ffffff;
  --surface: #e9ebe4;
  --text: #101319;
  --muted: #59616b;
  --line: rgba(16, 19, 25, 0.14);
  --accent: #bdda26;
  --accent-soft: rgba(151, 177, 25, 0.15);
  --dark-on-accent: #10130a;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 24px); }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  transition: color 220ms ease, background-color 220ms ease;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  color: #111;
  background: var(--accent);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid transparent;
  transition: height 220ms ease, background-color 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.site-header.is-scrolled {
  height: 66px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-color: var(--line);
  backdrop-filter: blur(16px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; text-decoration: none; }
.brand-mark {
  width: 36px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--dark-on-accent);
  background: var(--accent);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}
.brand-name { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }

.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a { position: relative; color: var(--muted); font-size: 0.92rem; font-weight: 500; text-decoration: none; transition: color 160ms ease; }
.site-nav a::after { content: ""; position: absolute; right: 0; bottom: -8px; left: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.site-nav a:hover, .site-nav a.is-active { color: var(--text); }
.site-nav a.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.icon-button, .menu-toggle { border: 0; color: var(--text); background: transparent; cursor: pointer; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
.theme-icon { width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; box-shadow: -5px -5px 0 -4px currentColor, 5px -5px 0 -4px currentColor, -5px 5px 0 -4px currentColor, 5px 5px 0 -4px currentColor; }
html[data-theme="light"] .theme-icon { background: currentColor; }
.header-cta { padding: 10px 17px; color: var(--dark-on-accent); background: var(--accent); border-radius: 99px; font-weight: 600; text-decoration: none; }
.menu-toggle { display: none; }

.hero {
  position: relative;
  min-height: min(900px, 100svh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-height) + 88px) max(24px, calc((100vw - var(--max-width)) / 2)) 42px;
  isolation: isolate;
  overflow: hidden;
}

.hero-grid, .contact-grid { position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px; mask-image: linear-gradient(to bottom, transparent, black 20%, black 70%, transparent); opacity: 0.32; }

.hero-content { position: relative; z-index: 1; width: min(980px, 86%); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; color: var(--muted); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.signal { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 7px var(--accent-soft); }

h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.02; letter-spacing: -0.055em; }
h1 { max-width: 980px; font-size: clamp(3.4rem, 7.2vw, 6.65rem); font-weight: 700; }
h1 span { color: var(--muted); }
.hero-lede { width: min(650px, 100%); margin: 34px 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.3rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }

.button { min-height: 50px; display: inline-flex; justify-content: center; align-items: center; padding: 12px 22px; border: 1px solid transparent; border-radius: 999px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--dark-on-accent); background: var(--accent); }
.button-secondary { border-color: var(--line); background: var(--bg-elevated); }

.hero-orbit { position: absolute; top: 20%; right: -3%; width: clamp(270px, 34vw, 510px); aspect-ratio: 1; z-index: -1; }
.orbit { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 50%; }
.orbit::after { content: ""; position: absolute; top: 50%; left: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 25px var(--accent); }
.orbit-one { animation: spin 18s linear infinite; }
.orbit-two { inset: 16%; animation: spin 12s linear reverse infinite; }
.orbit-two::after { top: 12%; left: auto; right: 8%; }
.orbit-core { position: absolute; inset: 32%; display: grid; place-items: center; border-radius: 50%; color: var(--dark-on-accent); background: var(--accent); font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 5rem); font-weight: 800; letter-spacing: -0.08em; box-shadow: 0 0 90px var(--accent-soft); }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-meta { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: auto; padding-top: 64px; border-top: 1px solid var(--line); }
.hero-meta div { min-height: 70px; display: flex; flex-direction: column; gap: 4px; padding-right: 30px; }
.hero-meta strong { font-family: var(--font-display); font-size: 1.1rem; }
.hero-meta span { color: var(--muted); font-size: 0.9rem; }

.section { max-width: var(--max-width); margin-inline: auto; padding: 130px 24px; }
.section-label { display: flex; align-items: center; gap: 12px; margin-bottom: 46px; color: var(--muted); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.section-label::after { content: ""; width: 42px; height: 1px; background: var(--line); }
.section-label span { color: var(--accent); }
.section-title { font-size: clamp(2.7rem, 5.5vw, 5.2rem); font-weight: 650; }

.about-layout { display: grid; grid-template-columns: 0.95fr 1fr; gap: clamp(48px, 10vw, 150px); align-items: start; }
.about-copy { padding-top: 6px; }
.about-copy p { color: var(--muted); font-size: 1.06rem; }
.about-copy .lead { margin-top: 0; color: var(--text); font-size: clamp(1.28rem, 2.2vw, 1.68rem); line-height: 1.48; }

.expertise { max-width: none; padding-inline: max(24px, calc((100vw - var(--max-width)) / 2)); background: var(--bg-elevated); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 62px; }
.section-heading .section-label { align-self: start; margin: 15px 24px 0 0; }
.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.expertise-card { min-height: 420px; display: flex; flex-direction: column; padding: clamp(26px, 3vw, 42px); border: 1px solid var(--line); background: var(--bg); transition: transform 220ms ease, border-color 220ms ease; }
.expertise-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.card-index { color: var(--accent); font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; }
.expertise-card h3 { margin-top: auto; font-size: 1.8rem; letter-spacing: -0.035em; }
.expertise-card p { color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.tag-list li { padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 0.78rem; }

.approach { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(56px, 9vw, 140px); }
.approach-intro { position: sticky; top: 110px; align-self: start; }
.kicker { margin: 0 0 16px; color: var(--accent); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.approach-intro h2 { font-size: clamp(2.4rem, 4.5vw, 4.2rem); }
.approach-steps { margin: 0; padding: 0; list-style: none; }
.approach-steps li { display: grid; grid-template-columns: 58px 1fr; column-gap: 20px; padding: 34px 0; border-top: 1px solid var(--line); }
.approach-steps li:last-child { border-bottom: 1px solid var(--line); }
.approach-steps span { grid-row: span 2; color: var(--accent); font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; }
.approach-steps strong { font-family: var(--font-display); font-size: 1.25rem; }
.approach-steps p { margin: 7px 0 0; color: var(--muted); }

.experience { max-width: none; padding-inline: max(24px, calc((100vw - var(--max-width)) / 2)); background: var(--bg-elevated); }
.experience-heading { display: grid; grid-template-columns: 1fr 0.65fr; gap: 80px; align-items: end; margin-bottom: 74px; }
.experience-summary { margin: 0 0 8px; color: var(--muted); font-size: 1.1rem; }
.timeline { border-top: 1px solid var(--line); }
.timeline-item { border-bottom: 1px solid var(--line); }
.timeline-trigger { width: 100%; display: grid; grid-template-columns: 180px 1fr 30px; gap: 32px; align-items: center; padding: 30px 0; border: 0; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.timeline-date { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.timeline-role { display: grid; grid-template-columns: minmax(280px, 1.2fr) 0.8fr; gap: 24px; align-items: center; }
.timeline-role strong { font-family: var(--font-display); font-size: clamp(1.12rem, 2vw, 1.45rem); letter-spacing: -0.025em; }
.timeline-role > span { color: var(--muted); }
.timeline-toggle, .history-icon { position: relative; width: 22px; height: 22px; }
.timeline-toggle::before, .timeline-toggle::after, .history-icon::before, .history-icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 1px; background: currentColor; transform: translate(-50%, -50%); transition: transform 200ms ease; }
.timeline-toggle::after, .history-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.timeline-item.is-open .timeline-toggle::after { transform: translate(-50%, -50%) rotate(0); }
.timeline-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms ease; }
.timeline-item.is-open .timeline-panel { grid-template-rows: 1fr; }
.timeline-panel-inner { overflow: hidden; padding-left: 212px; }
.timeline-panel-inner > * { max-width: 720px; }
.timeline-panel-inner p { margin: 0 0 14px; color: var(--muted); }
.timeline-panel-inner ul { margin: 0; padding: 0 0 32px; display: flex; flex-wrap: wrap; gap: 7px; list-style: none; }
.timeline-panel-inner li { padding: 6px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--text); font-size: 0.8rem; }
.timeline-more { max-height: 0; overflow: hidden; transition: max-height 720ms cubic-bezier(.2,.75,.25,1); }
.timeline.is-expanded .timeline-more { max-height: 2400px; }
.history-toggle { width: 100%; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 22px; border: 0; color: var(--text); background: transparent; font-weight: 600; cursor: pointer; }
.history-toggle:hover { color: var(--accent); }
.timeline.is-expanded .history-icon::after { transform: translate(-50%, -50%) rotate(0); }

.contact { position: relative; min-height: 720px; display: grid; place-items: center; padding: 100px 24px; color: #10130a; background: var(--accent); overflow: hidden; isolation: isolate; }
.contact-grid { background-image: linear-gradient(rgba(16,19,10,.15) 1px, transparent 1px), linear-gradient(90deg, rgba(16,19,10,.15) 1px, transparent 1px); mask-image: radial-gradient(circle at center, black, transparent 78%); opacity: .45; }
.contact-inner { width: min(var(--max-width), 100%); }
.section-label-light { color: rgba(16, 19, 10, 0.65); }
.section-label-light span { color: #10130a; }
.section-label-light::after { background: rgba(16, 19, 10, 0.28); }
.contact-kicker { margin: 0 0 22px; font-weight: 600; }
.contact h2 { max-width: 980px; font-size: clamp(4rem, 10.5vw, 9.5rem); line-height: 0.9; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }
.button-dark { color: var(--accent); background: #10130a; }
.button-outline-dark { border-color: rgba(16, 19, 10, 0.4); color: #10130a; background: transparent; }
.button-outline-dark:hover { background: rgba(16, 19, 10, 0.08); }
.contact-footer { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-top: 84px; padding-top: 28px; border-top: 1px solid rgba(16, 19, 10, 0.28); }
.contact-footer p { max-width: 620px; margin: 0; }
.contact-footer a { font-weight: 700; text-underline-offset: 5px; }

.site-footer { max-width: var(--max-width); display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; margin: auto; padding: 30px 24px; color: var(--muted); font-size: 0.82rem; }
.site-footer p { margin: 0; }
.site-footer a { justify-self: end; color: var(--text); text-underline-offset: 4px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 200; padding: 13px 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--bg-elevated); box-shadow: 0 18px 50px rgba(0,0,0,.2); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.75,.25,1); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

@media (max-width: 920px) {
  :root { --header-height: 72px; }
  .site-header { grid-template-columns: 1fr auto; padding-inline: 20px; }
  .site-nav { position: fixed; inset: var(--header-height) 0 auto; display: grid; gap: 0; padding: 16px 20px 24px; border-bottom: 1px solid var(--line); background: var(--bg); transform: translateY(-120%); opacity: 0; visibility: hidden; transition: transform 220ms ease, opacity 220ms ease, visibility 220ms; }
  .site-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .site-nav a { padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .site-nav a::after { display: none; }
  .menu-toggle { width: 40px; height: 40px; display: grid; place-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 50%; }
  .menu-toggle span { width: 16px; height: 1px; background: currentColor; transition: transform 180ms ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }
  .header-cta { display: none; }
  .hero { min-height: 900px; padding-top: 130px; }
  .hero-content { width: 100%; }
  .hero-orbit { top: auto; right: -100px; bottom: 190px; opacity: .72; }
  .hero-meta { grid-template-columns: 1fr 1fr; gap: 22px; }
  .hero-meta div:last-child { grid-column: span 2; }
  .about-layout, .approach, .experience-heading { grid-template-columns: 1fr; gap: 46px; }
  .section-heading { display: block; }
  .section-heading .section-label { margin: 0 0 46px; }
  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-card { min-height: 320px; }
  .approach-intro { position: static; }
  .experience-summary { max-width: 640px; }
  .timeline-trigger { grid-template-columns: 140px 1fr 28px; gap: 20px; }
  .timeline-role { grid-template-columns: 1fr; gap: 3px; }
  .timeline-panel-inner { padding-left: 160px; }
}

@media (max-width: 620px) {
  .brand-name { display: none; }
  .section { padding-block: 88px; }
  .hero { min-height: 860px; padding-bottom: 28px; }
  h1 { font-size: clamp(3.1rem, 15.5vw, 5rem); }
  .eyebrow { max-width: 290px; font-size: 0.76rem; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .hero-orbit { width: 280px; right: -115px; bottom: 185px; }
  .hero-meta { grid-template-columns: 1fr 1fr; padding-top: 34px; }
  .hero-meta div { padding-right: 5px; }
  .hero-meta strong { font-size: 0.95rem; }
  .hero-meta span { font-size: 0.78rem; }
  .section-label { margin-bottom: 32px; }
  .expertise-card { min-height: 290px; }
  .timeline-trigger { grid-template-columns: 1fr 26px; gap: 14px; padding: 24px 0; }
  .timeline-date { grid-column: 1 / 2; }
  .timeline-role { grid-column: 1 / 2; }
  .timeline-toggle { grid-column: 2; grid-row: 1 / 3; }
  .timeline-panel-inner { padding-left: 0; }
  .timeline-panel-inner ul { padding-bottom: 24px; }
  .approach-steps li { grid-template-columns: 42px 1fr; }
  .contact { min-height: 680px; padding-block: 82px; }
  .contact h2 { font-size: clamp(3.7rem, 18vw, 6.3rem); }
  .contact-actions { display: grid; }
  .contact-footer { align-items: start; flex-direction: column; margin-top: 60px; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer p:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
