/* ==========================================================================
   Isaura Pestano · CV website
   Palette: slate blue from the original CV + rose/violet from the photo.
   ========================================================================== */

:root {
  --bg: #f6f4f1;
  --bg-2: #ffffff;
  --ink: #1d2533;
  --ink-2: #4a5568;
  --ink-3: #7a8597;
  --line: rgba(29, 37, 51, 0.1);
  --slate: #6f87a5;
  --slate-2: #a9bdd3;
  --rose: #e2557a;
  --violet: #7a4fc4;
  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.9);
  --shadow: 0 10px 40px -12px rgba(29, 37, 51, 0.18);
  --grad: linear-gradient(120deg, var(--slate) 0%, var(--violet) 55%, var(--rose) 100%);
  --blob-opacity: 0.45;
  --radius: 22px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(18px, 5vw, 64px);
  --max: 1120px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #11151d;
  --bg-2: #171c26;
  --ink: #eef1f6;
  --ink-2: #b9c2d0;
  --ink-3: #8390a4;
  --line: rgba(255, 255, 255, 0.09);
  --slate: #93aac8;
  --slate-2: #5d7393;
  --rose: #f06b8f;
  --violet: #a07ae6;
  --card: rgba(30, 37, 50, 0.62);
  --card-border: rgba(255, 255, 255, 0.07);
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
  --blob-opacity: 0.28;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11151d;
    --bg-2: #171c26;
    --ink: #eef1f6;
    --ink-2: #b9c2d0;
    --ink-3: #8390a4;
    --line: rgba(255, 255, 255, 0.09);
    --slate: #93aac8;
    --slate-2: #5d7393;
    --rose: #f06b8f;
    --violet: #a07ae6;
    --card: rgba(30, 37, 50, 0.62);
    --card-border: rgba(255, 255, 255, 0.07);
    --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
    --blob-opacity: 0.28;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  transition: background-color .5s ease, color .5s ease;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--rose); color: #fff; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- ambient background ---------- */
.blobs { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.blobs span {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  filter: blur(80px); opacity: var(--blob-opacity);
  animation: drift 26s ease-in-out infinite alternate;
}
.blobs span:nth-child(1) { background: var(--slate-2); top: -18vmax; left: -12vmax; }
.blobs span:nth-child(2) { background: var(--rose); top: 30vh; right: -20vmax; opacity: calc(var(--blob-opacity) * .55); animation-duration: 32s; }
.blobs span:nth-child(3) { background: var(--violet); bottom: -24vmax; left: 20vw; opacity: calc(var(--blob-opacity) * .5); animation-duration: 38s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vh) scale(1.12); }
  100% { transform: translate(-4vw, 8vh) scale(.95); }
}
body::before { /* subtle grain */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed; left: 0; top: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px;
  border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--rose) 22%, transparent), transparent 65%);
  opacity: 0; transition: opacity .4s;
  will-change: transform;
}
body.has-pointer .cursor-glow { opacity: 1; }

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

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 14px;
  transition: background-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Logos are transparent PNGs used as masks, so they take any colour / gradient. */
.mono {
  display: block; height: 40px; aspect-ratio: 300 / 439;
  background: var(--ink); background-size: 200% 100%;
  -webkit-mask: url("../assets/logo-ip.png") center / contain no-repeat;
          mask: url("../assets/logo-ip.png") center / contain no-repeat;
  transition: background-color .3s, transform .5s cubic-bezier(.3, 1.5, .5, 1);
}
.nav__logo { display: block; text-decoration: none; }
.nav__logo:hover .mono { background: var(--grad); transform: rotate(-8deg) scale(1.08); }
.mono--footer { height: 46px; margin: 0 auto 10px; background: var(--slate); opacity: .8; }
.nav__links { display: flex; gap: 6px; }
.nav__links a {
  position: relative; padding: 6px 12px; border-radius: 999px; text-decoration: none;
  font-size: .9rem; font-weight: 500; color: var(--ink-2); transition: color .2s, background-color .2s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); background: var(--card); }
.nav__tools { display: flex; align-items: center; gap: 10px; }

.lang {
  position: relative; display: flex; padding: 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--shadow);
}
.lang button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  font: 600 .78rem var(--sans); letter-spacing: .06em; color: var(--ink-2);
  padding: 6px 11px; border-radius: 999px; transition: color .3s;
}
.lang button[aria-pressed="true"] { color: #fff; }
.lang__pill {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: var(--grad); transition: transform .45s cubic-bezier(.65, 0, .35, 1), width .45s cubic-bezier(.65, 0, .35, 1);
}

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--card); border: 1px solid var(--card-border); color: var(--ink); box-shadow: var(--shadow);
  transition: transform .4s;
}
.theme-toggle:hover { transform: rotate(25deg); }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; transition: opacity .3s, transform .5s; }
.theme-toggle .i-moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
:root[data-theme="dark"] .theme-toggle .i-sun { opacity: 0; transform: rotate(90deg) scale(.5); }
:root[data-theme="dark"] .theme-toggle .i-moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { opacity: 0; transform: rotate(90deg) scale(.5); }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
main { padding: 0 var(--gutter); }
.hero {
  position: relative; max-width: var(--max); margin: 0 auto;
  min-height: calc(100svh - 70px);
  display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: clamp(28px, 5vw, 72px);
  padding-block: 40px 90px;
}
.hero__hello { margin: 0 0 4px; font-weight: 500; color: var(--ink-2); font-size: 1.1rem; }
.hero__name { margin: 8px 0 0; line-height: 0; }
.wordmark {
  display: block; width: min(100%, 560px); aspect-ratio: 931 / 360;
  background: linear-gradient(105deg, var(--ink) 0%, var(--ink) 38%, var(--violet) 62%, var(--rose) 80%, var(--ink) 100%);
  background-size: 260% 100%; background-position: 0 0;
  -webkit-mask: url("../assets/logo-wordmark.png") center / contain no-repeat;
          mask: url("../assets/logo-wordmark.png") center / contain no-repeat;
  /* "handwritten" reveal, then a slow colour shimmer */
  clip-path: inset(0 100% 0 0);
  animation: write 1.8s cubic-bezier(.65, 0, .35, 1) .2s forwards, shimmer 9s ease-in-out 2s infinite alternate;
}
@keyframes write { to { clip-path: inset(0 0 0 0); } }
@keyframes shimmer { to { background-position: 100% 0; } }

.hero__role { margin: 22px 0 0; font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 500; min-height: 1.6em; }
.typed { color: var(--rose); font-weight: 600; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 3px; vertical-align: -.15em; background: var(--rose); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__intro { max-width: 34em; color: var(--ink-2); margin: 18px 0 20px; }
.strengths { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-wrap: wrap; gap: 8px; max-width: 36em; }
.strengths li {
  padding: 5px 13px; border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--ink);
  background: var(--card); border: 1px solid var(--card-border); box-shadow: 0 4px 14px -8px rgba(29, 37, 51, .25);
  opacity: 0; transform: translateY(10px) scale(.9);
  transition: transform .5s cubic-bezier(.3, 1.5, .5, 1), opacity .5s, color .2s, border-color .2s;
  transition-delay: calc(.5s + var(--i) * 70ms);
}
.strengths.is-visible li { opacity: 1; transform: none; }
.strengths li:hover { color: var(--rose); border-color: var(--rose); transition-delay: 0s; }
.strengths li:first-child { color: #fff; background: var(--grad); border-color: transparent; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__loc { display: flex; align-items: center; gap: 6px; margin-top: 26px; color: var(--ink-3); font-size: .92rem; }
.hero__loc svg { width: 18px; height: 18px; }

.hero__photo { display: grid; place-items: center; }
.photo { position: relative; width: min(100%, 400px); aspect-ratio: 1; transform-style: preserve-3d; transition: transform .2s ease-out; }
.photo img {
  position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: cover; z-index: 1;
  border-radius: 58% 42% 52% 48% / 48% 56% 44% 52%;
  animation: morph 12s ease-in-out infinite;
  box-shadow: 0 30px 60px -20px rgba(122, 79, 196, .45);
}
.photo__ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--slate), var(--violet), var(--rose), var(--slate-2), var(--slate));
  filter: blur(2px); opacity: .9; animation: spin 14s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 61%, #000 62%, #000 70%, transparent 71%);
          mask: radial-gradient(circle, transparent 61%, #000 62%, #000 70%, transparent 71%);
}
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes morph {
  0%, 100% { border-radius: 58% 42% 52% 48% / 48% 56% 44% 52%; }
  33% { border-radius: 44% 56% 40% 60% / 58% 42% 58% 42%; }
  66% { border-radius: 52% 48% 60% 40% / 42% 52% 48% 58%; }
}
.photo__badge {
  position: absolute; z-index: 2; display: grid; place-items: center;
  min-width: 52px; height: 52px; padding: 0 12px; border-radius: 16px;
  font: 700 .95rem var(--sans); color: var(--ink);
  background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: float 6s ease-in-out infinite; transform: translateZ(40px);
}
.photo__badge--1 { top: 8%; right: 0; color: var(--violet); }
.photo__badge--2 { bottom: 14%; left: -2%; color: var(--slate); animation-delay: -2s; }
.photo__badge--3 { bottom: 2%; right: 12%; color: var(--rose); animation-delay: -4s; }
@keyframes float { 50% { translate: 0 -12px; } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px;
  border: 2px solid var(--ink-3); border-radius: 14px; opacity: .6;
}
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink-3); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  font: 600 1rem var(--sans); line-height: 1.2; transition: transform .25s, box-shadow .25s, background-color .25s;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn--primary {
  color: #fff; background: var(--grad); background-size: 200% 100%; background-position: 0 0;
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--violet) 70%, transparent);
  overflow: hidden;
}
.btn--primary::after { /* shine sweep */
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
}
.btn--primary:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 18px 36px -12px color-mix(in srgb, var(--rose) 70%, transparent); }
.btn--primary:hover::after { transform: translateX(120%); transition: transform .8s ease; }
.btn--primary:hover svg { animation: bob .8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }
.btn__text { display: flex; flex-direction: column; text-align: left; }
.btn__sub { font-size: .72rem; font-weight: 500; opacity: .85; letter-spacing: .03em; }
.btn--ghost { color: var(--ink); background: var(--card); border: 1px solid var(--line); padding: 16px 24px; }
.btn--ghost:hover { border-color: var(--rose); color: var(--rose); }
.btn.is-busy { pointer-events: none; opacity: .8; }

/* ---------- stats ---------- */
.stats {
  max-width: var(--max); margin: 0 auto 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.stat {
  padding: 26px 24px; border-radius: var(--radius); text-align: center;
  background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.stat__num { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { margin-top: 8px; color: var(--ink-2); font-size: .92rem; }

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding-block: clamp(60px, 10vw, 110px) 0; }
.section__head { margin-bottom: 40px; }
.kicker {
  margin: 0 0 6px; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--rose);
  display: flex; align-items: center; gap: 12px;
}
.kicker::before { content: ""; width: 32px; height: 2px; background: var(--grad); border-radius: 2px; }
h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -.03em; line-height: 1.05; }
h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
.subhead { font-size: 1.5rem; margin: 56px 0 20px; }

.card {
  position: relative; border-radius: var(--radius); padding: 26px 28px;
  background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform .3s, box-shadow .3s;
}
/* mouse-follow spotlight on cards */
.spotlight { overflow: hidden; }
.spotlight::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--rose) 14%, transparent), transparent 60%);
}
.spotlight:hover::before { opacity: 1; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.about__photo { position: relative; margin: 0; }
.about__photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about__photo::before {
  content: ""; position: absolute; inset: 0 0 auto 0; aspect-ratio: 4 / 3; transform: translate(14px, 14px); border-radius: var(--radius);
  border: 2px solid var(--rose); z-index: -1; transition: transform .4s;
}
.about__photo:hover::before { transform: translate(6px, 6px); }
.about__photo figcaption { margin-top: 12px; font-size: .85rem; color: var(--ink-3); font-style: italic; }
.about__text p { margin: 0 0 1.1em; color: var(--ink-2); }
.about__text p:first-child { font-size: 1.15rem; color: var(--ink); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 38px; position: relative; }
.timeline::before, .timeline__fill {
  content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--line);
}
.timeline__fill { background: var(--grad); transform-origin: top; transform: scaleY(0); bottom: auto; height: calc(100% - 16px); }
.tl { position: relative; margin-bottom: 22px; }
.tl__dot {
  position: absolute; left: -38px; top: 30px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--slate); display: grid; place-items: center;
  transition: transform .3s, border-color .3s;
}
.tl__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--slate); transition: background-color .3s; }
.tl.is-visible .tl__dot { border-color: var(--rose); }
.tl.is-visible .tl__dot::after { background: var(--rose); }
.tl--current .tl__dot::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--rose); animation: ping 2s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.tl .card:hover { transform: translateY(-3px); }
.tl__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; align-items: baseline; }
.tl__role { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.tl__date { font-size: .85rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.tl__org { margin: 2px 0 10px; font-weight: 600; color: var(--slate); font-size: .95rem; }
.tl__org span { color: var(--ink-3); font-weight: 500; }
.tl__text { margin: 0; color: var(--ink-2); font-size: .98rem; }
.badge-now {
  display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; vertical-align: 2px;
  font: 700 .68rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--rose);
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  color: var(--ink-2); background: color-mix(in srgb, var(--slate) 14%, transparent);
}
.tl[data-type="design"] .tag { background: color-mix(in srgb, var(--rose) 14%, transparent); }
.tl[data-type="other"] .tag { background: color-mix(in srgb, var(--violet) 12%, transparent); }

.earlier { margin: 26px 0 0 38px; }
.earlier h3 { font-size: 1.05rem; margin: 0 0 10px; color: var(--ink-2); }
.earlier ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.earlier li {
  padding: 8px 16px; border-radius: 14px; font-size: .9rem; color: var(--ink-2);
  border: 1px dashed color-mix(in srgb, var(--ink-3) 50%, transparent);
}
.earlier li strong { color: var(--ink); font-weight: 600; }

/* education */
.edu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.edu .card { display: flex; flex-direction: column; }
.edu__years { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; color: var(--slate); }
.edu__title { margin: 14px 0 4px; font-size: 1.15rem; line-height: 1.3; }
.edu__org { margin: 0; color: var(--ink-2); font-size: .95rem; flex: 1; }
.edu__note {
  align-self: flex-start; margin-top: 16px; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: color-mix(in srgb, var(--slate) 16%, transparent); color: var(--ink-2);
}
.edu__note--honors { background: var(--grad); color: #fff; }
.edu__note--now { background: color-mix(in srgb, var(--rose) 18%, transparent); color: var(--rose); }

.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cert { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; }
.cert__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--grad); }
.cert__icon svg { width: 20px; height: 20px; }
.cert h4 { margin: 0; font-size: .98rem; line-height: 1.35; }
.cert p { margin: 3px 0 0; font-size: .85rem; color: var(--ink-3); }

/* skills */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skills h3 { margin: 0 0 16px; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.skills h3 svg { width: 24px; height: 24px; color: var(--rose); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 12px; font-size: .9rem; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), background-color .25s, color .25s, border-color .25s;
  cursor: default;
}
.chip:hover { transform: translateY(-3px) rotate(-2deg); background: var(--ink); color: var(--bg); border-color: var(--ink); }

.langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lang-card { display: flex; flex-direction: column; gap: 10px; }
.lang-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lang-card__name { font-family: var(--serif); font-size: 1.35rem; }
.lang-card__level { font-size: .85rem; color: var(--ink-3); font-weight: 600; }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }

/* portfolio */
.portfolio {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 5vw, 56px); align-items: center;
  padding: clamp(26px, 5vw, 48px); text-decoration: none; color: inherit;
}
.portfolio:hover { transform: translateY(-4px); }
.portfolio__logo { display: grid; place-items: center; width: clamp(110px, 18vw, 190px); }
.portfolio__logo img { width: 100%; height: auto; transition: transform .6s cubic-bezier(.3, 1.5, .5, 1); }
.portfolio:hover .portfolio__logo img { transform: scale(1.06) rotate(-4deg); }
.portfolio__body { display: flex; flex-direction: column; gap: 6px; }
.portfolio__title { font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.1; letter-spacing: -.02em; }
.portfolio__text { color: var(--ink-2); max-width: 32em; }
.portfolio__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 700; color: var(--rose); }
.portfolio__cta svg { width: 20px; height: 20px; transition: transform .3s; }
.portfolio:hover .portfolio__cta svg { transform: translate(3px, -3px); }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}

/* contact */
.contact { padding-bottom: 40px; }
.contact__card {
  text-align: center; padding: clamp(40px, 7vw, 80px) clamp(20px, 5vw, 60px); border-radius: 32px;
  background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--shadow); position: relative;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.contact__card > p { max-width: 34em; margin: 16px auto 28px; color: var(--ink-2); }
.form { max-width: 640px; margin: 0 auto; text-align: left; display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: 14px; resize: vertical;
  font: 400 1rem/1.5 var(--sans); color: var(--ink);
  background: var(--bg-2); border: 1.5px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--violet);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent);
}
.form__trap { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.form__status { margin: 0; flex: 1 1 220px; font-size: .92rem; font-weight: 500; }
.form__status.is-ok { color: #2f9e6e; }
.form__status.is-error { color: var(--rose); }
.contact__links { display: flex; justify-content: center; gap: 12px; margin: 34px 0 22px; }
.contact__links:empty { display: none; }
.social {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); transition: transform .3s, color .3s, border-color .3s;
}
.social:hover { transform: translateY(-4px) rotate(-8deg); color: var(--rose); border-color: var(--rose); }
.social svg { width: 22px; height: 22px; }
.social svg.fill { fill: currentColor; stroke: none; }

.footer { text-align: center; padding: 30px var(--gutter) calc(30px + env(safe-area-inset-bottom, 0px)); color: var(--ink-3); font-size: .85rem; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .8, .2, 1), transform .9s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* language swap fade */
body.is-switching main, body.is-switching .nav__links { opacity: .25; filter: blur(3px); }
main, .nav__links { transition: opacity .25s, filter .25s; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  transform: translate(-50%, calc(100% + 40px)); visibility: hidden; padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow);
  transition: transform .45s cubic-bezier(.3, 1.4, .5, 1);
}
.toast.is-on { transform: translate(-50%, 0); visibility: visible; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .edu, .certs, .skills, .langs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 10px; min-height: auto; text-align: left; }
  .hero__photo { order: -1; }
  .hero__role { min-height: 3.2em; }
  .photo { width: min(72vw, 300px); }
  .scroll-hint { display: none; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat { padding: 18px 10px; }
  .stat__label { font-size: .78rem; line-height: 1.35; }
  .about { grid-template-columns: 1fr; }
  .about__photo { margin-right: 10px; }
  .about__photo::before { transform: translate(8px, 8px); }
  .hero { padding-bottom: 36px; }
  .form__row { grid-template-columns: 1fr; }
  .form__send { width: 100%; justify-content: center; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .hero__name { margin-top: 4px; }
  .wordmark { width: min(100%, 420px); }
  .strengths li { font-size: .8rem; padding: 4px 11px; }
  .subhead { margin-top: 44px; }
  .contact__card { border-radius: 24px; }
  .portfolio { grid-template-columns: 1fr; justify-items: start; }
  .edu, .certs, .skills, .langs { grid-template-columns: 1fr; }
  .timeline { padding-left: 30px; }
  .tl__dot { left: -30px; width: 22px; height: 22px; }
  .timeline::before, .timeline__fill { left: 10px; }
  .earlier { margin-left: 30px; }
  .card { padding: 20px; }
  .lang button { padding: 6px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .strengths li { opacity: 1 !important; transform: none !important; }
  .wordmark { clip-path: none; }
  html { scroll-behavior: auto; }
}

/* ---------- print (fallback if the PDF library can't load) ---------- */
@media print {
  .nav, .blobs, .cursor-glow, .progress, .scroll-hint, .btn, .form, .contact__links, body::before { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .reveal, .strengths li { opacity: 1 !important; transform: none !important; }
  .card, .stat, .contact__card { box-shadow: none; border: 1px solid #ddd; backdrop-filter: none; }
  .hero { min-height: auto; padding: 0; }
  .section { padding-top: 24px; }
  .tl, .card { break-inside: avoid; }
}
