/* ==========================================================
   Direction: playful bold / sticker. Cream paper, cobalt blocks,
   yellow accent, thick outlines, flat colour (no gradients).
   See DESIGN.md before changing tokens.
   ========================================================== */
:root {
  --bg: #fff8e7;
  --card: #ffffff;
  --ink: #14142b;
  --muted: #55546f;

  --blue: #3b4eff;      /* dominant */
  --yellow: #ffd93d;    /* sharp accent */
  --pink: #ff8fb8;
  --mint: #9be8c4;
  --lilac: #c9bbff;
  --dark: #14142b;      /* fixed: text inside coloured blocks */
  --cream: #fff8e7;     /* fixed: text on blue */

  --line: 2.5px solid var(--ink);
  --hard: 4px 4px 0 var(--ink);
  --r-card: 28px;
  --r-block: 40px;

  --display: "Gabarito", "Trebuchet MS", system-ui, sans-serif;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 72px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #14142b; --card: #1f1f3d; --ink: #fff8e7; --muted: #b7b5d4; }
}
:root[data-theme="dark"] { --bg: #14142b; --card: #1f1f3d; --ink: #fff8e7; --muted: #b7b5d4; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); }
body {
  font-family: var(--font); font-size: 18px; line-height: 1.6;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
:root[data-theme="dark"] :focus-visible { outline-color: var(--yellow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :focus-visible { outline-color: var(--yellow); } }
::selection { background: var(--yellow); color: var(--dark); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--yellow); color: var(--dark); padding: 8px 16px; border: var(--line); border-radius: 999px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- Nav: floating pill ---------- */
.nav { position: fixed; top: 12px; left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.nav__pill {
  pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 8px;
  background: var(--card); border: var(--line); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
}
.nav__mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: var(--yellow); font-family: var(--display); font-weight: 900; font-size: 18px; }
.nav__links { display: flex; gap: 2px; margin: 0 6px; }
.nav__links a { padding: 10px 14px; border-radius: 999px; font-weight: 700; font-size: 15px; transition: background 0.15s; }
.nav__links a:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.nav__links a.active { background: var(--yellow); color: var(--dark); }
.nav__actions { display: flex; align-items: center; gap: 6px; }
.nav__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: var(--line); background: var(--bg); transition: transform 0.3s var(--pop); }
.nav__icon:hover { transform: rotate(-20deg) scale(1.08); }
.nav__icon svg { width: 20px; height: 20px; }
.nav__burger { display: none; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--yellow); color: var(--dark); border: var(--line); font-weight: 700; }

/* ---------- Shared bits ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  font-weight: 700; font-size: 16px; border: var(--line); border-radius: 999px; box-shadow: var(--hard);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn--yellow { background: var(--yellow); color: var(--dark); }
.btn--white { background: #fff; color: var(--dark); }
.btn--dark { background: var(--dark); color: var(--cream); }

.sticker {
  display: inline-block; padding: 7px 16px; border: var(--line); border-radius: 999px; font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--dark);
  background: var(--yellow); white-space: nowrap;
}
.sticker--pink { background: var(--pink); } .sticker--mint { background: var(--mint); } .sticker--yellow { background: var(--yellow); } .sticker--lilac { background: var(--lilac); }

.sec { padding: 72px 0; }
.sec__title { display: flex; align-items: center; gap: 16px; font-size: clamp(2.2rem, 5.4vw, 4rem); margin-bottom: 40px; }
.num { display: grid; place-items: center; flex: none; width: 1.15em; height: 1.15em; border-radius: 50%; border: var(--line); background: var(--yellow); color: var(--dark); font-size: 0.62em; transform: rotate(-8deg); }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--nav-h) + 20px); overflow-x: clip; }
.hero__card {
  position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center;
  background: var(--blue); color: var(--cream); border: var(--line); border-radius: var(--r-block); padding: 56px 56px 56px; box-shadow: 8px 8px 0 var(--ink);
}
.hi { display: inline-block; background: var(--yellow); color: var(--dark); border: var(--line); border-radius: 999px; padding: 4px 16px; font-weight: 700; transform: rotate(-3deg); margin-bottom: 18px; }
.hero h1 { font-size: clamp(3rem, 7.2vw, 6.4rem); line-height: 0.92; font-weight: 900; }
.hero h1 span { display: block; }
.hero h1 .hl { color: var(--yellow); }
.hero__statement { margin-top: 22px; font-size: clamp(1.1rem, 1.9vw, 1.4rem); line-height: 1.4; max-width: 30ch; font-weight: 500; }
.hero__builds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero__builds li { padding: 5px 14px; border: 2px solid var(--cream); border-radius: 999px; font-size: 15px; font-weight: 500; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__visual { position: relative; display: grid; place-items: center; padding: 12px 0; }
.photo {
  position: relative; width: min(360px, 100%); aspect-ratio: 4 / 5; overflow: hidden; background: var(--yellow);
  border: var(--line); border-radius: 200px 200px 28px 28px; box-shadow: var(--hard); transform: rotate(2deg);
}
.photo img, .photo__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.photo__fallback { display: grid; place-items: center; font-family: var(--display); font-size: 6rem; font-weight: 900; color: var(--dark); }
.hero__visual .sticker { position: absolute; box-shadow: 3px 3px 0 var(--ink); font-size: 16px; }
.s1 { top: 6%; left: -2%; transform: rotate(-8deg); }
.s2 { top: 44%; right: -3%; transform: rotate(6deg); }
.s3 { bottom: 5%; left: 2%; transform: rotate(-4deg); }
.hero__visual .sticker { transition: transform 0.3s var(--pop); }
@media (hover: hover) { .hero__visual .sticker:hover { transform: rotate(0) scale(1.12); } }

.marquee { margin-top: 56px; background: var(--yellow); color: var(--dark); border-block: var(--line); overflow: hidden; transform: rotate(-1.2deg) scale(1.02); }
.marquee__track { display: flex; width: max-content; padding: 14px 0; animation: scroll 38s linear infinite; font-family: var(--display); font-weight: 800; font-size: 1.4rem; white-space: nowrap; }
.marquee__track span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; }
.marquee__track span::after { content: ""; width: 14px; height: 14px; background: var(--blue); border: 2px solid var(--dark); border-radius: 50%; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.bubble { position: relative; display: grid; gap: 18px; background: var(--card); border: var(--line); border-radius: var(--r-block); padding: 40px; font-size: 1.2rem; line-height: 1.55; box-shadow: var(--hard); }
.bubble p:first-child { font-weight: 500; font-size: 1.3rem; }
.bubble p + p { color: var(--muted); }
.bubble::after { content: ""; position: absolute; right: 56px; bottom: -17px; width: 28px; height: 28px; background: var(--card); border-right: var(--line); border-bottom: var(--line); transform: rotate(45deg); }
.facts { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.facts li { padding: 12px 20px; border: var(--line); border-radius: 22px; font-weight: 700; color: var(--dark); line-height: 1.25; }
.facts li small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; opacity: 0.7; margin-bottom: 2px; }
.facts li:nth-child(1) { background: var(--yellow); transform: rotate(-2deg); }
.facts li:nth-child(2) { background: var(--pink); transform: rotate(1.5deg); }
.facts li:nth-child(3) { background: var(--mint); transform: rotate(-1deg); }
.facts li:nth-child(4) { background: var(--lilac); transform: rotate(2deg); }
.facts li:nth-child(5) { background: #fff; transform: rotate(-1.5deg); }

/* ---------- Skills: candy jars on shelves ---------- */
.shelves { display: grid; gap: 64px; }
.shelf { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; padding-bottom: 22px; position: relative; }
.shelf::after { content: ""; position: absolute; left: -12px; right: -12px; bottom: 0; height: 16px; background: var(--ink); border-radius: 999px; }
.jar { position: relative; display: flex; flex-direction: column; flex: var(--w, 1) 1 250px; min-width: 0; color: var(--dark); }
.jar__lid {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 10px -2.5px; padding: 10px 18px;
  border: var(--line); border-radius: 18px 18px 0 0; background: var(--jar-dark); color: var(--cream); position: relative; z-index: 1;
}
.jar__lid h3 { font-size: 1.15rem; }
.jar__lid span { font-weight: 700; font-size: 14px; padding: 1px 10px; border-radius: 999px; background: var(--cream); color: var(--dark); }
.jar__body {
  position: relative; display: flex; flex-wrap: wrap; align-content: flex-end; justify-content: center; gap: 8px; padding: 24px 22px 18px;
  border: var(--line); border-radius: 22px 22px 34px 34px; background: var(--jar); overflow: hidden; cursor: pointer;
}
.jar__body::before { /* glass highlight */
  content: ""; position: absolute; top: 18px; bottom: 18px; left: 12px; width: 9px; border-radius: 9px; background: rgba(255, 255, 255, 0.5); pointer-events: none;
}
.jar--blue { --jar: #8b97ff; --jar-dark: var(--blue); }
.jar--pink { --jar: #ffb3d1; --jar-dark: #c2347a; }
.jar--mint { --jar: #9be8c4; --jar-dark: #0f7a52; }
.jar--yellow { --jar: #ffe27a; --jar-dark: #7a5f00; }
.jar--lilac { --jar: #c9bbff; --jar-dark: #5b43d6; }
.jar--peach { --jar: #ffc59a; --jar-dark: #b4501e; }
.jar ul { display: contents; }
.candy {
  cursor: pointer; font-family: inherit;
  position: relative; display: inline-block; padding: 8px 16px; background: #fff; color: var(--dark); border: 2px solid var(--dark); border-radius: 14px;
  font-weight: 700; font-size: 15px; line-height: 1.2; transition: transform 0.25s var(--pop), translate 0.3s var(--pop);
}
/* resting poses: a pile, not a grid */
.jar li:nth-child(6n+1) .candy { transform: rotate(-4deg); } .jar li:nth-child(6n+2) .candy { transform: rotate(3deg) translateY(-2px); }
.jar li:nth-child(6n+3) .candy { transform: rotate(-1.5deg); } .jar li:nth-child(6n+4) .candy { transform: rotate(5deg) translateY(2px); }
.jar li:nth-child(6n+5) .candy { transform: rotate(-3deg); } .jar li:nth-child(6n) .candy { transform: rotate(1.5deg) translateY(-1px); }
@media (hover: hover) { .candy:hover { transform: rotate(0) scale(1.12) translateY(-3px) !important; z-index: 2; } }

/* Gravity: items at the bottom of the pile land first, the rest rain down on top, with two small bounces */
.candy.on { background: var(--blue); color: #fff; border-color: var(--dark); transform: rotate(0) scale(1.1) !important; z-index: 2; }

@keyframes fall {
  0%   { translate: 0 -340px; opacity: 0; animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  8%   { opacity: 1; }
  52%  { translate: 0 0; animation-timing-function: ease-out; }
  68%  { translate: 0 -16px; animation-timing-function: ease-in; }
  82%  { translate: 0 0; animation-timing-function: ease-out; }
  91%  { translate: 0 -4px; animation-timing-function: ease-in; }
  100% { translate: 0 0; }
}
.jar:not(.drop) .candy { opacity: 0; }
.jar.drop .candy { animation: fall 1.05s backwards; animation-delay: calc((var(--n) - var(--i)) * 55ms + 120ms); }
@keyframes shake { 0%, 100% { rotate: 0deg; } 20% { rotate: -2.5deg; } 40% { rotate: 2.5deg; } 60% { rotate: -1.5deg; } 80% { rotate: 1.5deg; } }
.jar__body.shake { animation: shake 0.26s ease-in-out; }

/* ---------- Experience ---------- */
.xp-list { display: grid; gap: 28px; }
.xp { position: relative; display: grid; grid-template-columns: 220px 1fr; gap: 12px 40px; padding: 36px 40px; border: var(--line); border-radius: var(--r-block); color: var(--dark); box-shadow: var(--hard); }
.xp:nth-child(1) { background: var(--yellow); }
.xp:nth-child(2) { background: var(--mint); }
.period { display: inline-block; align-self: start; justify-self: start; padding: 6px 14px; border: var(--line); border-radius: 999px; background: #fff; color: var(--dark); font-weight: 700; font-size: 14px; white-space: nowrap; }
.period.live::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--blue); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.xp h3, .org h3 { font-size: 1.9rem; }
.sub { font-weight: 700; margin: 6px 0 14px; opacity: 0.8; }
.badge { display: inline-block; margin-left: 8px; padding: 1px 12px; background: var(--pink); color: var(--dark); border: 2px solid var(--dark); border-radius: 999px; font-size: 13px; vertical-align: 2px; }
.list { display: grid; gap: 10px; max-width: 64ch; }
.list li { position: relative; padding-left: 26px; }
.list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; border: 2.5px solid currentColor; border-radius: 50%; }
.subhead { margin: 64px 0 20px; font-size: 1.6rem; }
.org-list { display: grid; gap: 12px; }
.org { background: var(--card); border: var(--line); border-radius: 24px; }
.org summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 16px 22px; cursor: pointer; list-style: none; min-height: 56px; }
.org summary::-webkit-details-marker { display: none; }
.org summary::after { content: "+"; display: grid; place-items: center; width: 32px; height: 32px; border: var(--line); border-radius: 50%; background: var(--yellow); color: var(--dark); font-weight: 900; font-size: 20px; line-height: 1; }
.org[open] summary::after { content: "−"; }
.org h3 { font-size: 1.2rem; flex: 1 1 260px; }
.org .period { padding: 3px 12px; font-size: 13px; background: var(--bg); color: var(--ink); }
.org__body { padding: 0 22px 22px; }
.org__body .sub { margin-top: 0; color: var(--muted); }

/* ---------- Projects ---------- */
.pj-list { display: grid; gap: 56px; }
.pj { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 40px; border: var(--line); border-radius: var(--r-block); color: var(--dark); box-shadow: 8px 8px 0 var(--ink); }
.pj:nth-child(4n+1) { background: var(--pink); }
.pj:nth-child(4n+2) { background: var(--yellow); }
.pj:nth-child(4n+3) { background: var(--mint); }
.pj:nth-child(4n) { background: var(--lilac); }
.pj:nth-child(even) .pj__media { order: 2; }
.pj__no { position: absolute; top: -22px; left: 32px; padding: 6px 18px; background: var(--dark); color: var(--cream); border: var(--line); border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 1.1rem; transform: rotate(-4deg); }
.pj:nth-child(even) .pj__no { left: auto; right: 32px; transform: rotate(4deg); }
.pj__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pj__meta .period, .pj__meta .role { padding: 4px 14px; border: 2px solid var(--dark); border-radius: 999px; background: #fff; font-weight: 700; font-size: 13px; }
.pj h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.pj .sub { margin: 8px 0 14px; }
.pj__desc { font-weight: 500; font-size: 1.1rem; line-height: 1.45; margin-bottom: 16px; }
.pj .list li::before { border-width: 2.5px; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.stack li { padding: 3px 12px; background: #fff; border: 2px solid var(--dark); border-radius: 999px; font-size: 14px; font-weight: 700; }
.pj__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2.5px; text-underline-offset: 4px; }
.pj__link svg { width: 16px; height: 16px; }

.project__media { position: relative; aspect-ratio: 16 / 10; width: 100%; overflow: hidden; border: var(--line); border-radius: 22px; background: #fff; }
.pj:nth-child(odd) .project__media { transform: rotate(-1.2deg); }
.pj:nth-child(even) .project__media { transform: rotate(1.2deg); }
.slides { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; transition: opacity 0.22s ease; }
.slides::-webkit-scrollbar { display: none; }
.slider.fading .slides { opacity: 0; }
.slide { flex: 0 0 100%; height: 100%; overflow: hidden; cursor: zoom-in; scroll-snap-align: center; scroll-snap-stop: always; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.slide img.portrait { object-fit: contain; }
.project__media .count { position: absolute; right: 12px; bottom: 12px; padding: 3px 12px; background: var(--dark); color: var(--cream); border-radius: 999px; font-size: 13px; font-weight: 700; }
.project__placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; font-weight: 700; color: var(--dark);
  background-image: repeating-linear-gradient(45deg, transparent 0 12px, rgba(20, 20, 43, 0.1) 12px 14px);
}
.project__placeholder svg { width: 40px; height: 40px; }

/* ---------- Education ---------- */
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.edu__card { padding: 36px; border: var(--line); border-radius: var(--r-block); color: var(--dark); box-shadow: var(--hard); }
.edu__card:nth-child(1) { background: var(--lilac); transform: rotate(-0.8deg); }
.edu__card:nth-child(2) { background: var(--pink); transform: rotate(0.8deg); }
.edu__card h3 { font-size: 1.8rem; margin: 14px 0 4px; }
.edu__card .degree { font-weight: 700; margin-bottom: 14px; }
.edu__card .meta { display: inline-block; padding: 2px 14px; background: var(--dark); color: var(--cream); border-radius: 999px; font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.edu__card > p { margin-top: 4px; }

/* ---------- Certificates: polaroids ---------- */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 28px; }
.cert { display: flex; flex-direction: column; padding: 12px 12px 18px; background: #fff; color: var(--dark); border: var(--line); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); transition: transform 0.3s var(--pop); }
.cert:nth-child(4n+1) { transform: rotate(-2deg); } .cert:nth-child(4n+2) { transform: rotate(1.5deg); }
.cert:nth-child(4n+3) { transform: rotate(-1deg); } .cert:nth-child(4n) { transform: rotate(2deg); }
@media (hover: hover) { .cert:hover { transform: rotate(0) scale(1.04); } }
.cert__media { aspect-ratio: 4 / 3; width: 100%; border: 2px solid var(--dark); border-radius: 4px; overflow: hidden; background: var(--yellow); display: grid; place-items: center; padding: 0; }
.cert__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cert__media svg { width: 44px; height: 44px; }
.cert__body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 14px 4px 0; }
.cert h3 { font-size: 1.05rem; line-height: 1.2; }
.cert p { font-size: 0.88rem; color: #55546f; line-height: 1.35; }
.cert .cert__note { color: var(--dark); font-weight: 500; }
.cert__id { font-size: 11.5px; color: #55546f; word-break: break-all; }
.cert__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; }
.cert__foot .period { padding: 2px 10px; font-size: 12px; background: var(--yellow); }
.cert__foot a { font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; min-height: 32px; }
.cert__foot a svg { width: 13px; height: 13px; }

/* ---------- Contact ---------- */
.sec--contact { padding-bottom: 96px; }
.contact { position: relative; padding: 72px 56px; background: var(--yellow); color: var(--dark); border: var(--line); border-radius: var(--r-block); box-shadow: 8px 8px 0 var(--ink); }
.contact__title { font-size: clamp(2.8rem, 8vw, 7rem); line-height: 0.95; font-weight: 900; max-width: 12ch; }
.contact__sticker { position: absolute; top: 28px; right: 40px; font-size: 1.3rem; padding: 12px 24px; transform: rotate(8deg); box-shadow: 3px 3px 0 var(--ink); }
.contact__lead { margin: 24px 0 32px; font-size: 1.25rem; font-weight: 500; max-width: 40ch; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.footer { padding: 24px 0 40px; color: var(--muted); font-weight: 500; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer a { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ---------- Interactive bits ---------- */
.hero__visual .sticker { cursor: grab; touch-action: none; user-select: none; }
.hero__visual .sticker.grab { cursor: grabbing; transition: none; transform: rotate(0) scale(1.1); z-index: 5; }
.pj { transition: opacity 0.3s, filter 0.3s; }
.pj.dim { opacity: 0.28; filter: saturate(0.4); }
.pj.hit::after {
  content: attr(data-hit); position: absolute; right: 32px; bottom: -18px; padding: 6px 18px; background: var(--blue); color: #fff; border: var(--line);
  border-radius: 999px; font-weight: 700; font-size: 15px; transform: rotate(-3deg); animation: pop 0.5s var(--pop) backwards;
}
.filterbar {
  position: fixed; left: 50%; bottom: 18px; z-index: 60; translate: -50% 0; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 22px; background: var(--dark); color: var(--cream); border: 2.5px solid var(--cream); border-radius: 999px; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  font-weight: 700; animation: pop 0.4s var(--pop) backwards;
}
.filterbar[hidden] { display: none; }
.filterbar__msg { font-size: 15px; line-height: 1.25; }
.filterbar button { min-height: 40px; border-radius: 999px; font-weight: 700; }
.filterbar__go { padding: 0 18px; background: var(--yellow); color: var(--dark); border: 2px solid var(--cream); }
.filterbar__go[hidden] { display: none; }
.filterbar__x { flex: none; width: 40px; min-width: 40px; height: 40px; padding: 0; font-size: 22px; line-height: 1; background: transparent; border: 2px solid var(--cream); color: var(--cream); }
.filterbar__x:hover, .filterbar__go:hover { background: var(--pink); color: var(--dark); }
@media (max-width: 640px) {
  .filterbar { bottom: 10px; padding: 6px 6px 6px 16px; gap: 8px; border-radius: 26px; width: max-content; }
  .filterbar__msg { font-size: 13px; flex: 1 1 auto; min-width: 0; }
  .filterbar__go { flex: none; padding: 0 14px; font-size: 14px; }
  .pj.hit::after { right: 20px; }
}

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20, 20, 43, 0.94); display: grid; place-items: center; padding: 56px 16px; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1100px, 100%); max-height: calc(100dvh - 112px); width: auto; height: auto; object-fit: contain; border: var(--line); border-color: var(--cream); border-radius: 16px; will-change: transform; user-select: none; -webkit-user-drag: none; }
.lightbox__cap { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: var(--cream); font-size: 14px; padding: 0 16px; }
.lightbox__close, .lightbox__nav { position: absolute; width: 48px; height: 48px; border-radius: 50%; background: var(--yellow); color: var(--dark); border: 2.5px solid var(--cream); font-size: 28px; line-height: 1; display: grid; place-items: center; font-weight: 700; }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--pink); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lightbox__nav, .lightbox.single .lightbox__dots { display: none; }
.lightbox__dots { position: absolute; bottom: 42px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; pointer-events: none; }
.lightbox__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 248, 231, 0.35); transition: background 0.2s, transform 0.2s; }
.lightbox__dots i.on { background: var(--yellow); transform: scale(1.3); }
@media (hover: none) { .lightbox__nav { opacity: 0.8; } }

/* ---------- Motion ---------- */
@keyframes pop { from { opacity: 0; translate: 0 22px; scale: 0.96; } }
.reveal { opacity: 0; }
.reveal.in { opacity: 1; animation: pop 0.6s var(--pop) backwards; animation-delay: var(--d, 0ms); }
.no-js .reveal { opacity: 1; }
.hero__text > * { animation: pop 0.7s var(--pop) backwards; }
.hero__text > :nth-child(2) { animation-delay: 0.06s; } .hero__text > :nth-child(3) { animation-delay: 0.12s; }
.hero__text > :nth-child(4) { animation-delay: 0.18s; } .hero__text > :nth-child(5) { animation-delay: 0.24s; }
.photo { animation: pop 0.8s var(--pop) 0.15s backwards; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hero__card { grid-template-columns: 1fr; padding: 40px 32px 48px; }
  .hero__visual { order: -1; }
  .photo { width: min(300px, 70vw); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .xp { grid-template-columns: 1fr; padding: 28px; }
  .pj { grid-template-columns: 1fr; padding: 32px 28px; }
  .pj:nth-child(even) .pj__media { order: 0; }
  .edu { grid-template-columns: 1fr; }
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .nav__pill { width: 100%; max-width: 560px; justify-content: space-between; }
  .nav__burger { display: inline-flex; align-items: center; }
  .nav__actions { margin-left: auto; }
  .nav__links {
    position: fixed; top: 76px; left: 12px; right: 12px; flex-direction: column; gap: 4px; margin: 0; padding: 12px;
    background: var(--card); border: var(--line); border-radius: 28px; box-shadow: var(--hard); max-width: 560px; margin-inline: auto;
    transform: translateY(-12px) scale(0.96); transform-origin: top right; opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform 0.3s var(--pop), opacity 0.2s, visibility 0.3s;
  }
  .nav__links.open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav__links a { padding: 14px 18px; font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .sec { padding: 48px 0; }
  .sec__title { margin-bottom: 28px; }
  .hero__card { padding: 28px 20px 36px; border-radius: 32px; box-shadow: 5px 5px 0 var(--ink); }
  .hero h1 { font-size: 14vw; }
  .hero__cta .btn { flex: 1 1 100%; }
  .s1 { left: -4px; } .s2 { right: -4px; } .hero__visual .sticker { font-size: 14px; padding: 5px 12px; }
  .marquee { margin-top: 40px; }
  .bubble { padding: 26px 22px; font-size: 1.05rem; border-radius: 28px; }
  .bubble p:first-child { font-size: 1.15rem; }
  .shelves { gap: 48px; }
  .shelf { gap: 36px; }
  .jar { flex-basis: 100%; }
  .xp, .pj, .edu__card { padding: 24px 20px; border-radius: 28px; box-shadow: 4px 4px 0 var(--ink); }
  .xp h3 { font-size: 1.55rem; }
  .pj-list { gap: 48px; }
  .pj__no { left: 20px; }
  .pj:nth-child(even) .pj__no { right: 20px; }
  .certs { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
  .cert { padding: 8px 8px 12px; }
  .cert h3 { font-size: 0.9rem; } .cert p { font-size: 0.78rem; } .cert__id { font-size: 10px; }
  .cert__foot { flex-wrap: wrap; }
  .contact { padding: 48px 22px 36px; border-radius: 32px; box-shadow: 5px 5px 0 var(--ink); }
  .contact__sticker { top: 14px; right: 14px; font-size: 1rem; padding: 8px 16px; }
  .contact__title { margin-top: 28px; font-size: 14vw; }
  .contact__actions .btn { flex: 1 1 100%; font-size: 15px; word-break: break-all; }
}

/* ---------- Paper ---------- */
.papers { display: grid; gap: 32px; }
.paper {
  display: grid; grid-template-columns: minmax(220px, 0.8fr) 1.4fr; gap: 36px; align-items: center; padding: 32px; background: var(--mint); color: var(--dark);
  border: var(--line); border-radius: var(--r-block); box-shadow: var(--hard);
}
.paper__media { width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; background: #fff; border: var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-2deg); transition: transform 0.3s var(--pop); }
.paper__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (hover: hover) { .paper__media:hover { transform: rotate(0) scale(1.03); } }
.paper__tag { display: inline-block; padding: 3px 14px; background: var(--dark); color: var(--cream); border-radius: 999px; font-weight: 700; font-size: 14px; }
.paper h3 { margin: 12px 0 4px; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.1; }
.paper__gloss { font-style: italic; color: #2d2c4a; margin-bottom: 12px; }
.paper__venue { margin-bottom: 10px; font-size: 0.95rem; }
.paper__authors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.paper__authors span { padding: 2px 12px; background: #fff; border: 2px solid var(--dark); border-radius: 999px; font-size: 13px; font-weight: 700; }
.paper .cert__id { color: #2d2c4a; }

/* ---------- Extra life (pointer devices only; JS adds .fx) ---------- */
.shape { position: absolute; z-index: 0; pointer-events: none; transition: transform 0.25s ease-out; }
.shape--ring { width: 74px; height: 74px; border: 7px solid var(--yellow); border-radius: 50%; top: -30px; right: 38%; }
.shape--star { width: 54px; height: 54px; background: var(--pink); border: var(--line); clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 82% 100%, 50% 76%, 18% 100%, 30% 60%, 0 38%, 38% 36%); bottom: 22px; left: 46%; }
.shape--dot { width: 22px; height: 22px; background: var(--mint); border: var(--line); border-radius: 50%; top: 52%; left: 52%; }
.shape--tri { width: 0; height: 0; border-left: 22px solid transparent; border-right: 22px solid transparent; border-bottom: 38px solid var(--lilac); bottom: 12%; right: 6%; }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -14px; rotate: 14deg; } }
.shape { animation: bob 5s ease-in-out infinite; }
.shape--star { animation-duration: 6.5s; animation-delay: -2s; }
.shape--dot { animation-duration: 4s; animation-delay: -1s; }
.shape--tri { animation-duration: 7s; animation-delay: -3s; }
.hero__text, .hero__visual { position: relative; z-index: 1; }

@keyframes wob { 0% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-10px) rotate(-6deg) scale(1.1); } 70% { transform: translateY(2px) rotate(3deg); } 100% { transform: none; } }
.hero h1 .ch, .ch { display: inline-block; white-space: pre; }
.ch.wob { animation: wob 0.5s var(--pop); }

@keyframes idle { 0%, 100% { rotate: 0deg; } 50% { rotate: 3deg; } }
.fx .hero__visual .sticker:not(.grab) { animation: idle 3.4s ease-in-out infinite; }
.fx .hero__visual .s2 { animation-delay: -1.2s; } .fx .hero__visual .s3 { animation-delay: -2.2s; }

.fx .pj, .fx .xp { transition: transform 0.2s ease-out, opacity 0.3s, filter 0.3s; will-change: transform; }
.fx .pj.tilting, .fx .xp.tilting { transition: transform 0.08s linear, opacity 0.3s, filter 0.3s; }
.fx .btn { transition: transform 0.15s, box-shadow 0.15s, translate 0.25s var(--pop); }

.nav__mark { position: relative; }
.ring { position: absolute; inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); transform: rotate(-90deg); pointer-events: none; }
.ring circle { fill: none; stroke: var(--yellow); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 400; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2.5px solid var(--ink); border-radius: 50%;
  background: rgba(255, 217, 61, 0.35); pointer-events: none; opacity: 0; transition: width 0.2s var(--pop), height 0.2s var(--pop), margin 0.2s var(--pop), background 0.2s, opacity 0.2s;
}
.cursor.on { opacity: 1; }
.cursor.big { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255, 143, 184, 0.4); }
.cursor.down { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
:root[data-theme="dark"] .cursor { border-color: var(--cream); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cursor { border-color: var(--cream); } }

.fx .sec__title .tw { display: inline-block; opacity: 0; translate: 0 0.5em; rotate: 8deg; }
.fx .sec__title.in .tw { opacity: 1; translate: 0 0; rotate: 0deg; transition: opacity 0.4s, translate 0.55s var(--pop), rotate 0.55s var(--pop); transition-delay: calc(var(--k) * 35ms); }

@media (max-width: 1024px) { .shape--ring, .shape--dot { display: none; } }
@media (max-width: 760px) { .paper { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 640px) {
  .paper { padding: 22px 18px; box-shadow: 4px 4px 0 var(--ink); border-radius: 28px; }
  .shape { display: none; }
  /* mobile: one jar, one shelf */
  .shelf::after { display: none; }
  .shelf { padding-bottom: 0; gap: 44px; }
  .jar { padding-bottom: 24px; }
  .jar::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: 0; height: 15px; background: var(--ink); border-radius: 999px; }
}

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