/* Damia Tsiafaratiana · portfolio
   Base = "Damia's world" from the TUA site (pastel, fairy-tale, playful)
   + TUA's unexpected bits (pop-up windows, surprises). */

:root {
  --cream: #FFF8F1;
  --peach: #FFF1E6;
  --blush: #FFE6F1;
  --sky: #E6F4FF;
  --mint: #EAFBF0;
  --card: #FFFFFF;
  --ink: #2B2340;
  --muted: #5E4E72;
  --line: #EBCFE0;
  --rose: #C2185B;      /* accessible pink for text */
  --rose-hi: #E0006F;   /* big titles only */
  --p-pink: #FFB3D6;
  --p-yellow: #FFE45E;
  --p-mint: #A8EBC6;
  --p-sky: #9FD8FF;
  --p-peach: #FFC48A;
  --lime: #C9EF35;      /* TUA link */

  --f-title: "Fredoka", "Bricolage Grotesque", Arial, sans-serif;
  --f-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "DM Mono", ui-monospace, Consolas, monospace;

  --r-sm: 10px;
  --r-md: 22px;
  --space: clamp(40px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  background: linear-gradient(180deg, var(--cream) 0%, var(--blush) 30%, var(--sky) 62%, var(--mint) 100%) fixed;
  background-color: var(--cream);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; } /* keeps every photo in proportion */
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-title); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 0.85em; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow { font: 500 0.8rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; }
.h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 20ch; margin-bottom: 18px; }
.h2 em, h1 em { font-style: normal; color: var(--rose-hi); }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 56ch; }
.small { font-size: 0.92rem; color: var(--muted); }
.link { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.link:hover { color: var(--rose); }
section { position: relative; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: #fff; border: 2.5px solid var(--ink);
  font: 600 1rem var(--f-body); text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--p-pink);
  transition: background-color 200ms, color 200ms, box-shadow 200ms;
}
.btn:hover { background: var(--rose); border-color: var(--rose); }
.btn--ghost { background: var(--card); color: var(--ink); }
.btn--ghost:hover { background: var(--p-yellow); color: var(--ink); border-color: var(--ink); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 0.92rem; box-shadow: 3px 3px 0 var(--p-pink); }

.tags { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font: 500 0.8rem var(--f-mono); padding: 4px 11px; border-radius: 999px; background: var(--blush); border: 1.5px solid var(--ink); }
.tags li:nth-child(5n+2) { background: #FFF6C2; }
.tags li:nth-child(5n+3) { background: #D8F5E3; }
.tags li:nth-child(5n+4) { background: #DDF0FF; }
.tags li:nth-child(5n+5) { background: #FFE3CC; }

/* ============ Header ============ */
.top { position: sticky; top: 0; z-index: 20; background: rgb(255 248 241 / 0.96); border-bottom: 1.5px solid var(--line); }
.top__row { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.15rem var(--f-title); }
.logo__dot { width: 34px; height: 34px; flex: none; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--rose); text-decoration: underline; text-underline-offset: 4px; }
.nav a.lang { font: 500 0.85rem var(--f-mono); padding: 4px 9px; border: 1.5px solid currentColor; border-radius: 999px; }
.nav a.lang:hover { background: var(--ink); color: #fff; text-decoration: none; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 2px solid var(--ink); background: var(--card); border-radius: 999px; font: 600 0.95rem var(--f-body); color: inherit; cursor: pointer; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; align-items: stretch; gap: 0; background: var(--cream); border-bottom: 1.5px solid var(--line); padding: 8px 16px 18px; }
  .nav.open { display: flex; }
  .nav a:not(.btn):not(.lang) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav a.lang { align-self: flex-start; margin-top: 14px; }
  .nav .btn { margin-top: 14px; }
}

/* ============ Floating world (bubbles, stars) ============ */
.worldfx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
main { position: relative; z-index: 1; }
.fx { position: absolute; }
.fx-bubble { border-radius: 50%; border: 2px solid rgb(255 255 255 / 0.9); background: radial-gradient(circle at 30% 30%, rgb(255 255 255 / 0.9), rgb(255 255 255 / 0) 45%), var(--c); opacity: 0.45; }
.fx-star { width: 16px; height: 16px; opacity: 0.8; }
@media (prefers-reduced-motion: no-preference) {
  .fx-bubble { animation: rise var(--d, 14s) linear var(--delay, 0s) infinite; }
  @keyframes rise { from { transform: translateY(0); } to { transform: translateY(-115vh); } }
  .fx-star { animation: tw 2.6s ease-in-out var(--delay, 0s) infinite; }
}
@keyframes tw { 50% { transform: scale(0.5) rotate(40deg); opacity: 0.35; } }

/* ============ Hero ============ */
.hero { padding: clamp(32px, 5vw, 64px) 0 var(--space); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 0.82rem var(--f-mono); background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px; padding: 5px 12px; margin-bottom: 18px; }
.status i { width: 9px; height: 9px; border-radius: 50%; background: #1FA463; box-shadow: 0 0 0 3px #CFF3DF; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); margin-bottom: 20px; }
html[lang="fr"] .hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); }
.hero h1 em { display: inline-block; background: var(--p-yellow); color: var(--ink); padding: 0 12px; border-radius: 14px; rotate: -2deg; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 22px; }
.roles { font: 500 0.85rem var(--f-mono); color: var(--muted); }

.portrait-wrap { position: relative; justify-self: center; width: min(420px, 100%); }
.portrait { position: relative; }
.portrait__frame {
  position: relative; border: 3px solid var(--ink); border-radius: 220px 220px 28px 28px; overflow: hidden;
  background: var(--card); box-shadow: 0 0 0 8px var(--p-yellow), 0 0 0 13px var(--p-mint), 12px 16px 0 13px var(--p-pink);
  aspect-ratio: 4 / 5;
}
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait { cursor: pointer; }
.portrait:focus-visible { outline-offset: 10px; }
.portrait__frame .alt { position: absolute; inset: 0; opacity: 0; transition: opacity 250ms; }
.portrait:hover .portrait__frame .alt, .portrait.winking .portrait__frame .alt { opacity: 1; }
.portrait__sticker {
  position: absolute; left: -18px; bottom: 34px; rotate: -6deg; z-index: 2;
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 14px; padding: 8px 14px;
  font: 600 1rem var(--f-title); box-shadow: 4px 4px 0 var(--ink);
}
.portrait__sticker small { display: block; font: 500 0.72rem var(--f-mono); color: var(--muted); }
.portrait__hello { position: absolute; right: -6px; top: 18px; z-index: 2; rotate: 8deg; background: var(--p-pink); border: 2.5px solid var(--ink); border-radius: 999px; padding: 6px 14px; font: 600 0.95rem var(--f-title); }
.deco { position: absolute; pointer-events: none; }
.d-rainbow { width: 150px; top: -64px; left: 50%; translate: -50% 0; z-index: 3; }
.d-fly { width: 50px; right: -28px; top: 46%; }
.wand-btn { position: absolute; left: -40px; top: 18%; z-index: 3; width: 62px; height: 62px; padding: 4px; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.wand-btn:hover { background: rgb(255 228 94 / 0.5); }
.wand-btn svg { width: 100%; height: 100%; }
.d-mush { width: 48px; right: 16px; bottom: -26px; }
@media (prefers-reduced-motion: no-preference) {
  .d-fly { animation: flutter 2.6s ease-in-out infinite; }
  .wand-btn svg { animation: wiggle 2s ease-in-out infinite; }
  @keyframes flutter { 50% { transform: translate(-12px, -10px) rotate(-8deg); } }
  @keyframes wiggle { 50% { transform: rotate(-12deg); } }
}
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .portrait-wrap { order: -1; width: min(300px, 82%); margin-top: 56px; }
  .wand-btn { left: -30px; width: 54px; height: 54px; } .d-fly { right: -18px; }
  .portrait__sticker { left: -10px; }
}

/* ============ About ============ */
.about { padding: var(--space) 0; }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.loves { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.loves li { font: 600 1.15rem var(--f-title); background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-sm); padding: 10px 16px; box-shadow: 4px 4px 0 var(--c, var(--p-pink)); width: fit-content; }
.loves li:nth-child(2) { --c: var(--p-mint); margin-left: 18px; }
.loves li:nth-child(3) { --c: var(--p-sky); margin-left: 36px; }
.path { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: p; }
.path li { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-md); padding: 20px; position: relative; }
.path li::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 12px; border-radius: 20px 20px 0 0; background: var(--c); border-bottom: 2px solid var(--ink); }
.path li:nth-child(1) { --c: var(--p-pink); } .path li:nth-child(2) { --c: var(--p-yellow); } .path li:nth-child(3) { --c: var(--p-mint); } .path li:nth-child(4) { --c: var(--p-sky); }
.path__n { display: block; font: 500 0.78rem var(--f-mono); color: var(--rose); margin-top: 8px; }
.path h3 { font-size: 1.35rem; margin: 6px 0 8px; }
.path blockquote { margin: 0; font-size: 0.98rem; color: var(--muted); font-style: italic; }
@media (max-width: 960px) { .path { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .about__grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .path { grid-template-columns: 1fr; } .loves li:nth-child(n) { margin-left: 0; } }

/* ============ What I do: pop-up windows ============ */
.skills { padding: var(--space) 0; }
.windows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; margin-top: 36px; }
.win { background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--r-md); box-shadow: 6px 6px 0 var(--sh, var(--p-pink)); overflow: hidden; }
.win:nth-child(1) { rotate: -1deg; } .win:nth-child(2) { translate: 0 28px; rotate: 0.8deg; --sh: var(--p-sky); } .win:nth-child(3) { translate: 0 10px; rotate: -0.4deg; --sh: var(--p-mint); }
.win__bar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 2.5px solid var(--ink); font: 500 0.82rem var(--f-mono); background: var(--bar, var(--p-pink)); }
.win:nth-child(2) .win__bar { --bar: var(--p-yellow); } .win:nth-child(3) .win__bar { --bar: var(--p-sky); }
.win__dots { display: flex; gap: 5px; } .win__dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); background: #fff; }
.win__body { padding: 22px; }
.win__kicker { font: 600 1.05rem/1.3 var(--f-title); color: var(--rose); margin-bottom: 8px; }
.win h3 { font-size: 1.55rem; margin-bottom: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .js .win { opacity: 0; scale: 0.88; }
  .js .win.popped { opacity: 1; scale: 1; transition: opacity 240ms ease-out, scale 340ms cubic-bezier(.3,1.6,.5,1); }
}
@media (max-width: 900px) { .windows { grid-template-columns: 1fr; max-width: 580px; } .win:nth-child(n) { translate: none; rotate: none; } }

/* mini workflow demo */
.flow { margin-top: 72px; max-width: 760px; }
.flow .win__bar { --bar: var(--lime); }
.flow__steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.flow__steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 10px 12px; border: 2px dashed var(--line); border-radius: var(--r-sm); color: var(--muted); transition: background-color 250ms, border-color 250ms, color 250ms; }
.flow__steps li b { display: block; color: var(--ink); font-family: var(--f-title); font-weight: 600; font-size: 1.05rem; }
.flow__steps li span.n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); font: 500 0.8rem var(--f-mono); }
.flow__steps li.on { background: #EAFBF0; border: 2px solid var(--ink); color: var(--ink); }
.flow__steps li.on span.n { background: var(--p-mint); border-color: var(--ink); }
.flow__status { font: 500 0.88rem var(--f-mono); color: var(--muted); margin: 10px 0 0; }

/* ============ Projects ============ */
.projects { padding: var(--space) 0; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 36px; }
.card { background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; box-shadow: 6px 6px 0 var(--sh, var(--p-pink)); }
.card:nth-child(2) { --sh: var(--p-yellow); } .card:nth-child(3) { --sh: var(--p-mint); } .card:nth-child(4) { --sh: var(--p-sky); }
.card__img { aspect-ratio: 16 / 9; background: var(--blush); border-bottom: 2.5px solid var(--ink); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card__n { font: 500 0.78rem var(--f-mono); color: var(--rose); }
.card h3 { font-size: 1.5rem; margin: 6px 0 6px; }
.card__meta { font: 500 0.82rem var(--f-mono); color: var(--muted); margin-bottom: 12px; }
.card__more { margin-top: auto; padding-top: 18px; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } }

/* dialogs (case studies) */
.dlg { width: min(860px, 100% - 24px); max-height: calc(100vh - 32px); border: 2.5px solid var(--ink); border-radius: var(--r-md); padding: 0; background: var(--card); color: var(--ink); box-shadow: 8px 8px 0 var(--p-pink); }
.dlg::backdrop { background: rgb(43 35 64 / 0.55); }
.dlg__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--p-yellow); border-bottom: 2.5px solid var(--ink); font: 500 0.82rem var(--f-mono); }
.dlg__close { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); font: 600 0.9rem var(--f-body); cursor: pointer; color: var(--ink); }
.dlg__close:hover { background: var(--ink); color: #fff; }
.dlg__body { padding: clamp(20px, 4vw, 36px); }
.dlg h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 6px; }
.dlg h3 { font-size: 1.2rem; margin: 26px 0 8px; color: var(--rose); }
.dlg ul { padding-left: 1.2em; margin: 0; display: grid; gap: 6px; }
.dlg .takeaway { margin-top: 26px; background: var(--blush); border: 2px solid var(--ink); border-radius: var(--r-sm); padding: 16px 18px; font: 500 1.08rem/1.45 var(--f-title); }
.gallery { display: grid; gap: 18px; margin-top: 24px; }
.gallery figure { margin: 0; border: 2px solid var(--ink); border-radius: var(--r-sm); overflow: hidden; background: var(--cream); }
.gallery figcaption { padding: 10px 14px; font-size: 0.95rem; border-top: 2px solid var(--ink); }
.gallery figcaption b { display: block; font-family: var(--f-title); font-weight: 600; }
.gallery figcaption small { font: 500 0.75rem var(--f-mono); color: var(--muted); }
.roles-list { display: grid; gap: 16px; }
.roles-list > div { border-left: 4px solid var(--p-pink); padding-left: 14px; }
.roles-list h4 { margin: 0; font: 600 1.05rem var(--f-title); }
.roles-list p { margin: 2px 0 6px; font: 500 0.8rem var(--f-mono); color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .dlg[open] { animation: dlg-in 240ms cubic-bezier(.3,1.4,.5,1); }
  @keyframes dlg-in { from { opacity: 0; scale: 0.92; } }
}

/* ============ How I work / Right now ============ */
.how { padding: var(--space) 0; }
.how__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.polas { display: flex; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.pola { margin: 0; background: #fff; border: 2px solid var(--ink); padding: 10px 10px 12px; width: 180px; box-shadow: 4px 4px 0 var(--p-sky); rotate: -3deg; }
.pola:nth-child(2) { rotate: 2.5deg; box-shadow: 4px 4px 0 var(--p-pink); }
.pola img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.pola figcaption { font: 500 0.95rem var(--f-title); text-align: center; margin-top: 8px; }
.reflex { font: 600 clamp(1.4rem, 3vw, 1.9rem)/1.2 var(--f-title); margin: 18px 0; }
.reflex span { background: linear-gradient(transparent 60%, var(--p-yellow) 60%); }
.box { background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--r-md); padding: clamp(22px, 3vw, 32px); box-shadow: 6px 6px 0 var(--p-mint); }
@media (max-width: 820px) { .how__grid { grid-template-columns: 1fr; } .pola { width: 150px; } }

/* ============ Contact ============ */
.contact { padding: var(--space) 0; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 0; }
.contact__head { display: flex; align-items: center; gap: 20px; margin-bottom: 14px; }
.contact__head .h2 { margin: 0; }
.contact__photo { flex: none; width: 120px; aspect-ratio: 4 / 5; border: 2.5px solid var(--ink); border-radius: 70px 70px 16px 16px; overflow: hidden; box-shadow: 5px 5px 0 var(--p-yellow); }
.contact__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (max-width: 520px) { .contact__photo { width: 92px; } }
.form { background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--r-md); padding: clamp(20px, 3vw, 30px); box-shadow: 6px 6px 0 var(--p-pink); }
.fld { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 600; font-size: 0.95rem; }
.fld input, .fld textarea { font: 400 1rem var(--f-body); color: var(--ink); background: var(--cream); border: 2px solid var(--ink); border-radius: var(--r-sm); padding: 11px 13px; width: 100%; }
.fld textarea { min-height: 130px; resize: vertical; }
.fld input:focus-visible, .fld textarea:focus-visible { outline: 3px solid var(--rose); outline-offset: 1px; }
.fld [aria-invalid="true"] { border-color: var(--rose); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { min-height: 1.4em; margin: 6px 0 0; font-weight: 600; }
.form__msg.err { color: var(--rose); }
.form__msg.ok { color: #157347; }
@media (max-width: 820px) { .contact__grid { grid-template-columns: 1fr; } }

/* ============ Footer ============ */
.foot { padding: 32px 0 40px; border-top: 1.5px solid var(--line); background: rgb(255 255 255 / 0.6); position: relative; z-index: 1; }
.foot__row { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; font-size: 0.95rem; }
.foot__row p { margin: 0; }
.foot__toggle { margin-left: auto; background: var(--card); border: 2px solid var(--ink); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 500 0.82rem var(--f-mono); cursor: pointer; }
.foot__toggle:hover { background: var(--p-yellow); }

/* ============ Unexpected surprises (with Damia's photos) ============ */
.surprises { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.sp { position: absolute; }
.sp--card { display: flex; align-items: center; gap: 14px; width: max-content; max-width: min(360px, calc(100vw - 32px)); padding: 12px 18px 14px 12px; border: 2.5px solid var(--ink); border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; rotate: var(--rot, 0deg); }
.sp--card.tone-pink { background: var(--p-pink); } .sp--card.tone-yellow { background: var(--p-yellow); } .sp--card.tone-mint { background: var(--p-mint); } .sp--card.tone-sky { background: var(--p-sky); }
.sp__pic { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 2.5px solid var(--ink); overflow: hidden; background: #fff; }
.sp__pic img { width: 100%; height: 100%; object-fit: cover; }
.sp__body { display: grid; gap: 3px; }
.sp__label { font: 500 0.72rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: 0.1em; }
.sp__text { font: 600 1rem/1.35 var(--f-body); }
.sp__timer { position: absolute; left: 0; bottom: 0; height: 5px; width: 100%; background: var(--ink); transform-origin: left; }
@media (max-width: 559px) { .sp--card { width: auto; max-width: none; } }
@media (prefers-reduced-motion: no-preference) {
  .sp.in.from-left   { animation: sp-left 520ms cubic-bezier(.3,1.5,.5,1) both; }
  .sp.in.from-right  { animation: sp-right 520ms cubic-bezier(.3,1.5,.5,1) both; }
  .sp.in.from-bottom { animation: sp-up 520ms cubic-bezier(.3,1.5,.5,1) both; }
  .sp.in .sp__pic { animation: wobble 900ms ease-in-out 400ms 2; }
  .sp__timer { animation: timer var(--life, 5600ms) linear both; }
  .sp.out { animation: sp-out 280ms ease-in both; }
}
@keyframes sp-left  { from { opacity: 0; transform: translateX(-120%) rotate(-12deg); } }
@keyframes sp-right { from { opacity: 0; transform: translateX(120%) rotate(12deg); } }
@keyframes sp-up    { from { opacity: 0; transform: translateY(140%) scale(0.8); } }
@keyframes sp-out   { to { opacity: 0; transform: scale(0.7) translateY(16px); } }
@keyframes wobble   { 25% { transform: rotate(-12deg) scale(1.08); } 75% { transform: rotate(9deg); } }
@keyframes timer    { to { transform: scaleX(0); } }
.sp--butterfly svg { width: 70px; height: 56px; }
.sp--butterfly { animation: flyby 6s ease-in-out both; }
@keyframes flyby {
  0% { transform: translate(-90px, 0) rotate(8deg); }
  25% { transform: translate(25vw, -60px) rotate(-6deg); }
  50% { transform: translate(50vw, 10px) rotate(6deg); }
  75% { transform: translate(75vw, -40px) rotate(-6deg); }
  100% { transform: translate(calc(100vw + 90px), 0) rotate(8deg); }
}
/* star burst when the wand is clicked */
.burst { position: fixed; pointer-events: none; z-index: 40; width: 18px; height: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .burst { animation: burst 900ms ease-out both; }
  @keyframes burst { to { transform: translate(var(--x), var(--y)) scale(0.4) rotate(160deg); opacity: 0; } }
}

/* Calm everything when the visitor asks for less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .burst { display: none; }
}

/* ============ Tighter rhythm (one gap between sections, no empty bands) ============ */
.hero { padding-bottom: 0; }
.about, .skills, .projects, .how { padding: var(--space) 0 0; }
.contact { padding: var(--space) 0; }
.about__grid { align-items: start; }
.about__grid > div:last-child { background: rgb(255 255 255 / 0.7); border: 2px solid var(--ink); border-radius: var(--r-md); padding: 22px 24px; box-shadow: 5px 5px 0 var(--p-yellow); }
.path { margin-top: 32px; }
.flow { margin-top: 56px; }

/* Gallery images keep their real shape and get room to breathe */
.gallery figure > img { width: 100%; padding: clamp(10px, 2vw, 18px); background: var(--cream); }
.gallery figure > img.tall { width: min(100%, 520px); margin: 0 auto; padding: clamp(14px, 3vw, 28px); }
.gallery figure:has(img.tall) { background: var(--cream); }
