/* =========================================================
   王乙舒 · Portfolio — Design System
   Soft warm / kawaii aesthetic · blush pink · 3D portrait card
   ========================================================= */

:root {
  /* ---- Color tokens ---- */
  --bg:        #FFF7F8;
  --bg-soft:   #FFF0F3;
  --bg-deep:   #FFE4EC;
  --surface:   rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.92);
  --line:      rgba(58, 46, 46, 0.10);
  --line-soft: rgba(58, 46, 46, 0.06);

  --text:      #3A2E2E;
  --text-2:    #6B5B5B;
  --text-3:    #9A8A8A;

  --accent:    #FF6B9D;   /* 莓红 */
  --accent-2:  #FF9DB4;
  --accent-dim:rgba(255, 107, 157, 0.20);
  --pink:      #FFB6C1;
  --pink-dim:  rgba(255, 182, 193, 0.25);

  /* ---- Typography ---- */
  --font-display: "Quicksand", "Noto Sans SC", system-ui, sans-serif;
  --font-body:    "Noto Sans SC", "Quicksand", system-ui, sans-serif;
  --font-mono:    ui-monospace, "SFMono-Regular", "Noto Sans SC", monospace;

  /* ---- Spacing (4px base) ---- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* ---- Radii / shadow ---- */
  --r-sm: 12px; --r-md: 20px; --r-lg: 28px; --r-xl: 40px;
  --shadow: 0 20px 50px -20px rgba(58, 46, 46, 0.28);
  --shadow-accent: 0 16px 40px -18px rgba(255, 107, 157, 0.55);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1120px;
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section[id] { scroll-margin-top: 100px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--text); }

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

/* ============ Background bubbles ============ */
.bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bubbles span {
  position: absolute; bottom: -60px;
  display: block; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.2));
  box-shadow: inset -6px -6px 16px rgba(58,46,46,0.06);
  animation: rise 18s var(--ease) infinite;
}
.bubbles span:nth-child(1)  { left: 5%;  width: 22px; height: 22px; animation-delay: 0s; animation-duration: 22s; }
.bubbles span:nth-child(2)  { left: 15%; width: 38px; height: 38px; animation-delay: 2s; animation-duration: 26s; }
.bubbles span:nth-child(3)  { left: 25%; width: 18px; height: 18px; animation-delay: 4s; animation-duration: 20s; }
.bubbles span:nth-child(4)  { left: 40%; width: 46px; height: 46px; animation-delay: 1s; animation-duration: 28s; }
.bubbles span:nth-child(5)  { left: 55%; width: 26px; height: 26px; animation-delay: 6s; animation-duration: 24s; }
.bubbles span:nth-child(6)  { left: 65%; width: 34px; height: 34px; animation-delay: 3s; animation-duration: 21s; }
.bubbles span:nth-child(7)  { left: 78%; width: 20px; height: 20px; animation-delay: 5s; animation-duration: 23s; }
.bubbles span:nth-child(8)  { left: 88%; width: 42px; height: 42px; animation-delay: 7s; animation-duration: 27s; }
.bubbles span:nth-child(9)  { left: 72%; width: 16px; height: 16px; animation-delay: 9s; animation-duration: 19s; }
.bubbles span:nth-child(10) { left: 32%; width: 30px; height: 30px; animation-delay: 11s; animation-duration: 25s; }
@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-110vh) scale(1.15); opacity: 0; }
}

/* ============ Layout ============ */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s-6); position: relative; z-index: 2; }
.section { padding-block: clamp(72px, 12vw, 130px); position: relative; }
.section__head { max-width: 720px; margin-bottom: var(--s-12); text-align: center; margin-inline: auto; }
.section__index {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.3em;
  color: var(--accent); display: inline-block; margin-bottom: var(--s-3);
  background: var(--surface); padding: 6px 14px; border-radius: 999px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.01em;
}
.section__sub { margin-top: var(--s-4); color: var(--text-2); font-size: 1.05rem; max-width: 52ch; margin-inline: auto; }

/* ============ Scroll progress ============ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--pink));
  z-index: 120; border-radius: 0 4px 4px 0;
}

/* ============ Lace divider ============ */
.lace-divider {
  position: relative; height: 48px; margin-top: -1px; color: var(--bg-soft);
  z-index: 3;
}
.lace-divider svg { display: block; width: 100%; height: 100%; }
.lace-divider--flip { transform: scaleY(-1); color: var(--bg); }

/* ============ Navigation ============ */
.nav {
  position: fixed; inset: 18px 0 auto 0; z-index: 100;
  display: flex; justify-content: center; pointer-events: none;
}
.nav__pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--s-2);
  background: var(--surface-2); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 8px; box-shadow: var(--shadow);
}
.nav__brand {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
}
.nav__links { display: flex; align-items: center; gap: var(--s-1); font-size: 0.92rem; }
.nav__links a {
  color: var(--text-2); padding: 9px 18px; border-radius: 999px;
  transition: all 0.25s var(--ease); font-weight: 500;
}
.nav__links a:hover, .nav__links a[aria-current="true"] { background: var(--accent-dim); color: var(--accent); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; margin-left: 4px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  padding: 13px 28px; border-radius: 999px; position: relative;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, box-shadow 0.25s;
  will-change: transform;
}
.btn--primary { background: var(--accent); color: var(--text); box-shadow: var(--shadow-accent); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -16px rgba(255,107,157,0.7); }
.btn--ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { background: #fff; transform: translateY(-3px); }
.btn:active { transform: scale(0.97); }

/* ============ Section background images ============ */
.hero,
.about,
.projects,
.experience,
.contact {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.hero {
  background-image: url('../assets/images/bg-vintage-collage.png');
}
.about {
  background-image: url('../assets/images/bg-about-vintage.png');
}
.projects {
  background-image: url('../assets/images/bg-dot-matrix.png');
}
.experience {
  background-image: url('../assets/images/bg-experience-dotmatrix.png');
}
.contact {
  background-image: url('../assets/images/bg-floral-stitch.png');
}

.hero::before,
.about::before,
.projects::before,
.experience::before,
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 251, 246, 0.72);
  pointer-events: none;
}

/* ============ Hero ============ */
.hero {
  position: relative; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding-block: 130px 90px; overflow: hidden;
}
.clouds { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cloud {
  position: absolute; background: #fff;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.7;
}
.cloud::before, .cloud::after {
  content: ""; position: absolute; background: #fff; border-radius: 50%;
}
.cloud--1 { width: 180px; height: 60px; top: 16%; left: -60px; animation: float 24s linear infinite alternate; }
.cloud--1::before { width: 90px; height: 90px; top: -45px; left: 28px; }
.cloud--1::after { width: 70px; height: 70px; top: -30px; left: 88px; }
.cloud--2 { width: 140px; height: 50px; top: 28%; right: -40px; opacity: 0.55; animation: float 30s linear infinite alternate-reverse; }
.cloud--2::before { width: 80px; height: 80px; top: -40px; left: 20px; }
.cloud--2::after { width: 60px; height: 60px; top: -28px; left: 70px; }
.cloud--3 { width: 220px; height: 70px; bottom: 22%; left: -90px; opacity: 0.45; animation: float 34s linear infinite alternate-reverse; }
.cloud--3::before { width: 110px; height: 110px; top: -55px; left: 36px; }
.cloud--3::after { width: 80px; height: 80px; top: -36px; left: 108px; }
.cloud--4 { width: 160px; height: 55px; bottom: 34%; right: -60px; opacity: 0.5; animation: float 26s linear infinite alternate; }
.cloud--4::before { width: 90px; height: 90px; top: -44px; left: 24px; }
.cloud--4::after { width: 66px; height: 66px; top: -30px; left: 82px; }
@keyframes float { from { transform: translateX(0); } to { transform: translateX(40px); } }

.hero__inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--s-8);
}
.hero__portrait { position: relative; perspective: 1000px; }
.portrait-card {
  width: 220px; height: 280px;
  transform-style: preserve-3d;
  animation: cardFloat 5s ease-in-out infinite;
}
.portrait-card__inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.15s linear;
  border-radius: var(--r-xl);
}
.portrait-card__front, .portrait-card__back {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: var(--r-xl); overflow: hidden;
  box-shadow: 0 28px 70px -24px rgba(255,107,157,0.35), inset 0 0 0 6px rgba(255,255,255,0.55);
}
.portrait-card__front { background: #fff; }
.portrait-card__front img { width: 100%; height: 100%; object-fit: cover; }
.portrait-card__back {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: rotateY(180deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2);
  color: #fff;
}
.back__logo {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.25); font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700;
}
.back__text { font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.1em; opacity: 0.9; }
.portrait-shadow {
  position: absolute; left: 50%; bottom: -28px; transform: translateX(-50%);
  width: 160px; height: 28px; border-radius: 50%;
  background: rgba(255,107,157,0.18); filter: blur(12px);
  animation: shadowPulse 5s ease-in-out infinite;
}
@keyframes cardFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes shadowPulse { 0%,100% { transform: translateX(-50%) scale(1); opacity: 0.35; } 50% { transform: translateX(-50%) scale(0.85); opacity: 0.2; } }

.hero__text { max-width: 640px; }
.hero__eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.15em;
  color: var(--text-2); margin-bottom: var(--s-4);
  background: var(--surface); padding: 8px 18px; border-radius: 999px;
}
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.2rem); line-height: 1.05; letter-spacing: -0.02em;
}
.hero__desc { margin-top: var(--s-5); color: var(--text-2); font-size: 1.1rem; max-width: 52ch; margin-inline: auto; }
.hero__actions { margin-top: var(--s-8); display: flex; gap: var(--s-4); justify-content: center; flex-wrap: wrap; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-3); font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 0.15em;
}
.hero__scroll-mouse {
  width: 22px; height: 34px; border: 2px solid var(--text-3); border-radius: 12px;
  display: grid; place-items: start center; padding-top: 6px;
}
.hero__scroll-mouse span { width: 4px; height: 6px; background: var(--accent); border-radius: 2px; animation: scrollWheel 1.6s var(--ease) infinite; }
@keyframes scrollWheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(8px); } }

/* ============ About ============ */
.about__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 80px); }
.about__head { position: sticky; top: 110px; align-self: start; text-align: left; margin-inline: 0; }
.about__head .section__title { text-align: left; }
.about__lead { font-size: 1.15rem; color: var(--text); max-width: 60ch; }
.about__lead strong { color: var(--accent); font-weight: 600; }
.about__points { margin-top: var(--s-8); display: grid; gap: var(--s-4); }
.about__points li { display: flex; gap: var(--s-3); color: var(--text-2); align-items: flex-start; }
.about__points .dot { flex: none; margin-top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.about__points strong { color: var(--text); }

.stats { margin-top: var(--s-12); display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-6); }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5); text-align: center; box-shadow: 0 10px 30px -18px rgba(58,46,46,0.15);
}
.stat__num { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 700; color: var(--accent); display: block; line-height: 1; }
.stat__label { color: var(--text-2); font-size: 0.88rem; margin-top: var(--s-2); display: block; }

/* ============ Projects ============ */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-6); }
.card {
  position: relative; padding: var(--s-8); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
  overflow: hidden; transition: transform 0.3s var(--ease), box-shadow 0.3s;
  transform-style: preserve-3d; will-change: transform;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__spot {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--accent-dim), transparent 50%);
  pointer-events: none;
}
.card:hover .card__spot { opacity: 1; }
.card > * { transform: translateZ(30px); position: relative; z-index: 2; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-5); }
.card__tag { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.04em; }
.card__year { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-3); }
.card__link { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-2); transition: color 0.2s; }
.card__link:hover { color: var(--accent); }
.card__title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: var(--s-3); }
.card__desc { color: var(--text-2); font-size: 0.98rem; margin-bottom: var(--s-5); }
.card__tech { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.card__tech span { font-size: 0.78rem; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; }
.card__foot { border-top: 1px solid var(--line); padding-top: var(--s-4); }
.card__role { font-size: 0.85rem; color: var(--text-3); }
/* ============ Video reel carousel ============ */
.videoreel {
  position: relative;
  background-image: url('../assets/images/bg-videoreel-dotmatrix.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.videoreel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 251, 246, 0.78);
  pointer-events: none;
}
.videoreel .container { position: relative; z-index: 1; }
.carousel {
  position: relative;
  display: flex; align-items: center; gap: var(--s-3);
  max-width: 100%; margin-inline: auto;
}
.carousel__viewport {
  flex: 1; overflow: hidden;
  border-radius: var(--r-lg);
}
.carousel__track {
  display: flex; margin: 0; padding: 0; list-style: none;
  transform: translateX(calc(20% - var(--idx, 0) * 60%));
  transition: transform 0.6s var(--ease);
}
.carousel__slide {
  flex: 0 0 60%; min-width: 60%;
  padding: 0 var(--s-2);
  box-sizing: border-box;
}
.vcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  box-shadow: var(--shadow);
  transition: transform 0.6s var(--ease), opacity 0.6s;
  transform: scale(0.86);
  opacity: 0.55;
}
.carousel__slide.is-active .vcard {
  transform: scale(1);
  opacity: 1;
}
.vcard__video {
  display: block; width: 100%;
  aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--r-md);
  background: #2a2326;
}
.vcard__cap {
  margin-top: var(--s-3); text-align: center;
  font-family: var(--font-display); color: var(--accent);
  font-size: 0.95rem;
}
.vcard__desc {
  margin-top: var(--s-2); text-align: center;
  color: var(--text-2); font-size: 0.9rem; line-height: 1.6;
  max-width: 52ch; margin-inline: auto;
}
.carousel__nav {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--accent); font-size: 1.7rem; line-height: 1;
  display: grid; place-items: center; box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s;
  z-index: 2;
}
.carousel__nav:hover { background: #fff; color: var(--accent-2); transform: scale(1.08); }
.carousel__nav:active { transform: scale(0.95); }
.carousel__dots {
  display: flex; justify-content: center; gap: var(--s-2);
  margin-top: var(--s-6);
}
.carousel__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line); border: none; padding: 0; cursor: pointer;
  transition: all 0.25s var(--ease);
}
.carousel__dot.is-active {
  background: var(--accent); width: 28px; border-radius: 999px;
}
@media (max-width: 560px) {
  .carousel__nav { width: 40px; height: 40px; font-size: 1.4rem; }
}

/* ============ Experience ============ */
.timeline { position: relative; padding-left: var(--s-10); max-width: 820px; margin-inline: auto; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 3px; background: linear-gradient(var(--accent), var(--pink)); border-radius: 3px; }
.timeline__item { position: relative; padding-bottom: var(--s-10); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: calc(-1 * var(--s-10) + 1px); top: 8px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 0 0 5px var(--accent-dim); }
.timeline__meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: baseline; margin-bottom: var(--s-2); }
.timeline__date { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); }
.timeline__org { color: var(--text-2); font-size: 0.95rem; }
.timeline__role { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: var(--s-2); }
.timeline__desc { color: var(--text-2); max-width: 64ch; }

/* ============ Skills ============ */
.skills__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 72px); }
.skills__head { position: sticky; top: 110px; align-self: start; text-align: left; margin-inline: 0; }
.skills__head .section__title { text-align: left; }
.skills__tags { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.chip {
  font-family: var(--font-display); font-size: 0.88rem; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line); padding: 9px 18px; border-radius: 999px;
  transition: all 0.25s var(--ease); cursor: default;
}
.chip:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); background: #fff; }

/* ============ Contact ============ */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact__left .section__title { margin-bottom: var(--s-5); text-align: left; }
.contact__lead { color: var(--text-2); font-size: 1.1rem; max-width: 38ch; margin-bottom: var(--s-8); }
.contact__list { display: grid; gap: var(--s-4); }
.contact__list li { display: flex; align-items: baseline; gap: var(--s-4); padding-bottom: var(--s-4); border-bottom: 1px solid var(--line); }
.contact__k { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-3); width: 44px; flex: none; }
.contact__list a { color: var(--text); transition: color 0.2s; }
.contact__list a:hover { color: var(--accent); }

.contact__form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-8);
  display: grid; gap: var(--s-5); box-shadow: var(--shadow);
}
.field { display: grid; gap: var(--s-2); }
.field label { font-size: 0.9rem; color: var(--text-2); font-weight: 500; }
.field input, .field textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 16px; color: var(--text); font: inherit; resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.field.has-error input, .field.has-error textarea { border-color: #ff6b6b; }
.field__error { font-size: 0.8rem; color: #ff6b6b; min-height: 1em; }
.contact__note { font-size: 0.9rem; color: var(--accent); min-height: 1.2em; }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); padding-block: var(--s-8); background: var(--bg-soft); }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3); color: var(--text-3); font-size: 0.9rem; }
.footer__brand { color: var(--text-2); font-family: var(--font-display); font-weight: 600; }

/* ============ Reveal ============ */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .about__grid, .skills__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__head, .skills__head { position: static; text-align: center; }
  .about__head .section__title, .skills__head .section__title { text-align: center; }
  .cards { grid-template-columns: 1fr; }
  .nav__pill { width: calc(100% - var(--s-6) * 2); justify-content: space-between; }
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(72vw, 300px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--s-4);
    padding: var(--s-12); background: var(--surface-2); backdrop-filter: blur(16px);
    transform: translateX(100%); transition: transform 0.35s var(--ease); border-left: 1px solid var(--line);
    border-radius: 0;
  }
  .nav__links.is-open { transform: none; }
  .nav__toggle { display: flex; }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 560px) {
  .container { padding-inline: var(--s-4); }
  .stats { grid-template-columns: 1fr; }
  .hero { padding-block: 120px 70px; }
  .portrait-card { width: 180px; height: 228px; }
  .card { padding: var(--s-6); }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .bubbles { display: none; }
}
