:root {
  --bg: #121212;
  --surface: #1e1e1f;
  --surface-soft: #202022;
  --surface-blue: #2b2b2c;
  --text: #fafafa;
  --text-soft: #d6d6d6;
  --muted: #a3a3a3;
  --line: #383838;
  --line-strong: #626266;
  --primary: #ffdb70;
  --primary-dark: #ffbb5c;
  --primary-soft: #4a3e1f;
  --accent-foreground: #1e1e1f;
  --green: #7bdc98;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --container: 1120px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: var(--primary-soft);
  color: var(--text);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 2.7vw, 2.3rem);
}

h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

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

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

button,
input,
textarea {
  font: inherit;
}

svg {
  display: block;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 96px 0;
}

.section-tinted {
  border-block: 1px solid var(--line);
  background: var(--surface-soft);
}

.site-noise,
.ambient,
.orbit {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  transform: translateY(-160%);
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--accent-foreground);
  font-weight: 700;
  transition: transform 160ms ease;
}

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

:focus-visible {
  outline: 3px solid #ffdb70;
  outline-offset: 3px;
}

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

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

.header-inner {
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 38px;
  height: 38px;
  overflow: hidden;
  place-items: center;
  border-radius: 9px;
  background: var(--primary);
  color: var(--accent-foreground);
  font-size: 0.8rem;
  letter-spacing: -0.03em;
  animation: brand-mark-intro 650ms cubic-bezier(0.2, 0.9, 0.25, 1.25);
  transition: box-shadow 220ms ease;
}

.brand-mark::after {
  position: absolute;
  inset: -30% auto -30% -60%;
  width: 40%;
  transform: skewX(-20deg);
  background: rgba(255, 255, 255, 0.55);
  content: "";
  transition: left 420ms ease;
}

.brand-name {
  position: relative;
  font-size: 0.92rem;
  animation: brand-name-intro 600ms ease-out 140ms backwards;
  transition: color 180ms ease;
}

.brand-name::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  border-radius: 999px;
  background: var(--primary);
  content: "";
  transition: transform 220ms ease;
}

.brand:is(:hover, :focus-visible) .brand-mark {
  box-shadow: 0 7px 18px rgba(255, 219, 112, 0.2);
}

.brand:is(:hover, :focus-visible) .brand-mark::after {
  left: 125%;
}

.brand:is(:hover, :focus-visible) .brand-name {
  color: var(--primary);
}

.brand:is(:hover, :focus-visible) .brand-name::after {
  transform: scaleX(1);
}

@keyframes brand-mark-intro {
  0% {
    transform: translateY(-12px) scale(0.65) rotate(-12deg);
    opacity: 0;
  }
  70% {
    transform: translateY(2px) scale(1.06) rotate(3deg);
    opacity: 1;
  }
  100% {
    transform: none;
  }
}

@keyframes brand-name-intro {
  from {
    transform: translateX(-14px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  position: relative;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 600;
  transition: color 160ms ease;
}

.site-nav a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  background: var(--primary);
  content: "";
  transition: transform 160ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.site-nav .nav-cta,
.site-nav .nav-cta.active {
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--accent-foreground);
}

.site-nav .nav-cta:hover {
  background: var(--primary-dark);
  color: var(--accent-foreground);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 22px;
  height: 2px;
  margin: 6px auto;
  background: currentColor;
  transition: transform 160ms ease;
}

/* Shared components */
.eyebrow,
.section-kicker {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-kicker {
  margin-bottom: 14px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(123, 220, 152, 0.4);
  animation: status-pulse 2.4s ease-out infinite;
}

@keyframes status-pulse {
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(123, 220, 152, 0);
  }
}

.section-heading {
  max-width: 680px;
  margin-bottom: 46px;
}

.section-heading.horizontal {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.section-heading.horizontal > p {
  max-width: 360px;
  margin-bottom: 3px;
  color: var(--muted);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 9vw;
}

.split-layout .section-heading {
  margin-bottom: 0;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button svg,
.text-link svg,
.project-link svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease;
}

.button:hover svg,
.text-link:hover svg,
.project-link:hover svg {
  transform: translateX(3px);
}

.cv-link:hover svg {
  transform: translateY(2px);
}

.button-primary {
  background: var(--primary);
  color: var(--accent-foreground);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--primary);
  background: var(--surface-soft);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 600;
}

.text-link span {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

/* Hero */
.hero {
  display: flex;
  min-height: 680px;
  align-items: center;
  padding-top: calc(var(--header-height) + 70px);
  padding-bottom: 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: 80px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero .eyebrow {
  margin-bottom: 22px;
}

.hero h1 {
  max-width: 700px;
  margin-bottom: 22px;
  font-size: clamp(2.35rem, 4vw, 3.5rem);
}

.hero h1 span {
  color: var(--primary);
}

.hero-intro {
  max-width: 650px;
  margin-bottom: 28px;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.cv-link:hover {
  color: var(--primary);
}

.hero-visual {
  position: relative;
  display: grid;
  min-height: 360px;
  place-items: center;
}

.monogram-shell {
  position: relative;
  display: grid;
  width: 285px;
  height: 280px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.monogram {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: -0.1em;
}

.monogram-cursor {
  color: var(--primary);
  font-size: 1.8rem;
  animation: cursor-blink 1.1s steps(2, jump-none) infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

.code-label {
  position: absolute;
  right: 20px;
  left: 20px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: monospace;
  font-size: 0.67rem;
}

.code-label span {
  color: var(--primary);
}

.code-label-top { top: 20px; }
.code-label-bottom { bottom: 20px; }

.tech-pill {
  position: absolute;
  z-index: 3;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  animation: pill-float 4.5s ease-in-out infinite;
}

.tech-pill-one { top: 66px; left: 0; }
.tech-pill-two { top: 150px; right: -6px; animation-delay: -1.5s; }
.tech-pill-three { bottom: 58px; left: 5px; animation-delay: -3s; }

@keyframes pill-float {
  50% {
    transform: translateY(-6px);
  }
}

/* Project preview */
.project-preview {
  padding: 58px 0 64px;
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.preview-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.preview-heading .section-kicker {
  margin-bottom: 0;
}

.preview-heading h2 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.preview-list a {
  display: flex;
  min-height: 115px;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.preview-list a:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  background: var(--surface-blue);
}

.preview-index {
  margin-bottom: 14px;
  color: var(--primary);
  font-family: monospace;
  font-size: 0.7rem;
}

.preview-list strong {
  font-family: var(--font-display);
  font-size: 0.94rem;
}

.preview-list a > span:last-child {
  color: var(--muted);
  font-size: 0.79rem;
}

/* About */
.about-copy .lead {
  margin-bottom: 20px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 500;
  line-height: 1.4;
}

.about-copy > p:not(.lead) {
  color: var(--text-soft);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.quick-facts div {
  display: flex;
  flex-direction: column;
}

.quick-facts span {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quick-facts strong {
  color: var(--text);
  font-size: 0.86rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.skill-card {
  min-height: 240px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.skill-card h3 {
  margin-top: 18px;
}

.skill-card p {
  max-width: 470px;
  color: var(--muted);
}

.skill-number {
  color: var(--primary);
  font-family: monospace;
  font-size: 0.72rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.71rem;
  line-height: 1.5;
}

/* Experience */
.experience-card {
  display: grid;
  grid-template-columns: 0.32fr 1fr;
  gap: 48px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.experience-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.experience-date {
  margin-bottom: 2px;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 600;
}

.experience-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.experience-title-row h3 {
  margin-bottom: 5px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.experience-title-row p {
  margin-bottom: 0;
  color: var(--text-soft);
}

.current-badge {
  padding: 4px 10px;
  border: 1px solid rgba(255, 219, 112, 0.35);
  border-radius: 999px;
  background: rgba(255, 219, 112, 0.08);
  color: var(--green);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.impact-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  color: var(--text-soft);
  list-style: none;
}

.impact-list li {
  position: relative;
  padding-left: 20px;
}

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

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.project-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.project-card-reverse {
  grid-template-columns: 0.95fr 1.05fr;
}

.project-card-reverse .project-art {
  order: 2;
}

.project-art {
  position: relative;
  display: grid;
  min-height: 275px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #171718;
}

.project-card-wide .project-art {
  min-height: 100%;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.project-card-reverse .project-art {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.project-art::before {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: linear-gradient(rgba(255, 219, 112, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 219, 112, 0.1) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
}

.project-art svg {
  position: relative;
  z-index: 1;
  width: 90%;
}

.art-label {
  position: absolute;
  z-index: 2;
  bottom: 15px;
  left: 16px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  background: rgba(18, 18, 18, 0.82);
  color: #ffe7a3;
  font-family: monospace;
  font-size: 0.61rem;
  letter-spacing: 0.1em;
}

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px;
}

.project-topline {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 30px;
  color: var(--muted);
  font-family: monospace;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-topline span:first-child {
  color: var(--primary);
}

.project-content h3 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.project-summary {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.55;
}

.project-content > p:not(.project-summary) {
  color: var(--muted);
}

.project-content .tag-list {
  margin-bottom: 26px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.project-link:hover {
  color: var(--primary-dark);
}

/* Education */
.education-list article {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.education-list article:first-child {
  padding-top: 0;
}

.education-list h3 {
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.education-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.education-list .education-year {
  color: var(--primary);
  font-family: monospace;
  font-size: 0.8rem;
}

/* Beyond code */
.beyond-section {
  padding-top: 16px;
}

.beyond-card {
  display: grid;
  grid-template-columns: 0.4fr 1fr;
  align-items: center;
  gap: 44px;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-blue);
}

.beyond-number {
  grid-row: 1 / 3;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: clamp(4.8rem, 10vw, 7.5rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.08em;
}

.beyond-number span {
  font-size: 0.45em;
  vertical-align: top;
}

.beyond-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
}

.beyond-copy p:last-child {
  margin-bottom: 0;
  color: var(--text-soft);
}

.beyond-caption {
  grid-column: 1;
  margin: -16px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.4;
  text-align: center;
}

/* Contact */
.contact-section {
  padding: 120px 0;
  text-align: center;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-inner h2 {
  margin-bottom: 22px;
  font-size: clamp(2rem, 3.8vw, 3rem);
}

.contact-inner > p:not(.section-kicker) {
  max-width: 600px;
  color: var(--text-soft);
  font-size: 1rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 25px 0 28px;
}

.contact-email {
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-email:hover {
  color: var(--primary);
}

/* Footer */
.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  gap: 24px;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.footer-inner nav {
  display: flex;
  gap: 22px;
}

.footer-inner nav a {
  color: var(--text-soft);
  font-size: 0.79rem;
  font-weight: 600;
}

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

/* Restrained motion */
.js .reveal {
  transform: translateY(12px);
  opacity: 0;
  transition: transform 420ms ease, opacity 420ms ease;
}

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

/* Responsive */
@media (max-width: 980px) {
  .section { padding: 82px 0; }

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

  .hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.2rem);
  }

  .monogram-shell {
    width: 240px;
    height: 250px;
  }

  .monogram { font-size: 3.8rem; }
  .preview-list { grid-template-columns: repeat(2, 1fr); }
  .split-layout { gap: 7vw; }
  .project-card-wide,
  .project-card-reverse { grid-template-columns: 1fr 1fr; }
  .beyond-card { padding: 44px; }
}

@media (max-width: 760px) {
  :root { --header-height: 64px; }

  .site-header {
    background: var(--bg);
    backdrop-filter: none;
  }

  .container {
    width: min(calc(100% - 34px), var(--container));
  }

  .section { padding: 72px 0; }
  .brand-name { display: none; }
  .nav-toggle { position: relative; z-index: 102; display: block; }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

  .site-nav {
    position: fixed;
    z-index: 101;
    inset: var(--header-height) 0 0;
    visibility: hidden;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    padding: 40px 12vw;
    transform: translateY(-8px);
    opacity: 0;
    background: var(--bg);
    transition: visibility 200ms, opacity 200ms ease, transform 200ms ease;
  }

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

  .site-nav a {
    font-family: var(--font-display);
    font-size: 1.45rem;
  }

  .site-nav .nav-cta,
  .site-nav .nav-cta.active {
    padding: 0;
    background: transparent;
    color: var(--primary);
  }

  .hero {
    min-height: 0;
    padding-top: calc(var(--header-height) + 62px);
    padding-bottom: 65px;
  }

  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2rem, 8.5vw, 2.35rem); }
  .hero-intro { font-size: 1rem; }
  .hero-visual { min-height: 310px; margin-top: 15px; }
  .monogram-shell { width: 250px; height: 245px; }
  .tech-pill-one { left: 7px; }
  .tech-pill-two { right: 3px; }

  .preview-heading,
  .section-heading.horizontal {
    display: block;
  }

  .preview-heading .section-kicker { margin-bottom: 9px; }
  .section-heading.horizontal > p { margin-top: 16px; }
  .split-layout { grid-template-columns: 1fr; gap: 38px; }
  .quick-facts { grid-template-columns: 1fr; }
  .quick-facts div { flex-direction: row; justify-content: space-between; gap: 18px; }

  .skills-grid,
  .projects-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: 0; padding: 24px; }
  .experience-card { grid-template-columns: 1fr; gap: 24px; padding: 26px; }
  .experience-meta { padding-bottom: 18px; border-bottom: 1px solid var(--line); }

  .project-card-wide,
  .project-card-reverse {
    grid-column: auto;
    display: flex;
  }

  .project-card-reverse .project-art { order: 0; }
  .project-card-wide .project-art,
  .project-card-reverse .project-art {
    min-height: 250px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .project-content { padding: 26px; }
  .project-topline { margin-bottom: 24px; }
  .beyond-section { padding-top: 8px; }
  .beyond-card { grid-template-columns: 1fr; gap: 26px; padding: 34px 26px; }
  .beyond-number { grid-row: auto; }
  .beyond-caption { grid-column: auto; margin: -14px 0 0; text-align: left; }
  .contact-section { padding: 90px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-height: 500px) and (max-width: 760px) {
  .site-nav {
    gap: 14px;
    padding-block: 16px;
  }

  .site-nav a {
    font-size: 1.15rem;
  }
}

@media (max-width: 520px) {
  .preview-list { grid-template-columns: 1fr; }
  .preview-list a { min-height: 100px; }
  .hero-actions,
  .contact-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button,
  .contact-actions .button { width: 100%; }
  .experience-title-row { flex-direction: column; }
  .education-list article { grid-template-columns: 58px 1fr; }
  .footer-inner nav { flex-wrap: wrap; justify-content: center; }
}

@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 { transform: none; opacity: 1; }
}
