/* Maker's desk – homepage styles. Mobile-first: one column by default,
   desk objects spread out into a wrapping row from 720px up. */

:root {
  --desk: #4a3426;
  --accent: #f0a24a;
  --paper: #fbf8f2;
  --ink: #1a1a1a;
  --blue: #2558b8;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-hand: 'Caveat', cursive;
  --font-head: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--desk);
  font-family: var(--font-body);
  color: var(--ink);
}

a { color: var(--ink); }
a:hover { color: #000; }

/* ---------- shared textures & type ---------- */

.grain {
  background-image:
    repeating-linear-gradient(92deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(88deg, rgba(0,0,0,0.09) 0 1px, transparent 1px 23px);
}
.paper { box-shadow: 0 2px 0 rgba(0,0,0,0.08), 0 16px 32px rgba(0,0,0,0.35); }
.hand { font-family: var(--font-hand); }
.mono { font-family: var(--font-mono); }
.grot { font-family: var(--font-head); }
.dots {
  background-image: radial-gradient(#e3dccd 1.2px, transparent 1.2px);
  background-size: 16px 16px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Focus: white ring on the dark desk, dark ring on paper. */
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.paper .btn:focus-visible { outline-color: var(--ink); }

.art { display: block; max-width: 100%; height: auto; }

/* ---------- page frame ---------- */

.desk {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 56px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---------- header ---------- */

.top {
  display: flex;
  flex-direction: column-reverse;
  gap: 20px;
}

.intro {
  position: relative;
  background: var(--paper);
  padding: 28px 22px 24px;
  transform: rotate(-1deg);
}
.tape {
  position: absolute; top: -12px; left: 42%;
  width: 110px; height: 26px;
  background: var(--accent); opacity: 0.8;
  transform: rotate(-3deg);
}
.intro-hi { margin: 0 0 2px; font-size: 28px; color: #4a4a4a; }
.intro-name {
  margin: 0;
  font-size: clamp(38px, 10vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.intro-bio { margin: 16px 0 0; font-size: 17px; line-height: 1.55; color: #333; }

.lang { display: flex; gap: 8px; align-self: flex-end; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; min-height: 44px; padding: 0 14px;
  border-radius: 22px;
  border: 2px solid rgba(255,255,255,0.6);
  background: transparent; color: #fff;
  font: 600 16px var(--font-body);
  cursor: pointer;
}
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.pill[aria-pressed="false"]:hover { border-color: #fff; }

.desk-note { margin: 0; font-size: 28px; color: #fff; }

/* ---------- desk objects ---------- */

.objects {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.objects > section { min-width: 0; }

.caption { margin: 12px 0 0; font-size: 26px; font-weight: 500; color: #fff; }

/* --- lanyard --- */
.career {
  position: relative;
  background-color: var(--paper);
  padding: 20px 16px;
  transform: rotate(0.4deg);
}
.strap {
  position: absolute; top: 14px; left: -10px; right: -10px; height: 24px;
  border-radius: 12px;
  background: repeating-linear-gradient(45deg, #2558b8 0 9px, #1d4a9c 9px 18px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  transform: rotate(-1.4deg);
}
.coffee { position: absolute; right: 8px; bottom: 10px; opacity: 0.55; pointer-events: none; }
.pen { position: absolute; right: 60px; top: 50px; transform: rotate(-24deg); display: none; }
.career-title { position: relative; margin: 30px 0 0; font-size: 38px; line-height: 1.1; }
.career-sub { position: relative; margin: 2px 0 22px; font-size: 15px; color: #4a4a4a; }

.badges {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 18px 14px;
  padding-top: 14px; /* room for the clips */
}
.badge {
  min-height: 220px;
  padding: 0 10px 12px;
  background: #fff;
  border: 1px solid #d9d4ca;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  font: inherit; color: var(--ink);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  transform: rotate(var(--tilt, 0deg));
  outline: 0 solid transparent;
  outline-offset: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.badge:hover { transform: rotate(var(--tilt, 0deg)) translateY(-3px); box-shadow: 0 10px 18px rgba(0,0,0,0.16); }
.badge[aria-pressed="true"] { outline: 3px solid var(--ink); }
.badge:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--blue); }
.badge-clip { display: block; margin: -14px auto 4px; }
.badge-photo { display: block; margin: 0 auto 8px; }
.badge-name {
  display: block;
  background: var(--badge-color, var(--blue));
  color: #fff;
  font-weight: 700; font-size: 19px;
  padding: 16px 6px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.badge-role { display: block; margin-top: 10px; font-size: 13px; line-height: 1.35; color: #333; }
.badge-now { display: block; margin-top: 4px; font-size: 20px; color: var(--ink); }
.badge-now[hidden] { display: none; }

.badge-detail {
  position: relative;
  margin-top: 24px;
  padding: 18px 20px;
  background: #fff;
  border: 1px dashed #a39c8f;
  border-radius: 8px;
}
.detail-role { margin: 0; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #555; }
.detail-name { margin: 6px 0; font-size: 22px; }
.detail-text { margin: 0; font-size: 16px; line-height: 1.55; color: #2a2a2a; }

/* --- laptop --- */
.laptop { perspective: 1100px; }
.laptop-body { transform: rotateY(-10deg) rotateX(4deg); transform-origin: 50% 100%; transform-style: preserve-3d; }
.laptop-lid {
  background: #2a2d33;
  border-radius: 14px 14px 4px 4px;
  padding: 12px 12px 16px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.4);
  transform: rotateX(-9deg);
  transform-origin: 50% 100%;
}
.screen {
  background: #141821;
  border-radius: 6px;
  padding: 18px;
  color: #d7e2ff;
  font-size: 14px; line-height: 1.75;
  min-height: 270px;
  box-shadow: inset 0 0 40px rgba(60,80,140,0.25);
  overflow-wrap: anywhere;
}
.screen-title { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #9aa7c7; }
.screen p { margin: 0; }
.screen .out { margin-bottom: 10px; color: #fff; }
.screen .out:last-child { margin-bottom: 0; }
.prompt { color: var(--accent); }
.laptop-base {
  background: #3a3e46;
  border-radius: 2px 2px 16px 16px;
  margin: 0 -12px;
  padding: 12px 26px 10px;
  transform: rotateX(48deg);
  transform-origin: 50% 0;
  box-shadow: 0 18px 24px rgba(0,0,0,0.35);
}
.keys {
  height: 82px; border-radius: 6px;
  background-color: #22252b;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 20px, #3a3e46 20px 24px),
    repeating-linear-gradient(0deg, transparent 0 15px, #3a3e46 15px 19px);
}
.trackpad { width: 120px; height: 30px; margin: 10px auto 0; border-radius: 6px; background: #2d3037; border: 1px solid #4a4f58; }

/* --- board games --- */
.games {
  background: #9b2c2c;
  color: #fff;
  padding: 14px;
  border-radius: 4px;
  transform: rotate(-1.2deg);
  box-shadow: 7px 8px 0 #5e1717, 10px 12px 0 #3d0f0f, 14px 24px 30px rgba(0,0,0,0.4);
}
.games-inner { border: 3px double rgba(255,255,255,0.55); border-radius: 3px; padding: 18px 16px 16px; }
.games-meta { margin: 0 0 6px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #f7d9d9; }
.games-title { margin: 0 0 8px; font-size: 30px; line-height: 1; letter-spacing: -0.01em; }
.meeples { display: block; margin: 0 0 10px; max-width: 100%; height: auto; }
.games-text { margin: 0 0 18px; font-size: 15px; line-height: 1.5; }
.cards { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cards li {
  flex: 1 1 0;
  min-width: 0;
  min-height: 92px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 10px;
  font-size: 13px; font-weight: 600;
  overflow-wrap: break-word;
  hyphens: auto;
}
.cards li:first-child { transform: rotate(-4deg); }
.cards li:last-child:not(:first-child) { transform: rotate(4deg); }

/* --- miniatures --- */
.minis { background: var(--paper); padding: 24px; transform: rotate(0.8deg); }
.minis-title { margin: 14px 0 8px; font-size: 26px; }
.minis-text { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: #333; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* --- books --- */
.books .art { width: 300px; }

/* --- music --- */
.music { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.music .art { flex: none; width: 250px; }
.music > div { flex: 1 1 180px; }
.music-title { margin: 0 0 6px; font-size: 24px; color: #fff; }
.music-text { margin: 0; font-size: 15px; line-height: 1.5; color: #f2ede4; }
.music-fav { margin: 6px 0 0; font-size: 22px; color: #fff; }

/* --- movie ticket --- */
.ticket {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 340 / 150;
  transform: rotate(-2deg);
  filter: drop-shadow(0 14px 20px rgba(0,0,0,0.4));
  container-type: inline-size;
}
.ticket-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.punch { fill: var(--desk); }
.ticket-text { position: relative; padding: 17% 6% 0 34.7%; }
.ticket-title { margin: 0 0 4px; font-size: 26px; line-height: 1; }
.ticket-fav { margin: 0; font-size: 15px; color: #2a2a2a; }
@container (max-width: 300px) {
  .ticket-text { padding-top: 13%; }
  .ticket-title { font-size: 22px; }
  .ticket-fav { font-size: 14px; }
}

/* --- sticky note --- */
.sticky { max-width: 300px; background: #ffe27a; padding: 22px; transform: rotate(2deg); }
.sticky-title { margin: 0 0 6px; font-size: 32px; line-height: 1.1; }
.sticky-text { margin: 0; font-size: 24px; line-height: 1.2; }

/* --- postcard / contact --- */
.contact { background: var(--paper); padding: 22px; transform: rotate(-0.6deg); }
.contact-title { margin: 0 0 4px; font-size: 36px; }
.contact-text { margin: 0 0 16px; font-size: 15px; color: #4a4a4a; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.contact-links a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 18px;
  border-radius: 22px;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 600; text-decoration: none;
}
.contact-links a.primary { background: var(--accent); border-color: var(--accent); }
.contact-links a:hover { background: rgba(0,0,0,0.06); }
.contact-links a.primary:hover { background: #f4b265; }

.footer { font-size: 22px; color: #f2ede4; }

/* ---------- small phones ---------- */
@media (min-width: 400px) {
  .career { padding: 24px 20px; }
}

/* ---------- tablet & desktop: spread the desk out ---------- */
@media (min-width: 720px) {
  .desk { padding: 48px 20px 72px; gap: 40px; }

  .top { flex-direction: row; flex-wrap: wrap; gap: 24px; align-items: flex-start; justify-content: space-between; }
  .intro { flex: 1 1 420px; max-width: 660px; padding: 34px 36px 30px; }
  .intro-bio { font-size: 18px; }
  .lang { align-self: auto; }
  .desk-note { font-size: 30px; }

  .objects { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }

  .career  { flex: 2 1 560px; padding: 28px; }
  .pen     { display: block; }
  .badges  { display: flex; flex-wrap: wrap; gap: 18px; }
  .badge   { width: 132px; }

  .laptop  { flex: 1 1 340px; }
  .screen  { padding: 20px; }
  .games   { flex: 1 1 260px; }
  .minis   { flex: 1 1 260px; }
  .books   { flex: 1 1 260px; }
  .music   { flex: 1 1 260px; }
  .ticket  { flex: 0 1 340px; width: 340px; }
  .sticky  { flex: 1 1 220px; }
  .contact { flex: 1 1 340px; padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .badge { transition: none; }
  .badge:hover { transform: rotate(var(--tilt, 0deg)); }
}
