@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #edeafb;
  --surface: #ffffff;
  --ink: #1c1a4a;
  --muted: #514e86;
  --lid: #1c1a4a;
  --lid-text: #edeafb;
  --pink: #ff6fa8;
  --mint: #3cc9a4;
  --butter: #ffd45c;
  --sky: #8fb4ff;
  --line: #cfcaf2;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15133a;
    --surface: #201d52;
    --ink: #edeafb;
    --muted: #b1addf;
    --lid: #2a2668;
    --lid-text: #edeafb;
    --line: #36327a;
  }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, .brand, .wordmark { font-family: var(--display); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.1; font-weight: 750; margin-bottom: 40px; }
h3 { font-size: 1.6rem; line-height: 1.15; font-weight: 700; }

.top, main > section, .foot { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.brand { font-size: 1.4rem; font-weight: 800; text-decoration: none; }
.top nav { display: flex; gap: 22px; }
.top nav a { text-decoration: none; color: var(--muted); font-weight: 700; }
.top nav a:hover { color: var(--ink); }

/* Hero: a laptop lid covered in stickers */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; padding: 24px 0 112px; }
.lid {
  position: relative;
  aspect-ratio: 16 / 11;
  background: var(--lid);
  border-radius: 28px;
  padding: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.wordmark {
  color: var(--lid-text);
  font-size: clamp(4rem, 11vw, 8.5rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.05em;
  font-variation-settings: "opsz" 96;
}
.stickers { list-style: none; padding: 0; }
.stickers li {
  position: absolute;
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  color: #1c1a4a;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px #ffffff, 0 6px 14px rgba(10, 8, 40, 0.35);
  white-space: nowrap;
  animation: stick 420ms cubic-bezier(.2, 1.4, .4, 1) both;
}
.s-go     { background: var(--sky);    top: 9%;  right: 8%;  rotate: 8deg;   animation-delay: 150ms; }
.s-next   { background: #ffffff; top: 34%; right: 5%; rotate: -6deg; animation-delay: 260ms; }
.s-stripe { background: var(--butter); top: 57%; right: 9%;  rotate: 5deg;   animation-delay: 370ms; }
.s-sec    { background: var(--mint);   bottom: 9%; right: 26%; rotate: -4deg; animation-delay: 480ms; }
.s-pg     { background: var(--sky);    bottom: 8%; left: 7%;  rotate: 3deg;   animation-delay: 590ms; }
.s-heart  { background: var(--pink);   top: 8%;  left: 46%;  rotate: -10deg; border-radius: 12px; animation-delay: 700ms; }
.s-next { box-shadow: 0 0 0 4px var(--pink), 0 6px 14px rgba(10, 8, 40, 0.35); }
@keyframes stick {
  from { opacity: 0; transform: scale(1.25) translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

.pitch h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.12; font-weight: 700; margin-bottom: 20px; }
.pitch p { color: var(--muted); font-size: 1.15rem; max-width: 46ch; margin-bottom: 32px; }
.cta {
  display: inline-block;
  background: var(--pink);
  color: #1c1a4a;
  font-family: var(--display);
  font-weight: 750;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px var(--ink);
}
.cta:hover { background: var(--butter); }

/* Work */
.work { padding-bottom: 16px; }
.project {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-top: 2px solid var(--line);
}
.project:nth-of-type(even) .project-visual { order: -1; }
.kind { color: var(--muted); font-weight: 700; margin: 6px 0 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.status { font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; color: #1c1a4a; }
.status.live { background: var(--mint); }
.status.beta { background: var(--butter); }
.project-text > p:not(.kind) { max-width: 52ch; margin-bottom: 18px; }
.facts { padding-left: 1.1em; margin-bottom: 22px; }
.facts li { margin-bottom: 4px; }
.facts li::marker { color: var(--pink); content: "✦  "; }
.visit { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--pink); }

.project-visual { margin: 0; }
.shot img { border-radius: 18px; box-shadow: 0 0 0 6px var(--surface), 0 18px 40px rgba(28, 26, 74, 0.18); rotate: 1.5deg; }

/* Mail club envelope */
.envelope { display: grid; place-items: center; padding: 24px 0; }
.env {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 3 / 2;
  background: #f6c9d9;
  border-radius: 14px;
  rotate: -2deg;
  box-shadow: 0 18px 40px rgba(28, 26, 74, 0.18);
}
.env-flap {
  position: absolute;
  inset: 0 0 auto 0;
  height: 55%;
  background: #f2b3c9;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 14px 14px 0 0;
}
.env-card {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -14%;
  background: #fffdf7;
  color: #1c1a4a;
  border-radius: 10px;
  padding: 18px 20px;
  display: grid;
  gap: 2px;
  rotate: 3deg;
  box-shadow: 0 10px 24px rgba(28, 26, 74, 0.2);
}
.env-title { font-family: var(--display); font-weight: 750; font-size: 1.2rem; margin-bottom: 4px; }
.env-line::before { content: "✦ "; color: var(--pink); }
.env-date { margin-top: 6px; font-size: 0.85rem; font-weight: 700; color: #2f8f76; }
.env-stamp {
  position: absolute;
  top: 10%;
  right: 7%;
  width: 54px;
  height: 64px;
  display: grid;
  place-items: center;
  background: var(--butter);
  color: #c2185b;
  font-size: 1.6rem;
  border: 3px dashed #fffdf7;
  rotate: 6deg;
}

/* Infra diagram */
.infra svg { width: 100%; max-width: 440px; margin-inline: auto; display: block; }
.infra rect { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.infra .visitor rect { fill: var(--sky); }
.infra .gate rect { fill: var(--mint); }
.infra .admin rect { fill: var(--butter); }
.infra .alert rect { fill: var(--pink); }
.infra .visitor text, .infra .gate text, .infra .admin text, .infra .alert text { fill: #1c1a4a; }
.infra text { fill: var(--ink); font: 700 14px var(--display); text-anchor: middle; }
.infra text.sub { font: 400 11px var(--body); }
.infra .link { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 4 4; fill: none; }

/* Services */
.services { padding: 80px 0; border-top: 2px solid var(--line); }
.service-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.service-list h3 { font-size: 1.3rem; margin-bottom: 10px; }
.service-list p { color: var(--muted); }

/* Profile */
.profile { padding: 80px 0; border-top: 2px solid var(--line); }
.profile p { max-width: 60ch; font-size: 1.2rem; margin-bottom: 14px; }
.profile h2 { margin-bottom: 24px; }

/* Contact */
.contact {
  background: var(--lid);
  color: var(--lid-text);
  border-radius: 28px;
  padding: clamp(40px, 7vw, 80px);
  margin-bottom: 48px;
}
.contact h2 { margin-bottom: 14px; }
.contact p { color: var(--lid-text); opacity: 0.85; margin-bottom: 28px; max-width: 46ch; }
.mail {
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(1.3rem, 4.5vw, 2.4rem);
  overflow-wrap: anywhere;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.mail:hover { color: var(--pink); }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 0 0 40px; color: var(--muted); font-size: 0.95rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero, .project { grid-template-columns: 1fr; gap: 32px; }
  .project:nth-of-type(even) .project-visual { order: 0; }
  .service-list { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding-bottom: 72px; }
}
@media (max-width: 520px) {
  .top nav { gap: 14px; font-size: 0.95rem; }
  .top nav a:first-child { display: none; }
  .lid { padding: 24px; border-radius: 22px; }
  .stickers li { padding: 6px 12px; box-shadow: 0 0 0 3px #ffffff, 0 4px 10px rgba(10, 8, 40, 0.35); }
  .s-next { box-shadow: 0 0 0 3px var(--pink), 0 4px 10px rgba(10, 8, 40, 0.35); }
  .s-sec { right: 6%; }
  .envelope { padding-bottom: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stickers li { animation: none; }
}
