/* ==========================================================================
   Tony Rose Ilagan — Portfolio
   Editorial, warm, professional. Light + dark modes.
   ========================================================================== */

:root {
  --bg: #fbf7f3;
  --bg-alt: #f4ece4;
  --surface: #ffffff;
  --ink: #1d1513;
  --ink-soft: #4a3d39;
  --ink-muted: #6b5c55;
  --line: #e8ddd3;

  --accent: #c44b5a;
  --accent-deep: #9a2e3b;
  --accent-text: #8a2531;
  --accent-soft: #f6d5d2;
  --accent-glow: rgba(196, 75, 90, 0.15);
  --on-accent: #ffffff;
  --status-online: #1f9d65;
  --status-online-glow: rgba(31, 157, 101, 0.22);

  --panel-dark-bg: #1d1513;
  --panel-dark-text: #ffffff;
  --panel-dark-muted: rgba(255, 255, 255, 0.72);
  --panel-dark-subtle: rgba(255, 255, 255, 0.55);
  --panel-eyebrow: #f6d5d2;

  --btn-primary-bg: #1d1513;
  --btn-primary-text: #ffffff;
  --btn-primary-shadow: rgba(29, 21, 19, 0.4);

  --feature-card-bg: linear-gradient(135deg, #ffffff 0%, #fff9f7 100%);
  --nav-scrolled-bg: rgba(251, 247, 243, 0.85);

  --hero-blob-1: #c44b5a;
  --hero-blob-2: #e8a5a0;
  --hero-blob-opacity-1: 0.6;
  --hero-blob-opacity-2: 0.5;
  --grain-opacity: 0.5;
  --grain-blend: multiply;

  --chip-tools-bg: #fbf7f3;
  --highlight-bg: #f6d5d2;
  --highlight-text: #9a2e3b;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px rgba(29, 21, 19, 0.04), 0 2px 8px rgba(29, 21, 19, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(29, 21, 19, 0.15);
  --shadow-lg: 0 25px 60px -20px rgba(29, 21, 19, 0.25);

  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --serif: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #14100f;
  --bg-alt: #1c1715;
  --surface: #211c1a;
  --ink: #f4ebe3;
  --ink-soft: #c2b5ad;
  --ink-muted: #968881;
  --line: #2d2623;

  --accent: #e67380;
  --accent-deep: #c44b5a;
  --accent-text: #f0a9b1;
  --accent-soft: #5a3a3e;
  --accent-glow: rgba(230, 115, 128, 0.28);
  --on-accent: #1d1513;
  --status-online: #4dd49a;
  --status-online-glow: rgba(77, 212, 154, 0.28);

  --panel-dark-bg: #0c0908;
  --panel-dark-text: #f4ebe3;
  --panel-dark-muted: rgba(244, 235, 227, 0.72);
  --panel-dark-subtle: rgba(244, 235, 227, 0.5);
  --panel-eyebrow: #e67380;

  --btn-primary-bg: #f4ebe3;
  --btn-primary-text: #1d1513;
  --btn-primary-shadow: rgba(0, 0, 0, 0.5);

  --feature-card-bg: linear-gradient(135deg, #241e1c 0%, #2c2320 100%);
  --nav-scrolled-bg: rgba(20, 16, 15, 0.88);

  --hero-blob-1: #c44b5a;
  --hero-blob-2: #6b2a31;
  --hero-blob-opacity-1: 0.45;
  --hero-blob-opacity-2: 0.55;
  --grain-opacity: 0;
  --grain-blend: screen;

  --chip-tools-bg: #1c1715;
  --highlight-bg: rgba(230, 115, 128, 0.16);
  --highlight-text: #f0a9b1;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 25px 60px -20px rgba(0, 0, 0, 0.65);

  color-scheme: dark;
}

/* Metric-matched fallback fonts to minimise CLS while web fonts load.
   Values approximated against Fraunces opsz 14 + Inter — close enough that
   the swap is visually subtle. */
@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia");
  size-adjust: 104%;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Helvetica Neue"), local("Arial");
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.skip-link {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 16px;
  padding: 10px 16px;
  background: var(--panel-dark-bg);
  color: var(--panel-dark-text);
  border-radius: 8px;
  z-index: 100;
  transform: translateY(calc(-100% - 24px));
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

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

/* -----------------------------  NAV  ------------------------------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: 20px;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}
.nav--scrolled {
  background: var(--nav-scrolled-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: 14px;
}

.nav__inner {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.nav__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.4s var(--ease);
}
.nav__logo:hover .nav__mark {
  animation: bloom 0.8s var(--ease);
}
@keyframes bloom {
  0% { transform: scale(1) rotate(0); }
  40% { transform: scale(1.18) rotate(-8deg); }
  100% { transform: scale(1) rotate(0); }
}
.nav__name { color: var(--ink); }

.nav__links {
  display: flex;
  gap: 32px;
}
.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after,
.nav__links a:focus-visible::after { transform: scaleX(1); }
.nav__links a:focus-visible {
  color: var(--ink);
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 4px;
}

.nav__theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.5s var(--ease);
}
.nav__theme:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface);
  transform: rotate(-18deg);
}
.nav__theme:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.nav__theme-icon {
  width: 16px;
  height: 16px;
}
[data-theme="light"] .nav__theme-icon--sun { display: none; }
[data-theme="dark"] .nav__theme-icon--moon { display: none; }

.nav__cta {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav__cta:hover { background: var(--accent); color: var(--on-accent); }
.nav__cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav__toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.nav__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--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 {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}

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

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
  transform: translateZ(0);
}
.hero__blob--1 {
  width: 560px; height: 560px;
  top: -150px; right: -160px;
  background: radial-gradient(circle, var(--hero-blob-1) 0%, transparent 65%);
  opacity: var(--hero-blob-opacity-1);
}
.hero__blob--2 {
  width: 460px; height: 460px;
  bottom: -130px; left: -120px;
  background: radial-gradient(circle, var(--hero-blob-2) 0%, transparent 65%);
  opacity: var(--hero-blob-opacity-2);
}
.hero__grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--status-online);
  box-shadow: 0 0 0 4px var(--status-online-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--status-online-glow); }
  50% { box-shadow: 0 0 0 9px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .dot {
    animation: none;
    box-shadow: 0 0 0 6px var(--status-online-glow);
  }
}

.hero__title {
  font-size: clamp(2.8rem, 7.2vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0 0 28px;
  max-width: 15ch;
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.hero__lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 40px;
  line-height: 1.55;
}
.hero__lead strong {
  font-weight: 600;
  color: var(--ink);
}
.hero__lead-alias {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9em;
  color: var(--ink-muted);
  margin-left: 2px;
  letter-spacing: -0.005em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 68px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  cursor: pointer;
  border: 0;
}
.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: 0 10px 24px -10px var(--btn-primary-shadow);
}
.btn--primary:hover {
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px var(--accent-glow), 0 10px 24px -10px var(--btn-primary-shadow);
}
.btn--primary svg { transition: transform 0.25s var(--ease); }
.btn--primary:hover svg { transform: translateX(3px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--btn-primary-text);
  transform: translateY(-2px);
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--line);
  max-width: 720px;
}
.hero__stats div { margin: 0; }
.hero__stats dt {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 6px;
}
.hero__stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero__stats dd span {
  color: var(--accent);
  margin-left: 2px;
}
.hero__stats dd .tiny {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
}

.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.hero__scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 4px;
}
.hero__scroll svg { animation: bounce 2s ease-in-out infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* -----------------------------  SECTIONS  -------------------------------- */

.section {
  padding: 110px 0;
  position: relative;
  transition: background-color 0.4s var(--ease);
}
.section--alt {
  background: var(--bg-alt);
}
.section--contact {
  padding-bottom: 130px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-text);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 16px;
}

.section__heading h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
.section__heading--center {
  text-align: center;
  margin: 0 auto 64px;
}
.section__heading--center h2 {
  max-width: 22ch;
  margin-inline: auto;
}

.section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 80px;
  align-items: start;
}

.section__body p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}
.section__body .lead {
  font-size: 20px;
  color: var(--ink);
  font-weight: 400;
}

.chips {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease), background-color 0.4s var(--ease);
}
.chips li:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* -----------------------------  TIMELINE  -------------------------------- */

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  max-width: 860px;
  margin-inline: auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(to bottom, var(--line), var(--accent-soft), var(--line));
}

.timeline__item {
  position: relative;
  padding: 0 0 36px 56px;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__marker {
  position: absolute;
  left: 5px;
  top: 28px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.4s var(--ease);
}
.timeline__item:hover .timeline__marker {
  background: var(--accent);
  transform: scale(1.1);
}

.timeline__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.4s var(--ease);
}
.timeline__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}

.timeline__card--feature {
  border-color: var(--accent-soft);
  background: var(--feature-card-bg);
}

.timeline__card header { margin-bottom: 14px; }
.timeline__date {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.timeline__card h3 {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
}
.timeline__company {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
  font-style: italic;
}

.timeline__card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline__card ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.timeline__card ul li:last-child { margin-bottom: 0; }
.timeline__card ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.highlights {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.highlight {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--highlight-bg);
  color: var(--highlight-text);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

/* -----------------------------  SKILLS  ---------------------------------- */

.skills {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px;
  margin-bottom: 48px;
}

.skills__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  transition: box-shadow 0.3s var(--ease), background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.skills__card:hover { box-shadow: var(--shadow-md); }

.skills__card h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.skills__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.skills__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
}
.skills__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.skills__bullet {
  color: var(--accent);
  font-size: 10px;
  margin-top: 7px;
}

.tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.tools__group {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: start;
}
.tools__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 6px 0 0;
}
.tools__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tools__chips span {
  padding: 6px 12px;
  background: var(--chip-tools-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.4s var(--ease);
}
.tools__chips span:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.education {
  background: var(--panel-dark-bg);
  color: var(--panel-dark-text);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  align-items: center;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.education__label .eyebrow { color: var(--panel-eyebrow); margin: 0; }
.education h3 {
  color: var(--panel-dark-text);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 4px;
}
.education p {
  margin: 0;
  color: var(--panel-dark-muted);
  font-style: italic;
}

/* -----------------------------  CONTACT  --------------------------------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.contact__copy h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 400;
  margin-bottom: 20px;
  max-width: 15ch;
}
.contact__copy .lead {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0;
}

.contact__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.contact__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 12px;
  border-radius: var(--radius-md);
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.contact__tile--static { cursor: default; }

.contact__tile:not(.contact__tile--static):hover,
.contact__tile:not(.contact__tile--static):focus-visible {
  background: var(--bg-alt);
  transform: translateY(-3px);
  outline: none;
}
.contact__tile:not(.contact__tile--static):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.contact__tile:not(.contact__tile--static):hover .contact__tile-icon,
.contact__tile:not(.contact__tile--static):focus-visible .contact__tile-icon {
  color: var(--accent);
  transform: scale(1.08);
}
.contact__tile:not(.contact__tile--static):hover .contact__tile-label,
.contact__tile:not(.contact__tile--static):focus-visible .contact__tile-label {
  color: var(--accent);
}

.contact__tile-icon {
  width: 34px;
  height: 34px;
  color: var(--ink-muted);
  transition: color 0.25s var(--ease), transform 0.3s var(--ease);
}
.contact__tile--static .contact__tile-icon { color: var(--accent); }

.contact__tile-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.25s var(--ease);
}

/* -----------------------------  FOOTER  ---------------------------------- */

.footer {
  padding: 40px 0;
  background: var(--panel-dark-bg);
  color: var(--panel-dark-muted);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__name {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--panel-dark-text);
  margin: 0 0 2px;
  font-size: 16px;
}
.footer__tag {
  font-size: 13px;
  color: var(--panel-dark-subtle);
  margin: 0;
}
.footer__copy {
  font-size: 13px;
  margin: 0;
}

/* -----------------------------  REVEAL ANIM  ----------------------------- */

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

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

/* -----------------------------  RESPONSIVE  ------------------------------ */

@media (max-width: 960px) {
  .section { padding: 80px 0; }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    width: min(78vw, 320px);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 100px 32px 40px;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease), background-color 0.4s var(--ease);
    box-shadow: var(--shadow-lg);
    z-index: 60;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav--open .nav__links { transform: translateX(0); }
  .nav__links a {
    font-size: 24px;
    font-family: var(--serif);
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    flex: 0 0 auto;
  }
  .nav__links a::after { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; z-index: 62; }

  /* Backdrop scrim — only visible when the drawer is open. */
  .nav::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 15, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
    z-index: 55;
    pointer-events: none;
  }
  .nav--open::before {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0s;
  }

  .hero { padding: 120px 0 60px; }
  .hero__stats {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .section__heading h2 { max-width: none; }

  .skills { grid-template-columns: 1fr; }
  .skills__card { padding: 28px; }

  .tools__group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .education {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 28px;
  }

  .timeline__card { padding: 24px; }
  .timeline__item { padding-left: 44px; }

  .contact {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact__card { padding: 12px; }
  .contact__tile { padding: 24px 8px; gap: 10px; }
  .contact__tile-icon { width: 28px; height: 28px; }
}

@media (max-width: 520px) {
  .hero__actions .btn { width: 100%; justify-content: center; }
  .timeline__card h3 { font-size: 1.15rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .nav__theme { width: 34px; height: 34px; }
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}
