/* =========================================================
   ROOT — simple, professional, AI-themed (light, burgundy + red)
========================================================= */

:root {
  --bg: #fcf8f8;
  --bg-alt: #f9f1f2;
  --surface: #ffffff;
  --ink: #1a0b10;
  --muted: #6b5a60;
  --faint: #9b8a90;
  --line: #eadfe2;
  --accent: #8c1d40;
  --accent-2: #e11d48;
  --soft: #fdeef1;
  --ok: #16a34a;
  --grad: linear-gradient(120deg, #7a1636 0%, #c8143f 55%, #e11d48 100%);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(26, 11, 16, 0.04), 0 14px 34px rgba(26, 11, 16, 0.06);
  --shadow-lg: 0 2px 4px rgba(26, 11, 16, 0.05), 0 24px 60px rgba(26, 11, 16, 0.12);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(140, 29, 64, 0.18); }

.container { width: min(1200px, 100% - clamp(40px, 8vw, 96px)); margin-inline: auto; }

.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* =========================================================
   BACKGROUND
========================================================= */

.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(140, 29, 64, 0.16) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 0%, transparent 75%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); will-change: translate; }
.o1 { width: 46vw; height: 46vw; right: -12vw; top: -14vw; background: radial-gradient(circle, rgba(140, 29, 64, 0.22), transparent 66%); }
.o2 { width: 38vw; height: 38vw; left: -14vw; top: 22vh; background: radial-gradient(circle, rgba(225, 29, 72, 0.16), transparent 66%); }

.app-shell, main { position: relative; z-index: 2; }

.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 100%;
  background: var(--grad);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 300;
}

/* =========================================================
   NAV
========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(252, 248, 248, 0.7);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.topbar.scrolled { border-bottom-color: var(--line); background: rgba(252, 248, 248, 0.88); }
.topbar-inner { width: min(1200px, 100% - clamp(40px, 8vw, 96px)); margin-inline: auto; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: -0.02em; }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; filter: hue-rotate(125deg) saturate(1.15) brightness(1.05); }

.nav { display: flex; gap: 4px; }
.nav-link { position: relative; padding: 10px 14px; font-size: 14.5px; font-weight: 500; color: var(--muted); border-radius: 8px; transition: color 0.25s; }
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--accent); }
/* underline: grows in from the right and retracts toward the left */
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: right;
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.mobile-menu { display: none; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }

/* =========================================================
   BUTTONS / SHARED
========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 28px rgba(140, 29, 64, 0.28); }
.btn-primary:hover { box-shadow: 0 14px 36px rgba(140, 29, 64, 0.4); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { box-shadow: 0 10px 26px rgba(26, 11, 16, 0.25); }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); padding-inline: 14px; }
.btn-ghost:hover { color: var(--accent); }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; line-height: 1.08; letter-spacing: -0.035em; }
.section-head p { margin-top: 18px; color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); }

.reveal { opacity: 0; translate: 0 28px; transition: opacity 0.8s var(--ease) var(--d, 0s), translate 0.8s var(--ease) var(--d, 0s); }
.reveal.is-visible { opacity: 1; translate: 0 0; }

.card, .skill-card, .edu-card, .principle, .tl-card, .pj {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* =========================================================
   HERO
========================================================= */

.hero { padding: clamp(56px, 8vw, 110px) 0 clamp(48px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 80px); align-items: center; }

.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 500; color: var(--muted); }
.hero h1 { margin: 22px 0 22px; font-size: clamp(40px, 5.6vw, 76px); font-weight: 700; line-height: 1.04; letter-spacing: -0.045em; }
.hero-lead { max-width: 560px; color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
.hero-lead strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; }

/* chat card */
.chat { border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; will-change: translate; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff, #fdf8f8); }
.chat-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--grad); color: #fff; }
.chat-head strong { display: block; font-size: 15px; line-height: 1.2; }
.chat-head small { color: var(--faint); font-size: 12.5px; }
.chat-live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); font-weight: 500; }
.chat-body { padding: 20px 18px; min-height: 318px; display: flex; flex-direction: column; gap: 12px; background: #fffcfc; }

.bubble { max-width: 88%; padding: 11px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; animation: bubbleIn 0.45s var(--ease) both; }
.bubble.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 5px; }
.bubble.bot { align-self: flex-start; background: var(--soft); color: #3a2229; border-bottom-left-radius: 5px; }
.bubble.fade { animation: bubbleOut 0.4s ease both; }
@keyframes bubbleIn { from { opacity: 0; translate: 0 10px; } }
@keyframes bubbleOut { to { opacity: 0; translate: 0 -6px; } }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.35; animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 40% { opacity: 1; translate: 0 -3px; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips span { font-family: var(--mono); font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid rgba(140, 29, 64, 0.25); color: var(--accent); animation: bubbleIn 0.4s var(--ease) both; animation-delay: calc(var(--k) * 0.08s); }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -0.14em; background: currentColor; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.chat-input { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 14px 14px; padding: 11px 12px 11px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--faint); font-size: 14px; transition: border-color 0.25s, color 0.25s; }
.chat-input i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--grad); color: #fff; }
.chat-input:hover { border-color: var(--accent); color: var(--muted); }

/* =========================================================
   STATS
========================================================= */

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 30px 24px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: clamp(36px, 4.4vw, 56px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 14px; color: var(--muted); }

/* =========================================================
   ABOUT
========================================================= */

.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-grid .section-head { margin-bottom: 0; position: sticky; top: 120px; }
.word-reveal { font-size: clamp(20px, 2.1vw, 28px); line-height: 1.5; letter-spacing: -0.02em; font-weight: 500; }
.word-reveal .w { color: #d8c9cd; transition: color 0.35s ease; }
.word-reveal .w.on { color: var(--ink); }
.word-reveal .w.hot.on { color: var(--accent); }
.about-points { display: grid; gap: 12px; margin-top: 36px; }
.point { display: grid; gap: 2px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.point b { font-weight: 600; }
.point span { color: var(--muted); font-size: 15px; }

/* =========================================================
   SKILLS
========================================================= */

.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-card { padding: 26px; transition: opacity 0.8s var(--ease) var(--d, 0s), translate 0.8s var(--ease) var(--d, 0s), transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s; }
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(140, 29, 64, 0.3); }
.skill-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.skill-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.skill-head small { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.skill-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: 13.5px; padding: 6px 13px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); color: #4a3a40; }

/* =========================================================
   EXPERIENCE
========================================================= */

.tl { position: relative; max-width: 960px; padding-left: clamp(34px, 5vw, 64px); }
.tl-rail { position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-rail i { display: block; width: 100%; height: 100%; background: var(--grad); border-radius: 2px; transform-origin: top; transform: scaleY(0); }
.tl-list { display: grid; gap: 22px; }
.tl-item { position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(clamp(34px, 5vw, 64px) * -1 + 1px);
  top: 30px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
}
.tl-item.lit::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px rgba(140, 29, 64, 0.14); }
.tl-card { padding: clamp(22px, 3vw, 34px); }
.tl-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tl-period { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.tl-tag { font-size: 12.5px; font-weight: 500; padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--accent); }
.tl-card h3 { margin-top: 14px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.tl-company { margin: 4px 0 18px; color: var(--muted); font-size: 15px; }
.tl-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tl-card li { display: flex; gap: 12px; color: #3d2a31; font-size: 15px; }
.tl-card li svg { flex: none; margin-top: 4px; color: var(--accent); }

/* =========================================================
   PROJECTS
========================================================= */

.pj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.pj { overflow: hidden; display: flex; flex-direction: column; transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.4s; }
.pj:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(140, 29, 64, 0.3); }
.pj.feat { grid-column: span 2; display: grid; grid-template-columns: 1.25fr 1fr; }
.pj-shot { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.pj.feat .pj-shot { aspect-ratio: auto; min-height: 320px; border-bottom: 0; border-right: 1px solid var(--line); }
.pj-img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; max-width: none; object-fit: cover; object-position: center top; transition: scale 0.8s var(--ease); will-change: translate; }
.pj:hover .pj-img { scale: 1.04; }
.pj-n { position: absolute; left: 14px; top: 12px; font-family: var(--mono); font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); color: var(--muted); }
.pj-body { padding: clamp(22px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.pj-type { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.pj-body h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.pj-body p { color: var(--muted); font-size: 15px; }
.pj-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pj-tech span { font-size: 12.5px; padding: 3px 11px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); color: #4a3a40; }
.pj-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; align-self: flex-start; padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: #fff; background: var(--grad); box-shadow: 0 10px 26px rgba(140, 29, 64, 0.28); transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.pj-link:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(140, 29, 64, 0.42); }
.pj-link svg { transition: transform 0.25s var(--ease); }
.pj-link:hover svg { transform: translate(3px, -3px); }

/* =========================================================
   PRINCIPLES / EDUCATION
========================================================= */

.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.principle { padding: 28px; transition: opacity 0.8s var(--ease) var(--d, 0s), translate 0.8s var(--ease) var(--d, 0s), transform 0.35s var(--ease), box-shadow 0.35s; }
.principle:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.principle-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--soft); color: var(--accent); font-size: 20px; margin-bottom: 18px; }
.principle h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.principle p { color: var(--muted); font-size: 15px; }

.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.edu-card { padding: clamp(24px, 3vw, 36px); }
.edu-period { font-family: var(--mono); font-size: 13px; color: var(--accent); background: var(--soft); padding: 4px 12px; border-radius: 999px; }
.edu-card h3 { margin: 18px 0 8px; font-size: clamp(19px, 1.9vw, 23px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.edu-school { color: #3d2a31; }
.edu-loc { color: var(--faint); font-size: 14px; margin-top: 6px; }

/* =========================================================
   CONTACT
========================================================= */

.contact { background: linear-gradient(180deg, var(--bg) 0%, #fdeef1 100%); }
.contact-shell { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 18px; max-width: 1100px; margin-inline: auto; }
.contact-info, .contact-form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: clamp(24px, 3vw, 40px); }
.contact-status { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--ok); }
.contact-info h3 { margin: 14px 0 22px; font-size: clamp(26px, 2.8vw, 34px); font-weight: 700; letter-spacing: -0.03em; }
.connect-list { display: grid; gap: 10px; }
.connect-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; transition: border-color 0.25s, background 0.25s, transform 0.3s var(--ease); }
.connect-card strong { flex: 1; font-weight: 500; }
.connect-card svg:first-child { color: var(--accent); }
.connect-card .go { color: var(--faint); transition: transform 0.25s var(--ease), color 0.25s; }
.connect-card:hover { border-color: rgba(140, 29, 64, 0.4); background: var(--soft); transform: translateX(4px); }
.connect-card:hover .go { color: var(--accent); transform: translate(3px, -3px); }
.contact-location { margin-top: 20px; color: var(--faint); font-size: 14px; }

.form-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.contact-form-card h3 { margin: 8px 0; font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.form-sub { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.contact-form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: grid; gap: 7px; }
.form-field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.form-field input, .form-field textarea { width: 100%; background: #fffbfb; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font: inherit; font-size: 15px; padding: 13px 15px; outline: none; resize: vertical; transition: border-color 0.25s, box-shadow 0.25s, background 0.25s; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #b8a8ad; }
.form-field input:focus, .form-field textarea:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(140, 29, 64, 0.12); }
.contact-submit { width: 100%; padding: 15px 24px; }
.contact-submit:disabled { opacity: 0.7; cursor: wait; }
.contact-submit #submitIconWrap { display: inline-flex; }

.contact-toast { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 15px 17px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.toast-icon { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.contact-toast.success .toast-icon { background: #dcfce7; color: var(--ok); }
.contact-toast.error .toast-icon { background: #fee2e2; color: #dc2626; }
.toast-content { flex: 1; }
.toast-title-row { display: flex; gap: 10px; align-items: center; }
.toast-status-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.toast-content p { color: var(--muted); font-size: 14px; }
.toast-close { background: none; border: 0; color: var(--faint); padding: 2px; }
.toast-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left; background: currentColor; }
.contact-toast.success .toast-progress { color: var(--ok); }
.contact-toast.error .toast-progress { color: #dc2626; }

/* =========================================================
   CV MODAL + FOOTER
========================================================= */

.cv-modal-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(26, 11, 16, 0.55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; }
.cv-modal { width: min(960px, 100%); height: min(90vh, 900px); display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.cv-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-weight: 600; }
.cv-modal-actions { display: flex; align-items: center; gap: 8px; }
.cv-modal-body { flex: 1; }
.cv-modal-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }

.portfolio-footer { position: relative; z-index: 2; background: var(--ink); color: #c9b8bd; padding: 38px 0; font-size: 14px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { display: block; color: #fff; font-size: 15px; }
.footer-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; filter: hue-rotate(125deg) saturate(1.15); }

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .section-head { position: static; margin-bottom: 24px; }
  .skills-grid, .principles-grid { grid-template-columns: repeat(2, 1fr); }
  .pj.feat { grid-template-columns: 1fr; }
  .pj.feat .pj-shot { aspect-ratio: 16 / 9; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .contact-shell { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 860px) {
  .mobile-menu { display: grid; }
  .nav-cv { display: none; }
  .nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0 20px;
    background: rgba(252, 248, 248, 0.98);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s var(--ease), padding 0.3s;
  }
  .nav.open { max-height: 440px; padding: 10px 20px 16px; }
  .nav-link { padding: 12px 14px; }
}

@media (max-width: 620px) {
  .skills-grid, .principles-grid, .pj-grid, .edu-grid, .form-row { grid-template-columns: 1fr; }
  .pj.feat { grid-column: auto; }
  .hero-actions .btn { flex: 1 1 auto; }
  .chat-body { min-height: 340px; }
  .tl { padding-left: 32px; }
  .tl-item::before { left: -32px; }
}

@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; }
  .reveal { opacity: 1; translate: none; }
}

/* location highlight */
.loc { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 10px; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(140, 29, 64, 0.25); }
.pill .loc { margin-left: 4px; }
.contact-location { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.contact-location .loc { font-size: 13.5px; }

.loc { white-space: nowrap; }
@media (max-width: 620px) {
  .pill { flex-wrap: wrap; row-gap: 8px; border-radius: 22px; padding: 8px 10px 8px 14px; }
  .pill .loc { margin-left: 0; }
}

/* =========================================================
   MOTION LAYER (everything below the hero)
========================================================= */

/* --- masked word-by-word headings --- */
.section-head h2 .m { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.section-head h2 .m > span {
  display: inline-block;
  transform: translateY(115%) rotate(5deg);
  transform-origin: 0 100%;
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i) * 0.07s);
}
.section-head h2.in .m > span { transform: none; }
.section-head h2 .m.acc > span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.04em;
}

/* --- scroll-driven icon rail --- */
.band {
  position: relative;
  padding: 34px 0;
  overflow: hidden;
  display: grid;
  gap: 14px;
  background: linear-gradient(135deg, #1a0b10 0%, #2b0d18 55%, #3a0f1f 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 120% at 50% 50%, rgba(225, 29, 72, 0.18), transparent 70%); pointer-events: none; }
.band-row { position: relative; display: flex; gap: 14px; width: max-content; white-space: nowrap; will-change: transform; }
.bp {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 24px 13px 18px;
  border-radius: 999px;
  font-size: clamp(16px, 1.6vw, 21px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
}
.bp .ico { width: 26px; height: 26px; }
.bp.alt { color: #f6c9d3; background: transparent; border-style: dashed; border-color: rgba(246, 201, 211, 0.3); }
.bp.alt .ico { width: 22px; height: 22px; color: #ff6b8a; }

/* --- generic parallax lift that coexists with .reveal --- */
[data-lift].reveal { translate: 0 calc(28px + var(--ly, 0px)); }
[data-lift].reveal.is-visible { translate: 0 var(--ly, 0px); }
[data-lift].reveal.done { transition: opacity 0.8s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s; }

/* --- about: rotating orbit + sliding points --- */
.about { position: relative; overflow: hidden; }
.about-orbit { position: absolute; right: -14vw; top: 50%; width: min(60vw, 760px); aspect-ratio: 1; margin-top: calc(min(60vw, 760px) / -2); pointer-events: none; will-change: transform; }
.about-orbit i { position: absolute; border-radius: 50%; border: 1px solid rgba(140, 29, 64, 0.14); }
.about-orbit i:nth-child(1) { inset: 0; }
.about-orbit i:nth-child(2) { inset: 13%; border-style: dashed; border-color: rgba(225, 29, 72, 0.22); }
.about-orbit i:nth-child(3) { inset: 28%; }
.about-orbit i::after { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 16px rgba(225, 29, 72, 0.6); }
.about-orbit i:nth-child(2)::after { top: auto; bottom: -5px; }
.about-orbit i:nth-child(3)::after { display: none; }
.about .container { position: relative; z-index: 1; }

/* --- skills / principles: staggered chip + icon pops --- */
.skill-card .chip { opacity: 0; }
.skill-card.is-visible .chip { animation: popIn 0.55s var(--ease) both; animation-delay: calc(var(--k) * 45ms + 250ms); }
@keyframes popIn { from { opacity: 0; scale: 0.7; translate: 0 10px; } to { opacity: 1; scale: 1; translate: 0 0; } }
.principle .principle-icon { scale: 0.6; rotate: -80deg; opacity: 0; }
.principle.is-visible .principle-icon { animation: iconPop 0.8s var(--ease) both; animation-delay: 0.25s; }
@keyframes iconPop { to { scale: 1; rotate: 0deg; opacity: 1; } }

/* --- experience: comet on the rail --- */
.tl-rail::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--p, 0) * 100%);
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent-2);
  box-shadow: 0 0 0 6px rgba(225, 29, 72, 0.14), 0 0 22px rgba(225, 29, 72, 0.7);
  opacity: calc(min(var(--p, 0) * 40, 1));
}

/* --- projects: tilt + wipe --- */
.pj { transition: opacity 0.8s var(--ease) var(--d, 0s), translate 0.8s var(--ease) var(--d, 0s), transform 0.25s ease-out, box-shadow 0.4s, border-color 0.4s; transform-style: preserve-3d; }
.pj:hover { transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px); }
.pj-shot { will-change: clip-path; }

/* --- contact: floating shapes --- */
.contact { position: relative; overflow: hidden; }
.contact .container { position: relative; z-index: 1; }
.shape { position: absolute; border-radius: 50%; pointer-events: none; will-change: translate; }
.sh1 { width: 280px; height: 280px; left: -90px; top: 14%; border: 1px dashed rgba(140, 29, 64, 0.25); }
.sh1::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle, rgba(225, 29, 72, 0.18), transparent 70%); }
.sh2 { width: 360px; height: 360px; right: -120px; bottom: 6%; background: radial-gradient(circle at 30% 30%, rgba(225, 29, 72, 0.16), rgba(140, 29, 64, 0.08) 55%, transparent 72%); }

/* --- side dots navigation --- */
.dots-nav {
  position: fixed;
  right: 22px;
  top: 50%;
  translate: 0 -50%;
  z-index: 150;
  display: grid;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.dots-nav.show { opacity: 1; pointer-events: auto; }
.dots-nav button { position: relative; width: 22px; height: 22px; display: grid; place-items: center; background: none; border: 0; padding: 0; }
.dots-nav button i { width: 8px; height: 8px; border-radius: 50%; background: #d6c3c8; transition: transform 0.35s var(--ease), background 0.3s; }
.dots-nav button:hover i { background: var(--accent-2); transform: scale(1.3); }
.dots-nav button.on i { background: var(--grad); transform: scale(1.6); box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.16); }
.dots-nav button span {
  position: absolute;
  right: 30px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  translate: 6px 0;
  transition: opacity 0.25s, translate 0.25s;
  pointer-events: none;
}
.dots-nav button:hover span { opacity: 1; translate: 0 0; }
@media (max-width: 1100px) { .dots-nav { display: none; } }
@media (max-width: 860px) { .about-orbit { opacity: 0.5; } }

@media (prefers-reduced-motion: reduce) {
  .section-head h2 .m > span { transform: none; }
  .skill-card .chip, .principle .principle-icon { opacity: 1; scale: 1; rotate: 0deg; animation: none !important; }
  [data-lift].reveal { translate: none; }
}

/* --- skill icons --- */
.ico { flex: none; vertical-align: middle; }
.skill-head { gap: 12px; }
.skill-head h3 { flex: 1; }
.skill-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--soft); color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px 6px 10px; }
.chip b { font-weight: 400; }
.chip .ico { width: 17px; height: 17px; color: var(--accent); transition: transform 0.35s var(--ease); }
.chip:hover { border-color: rgba(140, 29, 64, 0.35); background: var(--soft); }
.chip:hover .ico { transform: scale(1.25) rotate(-6deg); }

/* white chips so the original logo colours stay true */
.skill-card .chip { background: #fff; }
.skill-card .chip:hover { background: #fff; box-shadow: 0 6px 16px rgba(26, 11, 16, 0.08); transform: translateY(-2px); }
