/* ══════════════════════════════════════════════════════════════
   Soft pink, plum text, one raspberry accent.
   The hero portrait turns to follow the cursor (script.js).
   ══════════════════════════════════════════════════════════════ */
:root {
  color-scheme: light;
  --bg: #F7E4E9;
  --text: #3B2530;
  --muted: rgba(59, 37, 48, 0.72);
  --accent: #B0204F;
  --card: rgba(255, 255, 255, 0.6);
  --dark: #3B2530;
  --on-dark: #FBEEF1;
  --gutter: clamp(24px, 6vw, 80px);
  --script: 'Dancing Script', cursive;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; }
a { color: inherit; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 2000; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: #fff; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ─── Nav ───────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 28px; left: 50%; transform: translateX(-50%); z-index: 1000;
  display: flex; gap: 36px; padding: 14px 32px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.28); border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background 0.3s, box-shadow 0.3s, top 0.3s;
}
.nav.solid { top: 16px; background: rgba(250, 236, 240, 0.9); box-shadow: 0 8px 30px rgba(59, 37, 48, 0.12); }
.nav a {
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  padding-bottom: 3px; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s, opacity 0.2s;
}
.nav a:hover { opacity: 0.7; }
.nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #EFC3CD; }
.hero-art { position: absolute; inset: 0; }
/* script.js cover-fits these in pixels so the pose patch lines up exactly */
.hero-portrait { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; max-width: none; user-select: none; }
.hero-patch {
  position: absolute; overflow: hidden; pointer-events: none; visibility: hidden; isolation: isolate;
  /* Soft edges so the swapped head melts into the untouched portrait */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
  mask-composite: intersect;
}
.hero-patch.ready { visibility: visible; }
.hero-sheet { position: absolute; left: 0; top: 0; width: 700%; height: 500%; max-width: none; will-change: transform; user-select: none; }

.hero-intro { position: absolute; left: clamp(24px, 5vw, 80px); bottom: clamp(32px, 9vh, 110px); max-width: 440px; z-index: 2; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22A55B; animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 165, 91, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 165, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 165, 91, 0); }
}
.greeting { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
.hero h1 {
  margin: 0 0 12px; font-size: clamp(64px, 9vw, 150px); line-height: 1.05; color: var(--accent);
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.45);
  min-height: 1.05em; white-space: nowrap;
}
.tagline { margin: 0 0 24px; font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; max-width: 340px; }

/* Typing effect: blinking caret after the name */
.caret {
  display: inline-block; width: 0.06em; height: 0.78em; margin-left: 0.06em; vertical-align: -0.04em;
  background: currentColor; border-radius: 2px; animation: blink 1s steps(1) infinite;
}
.typed.typing .caret { animation: none; }
@keyframes blink { 50% { opacity: 0; } }

/* ─── Shared ────────────────────────────────────────────────────── */
.script { font-family: var(--script); font-weight: 700; letter-spacing: 0; color: var(--accent); }
.section { padding: clamp(56px, 9vw, 110px) var(--gutter) 0; scroll-margin-top: 80px; max-width: 1360px; margin: 0 auto; }
.label { margin: 0 0 16px; font-size: 13px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.heading { margin: 0 0 36px; font-size: clamp(34px, 5vw, 58px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.subheading { margin: 0 0 20px; font-size: 22px; font-weight: 700; }
.kicker { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.lead { margin: 0 0 18px; font-size: clamp(18px, 1.9vw, 22px); line-height: 1.5; font-weight: 500; max-width: 38em; }
.body { margin: 0 0 14px; font-size: 16px; line-height: 1.7; }
.muted { color: var(--muted); }
.small { font-size: 14px; margin: 16px 0 0; }
.card { background: var(--card); border-radius: 28px; padding: clamp(24px, 3vw, 36px); transition: transform 0.25s, box-shadow 0.25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(59, 37, 48, 0.08); }
.card-title { margin: 0 0 10px; font-size: 24px; font-weight: 700; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; }

.buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 999px; border: 1.5px solid var(--accent); background: transparent;
  color: var(--accent); font: 700 13px/1.2 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: transform 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--accent); color: #fff; }
.contact .btn-solid, .resume .btn-solid { text-transform: none; letter-spacing: 0.02em; font-size: 15px; }
.btn-light { border-color: rgba(251, 238, 241, 0.6); color: var(--on-dark); }
.btn-big { padding: 16px 28px; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips span { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); font-size: 12.5px; font-weight: 600; }
.chips-lg span { font-size: 14px; padding: 8px 14px; }
.points { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 15px; line-height: 1.6; }
.points li::marker { color: var(--accent); }

/* ─── About ─────────────────────────────────────────────────────── */
.about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-title { margin: 0 0 18px; font-size: clamp(40px, 6vw, 76px); line-height: 1.02; font-weight: 700; letter-spacing: -0.03em; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.pill { padding: 8px 16px; border: 1.5px solid var(--accent); color: var(--accent); border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.facts { margin: 0; display: grid; gap: 20px; }
.facts dd { margin: 0; font-size: 16px; line-height: 1.5; }

/* ─── Experience ────────────────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.job { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
.job-when { display: flex; flex-direction: column; gap: 4px; padding-top: 30px; font-size: 14px; font-weight: 600; }
.job-role { margin: 0 0 4px; font-size: 21px; font-weight: 700; }
.job-org { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--accent); }

/* ─── Work ──────────────────────────────────────────────────────── */
.feature-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.feature-title { margin: 0 0 6px; font-size: clamp(44px, 6vw, 72px); line-height: 1; }
.feature-tagline { margin: 0; font-size: clamp(18px, 2vw, 22px); font-weight: 500; }
.quote { margin-top: 8px; padding-left: 18px; border-left: 3px solid var(--accent); }

/* ─── Education ─────────────────────────────────────────────────── */
.edu-school { font-size: clamp(24px, 3vw, 32px); }
.awards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.awards li { display: grid; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid rgba(59, 37, 48, 0.12); font-size: 15px; line-height: 1.5; }

/* ─── Contact ───────────────────────────────────────────────────── */
.contact { border-radius: 36px; padding: clamp(36px, 6vw, 72px); background: var(--dark); color: var(--on-dark); }
.contact-heading { margin: 0 0 14px; font-size: clamp(34px, 5vw, 64px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; max-width: 14em; }
.contact-text { opacity: 0.8; max-width: 36em; }
.resume { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(251, 238, 241, 0.2); }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 28px 0 40px; font-size: 13px; }
.footer span { color: var(--muted); }
.to-top { font-weight: 700; color: var(--accent); text-decoration: none; }

/* ─── Scroll fade (script.js toggles .hidden / .above as blocks enter and leave) ── */
.reveal { transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); will-change: opacity, transform; }
.reveal.hidden { opacity: 0; transform: translateY(48px); }
.reveal.hidden.above { transform: translateY(-48px); }

/* ─── Small screens ─────────────────────────────────────────────── */
@media (max-width: 820px) {
  .about, .two { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; gap: 8px; }
  .job-when { padding-top: 0; flex-direction: row; gap: 12px; }
}
@media (max-width: 640px) {
  .nav { gap: 18px; padding: 12px 20px; top: 16px; }
  .nav a { font-size: 11px; letter-spacing: 0.1em; }
  /* Keep the intro readable over the portrait */
  .hero::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(to bottom, transparent, rgba(247, 228, 233, 0.92)); z-index: 1; pointer-events: none; }
  .hero-intro { right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot, .caret { animation: none; }
  .btn, .card, .reveal { transition: none; }
  .card:hover, .btn:hover { transform: none; }
}

/* ─── Project / certificate links (hidden until a URL is filled in) ── */
.job-link { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; border-bottom: 1.5px solid currentColor; }
.job-link[href=""] { display: none; }

/* ─── Scholarships & certifications ────────────────────────────── */
.subheading-gap { margin-top: 40px; }
.scholarships { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.scholarships li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-radius: 14px; background: var(--card); font-size: 15px; }
.scholarships strong { color: var(--accent); white-space: nowrap; }
.cert { padding: 20px 24px; }
.cert-title { margin: 0; font-size: 17px; font-weight: 700; }

/* ─── Tech stack ───────────────────────────────────────────────── */
.stack-legend { display: flex; align-items: center; gap: 10px; margin: -20px 0 24px; font-size: 14px; }
.core-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.stack-title { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.stack-sub { margin: 0; font-size: 14px; }
.stack-card .chips { margin-top: 18px; }
.stack-card .chips span { font-size: 13.5px; padding: 7px 13px; }
.chips span.core { background: var(--accent); color: #fff; }

.body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.8); }
.grid .card .points { margin-bottom: 4px; }
.explainer { margin: -4px 0 14px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.7); font-size: 14px; line-height: 1.5; }
.explainer strong { color: var(--text); }
