/* =========================================================================
   Saúl Moreno — Portfolio
   Design system: DESIGN.md — warm editorial identity × Apple product site
   Type: serif display + system sans · Paper #F7F5EF · Terracotta #C96442
   ========================================================================= */

/* ---------------------------------------------------------------- tokens */
:root {
  /* surface */
  --canvas: #f7f5ef;
  --surface: #f1eee5;
  --surface-elevated: #fffdf9;

  /* ink */
  --ink: #141413;
  --ink-secondary: #5f5b52;
  --ink-muted: #8a857a;
  --ink-body: #4a463d;

  /* lines */
  --rule: #e3ded2;
  --rule-soft: rgba(20, 20, 19, 0.08);
  --rule-faint: rgba(20, 20, 19, 0.05);
  --rule-strong: #d6d0c2;

  /* accent */
  --accent: #c96442;
  --accent-hover: #b5543a;
  --accent-ink: #a94a2c;
  --accent-wash: rgba(201, 100, 66, 0.1);

  /* ambient texture (fused from the deployed design) */
  --grid-line: rgba(20, 20, 19, 0.05);
  --spotlight: rgba(201, 100, 66, 0.1);
  --spotlight-soft: rgba(201, 100, 66, 0.05);
  --texture:
    radial-gradient(
      600px circle at var(--mx, 50%) var(--my, 40%),
      var(--spotlight),
      var(--spotlight-soft) 40%,
      rgba(201, 100, 66, 0) 65%
    ),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  --texture-size: auto, 46px 46px, 46px 46px;
  --texture-attach: fixed, fixed, fixed;

  /* geometry */
  --radius-card: 18px;
  --radius-card-lg: 24px;
  --radius-sm: 10px;
  --radius-pill: 980px;

  /* elevation */
  --shadow-card: 0 1px 2px rgba(20, 20, 19, 0.04), 0 10px 28px rgba(20, 20, 19, 0.05);
  --shadow-card-hover: 0 2px 6px rgba(20, 20, 19, 0.05), 0 18px 40px rgba(20, 20, 19, 0.09);
  --shadow-diagram: 0 20px 60px rgba(20, 20, 19, 0.08), 0 2px 10px rgba(20, 20, 19, 0.04);

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* layout */
  --container: 1120px;
  --header-h: 60px;

  /* type */
  --font-display: "Iowan Old Style", "Charter", "Bitstream Charter", "Palatino Linotype",
    Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------- ambient (fused layer) */
/* Ported from the deployed version: one fixed texture layer (46px grid +
   pointer spotlight), recoloured to the Apple palette. Transparent sections
   let it show through; opaque surfaces paint the same layers themselves so
   the phase never breaks at a section seam. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    58% 42% at 68% 12%,
    var(--accent-wash) 0%,
    rgba(201, 100, 66, 0.03) 45%,
    rgba(201, 100, 66, 0) 100%
  );
}

.ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 25%, transparent 78%);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 40%),
    var(--spotlight),
    var(--spotlight-soft) 40%,
    rgba(201, 100, 66, 0) 65%
  );
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
p,
dl,
dd,
figure,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
  transition: color 0.2s var(--ease-soft);
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: rgba(201, 100, 66, 0.18);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  text-decoration: none;
}

.scroll-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* -------------------------------------------------------------- masthead */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(247, 245, 239, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rule-soft);
  transition: background 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
}

.site-header.is-scrolled {
  background: rgba(247, 245, 239, 0.92);
  border-bottom-color: rgba(20, 20, 19, 0.1);
}

.site-header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--ink);
}

.brand__text {
  display: grid;
  gap: 1px;
}

.brand__name {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.brand__role {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 4px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  opacity: 0.82;
  transition: opacity 0.2s var(--ease-soft), color 0.2s var(--ease-soft);
}

.nav__link:hover {
  opacity: 1;
  text-decoration: none;
}

.nav__link[aria-current="true"] {
  opacity: 1;
}

.nav__link[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}

/* mobile menu button (hidden on desktop) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle__glyph {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 100%;
  height: 100%;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease-soft);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar--1 {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar--2 {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar--3 {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  border: 0;
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* -------------------------------------------------------------- sections */
.section {
  padding: 120px 0;
}

.section--alt {
  background-color: var(--surface);
  background-image: var(--texture);
  background-size: var(--texture-size);
  background-attachment: var(--texture-attach);
}

.section__head {
  max-width: 780px;
  margin-bottom: 56px;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.55rem + 2.2vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section__lede {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--ink-secondary);
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: -0.012em;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 112px;
  background-color: var(--canvas);
  background-image: var(--texture), linear-gradient(180deg, #fbf9f3 0%, var(--canvas) 55%);
  background-size: var(--texture-size), auto;
  background-attachment: var(--texture-attach), scroll;
}

.hero__aura {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__aura span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px);
}

.hero__aura-blue {
  width: 520px;
  height: 420px;
  right: -120px;
  top: -110px;
  background: rgba(201, 100, 66, 0.3);
  animation: auraDrift 22s ease-in-out infinite alternate;
}

.hero__aura-purple {
  width: 460px;
  height: 400px;
  right: 120px;
  bottom: -190px;
  background: rgba(217, 164, 65, 0.22);
  animation: auraDrift 28s ease-in-out infinite alternate-reverse;
}

.hero__aura-pink {
  width: 360px;
  height: 320px;
  left: -150px;
  top: 30px;
  background: rgba(232, 183, 160, 0.28);
  animation: auraDrift 26s ease-in-out infinite alternate;
}

@keyframes auraDrift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(30px, -26px, 0) scale(1.08);
  }
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 64px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 2.3rem + 5.2vw, 5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__headline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  min-height: 1.5em;
  margin-top: 14px;
  color: var(--ink-secondary);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.125rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.typewriter {
  white-space: pre;
}

.caret-block {
  display: inline-block;
  margin-left: 2px;
  color: var(--accent);
  font-weight: 400;
  line-height: 1;
  animation: caretBlink 1.05s steps(1) infinite;
}

@keyframes caretBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.hero__lede {
  max-width: 56ch;
  margin-top: 22px;
  color: var(--ink-secondary);
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: -0.012em;
}

.hero__lede strong {
  color: var(--ink);
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s var(--ease-soft), color 0.2s var(--ease-soft),
    border-color 0.2s var(--ease-soft), transform 0.15s var(--ease-soft);
}

.button:hover {
  text-decoration: none;
}

.button:active {
  transform: scale(0.975);
}

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

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

.button--secondary {
  background: var(--surface-elevated);
  border-color: var(--rule);
  color: var(--ink);
}

.button--secondary:hover {
  border-color: var(--ink-muted);
}

.button__icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease);
}

.button:hover .button__icon {
  transform: translateX(3px);
}

.hero__facts {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr;
  gap: 32px;
  margin-top: 52px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.hero__fact-label {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__fact-value {
  margin-top: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.hero__fact-sub {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 400;
}

/* hero diagram card */
.hero__diagram {
  margin: 0;
  padding: 22px 22px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-card-lg);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-diagram);
}

.hero__diagram svg {
  width: 100%;
  height: auto;
}

.hero__diagram-caption {
  margin-top: 12px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.diagram__bus,
.diagram__link path {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1.5;
}

.diagram__node rect {
  fill: var(--surface-elevated);
  stroke: var(--rule);
  stroke-width: 1.25;
}

.diagram__node--primary rect {
  fill: var(--surface-elevated);
  stroke: var(--rule-strong);
}

.diagram__led {
  fill: var(--accent);
}

.diagram__label {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.diagram__meta {
  fill: var(--ink-muted);
  font-size: 11px;
  font-weight: 400;
}

.diagram__node--primary .diagram__label {
  fill: var(--ink);
}

.diagram__node--primary .diagram__meta {
  fill: var(--ink-muted);
}

.diagram__packet {
  fill: var(--accent);
}

.diagram__packet--x {
  animation: packetX 3.4s var(--ease-soft) infinite;
}

.diagram__packet--down {
  animation: packetDown 4.2s var(--ease-soft) infinite;
}

.diagram__packet--up {
  animation: packetUp 4.2s var(--ease-soft) infinite;
}

@keyframes packetX {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  46% {
    transform: translateX(42px);
    opacity: 1;
  }
  56%,
  100% {
    transform: translateX(42px);
    opacity: 0;
  }
}

@keyframes packetDown {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  48% {
    transform: translateY(208px);
    opacity: 1;
  }
  58%,
  100% {
    transform: translateY(208px);
    opacity: 0;
  }
}

@keyframes packetUp {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  48% {
    transform: translateY(-208px);
    opacity: 1;
  }
  58%,
  100% {
    transform: translateY(-208px);
    opacity: 0;
  }
}

.hero__diagram.is-paused .diagram__packet {
  animation-play-state: paused;
}

/* --------------------------------------------------------------- about */
.prose {
  max-width: 720px;
  margin-inline: auto;
}

.prose p {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.011em;
}

.prose p + p {
  margin-top: 20px;
}

.prose__lead {
  font-size: 21px !important;
  line-height: 1.5 !important;
  letter-spacing: -0.018em !important;
  color: var(--ink-secondary) !important;
}

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

.card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s var(--ease-soft), transform 0.3s var(--ease-soft),
    border-color 0.3s var(--ease-soft);
}

.project {
  display: flex;
  flex-direction: column;
  padding: 28px;
}

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

.project--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  gap: 40px;
  padding: 36px;
}


.project__body {
  min-width: 0;
}

.project__title {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.project__tagline {
  margin-top: 8px;
  color: var(--ink-secondary);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.012em;
}

.project__text {
  margin-top: 14px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.006em;
}

.project__text strong {
  color: var(--ink);
  font-weight: 600;
}

.project__aside {
  padding: 22px 0 0;
  border-top: 1px solid var(--rule-soft);
}

.project--featured .project__aside {
  padding: 22px;
  border-top: 0;
  border-radius: 18px;
  background: var(--surface);
  align-self: start;
}

.project__aside-label {
  margin: 18px 0 10px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
}

.project__aside-label:first-child {
  margin-top: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.project__aside .chips {
  margin-top: 0;
}

.chip {
  padding: 5px 11px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.004em;
  white-space: nowrap;
}

.project--featured .chip {
  background: var(--canvas);
}

.project > .chips {
  margin-top: 16px;
}

.project__stats {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.project__stats dt {
  margin-bottom: 2px;
}

.project__stats dd {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.008em;
  word-break: break-word;
}

.card-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 20px;
}

.project__links .card-link {
  margin-top: 0;
  padding-top: 0;
}

.card-link__icon {
  flex: none;
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}

.card-link:hover .card-link__icon {
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------- specs */
.specs {
  display: grid;
  border: 1px solid var(--rule);
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  margin-top: 48px;
  padding: 36px;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.specs__title {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.specs .card-link {
  margin-top: 16px;
  padding-top: 0;
}

.specs__rows {
  display: grid;
  align-content: start;
}

.specs__row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 13px 0;
  border-top: 1px solid var(--rule);
}

.specs__row:first-child {
  border-top: 0;
  padding-top: 0;
}

.specs__row dt {
  color: var(--ink-secondary);
  font-size: 14px;
}

.specs__row dd {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.006em;
}

/* ----------------------------------------------------------- experience */
.timeline {
  max-width: 900px;
  margin-inline: auto;
}

.timeline__item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}

.timeline__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dates {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.008em;
}

.timeline__org {
  margin-top: 4px;
  color: var(--ink-secondary);
  font-size: 14px;
}

.timeline__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.bullets {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.bullets li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.006em;
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-muted);
}

/* ------------------------------------------------------------ education */
.education {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 980px;
  margin-inline: auto;
}

.edu {
  padding: 32px;
}

.edu--flag {
  background: var(--ink);
  color: #fff;
}

.edu__title {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.edu__org {
  margin-top: 6px;
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 500;
}

.edu--flag .eyebrow {
  color: rgba(255, 255, 255, 0.56);
}

.edu--flag .eyebrow--accent {
  color: #f0b8a0;
}

.edu--flag .edu__org {
  color: rgba(255, 255, 255, 0.62);
}

.edu__text {
  margin-top: 14px;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.6;
}

.edu--flag .edu__text {
  color: rgba(255, 255, 255, 0.78);
}

.edu--flag .card-link {
  color: #f0b8a0;
}

.edu--flag {
  position: relative;
  overflow: hidden;
  border-color: transparent;
}

.edu--flag::before {
  content: "";
  position: absolute;
  top: -130px;
  right: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 100, 66, 0.5), transparent 65%);
  filter: blur(24px);
  pointer-events: none;
}

.edu--flag > * {
  position: relative;
}

/* -------------------------------------------------------------- skills */
.skills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.skill-group {
  padding: 28px;
}

.skill-group__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule-soft);
}

.skill-group__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.012em;
}

.icon-well {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.icon-well svg {
  width: 20px;
  height: 20px;
}

.icon-well--lg {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.skills .skill-group:nth-child(1) .icon-well {
  background: rgba(201, 100, 66, 0.12);
  color: var(--accent-ink);
}

.skills .skill-group:nth-child(2) .icon-well {
  background: rgba(185, 138, 60, 0.14);
  color: #8a6420;
}

.skills .skill-group:nth-child(3) .icon-well {
  background: rgba(107, 125, 79, 0.14);
  color: #5f7044;
}

.skills__list {
  margin-top: 6px;
}

.skills__list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-faint);
  color: var(--ink-body);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.004em;
}

.skills__list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.skills__issuer {
  display: inline-block;
  margin-left: 6px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

/* ------------------------------------------------------------- contact */
.contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 980px;
  margin-inline: auto;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 24px;
  color: var(--ink);
}

.contact-link:hover {
  text-decoration: none;
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.contact-link__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contact-link__meta .eyebrow {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.contact-link__value {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.012em;
  word-break: break-word;
}

/* -------------------------------------------------------------- footer */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 40px;
  align-items: start;
}

.site-footer__name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.site-footer__role {
  margin-top: 3px;
}

.site-footer__list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer__list a {
  color: var(--ink-secondary);
}

.site-footer__list a:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-footer__legal {
  white-space: nowrap;
}

/* --------------------------------------------------------- scroll reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* --------------------------------------------------------- breakpoints */
@media (max-width: 1023px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__diagram {
    max-width: 560px;
  }

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

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

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

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px 24px 20px;
    background: rgba(247, 245, 239, 0.98);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--rule);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease),
      visibility 0.28s;
  }

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

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__link {
    display: block;
    padding: 13px 0;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 17px;
    font-weight: 400;
  }

  .nav__link[aria-current="true"]::after {
    display: none;
  }

  .site-header__inner {
    gap: 12px;
  }

  .section {
    padding: 88px 0;
  }

  .project--featured {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project--featured .project__aside {
    padding: 22px;
  }

  .timeline__item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .education,
  .skills {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .contact {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .site-footer__legal {
    white-space: normal;
  }

  .specs {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px;
  }
}

@media (max-width: 639px) {
  :root {
    --texture-size: auto, 64px 64px, 64px 64px;
  }

  .ambient::before {
    background-size: 64px 64px;
  }

  .container {
    padding-inline: 20px;
  }

  .section {
    padding: 72px 0;
  }

  .section__head {
    margin-bottom: 36px;
  }

  .section__lede {
    font-size: 17px;
  }

  .hero {
    padding: 56px 0 72px;
  }

  .hero__name {
    font-size: clamp(2.75rem, 2.1rem + 8vw, 3.75rem);
  }

  .hero__headline {
    font-size: 19px;
  }

  .hero__lede {
    font-size: 17px;
  }

  .hero__facts {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 36px;
  }

  .hero__fact {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule-faint);
  }

  .hero__fact:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .hero__fact-value {
    margin-top: 4px;
  }

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

  .project,
  .project--featured {
    padding: 24px;
  }

  .project__title {
    font-size: 24px;
  }

  .edu {
    padding: 26px;
  }

  .skill-group {
    padding: 24px;
  }

  .button {
    flex: 1 1 auto;
    padding: 12px 20px;
    font-size: 16px;
  }

  .hero__diagram {
    padding: 16px 14px 12px;
    border-radius: var(--radius-card);
  }

  .specs__row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 12px 0;
  }

  .hero__aura span {
    filter: blur(60px);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal] {
    transform: none;
  }

  .caret-block {
    animation: none;
  }

  .diagram__packet {
    animation: none;
    opacity: 0;
  }

  .hero__aura span {
    animation: none;
  }
}
