/* =============================================================
   Saravanamuthu S — Portfolio
   Aesthetic: Anthropic-warm light theme + hand-drawn pencil sketch
   -------------------------------------------------------------
   Contents
   1.  Design tokens
   2.  Reset & base
   3.  Paper texture & background
   4.  Typography helpers
   5.  Sketch primitives (wobble boxes, underlines, buttons)
   6.  Navigation
   7.  Hero + constellation
   8.  Stats
   9.  About
   10. Experience / timeline
   11. Skills
   12. Education
   13. Interests
   14. Contact + footer
   15. Reveal animations
   16. Responsive
   17. Reduced motion & print
   ============================================================= */

/* ---------- 1. Design tokens ------------------------------- */
:root {
  /* Warm paper (Anthropic "cloud" family) */
  --paper:        #f6f3eb;
  --paper-deep:   #efeade;
  --paper-card:   #fbf9f3;

  /* Graphite ink — warm near-blacks instead of pure black */
  --ink:          #2b2926;
  --graphite:     #3c3833;
  --pencil:       #4b453d;
  --muted:        #6f685c;
  --faint:        #a8a094;

  /* Colored-pencil accent (Anthropic clay / coral) */
  --clay:         #c15f3c;
  --clay-deep:    #a94e30;
  --clay-wash:    #eaddcf;

  /* Lines */
  --rule:         #d9d2c4;
  --rule-soft:    #e5dfd2;

  --maxw:         1120px;
  --gap:          clamp(1rem, 3vw, 2rem);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Newsreader", Georgia, serif;
  --font-hand:    "Caveat", "Kalam", "Comic Sans MS", cursive;

  --ease:         cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.12rem);
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }

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

::selection { background: var(--clay-wash); color: var(--ink); }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; border-radius: 4px;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

/* ---------- 3. Paper texture & background ------------------ */
/* Layered: fibrous grain + faint graph-paper grid + vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    /* soft grid, like a sketchbook page */
    linear-gradient(var(--rule-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse at 50% 40%, #000 55%, transparent 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: multiply;
  /* fibrous paper grain via fractal noise */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

/* ---------- 4. Typography helpers -------------------------- */
.handwrite {
  font-family: var(--font-hand);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.eyebrow {
  font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem);
  color: var(--clay);
  margin: 0 0 0.2rem;
  transform: rotate(-1.5deg);
}

/* Hero avatar — small round photo beside the greeting */
.hero__hello { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.35rem; }
.hero__hello .eyebrow { margin: 0; }
.hero__avatar {
  position: relative;
  flex: none;
  width: 60px; height: 60px;
  padding: 3px;
  background: var(--paper-card);
  border-radius: 50%;
  transform: rotate(-3deg);
}
.hero__avatar::before {
  content: "";
  position: absolute; inset: 0;
  border: 2px solid var(--graphite);
  border-radius: 50%;
  filter: url(#rough-a);
}
.hero__avatar img {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  filter: grayscale(45%) contrast(1.04) brightness(1.02) sepia(14%);
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--gap);
  scroll-margin-top: 5rem; /* clear the sticky header when jumped to via nav */
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}
.section__index {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--clay);
  transform: rotate(-6deg);
}
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  position: relative;
  display: inline-block;
}
/* animated hand-drawn underline stroke on section titles */
.section__title[data-underline]::after {
  content: "";
  position: absolute;
  left: -2%;
  bottom: -0.35em;
  width: 104%;
  height: 0.4em;
  background: no-repeat center/100% 100%
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M3 12 C 60 4 110 17 150 11 S 250 4 297 13' fill='none' stroke='%23c15f3c' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s var(--ease);
}
.section__title.is-drawn[data-underline]::after { transform: scaleX(1); }

/* ---------- 5. Sketch primitives --------------------------- */
/* Wobble box: crisp content, hand-drawn border via displaced pseudo */
.sketch-box { position: relative; z-index: 0; }
.sketch-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--graphite);
  border-radius: 14px 12px 15px 11px / 12px 15px 11px 14px;
  filter: url(#rough-a);
  pointer-events: none;
  z-index: -1;
  transition: transform 0.25s var(--ease);
}
/* rotate the filter seed a little per-nth so boxes differ */
.sketch-box:nth-of-type(2n)::before   { filter: url(#rough-b); }
.sketch-box:nth-of-type(3n)::before   { filter: url(#rough-c); }

/* sketch "double stroke" shadow that appears on hover */
.sketch-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--clay);
  border-radius: 12px 15px 11px 14px / 15px 11px 14px 12px;
  filter: url(#rough-b);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transform: translate(4px, 5px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

/* Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
  padding: 0.72rem 1.4rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}
.btn.sketch-box::before { border-radius: 40px 38px 42px 39px / 39px 42px 38px 40px; }
.btn.sketch-box::after  { border-radius: 40px 38px 42px 39px / 39px 42px 38px 40px; }
.btn--primary { background: var(--ink); color: var(--paper); border-radius: 40px; }
.btn--primary.sketch-box::before { border-color: var(--ink); }
.btn--ghost { color: var(--ink); }
.btn:hover  { transform: translate(-1px, -2px); }
.btn:hover.sketch-box::after { opacity: 0.9; transform: translate(3px, 4px); }
.btn--primary:hover { color: #fff; }

.btn-arrow { width: 30px; height: 13px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* generic hover lift for sketch cards */
.sketch-box.is-liftable:hover::after,
.job-group:hover::after,
.skill-card:hover::after,
.edu-card:hover::after,
.constellation__core:hover::after { opacity: 0.85; transform: translate(4px, 5px); }
.job-group:hover::before,
.skill-card:hover::before { transform: translate(-1px, -1px); }

/* ---------- 6. Navigation ---------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem var(--gap);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-nav.is-stuck { border-image: linear-gradient(90deg, transparent, var(--rule), transparent) 1; }

.nav-mark { display: inline-flex; align-items: center; gap: 0.6rem; }
.nav-mark__glyph {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  color: var(--paper); background: var(--ink);
  border-radius: 50% 48% 52% 47% / 48% 52% 47% 53%;
}
.nav-mark__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }

.nav-links { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.7rem); }
.nav-links a {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--pencil);
  position: relative;
  padding: 0.2rem 0;
  transition: color 0.2s var(--ease);
}
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 2px;
  background: var(--clay); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-links a:not(.nav-cta-link):hover { color: var(--ink); }
.nav-links a:not(.nav-cta-link):hover::after { transform: scaleX(1); }

.nav-cta {
  color: var(--ink);
  padding: 0.2rem 0.5rem;
  border: 2px solid var(--graphite);
  border-radius: 22px 20px 24px 19px / 20px 24px 19px 22px;
}

.nav-cta:hover { background: var(--ink); color: var(--paper); }

.nav-toggle { display: none; }

/* ---------- 7. Hero + constellation ------------------------ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--gap) clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.05rem, 0.6rem + 6.2vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0.1rem 0 0.4rem;
  position: relative;
  overflow-wrap: break-word;
  hyphens: auto;
}
.hero__initial { color: var(--clay); }
.scribble-underline {
  display: block;
  width: min(100%, 26rem);
  height: 1.1rem;
  margin-top: -0.2rem;
  fill: none; stroke: var(--clay); stroke-width: 3.4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 900; stroke-dashoffset: 900;
}
.hero__name.is-drawn .scribble-underline { animation: draw 1.1s var(--ease) 0.3s forwards; }

.hero__role {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.05rem, 0.9rem + 0.8vw, 1.4rem);
  color: var(--pencil);
  margin: 0 0 1.3rem;
}
.hero__role .dot { color: var(--clay); margin: 0 0.4rem; }

.hero__pitch {
  max-width: 34rem;
  color: var(--graphite);
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.2rem);
  margin: 0 0 1.8rem;
}
.hero__pitch em { font-style: italic; color: var(--clay-deep); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2rem; }

.hero__contacts {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem;
  font-size: 0.95rem;
}
.hero__contacts a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); transition: color 0.2s var(--ease); }
.hero__contacts a:hover { color: var(--clay); }
.mini-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: url(#rough-c); }

/* --- constellation --- */
.hero__sketch { display: flex; flex-direction: column; align-items: center; }
.constellation {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1;
  margin-inline: auto;
}
.constellation__wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.constellation__wires .wire path {
  fill: none; stroke: var(--faint); stroke-width: 1.6;
  stroke-dasharray: 3 6; stroke-linecap: round;
  filter: url(#rough-c);
}

.constellation__core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 120px;
  display: grid; place-items: center;
  background: var(--paper-card);
  border-radius: 50%;
  text-align: center;
}
.constellation__core::before,
.constellation__core::after { border-radius: 49% 51% 48% 52% / 52% 48% 51% 49%; }
.constellation__mono {
  font-family: var(--font-display); font-weight: 700;
  font-size: 3.4rem; line-height: 1; color: var(--ink);
}
.constellation__tag {
  position: absolute; bottom: -1.9rem; left: 50%; transform: translateX(-50%) rotate(-2deg);
  white-space: nowrap; font-size: 1.05rem; color: var(--muted);
}

.orbit { position: absolute; inset: 0; animation: spin 46s linear infinite; }
.node {
  position: absolute;
  top: var(--y); left: var(--x);
  transform: translate(-50%, -50%);
  width: 58px; height: 58px;
  display: grid; place-items: center;
  background: var(--paper-card);
  border-radius: 50%;
  animation: spin-rev 46s linear infinite;
}
.node svg { width: 30px; height: 30px; fill: none; stroke: var(--pencil); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: url(#rough-b); }
.node::before {
  content: ""; position: absolute; inset: 0;
  border: 2px solid var(--graphite);
  border-radius: 50%; filter: url(#rough-a);
}
.node__label {
  position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-hand); font-weight: 600; font-size: 0.92rem;
  color: var(--muted); white-space: nowrap;
}
.node--go svg    { stroke: var(--clay-deep); }
.node--ai svg    { stroke: var(--clay-deep); }

.sketch-caption { margin-top: 2.6rem; color: var(--faint); font-size: 1.1rem; transform: rotate(-1.5deg); }

/* ---------- 8. Stats --------------------------------------- */
.stats {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) var(--gap) clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.8rem, 2.5vw, 1.8rem);
  border-top: 1.5px dashed var(--rule);
  border-bottom: 1.5px dashed var(--rule);
}
.stat { text-align: center; padding: 0.5rem; }
.stat__num {
  display: block;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem);
  line-height: 1; color: var(--clay);
  letter-spacing: -0.02em;
}
.stat__label { display: block; margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted); line-height: 1.35; }

/* ---------- 9. About --------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: stretch;
}
.about__lead p { font-size: clamp(1.08rem, 1rem + 0.5vw, 1.32rem); color: var(--graphite); margin: 0 0 1.1rem; }
.about__lead strong { color: var(--ink); font-weight: 600; }
.about__lead .sticky-note { max-width: 22rem; margin-top: clamp(1.6rem, 3vw, 2.4rem); }

.sticky-note {
  position: relative;
  background: #fdf6d8;
  padding: 1.6rem 1.5rem 1.8rem;
  transform: rotate(2.2deg);
  box-shadow: 0 12px 24px -14px rgba(43,41,38,0.4);
}
.sticky-note::before {
  /* tape */
  content: ""; position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  width: 80px; height: 26px; background: rgba(193,95,60,0.18);
  border: 1px solid rgba(193,95,60,0.25);
}
.sticky-note__text { font-size: 1.5rem; line-height: 1.4; color: #5c4a1e; margin: 0 0 0.8rem; }
.sticky-note__by { font-size: 1.05rem; color: #8a7433; }

/* Portrait — a real photo, duotone-treated to sit inside the sketch theme */
.about__aside { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(1.3rem, 3vw, 1.9rem); }
.portrait {
  position: relative;
  width: min(100%, 250px);
  margin: 0;
  padding: 11px;
  background: var(--paper-card);
  transform: rotate(-1.6deg);
  transition: transform 0.25s var(--ease);
}
.portrait.sketch-box::before { border-radius: 16px 13px 17px 12px / 12px 17px 13px 16px; }
.portrait.sketch-box::after  { border-radius: 15px 17px 12px 16px / 17px 12px 16px 13px; }
.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 864 / 1184;
  height: auto;
  object-fit: cover;
  border-radius: 10px 8px 11px 7px / 7px 11px 8px 10px;
  /* gentle warm treatment — keeps colour so it isn't dull, still ties to the paper palette */
  filter: grayscale(45%) contrast(1.04) brightness(1.02) sepia(14%);
  transition: filter 0.3s var(--ease);
}
.portrait:hover { transform: rotate(0deg) translateY(-3px); }
.portrait:hover img { filter: grayscale(18%) contrast(1.04) brightness(1.02) sepia(6%); }
.portrait:hover.sketch-box::after { opacity: 0.85; transform: translate(4px, 5px); }
.portrait__cap {
  align-self: flex-end;
  margin: -0.5rem 0.5rem 0 0;
  font-size: 1.05rem;
  color: var(--muted);
  transform: rotate(-2deg);
}

/* ---------- 10. Experience / timeline ---------------------- */
.timeline { position: relative; padding-left: clamp(1.2rem, 4vw, 2.4rem); }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px;
  background: repeating-linear-gradient(var(--graphite) 0 7px, transparent 7px 14px);
  opacity: 0.55;
}
.job { position: relative; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.job__marker {
  position: absolute; left: calc(-1 * clamp(1.2rem, 4vw, 2.4rem) + -1px); top: 6px;
  width: 15px; height: 15px; background: var(--paper); border: 2.5px solid var(--clay);
  border-radius: 50% 47% 52% 48% / 48% 52% 47% 53%;
  transform: translateX(-1px);
}
.job__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.3rem 1rem; margin-bottom: 1.4rem;
}
.job__role { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); margin: 0; line-height: 1.1; }
.job__company { margin: 0.15rem 0 0; font-size: 1.1rem; color: var(--clay); font-weight: 500; }
.job__when { font-size: 1.2rem; color: var(--muted); white-space: nowrap; transform: rotate(-1deg); }

.job__groups { display: grid; gap: 1.1rem; }
.job-group { padding: 1.3rem 1.5rem 1.4rem; background: var(--paper-card); }
.job-group__title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem;
  color: var(--ink); margin: 0 0 0.7rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.job-group__title::before {
  content: ""; width: 26px; height: 3px; background: var(--clay);
  border-radius: 3px; flex: none;
}

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.ticks li { position: relative; padding-left: 1.9rem; font-size: 1rem; color: var(--graphite); line-height: 1.6; }
.ticks li::before {
  /* hand-drawn check tick */
  content: "";
  position: absolute; left: 0; top: 0.28em;
  width: 15px; height: 13px;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 18'%3E%3Cpath d='M2 9 C4 9 6 15 8 15 C11 15 14 3 18 2' fill='none' stroke='%23c15f3c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.ticks strong { color: var(--ink); font-weight: 600; }

/* ---------- 11. Skills ------------------------------------- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1rem, 3vw, 1.6rem);
}
.skill-card { padding: 1.4rem 1.5rem 1.6rem; background: var(--paper-card); }
.skill-card__title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
  margin: 0 0 1rem;
}
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chips li {
  font-family: var(--font-body);
  font-size: 0.94rem; color: var(--pencil);
  padding: 0.32rem 0.85rem;
  border: 1.8px solid var(--graphite);
  border-radius: 20px 17px 22px 16px / 16px 22px 17px 21px;
  background: var(--paper);
  transition: transform 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}
.chips li:nth-child(2n) { border-radius: 18px 22px 16px 21px / 22px 16px 21px 17px; }
.chips li:nth-child(3n) { transform: rotate(-1.2deg); }
.chips li:hover { color: var(--clay-deep); background: var(--clay-wash); transform: translateY(-2px) rotate(0.5deg); }

/* ---------- 12. Education ---------------------------------- */
.edu-card {
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 1.8rem);
  padding: 1.5rem 1.8rem; background: var(--paper-card);
}
.edu-card__cap { width: 62px; height: 46px; flex: none; fill: none; stroke: var(--clay); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: url(#rough-b); }
.edu-card__body { flex: 1 1 auto; }
.edu-card__degree { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.1rem, 1rem + 0.6vw, 1.45rem); margin: 0 0 0.25rem; }
.edu-card__school { margin: 0; color: var(--muted); }
.edu-card__year { font-size: 1.35rem; color: var(--clay); white-space: nowrap; transform: rotate(-2deg); }

/* ---------- 13. Interests ---------------------------------- */
.interest-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: clamp(0.8rem, 2.5vw, 1.4rem);
}
.interest {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 0.7rem; padding: 1.5rem 1rem;
  font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; color: var(--graphite);
}
.interest__icon { width: 52px; height: 52px; fill: none; stroke: var(--pencil); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: url(#rough-a); transition: stroke 0.2s var(--ease), transform 0.3s var(--ease); }
.interest:hover .interest__icon { stroke: var(--clay); transform: rotate(-4deg) scale(1.06); }

/* ---------- 14. Contact + footer --------------------------- */
.contact { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) var(--gap) clamp(4rem, 8vw, 6rem); }
.contact__inner {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  background: var(--paper-card);
}
.contact__inner::before { border-color: var(--clay); }
.contact__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 1.3rem + 4vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0.3rem 0 1rem; }
.contact__sub { max-width: 34rem; margin: 0 auto 2rem; color: var(--graphite); font-size: 1.1rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }

.site-foot {
  text-align: center;
  padding: 2.5rem var(--gap) 3rem;
  border-top: 1.5px dashed var(--rule);
  color: var(--muted);
}
.site-foot__sign { display: block; font-size: 2rem; color: var(--ink); transform: rotate(-2deg); margin-bottom: 0.4rem; }
.site-foot p { margin: 0.2rem 0; font-size: 0.95rem; }
.site-foot__fine { color: var(--faint); font-style: italic; }

/* ---------- 15. Reveal animations -------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: translate(-50%, -50%) rotate(-360deg); } }

/* ---------- 16. Responsive --------------------------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero__sketch { order: -1; margin-bottom: 1rem; width: 100%; }
  .constellation { width: min(74vw, 320px); }
  .about__grid { grid-template-columns: 1fr; }
  .sticky-note { justify-self: center; max-width: 24rem; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1rem; }
}

/* keep the orbiting labels from ever spilling past the viewport edge */
@media (max-width: 520px) {
  .node { width: 48px; height: 48px; }
  .node svg { width: 25px; height: 25px; }
  .node__label { font-size: 0.82rem; }
  .constellation__core { width: 96px; height: 96px; }
  .constellation__mono { font-size: 2.7rem; }
  .constellation__tag { font-size: 0.9rem; bottom: -1.6rem; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
  }
  .nav-toggle span { width: 26px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.25s var(--ease); }
  .site-nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .site-nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .site-nav.menu-open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); padding: 1.4rem var(--gap) 1.8rem;
    border-bottom: 2px solid var(--rule);
  }
  .job__head { flex-direction: column; }
  .job__when { transform: none; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .constellation__tag { font-size: 0.9rem; }
}

/* ---------- 17. Reduced motion & print --------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .orbit, .node { animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .scribble-underline { stroke-dashoffset: 0; }
  .section__title[data-underline]::after { transform: scaleX(1); }
}

@media print {
  body::before, body::after, .site-nav, .hero__sketch, .nav-toggle, .contact__actions, .sticky-note::before { display: none !important; }
  body { background: #fff; color: #000; }
  .sketch-box::before, .sketch-box::after { filter: none; }
  .section, .hero { padding-block: 1rem; }
  a { color: #000; }
}
