/* ---------- Tokens ---------- */
:root {
  /* white-paper theme */
  --bg: #f3ecdc;
  --paper2: #fbf7ec;
  --ink: #1a1220;
  --muted: #6b5f74;
  --pink: #ff2d95;
  --pink-d: #d1106c;
  --blue: #0a4fb0;
  --blue-l: #2f6fe0;
  --hero-ink: #f6eefb; /* text colour on the dark intro */

  /* Put your two images in /assets, or change these two lines */
  --hands: url("assets/hands.jpg");
  --cat: url("assets/cat.jpg");

  /* The intro ends in a 1:1 square, the same shape as the cat picture */
  --fs: min(34vw, 62vh, 520px);
  --fw: var(--fs);
  --fh: var(--fs);
  --gap: 2.2vw;
  --tsize: clamp(70px, 12vw, 210px);

  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
}

@media (max-width: 767px) {
  :root {
    --fs: min(80vw, 46vh);
    --tsize: clamp(58px, 22vw, 130px);
  }
  @supports (height: 1svh) {
    :root { --fs: min(80vw, 46svh); }
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--pink); }

/* paper grain over everything */
.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* scroll progress */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: var(--pink); transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 3px; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(243, 236, 220, .85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-120%);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.nav.show { transform: none; }
.nav-logo { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; font-size: 20px; }
.nav-logo span { color: var(--pink); margin: 0 2px; }
.nav-links { display: flex; gap: clamp(12px, 2.6vw, 30px); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--pink-d); }
@media (max-width: 520px) {
  .nav-logo { font-size: 17px; }
  .nav-links { gap: 10px; font-size: 10.5px; letter-spacing: .04em; }
}

/* ---------- Intro stage ---------- */
.stage {
  position: relative; height: 100vh; height: 100svh;
  overflow: hidden; background: #000; isolation: isolate;
}
.frame {
  position: absolute; inset: 0; margin: auto; width: 100%; height: 100%;
  border: 2px solid transparent; overflow: hidden; background: #05020a; z-index: 1;
}
.frame-target {
  position: absolute; inset: 0; margin: auto; width: var(--fw); height: var(--fh);
  visibility: hidden; pointer-events: none;
}
.layer {
  position: absolute; left: 50%; top: 50%;
  width: 100vw; height: 100vh;
  margin: -50vh 0 0 -50vw;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  will-change: transform, opacity;
}
@supports (height: 1svh) {
  .layer { height: 100svh; margin-top: -50svh; }
}
.stars {
  background-image:
    radial-gradient(1.6px 1.6px at 8% 14%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 22% 78%, #8fb4ff, transparent),
    radial-gradient(1.6px 1.6px at 35% 30%, #ffd9a0, transparent),
    radial-gradient(1.2px 1.2px at 48% 88%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 61% 12%, #ff8fd0, transparent),
    radial-gradient(1.2px 1.2px at 74% 64%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 86% 28%, #8fb4ff, transparent),
    radial-gradient(1.2px 1.2px at 93% 82%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 15% 50%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 55% 48%, #ffd9a0, transparent);
}
.hands { background-image: var(--hands), linear-gradient(120deg, #1a0526, #5a0b43 50%, #1a0526); }
.cat {
  opacity: 0;
  background-image: var(--cat), linear-gradient(100deg, #0a4fb0 0 50%, #ff2d95 50% 100%);
  background-position: center;
  left: 0; top: 0; width: 100%; height: 100%; margin: 0; /* fills the frame, so the picture is never zoomed in */
}
.shade {
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%);
  pointer-events: none;
}

/* titles */
.t-name {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: .22em;
  font: 400 clamp(64px, 17vw, 300px)/.9 var(--display);
  text-transform: uppercase; letter-spacing: .01em; color: var(--hero-ink);
}
.t-name span { display: block; will-change: transform; }
@media (max-width: 767px) {
  .t-name { flex-direction: column; gap: 0; font-size: clamp(90px, 34vw, 220px); line-height: .85; }
}

.t-port, .t-folio {
  position: absolute; z-index: 3; opacity: 0; pointer-events: none;
  font-size: var(--tsize); line-height: 1; white-space: nowrap;
}
.t-port  { top: 50%; margin-top: -.5em; right: calc(50% + var(--fw) / 2 + var(--gap)); }
.t-folio { top: 50%; margin-top: -.5em; left:  calc(50% + var(--fw) / 2 + var(--gap)); }
@media (max-width: 767px) {
  .t-port  { top: auto; margin-top: 0; right: 0; left: 0; text-align: center; bottom: calc(50% + var(--fh) / 2 + 4px); }
  .t-folio { margin-top: 0; right: 0; left: 0; text-align: center; top: calc(50% + var(--fh) / 2 + 4px); }
}

/* Port / Folio change style every second (JS sets data-s) */
.t-inner { display: inline-block; white-space: nowrap; }
.t-inner[data-s="0"] { font-family: "Anton", Impact, sans-serif; text-transform: uppercase; letter-spacing: .01em; color: var(--ink); }
.t-inner[data-s="1"] { font-family: "Shrikhand", cursive; text-transform: none; color: var(--pink); }
.t-inner[data-s="2"] { font-family: "Abril Fatface", serif; text-transform: uppercase; color: var(--blue); }
.t-inner[data-s="3"] { font-family: "Monoton", cursive; text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
.t-inner[data-s="4"] { font-family: "Instrument Serif", serif; font-style: italic; text-transform: none; color: var(--pink-d); }
.t-inner[data-s="5"] { font-family: "Bagel Fat One", cursive; text-transform: lowercase; color: var(--blue); }
.t-inner[data-s="6"] { font-family: "Rubik Mono One", sans-serif; text-transform: uppercase; color: var(--ink); }
.t-inner[data-s="7"] { font-family: "Fraunces", serif; font-style: italic; font-weight: 900; text-transform: none; color: var(--pink); }
.t-inner[data-s="8"] { font-family: "Limelight", cursive; text-transform: uppercase; color: var(--blue); }
.t-inner[data-s="9"] { font-family: "Anton", Impact, sans-serif; text-transform: uppercase; letter-spacing: .02em; color: transparent; -webkit-text-stroke: 2px var(--ink); }

.tagline {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(18px, 4vh, 40px);
  text-align: center; opacity: 0; pointer-events: none;
  font: italic 400 clamp(18px, 2.4vw, 28px)/1.2 var(--serif); color: var(--muted);
}
.corner {
  position: absolute; z-index: 3; top: clamp(16px, 3vh, 30px);
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--hero-ink); opacity: .8;
}
.corner-l { left: clamp(16px, 4vw, 40px); }
.corner-r { right: clamp(16px, 4vw, 40px); }
.hint {
  position: absolute; z-index: 3; left: 50%; bottom: clamp(16px, 3.5vh, 34px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--hero-ink);
}
.hint i { width: 1px; height: 38px; background: linear-gradient(var(--pink), transparent); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Paper ---------- */
main {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(26, 18, 32, .11) 1px, transparent 1.3px);
  background-size: 24px 24px;
}

/* crossing ribbons */
.ribbons { position: relative; height: clamp(150px, 19vw, 240px); overflow: hidden; z-index: 3; }
.mq {
  position: absolute; left: -6%; width: 112%;
  padding: clamp(8px, 1.2vw, 16px) 0; overflow: hidden;
  font: 400 clamp(20px, 3vw, 40px)/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.mq-ink  { top: 24%; transform: rotate(-2.4deg); background: var(--ink);  color: var(--bg); }
.mq-pink { top: 40%; transform: rotate(1.8deg);  background: var(--pink); color: var(--ink); }
.track { display: flex; width: max-content; will-change: transform; }
.track > span { flex-shrink: 0; white-space: pre; }

/* ---------- Sections ---------- */
.section {
  position: relative; z-index: 2;
  padding: clamp(80px, 12vw, 160px) clamp(20px, 6vw, 96px);
  max-width: 1400px; margin: 0 auto;
}
.section > *:not(.sticker) { position: relative; z-index: 2; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--pink-d); margin-bottom: 18px; }
.big { font: 400 clamp(44px, 8vw, 120px)/.95 var(--display); text-transform: uppercase; letter-spacing: .005em; }
.huge { font: 400 clamp(70px, 16vw, 260px)/.9 var(--display); text-transform: uppercase; }
.js .reveal { opacity: 0; transform: translateY(32px); }

/* split-text pieces made by JS */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em .04em; margin: -.06em -.04em; }
.c { display: inline-block; will-change: transform; }
.lw { display: inline-block; }
.c:hover { animation: wiggle .5s ease; }
@keyframes wiggle {
  0% { transform: rotate(0); } 25% { transform: rotate(-9deg) translateY(-4%); }
  60% { transform: rotate(6deg); } 100% { transform: rotate(0); }
}

/* the fancy words inside headings */
.fx { display: inline-block; text-transform: none; font-style: normal; font-weight: 400; line-height: 1; transform-origin: 30% 70%; }
.fx[data-f="0"] { font-family: "Shrikhand", cursive; color: var(--pink); }
.fx[data-f="1"] { font-family: "Abril Fatface", serif; color: var(--blue); }
.fx[data-f="2"] { font-family: "Bagel Fat One", cursive; color: var(--pink); }
.fx[data-f="3"] { font-family: "Fraunces", serif; font-style: italic; font-weight: 900; color: var(--blue); }
.fx[data-f="4"] { font-family: "Limelight", cursive; color: var(--pink); }
.fx[data-f="5"] { font-family: "Rubik Mono One", sans-serif; font-size: .72em; color: var(--blue); }
.fx[data-f="6"] { font-family: "Instrument Serif", serif; font-style: italic; color: var(--pink-d); }
.fx[data-f="7"] { font-family: "Monoton", cursive; font-size: .85em; color: var(--blue); }
.fxline { display: flex; align-items: center; height: 1.15em; }

/* stickers floating on the paper */
.sticker { position: absolute; z-index: 1; pointer-events: none; width: clamp(44px, 7vw, 96px); height: clamp(44px, 7vw, 96px); }
.st-a { top: 6%; right: 7%; color: var(--pink); }
.st-b { bottom: 8%; left: 2%; color: var(--blue); width: clamp(36px, 5vw, 70px); height: clamp(36px, 5vw, 70px); }
.st-c { top: 5%; right: 8%; color: var(--blue); width: clamp(90px, 13vw, 190px); height: clamp(30px, 4.4vw, 64px); }
.st-d { bottom: 12%; left: 1%; color: var(--pink); }
.st-e { top: 12%; left: 4%; color: var(--pink); }
.st-f { bottom: 14%; right: 6%; color: var(--blue); }

/* about */
.about-grid { display: grid; grid-template-columns: 1.35fr .8fr; gap: clamp(28px, 6vw, 96px); align-items: center; margin-top: clamp(32px, 5vw, 64px); color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); }
.about-text { display: grid; gap: 28px; }
.lead { font: italic 400 clamp(24px, 3vw, 40px)/1.25 var(--serif); color: var(--ink); }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } .polaroid { max-width: 320px; margin: 0 auto; } }

.polaroid {
  position: relative; background: #fff; padding: 14px 14px 46px;
  border: 1.5px solid rgba(26, 18, 32, .2); box-shadow: 0 22px 44px rgba(26, 18, 32, .2);
}
.polaroid img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #05020a; }
.polaroid figcaption { position: absolute; left: 14px; right: 14px; bottom: 13px; text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink); }
.polaroid::before { /* strip of tape */
  content: ""; position: absolute; top: -15px; left: 50%; width: 112px; height: 30px; margin-left: -56px;
  background: rgba(255, 45, 149, .5); transform: rotate(-3deg); z-index: 2;
}

/* projects */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(22px, 3vw, 40px); margin-top: clamp(32px, 5vw, 64px); }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 26px 24px 22px; background: var(--paper2);
  border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 8px 8px 0 var(--blue);
  transition: box-shadow .25s cubic-bezier(.2, .7, .2, 1);
}
.card:nth-child(even) { box-shadow: 8px 8px 0 var(--pink); }
.card:hover { box-shadow: 14px 14px 0 var(--blue); }
.card:nth-child(even):hover { box-shadow: 14px 14px 0 var(--pink); }
.card .num { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .12em; }
.card h3 { font: 400 clamp(28px, 2.6vw, 38px)/1.05 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.card p { color: var(--muted); font-size: 15.5px; flex: 1; }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--blue); color: var(--blue); }
.links { display: flex; gap: 14px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.links a { border-bottom: 1.5px solid var(--pink); padding-bottom: 1px; transition: color .2s; }
.links a:hover { color: var(--pink-d); }
.more { margin-top: 36px; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; }
.more a { color: var(--pink-d); border-bottom: 1.5px solid currentColor; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: clamp(28px, 4vw, 56px); margin-top: clamp(32px, 5vw, 64px); }
.skill-group h3 { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1.5px solid var(--ink); font-weight: 500; }
.skill-group ul { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-group li { padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper2); font-size: 14.5px; cursor: default; transition: background .2s, color .2s; }
.skill-group li:hover { background: var(--pink); animation: wiggle .5s ease; }

/* contact */
.contact { text-align: center; padding-bottom: clamp(60px, 8vw, 110px); }
.mail { display: inline-block; margin-top: clamp(14px, 2vw, 26px); font: italic 400 clamp(20px, 4vw, 48px)/1.2 var(--serif); border-bottom: 2px solid var(--pink); word-break: break-all; transition: color .2s; }
.mail:hover { color: var(--pink-d); }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px clamp(18px, 3vw, 40px); margin-top: clamp(28px, 4vw, 48px); font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.socials a { color: var(--muted); transition: color .2s; }
.socials a:hover { color: var(--pink-d); }

.footer {
  position: relative; z-index: 2; background: var(--bg);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 22px clamp(20px, 6vw, 96px) calc(22px + env(safe-area-inset-bottom));
  border-top: 1.5px solid var(--ink);
  font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .06em;
}
.footer a:hover { color: var(--pink-d); }

@media (prefers-reduced-motion: reduce) {
  .hint i { animation: none; }
  .card, .c:hover, .skill-group li:hover { animation: none; transition: none; }
}
