/* ================================================================
   THARAA QAID — PORTFOLIO
   Warm editorial design system
   All fonts are local system stacks; no external resources.
   ================================================================ */

/* ---------- Design tokens ---------- */
:root {
  --cream: #f7f3ea;
  --cream-deep: #efe7d8;
  --paper: #fdfbf6;
  --sand: #e7dbc8;
  --sand-deep: #d8c7ad;
  --espresso: #2d211b;
  --espresso-soft: #514136;
  --muted: #7c6c5e;
  --line: rgba(45, 33, 27, 0.13);
  --terracotta: #b85c3c;
  --terracotta-deep: #95472e;
  --terracotta-soft: #e8c7b6;
  --olive: #78805f;
  --gold: #c8a264;

  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --font-body: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 18px;
  --shadow-soft: 0 24px 60px rgba(64, 42, 28, 0.09);
  --shadow-lift: 0 30px 70px rgba(64, 42, 28, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open,
body.modal-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, dl, dd, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

::selection { background: var(--terracotta); color: var(--paper); }

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

/* Soft paper grain, made entirely in CSS */
.page-grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.32;
  background-image: radial-gradient(rgba(80, 55, 35, 0.11) 0.6px, transparent 0.6px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}

/* ---------- Utilities ---------- */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 300;
  padding: 0.75rem 1.25rem;
  background: var(--espresso);
  color: var(--paper);
  border-radius: 0 0 10px 10px;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
  color: var(--terracotta-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}
.eyebrow__line { width: 34px; height: 1px; background: currentColor; }
.eyebrow__index {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--terracotta-soft);
  border-radius: 50%;
  font-size: 0.65rem;
  letter-spacing: 0;
}

.section { padding: clamp(5.5rem, 11vw, 9rem) 0; position: relative; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.2vw, 4.35rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 16ch;
}
.section-title em {
  font-style: italic;
  color: var(--terracotta);
}
.section-intro {
  max-width: 38ch;
  color: var(--muted);
  font-size: 1.02rem;
}
.section-head { margin-bottom: clamp(2.75rem, 5vw, 4.25rem); }
.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
}
.section-head--split .section-intro { padding-bottom: 0.4rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 50px;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
              color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn span { transition: transform 0.35s var(--ease); font-size: 1.05rem; }
.btn:hover span { transform: translate(3px, -3px); }
.btn--primary { background: var(--espresso); color: var(--paper); box-shadow: 0 10px 24px rgba(45, 33, 27, 0.18); }
.btn--primary:hover { background: var(--terracotta); transform: translateY(-3px); box-shadow: 0 16px 30px rgba(184, 92, 60, 0.28); }
.btn--ghost { border-color: var(--line); color: var(--espresso); background: rgba(253, 251, 246, 0.5); }
.btn--ghost:hover { border-color: var(--espresso); background: var(--paper); transform: translateY(-3px); }

/* Reveal animation — only hides content when JavaScript is active */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(247, 243, 234, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(64, 42, 28, 0.05);
}
.site-header__inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.8rem; flex-shrink: 0; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--espresso);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.5s var(--ease);
}
.brand:hover .brand__mark { background: var(--terracotta); border-color: var(--terracotta); color: var(--paper); transform: rotate(-12deg); }
.brand__text { display: grid; line-height: 1.25; }
.brand__text strong { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; letter-spacing: -0.02em; }
.brand__text small { color: var(--muted); font-size: 0.65rem; letter-spacing: 0.11em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.1rem); }
.nav__link {
  position: relative;
  padding: 0.4rem 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--espresso-soft);
  transition: color 0.3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--terracotta-deep); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 100px;
  border: 1px solid var(--espresso);
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.nav__cta:hover { background: var(--espresso); color: var(--paper); transform: translateY(-2px); }

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  position: relative;
  z-index: 2;
}
.menu-toggle__bar {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--espresso);
  transform: translateX(-50%);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.menu-toggle__bar:first-child { top: 19px; }
.menu-toggle__bar:last-child { top: 26px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:first-child { top: 22px; transform: translateX(-50%) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:last-child { top: 22px; transform: translateX(-50%) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 9rem 0 6rem;
  overflow: hidden;
  isolation: isolate;
}
.hero__glow {
  position: absolute;
  z-index: -2;
  width: 60vw;
  height: 60vw;
  max-width: 850px;
  max-height: 850px;
  top: -18%;
  right: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 199, 182, 0.65) 0%, rgba(232, 199, 182, 0) 68%);
  filter: blur(10px);
}
.hero__rings {
  position: absolute;
  z-index: -2;
  width: 460px;
  height: 460px;
  left: -250px;
  bottom: -230px;
  border: 1px solid rgba(184, 92, 60, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(184, 92, 60, 0.035), 0 0 0 140px rgba(184, 92, 60, 0.025);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.9rem, 9.2vw, 8.4rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.06em;
  margin-bottom: 1.6rem;
}
.hero__title em { font-style: italic; color: var(--terracotta); font-weight: 400; }
.hero__dot { color: var(--gold); }
.hero__role {
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.3vw, 1.85rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}
.hero__text { max-width: 46ch; color: var(--muted); font-size: 0.98rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.2rem; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  margin-top: 3.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.hero__meta div { min-width: 120px; }
.hero__meta dt {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.hero__meta dd { font-size: 0.86rem; font-weight: 600; }
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 0 4px rgba(120, 128, 95, 0.16);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(120, 128, 95, 0.16); }
  50% { box-shadow: 0 0 0 8px rgba(120, 128, 95, 0); }
}

.hero__visual { position: relative; justify-self: center; width: min(100%, 460px); }
.hero__frame {
  position: relative;
  border-radius: 220px 220px 22px 22px;
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow-soft);
  transform: rotate(1.5deg);
  transition: transform 0.8s var(--ease), box-shadow 0.8s var(--ease);
}
.hero__visual:hover .hero__frame { transform: rotate(0deg) translateY(-6px); box-shadow: var(--shadow-lift); }
.hero__frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  will-change: transform;
  transition: transform 1.2s var(--ease);
}
.hero__visual:hover .hero__frame img { transform: scale(1.035); }
.hero__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(45, 33, 27, 0.1);
  border-radius: inherit;
  pointer-events: none;
}
.hero__seal {
  position: absolute;
  right: 6%;
  bottom: 7%;
  width: 96px;
  height: 96px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--sand-deep);
  box-shadow: 0 12px 30px rgba(45, 33, 27, 0.14);
  transform: rotate(-10deg);
}
.hero__seal span { font-family: var(--font-display); font-size: 1.65rem; line-height: 1; }
.hero__seal small { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.55rem; letter-spacing: 0.13em; text-transform: uppercase; }
.hero__caption {
  margin-top: 1.1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.hero__caption span { color: var(--terracotta); margin-right: 0.35rem; }

.scroll-cue {
  position: absolute;
  bottom: 1.7rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-cue__line { width: 1px; height: 38px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--terracotta);
  animation: scrollLine 2.2s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  55%, 100% { transform: translateY(100%); }
}

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden;
  padding: 1.1rem 0;
  background: var(--espresso);
  color: var(--paper);
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: max-content;
  animation: tickerMove 34s linear infinite;
}
.ticker span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.ticker i { color: var(--terracotta-soft); font-style: normal; font-size: 0.8rem; }
@keyframes tickerMove { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about { background: var(--paper); }
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}
.about__card {
  position: relative;
  padding: clamp(2rem, 4vw, 3rem);
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
}
.about__card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -90px;
  right: -90px;
  border-radius: 50%;
  background: var(--terracotta-soft);
  opacity: 0.45;
}
.about__quote-mark {
  display: block;
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 0.6;
  color: var(--terracotta);
}
.about__card p {
  position: relative;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.025em;
}
.about__signature {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--terracotta-deep);
  font-size: 1.3rem;
}
.about__signature span { font-family: var(--font-body); font-size: 0.9rem; }
.about__stamp {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.about__stamp span {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.4rem;
  border: 1px dashed var(--sand-deep);
  border-radius: 100px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.about__body > p + p { margin-top: 1.15rem; }
.about__body .lead {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.95rem);
  line-height: 1.36;
  letter-spacing: -0.02em;
  color: var(--espresso);
  margin-bottom: 1.4rem;
}
.about__body p:not(.lead) { color: var(--muted); max-width: 58ch; font-size: 0.96rem; }
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.8rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1;
  color: var(--terracotta);
  letter-spacing: -0.04em;
}
.stat span { display: block; margin-top: 0.45rem; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 2.4rem; }
.filter {
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--espresso-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease);
}
.filter:hover { border-color: var(--terracotta); color: var(--terracotta-deep); }
.filter.is-active { background: var(--espresso); border-color: var(--espresso); color: var(--paper); }

/* ---------- Skills ---------- */
.skills { background: var(--cream); }
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
.skill-card {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease), opacity 0.4s var(--ease);
}
.skill-card:hover {
  transform: translateY(-7px);
  border-color: var(--terracotta-soft);
  box-shadow: var(--shadow-soft);
}
.skill-card.is-hidden { display: none; }
.skill-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; }
.skill-card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--cream-deep);
  color: var(--terracotta);
  font-size: 1.15rem;
}
.skill-card__num { color: var(--sand-deep); font-family: var(--font-display); font-size: 0.85rem; font-style: italic; }
.skill-card h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; letter-spacing: -0.02em; }
.skill-card > p { margin-top: 0.55rem; margin-bottom: 1.7rem; color: var(--muted); font-size: 0.86rem; }
.skill-bar { height: 4px; border-radius: 100px; background: var(--cream-deep); overflow: hidden; }
.skill-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--terracotta), var(--gold));
  transition: width 1.25s var(--ease) 0.2s;
}
.skill-card.is-visible .skill-bar span { width: var(--level); }
.skill-card__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skills__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.skills__tools > span { color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.skills__tools ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skills__tools li {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--espresso-soft);
  font-size: 0.75rem;
}

/* ---------- Projects ---------- */
.projects { background: var(--paper); }
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3.5vw, 3rem);
}
.project-card {
  position: relative;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
.project-card--feature { grid-column: 1 / -1; }
.project-card--feature .project-card__media { aspect-ratio: 16 / 7.4; }
.project-card.is-hidden { display: none; }
.project-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand);
}
.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45, 33, 27, 0.22), transparent 45%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.project-card:hover .project-card__media::after { opacity: 1; }
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.project-card:hover .project-card__media img { transform: scale(1.05); }
.project-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  background: rgba(253, 251, 246, 0.9);
  color: var(--espresso-soft);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-card__info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0.2rem 0;
}
.project-card__cat { color: var(--terracotta-deep); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.project-card h3 {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.project-card__year { color: var(--muted); font-family: var(--font-display); font-style: italic; font-size: 0.95rem; }
.project-card__hint {
  display: inline-block;
  margin: 0.5rem 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.3s var(--ease);
}
.project-card:hover .project-card__hint,
.project-card:focus-within .project-card__hint { opacity: 1; transform: none; color: var(--terracotta-deep); }
.project-card__trigger { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border: 0; background: transparent; border-radius: var(--radius); }
.project-card__trigger:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 6px; }
.projects__footnote { margin-top: 2.5rem; color: var(--muted); font-size: 0.78rem; font-style: italic; text-align: center; }

/* ---------- Education ---------- */
.education { background: var(--cream-deep); }
.education__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}
.education__intro .section-title { max-width: 11ch; }
.education__intro .section-intro { margin-top: 1.2rem; }
.education__aside {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1.4rem;
  border-left: 2px solid var(--terracotta);
  background: rgba(253, 251, 246, 0.55);
}
.education__aside-icon { color: var(--terracotta); font-size: 1.2rem; }
.education__aside p { font-family: var(--font-display); font-style: italic; font-size: 1rem; line-height: 1.5; }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--sand-deep);
}
.timeline__item { position: relative; }
.timeline__item + .timeline__item { margin-top: 1.25rem; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 30px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 0 6px var(--cream-deep);
}
.timeline__year {
  display: inline-block;
  margin-bottom: 0.6rem;
  color: var(--terracotta-deep);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.timeline__card {
  padding: clamp(1.5rem, 3vw, 2.2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.timeline__card:hover { transform: translateX(5px); box-shadow: var(--shadow-soft); }
.timeline__tag {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  background: var(--cream-deep);
  color: var(--espresso-soft);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.timeline__card h3 { margin-top: 0.9rem; font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 500; letter-spacing: -0.02em; }
.timeline__place { margin: 0.3rem 0 0.8rem; color: var(--terracotta-deep); font-size: 0.85rem; font-weight: 700; }
.timeline__place span { color: var(--muted); font-weight: 400; }
.timeline__card > p:last-child { color: var(--muted); font-size: 0.88rem; max-width: 60ch; }

/* ---------- Contact ---------- */
.contact { background: var(--paper); }
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact__intro .section-title { max-width: 13ch; }
.contact__intro .section-intro { margin-top: 1.2rem; }
.contact__email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1.2rem 1.4rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact__email span { display: block; color: var(--muted); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }
.contact__email a {
  display: inline-block;
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--terracotta-soft);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact__email a:hover { color: var(--terracotta); border-color: var(--terracotta); }
.copy-btn {
  flex-shrink: 0;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--paper);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease);
}
.copy-btn:hover { background: var(--espresso); color: var(--paper); border-color: var(--espresso); }
.contact__details { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 1.5rem; }
.contact__details span { display: block; color: var(--muted); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.contact__details strong { font-size: 0.9rem; font-weight: 600; }
.contact__social { margin-top: 2rem; }
.contact__social > span { display: block; margin-bottom: 0.8rem; color: var(--muted); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.social-links { display: flex; gap: 0.6rem; }
.social-links a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--espresso-soft);
  font-family: var(--font-display);
  font-size: 0.85rem;
  transition: all 0.35s var(--ease);
}
.social-links a:hover { background: var(--terracotta); border-color: var(--terracotta); color: var(--paper); transform: translateY(-4px); }

.contact__form-wrap {
  position: relative;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}
.contact__form-wrap::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 2.5rem;
  width: 75px;
  height: 3px;
  background: var(--terracotta);
  border-radius: 0 0 3px 3px;
}
.contact-form__head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.8rem; }
.contact-form__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
  font-size: 1.1rem;
}
.contact-form__head h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; }
.contact-form__head p { color: var(--muted); font-size: 0.82rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: 0.45rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--espresso-soft); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 0.9rem;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #a89a8b; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(184, 92, 60, 0.1);
  background: #fff;
}
.field input.is-invalid, .field select.is-invalid, .field textarea.is-invalid { border-color: #b23b2a; box-shadow: 0 0 0 4px rgba(178, 59, 42, 0.09); }
.contact-form__submit { width: 100%; margin-top: 0.5rem; }
.contact-form__note { margin-top: 0.9rem; color: var(--muted); font-size: 0.7rem; text-align: center; }
.form-success { text-align: center; padding: 1.5rem 0; }
.form-success__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
  font-size: 1.6rem;
}
.form-success h3 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 500; }
.form-success p { color: var(--muted); font-size: 0.9rem; max-width: 38ch; margin: 0.8rem auto 1.5rem; }
.form-success .btn { margin: 0.25rem; }

/* ---------- Footer ---------- */
.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--line); background: var(--cream-deep); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; }
.site-footer__brand { display: flex; align-items: center; gap: 0.8rem; }
.site-footer__brand .brand__mark { width: 36px; height: 36px; font-size: 0.8rem; }
.site-footer__brand strong { display: block; font-family: var(--font-display); font-size: 1rem; }
.site-footer__brand small { display: block; color: var(--muted); font-size: 0.72rem; }
.site-footer__copy { color: var(--muted); font-size: 0.75rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer__links a { font-size: 0.75rem; font-weight: 700; color: var(--espresso-soft); transition: color 0.3s var(--ease); }
.site-footer__links a:hover { color: var(--terracotta); }
.back-to-top { padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: 100px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.25rem; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(35, 25, 19, 0.7); backdrop-filter: blur(6px); animation: fadeIn 0.3s var(--ease); }
.modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  width: min(100%, 940px);
  max-height: min(88svh, 760px);
  background: var(--paper);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(20, 12, 8, 0.35);
  animation: modalIn 0.45s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(25px) scale(0.97); } }
.modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 1.5rem;
  line-height: 1;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.modal__close:hover { background: var(--terracotta); color: var(--paper); border-color: var(--terracotta); transform: rotate(90deg); }
.modal__media { background: var(--sand); min-height: 100%; }
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__content { padding: clamp(1.75rem, 4vw, 3rem); overflow-y: auto; }
.modal__content .eyebrow { margin-bottom: 0.8rem; }
.modal__content h2 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; line-height: 1.1; letter-spacing: -0.035em; }
.modal__meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0 1.4rem; }
.modal__meta span { padding: 0.3rem 0.75rem; border-radius: 100px; background: var(--cream-deep); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.modal__summary { color: var(--muted); font-size: 0.92rem; }
.modal__content h3 { margin: 1.6rem 0 0.8rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; }
.modal__content ul li { position: relative; padding-left: 1.3rem; margin-bottom: 0.55rem; color: var(--espresso-soft); font-size: 0.88rem; }
.modal__content ul li::before { content: "✳"; position: absolute; left: 0; color: var(--terracotta); font-size: 0.7rem; top: 0.28rem; }
.modal__note { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; font-style: italic; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 250;
  max-width: min(360px, calc(100vw - 2.5rem));
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  background: var(--espresso);
  color: var(--paper);
  font-size: 0.82rem;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.toast.is-visible { opacity: 1; transform: none; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1050px) {
  .skills__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__grid { gap: 2.5rem; }
  .hero__title { font-size: clamp(3.5rem, 8vw, 6.5rem); }
  .section-head--split { align-items: flex-start; flex-direction: column; gap: 1.2rem; }
  .section-intro { max-width: 52ch; }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 80px; }
  .site-header__inner { min-height: 72px; }
  .brand__text small { display: none; }

  .menu-toggle { display: block; }

  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--gutter) 1.75rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-14px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav__link {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.25rem;
  }
  .nav__link::after { display: none; }
  .nav__cta { margin-top: 1.2rem; justify-content: center; }

  .hero { min-height: auto; padding: 7.5rem 0 6.5rem; }
  .hero__grid { grid-template-columns: 1fr; text-align: left; }
  .hero__content { order: 1; }
  .hero__visual { order: 2; width: min(100%, 400px); margin-top: 1rem; }
  .hero__title { font-size: clamp(3.6rem, 11vw, 6rem); }
  .hero__meta { margin-top: 2.4rem; }
  .scroll-cue { display: none; }

  .about__grid, .education__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__aside { max-width: 480px; }
  .education__intro .section-title { max-width: 16ch; }
  .modal__dialog { grid-template-columns: 1fr; max-height: 90svh; overflow-y: auto; }
  .modal__media { height: 240px; min-height: 0; }
}

@media (max-width: 640px) {
  .section { padding: 5rem 0; }
  .hero__title { font-size: clamp(3.2rem, 14vw, 5rem); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .hero__meta { gap: 1rem 1.5rem; }
  .hero__meta div { min-width: 100px; }
  .hero__seal { width: 76px; height: 76px; }
  .hero__seal span { font-size: 1.3rem; }

  .skills__grid { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .project-card--feature { grid-column: auto; }
  .project-card--feature .project-card__media { aspect-ratio: 4 / 3; }
  .project-card__hint { opacity: 1; transform: none; }

  .about__stats { gap: 0.5rem; }
  .stat span { font-size: 0.65rem; }
  .timeline { padding-left: 1.5rem; }
  .timeline__item::before { left: -1.5rem; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  .ticker span { font-size: 0.9rem; }
  .contact__email { flex-direction: column; align-items: flex-start; }
  .copy-btn { align-self: flex-start; }
}

@media (max-width: 380px) {
  .brand__text strong { font-size: 1rem; }
  .brand__mark { width: 38px; height: 38px; }
  .about__stats { grid-template-columns: 1fr; gap: 1.2rem; }
  .about__stats .stat { display: flex; align-items: baseline; gap: 1rem; }
  .about__stats .stat span { margin-top: 0; }
}

/* ---------- Reduced motion ---------- */
@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;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .ticker__track { animation: none; }
  .skill-bar span { width: var(--level); }
}
