:root {
  --bg: #f7f4ee;
  --bg-alt: #efe9db;
  --surface: #ffffff;
  --border: rgba(28, 27, 25, 0.1);
  --border-strong: rgba(28, 27, 25, 0.2);
  --text: #1c1b19;
  --text-dim: #4a473e;
  --text-faint: #6b6658;
  --accent: #1f5f44;
  --accent-dim: #163f2e;
  --accent-wash: rgba(31, 95, 68, 0.08);
  --on-accent: #f7f4ee;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --wrap: min(1100px, 100% - 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(31, 95, 68, 0.06), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(255, 255, 255, 0.7), transparent 55%);
  background-repeat: no-repeat;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

section {
  padding: clamp(4rem, 10vw, 8rem) 0;
  position: relative;
  scroll-margin-top: 1.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

/* ---------- scroll progress ---------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: border-color 0.4s var(--ease), padding 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  transition: background-color 0.4s var(--ease);
  pointer-events: none;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  padding: 0.85rem 0;
}

.site-header.is-scrolled::before {
  background: rgba(247, 244, 238, 0.8);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 101;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.main-nav a {
  color: var(--text-dim);
  transition: color 0.25s;
  position: relative;
}

.main-nav a:hover {
  color: var(--text);
}

.nav-contact-email,
.nav-contact-phone {
  display: none;
}

.nav-cta {
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: border-color 0.25s, background-color 0.25s;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding-block: 0.5rem;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

body.nav-open {
  overflow: hidden;
}

/* ---------- hero ---------- */

.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 2rem;
}

.hero-inner {
  padding-top: 2rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(31, 95, 68, 0.5);
  animation: pulse 2.4s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 95, 68, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(31, 95, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 95, 68, 0); }
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--text-dim);
  margin-bottom: 1.75rem;
}

.hero-role .divider {
  color: var(--accent);
  margin: 0 0.35em;
}

.hero-scramble {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3.4vw, 2.25rem);
  margin-bottom: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5ch;
}

.hero-scramble-prefix {
  color: var(--text-faint);
}

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

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s var(--ease), background-color 0.3s, border-color 0.3s, color 0.3s;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 50px;
  background: var(--border-strong);
  overflow: hidden;
}

.hero-scroll-cue span {
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent);
  animation: scrollcue 2s infinite;
}

@keyframes scrollcue {
  0% { top: -50%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* ---------- profile ---------- */

.profile-statement {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.4;
  max-width: 46ch;
  color: var(--text-dim);
  font-weight: 500;
}

.profile-statement strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- expertise ---------- */

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.expertise-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

.expertise-card:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.expertise-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.expertise-tags {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ---------- experience timeline ---------- */

.timeline {
  border-top: 1px solid var(--border);
}

.timeline-item {
  border-bottom: 1px solid var(--border);
}

.timeline-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0;
  text-align: left;
}

.timeline-org {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.timeline-loc {
  color: var(--text-faint);
  font-weight: 400;
  font-size: 1rem;
}

.timeline-title {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.timeline-dates {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.timeline-chevron {
  font-size: 1.1rem;
  color: var(--accent);
  transition: transform 0.35s var(--ease);
  display: inline-block;
}

.timeline-item.is-open .timeline-chevron {
  transform: rotate(135deg);
}

.timeline-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}

.timeline-item.is-open .timeline-body {
  grid-template-rows: 1fr;
}

.timeline-body-inner {
  overflow: hidden;
}

.timeline-list {
  padding-bottom: 2rem;
  max-width: 68ch;
}

.timeline-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.9rem;
  color: var(--text-dim);
  font-size: 0.98rem;
}

.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent-dim);
  border-radius: 50%;
}

.timeline-list strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- highlight cards ---------- */

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.highlight-subhead {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.highlight-card {
  border: 1px solid rgba(31, 95, 68, 0.3);
  background: linear-gradient(160deg, rgba(31, 95, 68, 0.06), transparent 60%);
  border-radius: 14px;
  padding: 1.75rem;
}

.highlight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.highlight-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.highlight-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--on-accent);
  background: var(--accent);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 500;
}

.highlight-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.highlight-body {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}

.highlight-card--recognition {
  border-color: rgba(156, 107, 31, 0.35);
  background: linear-gradient(160deg, rgba(156, 107, 31, 0.09), transparent 60%);
}

.highlight-card--recognition .highlight-tag {
  color: #9c6b1f;
}

/* ---------- education ---------- */

.edu-main {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.edu-org, .edu-dates {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 1rem;
}

.edu-dates {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.cert-list {
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}

.cert-entry {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.cert-entry-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 1rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
}

/* ---------- contact ---------- */

.contact {
  text-align: left;
}

.contact-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.contact-link {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  width: fit-content;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 0.2rem;
  transition: color 0.25s, border-color 0.25s;
}

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

.contact-link-secondary {
  font-size: 1rem;
  color: var(--text-dim);
}

/* ---------- work / portfolio page ---------- */

.work-hero {
  padding-bottom: 3rem;
}

.work-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 14ch;
}

.work-lede {
  color: var(--text-dim);
  max-width: 52ch;
  font-size: 1.05rem;
}

.work-list {
  padding-top: 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

.work-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.work-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.work-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  overflow: hidden;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.6s var(--ease);
}

.work-card:hover .work-thumb img {
  transform: scale(1.05);
}

.work-info {
  padding: 1.5rem;
}

.work-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.work-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.work-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

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

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

.footer-inner a {
  transition: color 0.25s;
}

.footer-inner a:hover {
  color: var(--accent);
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: var(--bg-alt);
    padding: 2rem var(--wrap-pad, 1.5rem);
    gap: 1.75rem;
    font-size: 1.15rem;
    transform: translateX(100%);
    pointer-events: none;
    transition: transform 0.4s var(--ease);
    z-index: 90;
  }

  .main-nav.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 100;
  }

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

  .nav-cta {
    display: none;
  }

  .main-nav .nav-contact-email,
  .main-nav .nav-contact-phone {
    display: block;
    position: absolute;
    bottom: 2rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-dim);
  }

  .main-nav .nav-contact-email {
    left: 1.5rem;
  }

  .main-nav .nav-contact-phone {
    right: 1.5rem;
  }

  .timeline-body-inner {
    margin: 0 -1.5rem;
  }

  .timeline-list,
  .highlight-subhead {
    padding-inline: 1.5rem;
  }

  .highlight-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1.5rem;
    gap: 1rem;
    padding-inline: 1.5rem;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    scrollbar-width: none;
  }

  .highlight-grid::-webkit-scrollbar {
    display: none;
  }

  .highlight-card {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }

  .timeline-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .timeline-meta {
    flex-direction: row-reverse;
    justify-content: flex-end;
    width: 100%;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- reduced motion ---------- */

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .status-dot,
  .hero-scroll-cue span {
    animation: none;
  }

  .btn-primary:hover,
  .btn-ghost:hover,
  .venture-card:hover {
    transform: none;
  }
}
