:root {
  --accent: #ff5c1f;
  --bg: #fdf6f0;
  --ink: #1a1024;
  --muted: #6b5a70;
  --faint: #a292a8;
  --line: rgba(255, 92, 31, 0.15);
  --line-strong: rgba(255, 92, 31, 0.25);
  --wash: rgba(255, 92, 31, 0.05);
  --pad-x: 48px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Archivo', sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: #fff; }

.accent { color: var(--accent); }

section { scroll-margin-top: 72px; }

@keyframes orbit  { from { transform: rotate(0deg); }   to { transform: rotate(360deg); } }
@keyframes orbitR { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes rise   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ticker { from { transform: translateX(0); }  to { transform: translateX(-50%); } }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
  background: rgba(253, 246, 240, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 92, 31, 0.18);
}

.nav-logo {
  font-weight: 800;
  font-size: 20px;
  font-stretch: 125%;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
}

.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--accent); }

.nav-clock {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
  flex: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin: -10px -10px -10px 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px var(--pad-x) 0;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-copy { animation: rise 0.8s ease both; }

.kicker {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(64px, 9vw, 128px);
  line-height: 0.95;
  font-weight: 850;
  font-stretch: 125%;
  letter-spacing: -0.03em;
}

.hero-copy p {
  max-width: 480px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
  margin: 32px 0 40px;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 2px;
}

.btn-solid { background: var(--accent); color: #fff; font-weight: 700; }
.btn-solid:hover { filter: brightness(1.1); color: #fff; }

.btn-ghost { border: 1px solid rgba(255, 92, 31, 0.4); font-weight: 600; color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-portrait {
  display: flex;
  justify-content: center;
  animation: rise 0.8s 0.2s ease both;
}

.orbit-wrap { position: relative; width: 340px; height: 340px; }

.orbit { position: absolute; }
.orbit-1 { inset: 0; animation: orbit 24s linear infinite; }
.orbit-2 { inset: 30px; width: 280px; height: 280px; animation: orbitR 16s linear infinite; }
.orbit-3 { inset: 65px; width: 210px; height: 210px; animation: orbit 10s linear infinite; }

.portrait-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-center picture { display: contents; }

.portrait-center img {
  width: 77%;
  height: 77%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 63% 10%;
  box-shadow: 0 16px 44px rgba(255, 92, 31, 0.25);
}

.ticker-band {
  margin-top: 80px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.ticker {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: ticker 28s linear infinite;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--faint);
  white-space: nowrap;
}

/* ---------- Sections ---------- */

.section {
  padding: 140px var(--pad-x);
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

.section-flow { padding-top: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 92, 31, 0.35);
  border-radius: 999px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 24px;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.h2-xl {
  margin: 0 0 40px;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.h2-md {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0 0 48px;
  max-width: 480px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-lede {
  margin: 0;
  font-size: 20px;
  line-height: 1.7;
  color: var(--muted);
}

.fact-list { display: flex; flex-direction: column; gap: 12px; }

.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 92, 31, 0.2);
  background: var(--wash);
}

.fact-key {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--faint);
}

.fact-val {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

/* ---------- Projects ---------- */

.project-list { display: flex; flex-direction: column; }

.project {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 24px 20px;
  border-top: 1px solid var(--line);
}

.project:hover { background: var(--wash); }

.project-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-icon img {
  width: 62%;
  height: 62%;
  object-fit: contain;
  border-radius: 6px;
}

/* the monogram is the fallback: hidden while the icon <img> is present */
.badge-icon img ~ span { display: none; }

.project-badge span {
  font-size: 18px;
  font-weight: 850;
  font-stretch: 125%;
  color: rgba(255, 255, 255, 0.95);
}

.project-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.project-name { font-size: 19px; font-weight: 750; }

.project-tag {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--accent);
}

.project-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 6px;
}

.project-context {
  font-family: 'Space Mono', monospace;
  font-style: italic;
  font-size: 13px;
  line-height: 1.6;
  color: var(--faint);
  margin-top: 6px;
}

.project-links { display: flex; gap: 10px; }

.project-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 92, 31, 0.3);
  color: var(--muted);
}

.project-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 92, 31, 0.08);
}

.project-links svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Track record ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  margin-top: 36px;
}

.stat {
  background: var(--bg);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat:hover { background: rgba(255, 92, 31, 0.08); }

.stat-num {
  font-size: 48px;
  font-weight: 850;
  font-stretch: 125%;
  color: var(--accent);
}

.stat-label { font-size: 16px; font-weight: 700; }

.stat-sub {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.5;
}

/* ---------- Journey ---------- */

.job-list { display: flex; flex-direction: column; margin-top: 36px; }

.job {
  display: grid;
  grid-template-columns: 180px 1fr 1.3fr;
  gap: 32px;
  padding: 28px 20px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.job:hover { background: var(--wash); }

.job-years {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--accent);
}

.job-role { font-size: 19px; font-weight: 700; }

.job-co {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--faint);
  margin-top: 4px;
}

.job-note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Contact ---------- */

.contact { padding-top: 0; padding-bottom: 120px; }

.h2-contact {
  margin: 0 0 24px;
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 850;
  font-stretch: 125%;
  letter-spacing: -0.03em;
  line-height: 1;
}

.contact-sub {
  max-width: 440px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 40px;
}

.contact-links { display: flex; gap: 16px; flex-wrap: wrap; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  border: 1px solid rgba(255, 92, 31, 0.3);
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--ink);
}

.contact-link:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px var(--pad-x);
  border-top: 1px solid var(--line);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--faint);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  :root { --pad-x: 32px; }

  .hero { padding-top: 120px; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* portrait above the name on small screens */
  .hero-portrait { order: -1; }

  .orbit-wrap {
    width: min(280px, 72vw);
    height: min(280px, 72vw);
  }

  .orbit-2 { inset: 9%; width: 82%; height: 82%; }
  .orbit-3 { inset: 19%; width: 62%; height: 62%; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  .section { padding-top: 96px; padding-bottom: 96px; }
  .section-flow { padding-top: 0; }
  .contact { padding-top: 0; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 61px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(253, 246, 240, 0.97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 92, 31, 0.18);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .nav-open .nav-links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    padding: 16px var(--pad-x);
    border-top: 1px solid var(--line);
    font-size: 15px;
  }

  .nav-clock { margin-left: auto; margin-right: 16px; }
}

@media (max-width: 640px) {
  :root { --pad-x: 20px; }

  .hero { padding-top: 104px; }

  .hero h1 { font-size: clamp(56px, 17vw, 80px); }
  .hero-copy p { font-size: 17px; margin: 24px 0 32px; }

  .hero-ctas .btn {
    flex: 1 1 auto;
    text-align: center;
    box-sizing: border-box;
  }

  .ticker-band { margin-top: 56px; }

  .h2-xl { font-size: clamp(34px, 9.5vw, 44px); }
  .h2-md { font-size: clamp(26px, 7.5vw, 32px); }
  .h2-contact { font-size: clamp(42px, 13vw, 60px); }

  .about-lede { font-size: 17px; }

  .project {
    grid-template-columns: 48px 1fr;
    gap: 16px;
    padding: 20px 12px;
    align-items: start;
  }

  .project-badge { width: 48px; height: 48px; border-radius: 12px; }
  .project-badge span { font-size: 15px; }

  .project-links {
    grid-column: 2;
    margin-top: 4px;
  }

  .stat-grid { grid-template-columns: 1fr; }
  .stat { padding: 28px 22px; }
  .stat-num { font-size: 40px; }

  .job {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 12px;
  }

  .job-note { margin-top: 4px; }

  .contact-links { flex-direction: column; align-items: stretch; }
  .contact-link { justify-content: flex-start; box-sizing: border-box; }

  .footer { padding-top: 22px; padding-bottom: 22px; }
}

@media (max-width: 560px) {
  .nav-clock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .orbit-1, .orbit-2, .orbit-3, .ticker {
    animation: none;
  }

  .hero-copy, .hero-portrait {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
