/* ============================================================
   style.css — how the site looks.
   Colors live in :root below; change them once and the whole
   site updates. Mobile rules are at the very bottom.
   ============================================================ */

:root{
  /* wood + cork */
  --wood-dark:#2a1a10;
  --wood:#7b4f2c;
  --wood-light:#a8703f;

  /* paper + ink */
  --cream:#fff4d6;
  --cream-dim:#f3e0b0;
  --ink:#1d120a;
  --ink-soft:#5a3f28;

  /* brand palette: orange + teal, nothing else */
  --orange:#ff7a2f;  --orange-dark:#b8480f;
  --teal:#1fd6c8;    --teal-dark:#0f8f86;

  /* the "current" accent — each element can override these */
  --accent:var(--orange);
  --accent-dark:var(--orange-dark);
}

/* colour helpers: categories alternate between the two brand colours */
.c0, .c2, .c4, .c6{--accent:var(--orange);--accent-dark:var(--orange-dark);}
.c1, .c3, .c5{--accent:var(--teal);--accent-dark:var(--teal-dark);}

*{ box-sizing:border-box; }
html{
  scroll-padding-top: env(safe-area-inset-top, 0px);
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

/* ---------- page: wooden frame + corkboard ---------- */
body{
  margin:0;
  color: var(--ink);
  font-family: 'VT323', monospace;
  font-size: 22px;
  line-height: 1.35;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;

  /* wooden picture-frame border around the whole site */
  background-color: var(--wood-dark);
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.25) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 46px);
  padding: clamp(10px, 2.6vw, 22px);
  padding-top: calc(clamp(10px, 2.6vw, 22px) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(clamp(10px, 2.6vw, 22px) + env(safe-area-inset-bottom, 0px));
  padding-left: calc(clamp(10px, 2.6vw, 22px) + env(safe-area-inset-left, 0px));
  padding-right: calc(clamp(10px, 2.6vw, 22px) + env(safe-area-inset-right, 0px));
}

.page-inner{
  position:relative;
  overflow:hidden;
  /* corkboard texture */
  background-color: var(--wood);
  background-image:
    radial-gradient(rgba(0,0,0,0.30) 1px, transparent 1.2px),
    radial-gradient(rgba(255,230,180,0.14) 1px, transparent 1.2px),
    radial-gradient(rgba(0,0,0,0.18) 1.6px, transparent 1.8px);
  background-size: 7px 7px, 9px 9px, 15px 15px;
  background-position: 0 0, 3px 4px, 6px 9px;
  box-shadow: inset 0 0 0 4px var(--wood-dark), inset 0 0 40px rgba(0,0,0,0.45);
}

/* colourful corner studs on the frame */
.frame-bolt{
  position:absolute;
  width:14px; height:14px;
  z-index:3;
  box-shadow: -3px 0 0 var(--ink), 3px 0 0 var(--ink), 0 -3px 0 var(--ink), 0 3px 0 var(--ink),
              inset 3px 3px 0 rgba(255,255,255,.55);
}
.frame-bolt.tl{ top:14px; left:14px;  background:var(--orange); }
.frame-bolt.tr{ top:14px; right:14px; background:var(--teal); }
.frame-bolt.bl{ bottom:14px; left:14px;  background:var(--teal); }
.frame-bolt.br{ bottom:14px; right:14px; background:var(--orange); }

/* twinkling pixel stars (spans are added by script.js) */
.sparkles{ position:absolute; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.sparkle{
  position:absolute;
  width:var(--s); height:var(--s);
  background:var(--c);
  box-shadow:
    var(--s) 0 0 var(--c),
    calc(var(--s) * -1) 0 0 var(--c),
    0 var(--s) 0 var(--c),
    0 calc(var(--s) * -1) 0 var(--c);
  animation: twinkle var(--d, 3s) steps(3) infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes twinkle{
  0%,100%{ opacity:1;   transform:scale(1); }
  50%    { opacity:.2;  transform:scale(.55); }
}

.pixel-font{ font-family:'Press Start 2P', monospace; }
img, svg { max-width:100%; display:block; }
a { color: inherit; }
h1,h2,h3,h4{ overflow-wrap:anywhere; }

.frame{
  position:relative;
  z-index:1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px clamp(18px, 4vw, 40px) 40px;
}

/* ============================================================
   CHUNKY PIXEL BORDERS
   Notched corners made from 4 shadows + a hard drop shadow.
   ============================================================ */
.topbar, .avatar-card, .intro-card, .hire, .work-card, .panel{
  box-shadow:
    -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink),
    inset 4px 4px 0 0 rgba(255,255,255,.45),
    inset -4px -4px 0 0 rgba(0,0,0,.12),
    8px 10px 0 0 rgba(0,0,0,.4);
}
.btn, .tag, .social-btn, .hire-btn, .section-heading h2, .avail-tag, .work-cat{
  box-shadow:
    -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink), 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink),
    inset 3px 3px 0 0 rgba(255,255,255,.5),
    inset -3px -3px 0 0 rgba(0,0,0,.18),
    5px 6px 0 0 rgba(0,0,0,.4);
}

/* little coloured push-pins on top of the cards */
.work-card::before, .panel::before, .intro-card::before, .avatar-card::before, .hire::before{
  content:"";
  position:absolute;
  top:-16px; left:50%;
  width:14px; height:14px;
  margin-left:-7px;
  background:var(--accent);
  z-index:3;
  box-shadow:
    -3px 0 0 var(--ink), 3px 0 0 var(--ink), 0 -3px 0 var(--ink), 0 3px 0 var(--ink),
    inset 3px 3px 0 rgba(255,255,255,.6),
    3px 5px 0 rgba(0,0,0,.35);
}
.intro-card{ --accent:var(--teal); }
.avatar-card{ --accent:var(--orange); }
.hire{ --accent:var(--teal); }
.intro-card::before{ left:auto; right:34px; }

/* ---------- header ---------- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background: var(--wood-dark);
  padding: 14px 20px;
  margin-top: 18px;
}
.logo{
  color: var(--cream);
  font-size: clamp(14px, 3vw, 22px);
  letter-spacing: 2px;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.logo::before{
  content:"";
  width:12px; height:12px; flex-shrink:0;
  background: var(--teal);
  box-shadow: 12px 0 0 var(--orange), 0 -3px 0 transparent;
  margin-right:12px;
}
.topbar-right{ display:flex; align-items:center; gap:16px; }
.hud{ display:flex; gap:6px; }
.heart{ width:22px; height:19px; }
.heart.dim{ opacity:.3; }

.btn{
  font-family:'Press Start 2P', monospace;
  font-size: 11px;
  background: var(--orange);
  color: var(--ink);
  border: none;
  padding: 12px 16px;
  min-height: 44px;
  cursor:pointer;
  letter-spacing: 1px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-decoration:none;
  touch-action: manipulation;
}
.btn.support::before{ content:""; width:10px; height:10px; background:var(--cream); box-shadow:0 0 0 2px var(--ink); }

/* ---------- intro ---------- */
.hero{ display:grid; grid-template-columns: 220px minmax(0,1fr); gap: 32px; margin-top: 56px; align-items:start; }

.avatar-card{
  position:relative;
  background: var(--cream);
  padding: 16px;
  text-align:center;
  --rot:-2deg;
  transform: rotate(var(--rot));
}
.avatar-box{
  aspect-ratio: 1/1;
  background: repeating-conic-gradient(from 0deg, #f3e0b0 0deg 90deg, #e8d29b 90deg 180deg);
  background-size: 16px 16px;
  border: 4px solid var(--ink);
  display:flex; align-items:center; justify-content:center;
  font-family:'Press Start 2P', monospace;
  font-size: 10px;
  line-height:1.6;
  color: var(--ink-soft);
  text-align:center;
  padding: 8px;
  overflow:hidden;
}
.avatar-box svg{ width:70%; height:70%; color: var(--ink-soft); }
.avatar-meta{ margin-top:16px; }
.avail-note{ margin:12px 0 0; font-size:20px; line-height:1.2; color: var(--ink-soft); }
.avatar-box img{ width:100%; height:100%; object-fit:cover; image-rendering:auto; }
.avail-tag{
  display:block;
  margin: 0;
  background: var(--teal);
  color: var(--ink);
  font-family:'Press Start 2P', monospace;
  font-size: 9px;
  padding: 8px 8px 8px 24px;
  letter-spacing: 1px;
  position:relative;
}
.avail-tag::before{
  content:"";
  position:absolute; left:8px; top:50%;
  width:8px; height:8px; margin-top:-4px;
  background: var(--ink);
  animation: blink 1.2s steps(1) infinite;
}

.intro-card{
  position:relative;
  background: var(--cream);
  padding: clamp(20px,3vw,30px);
  --rot:.5deg;
  transform: rotate(var(--rot));
  min-width:0;
}
.intro-card h1{
  font-family:'Press Start 2P', monospace;
  font-size: clamp(18px, 3.2vw, 28px);
  margin: 0 0 18px;
  line-height:1.5;
}
.intro-card h1 .name{
  color: var(--orange);
  text-shadow: 3px 3px 0 var(--ink);
}
.intro-card p{ font-size: 24px; margin: 0 0 14px; max-width: 60ch; }
.contact-line{ display:flex; flex-wrap:wrap; gap: 10px 22px; margin: 14px 0 18px; font-size: 22px; }
.contact-line a{ text-decoration: underline; text-underline-offset:3px; text-decoration-thickness:2px; overflow-wrap:anywhere; }
.contact-line .dot::before{
  content:"";
  display:inline-block;
  width:10px; height:10px;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--ink);
  margin-right: 10px;
}
.contact-line .dot:nth-child(2)::before{ background: var(--teal); }

/* confetti-style divider */
.divider-dash{
  border: none;
  height: 8px;
  margin: 20px 0;
  background:
    repeating-linear-gradient(90deg,
      var(--orange) 0 12px, transparent 12px 20px,
      var(--teal) 20px 32px, transparent 32px 40px);
}

.blink{ animation: blink 1s steps(1) infinite; }
@keyframes blink{ 50%{ opacity:0; } }

/* ---------- category filter buttons ---------- */
.tags{ display:flex; flex-wrap:wrap; gap: 16px 14px; padding: 4px 6px 8px; }
.tag{
  font-family:'Press Start 2P', monospace;
  font-size: 10px;
  line-height:1.4;
  background: var(--cream);
  border: none;
  padding: 10px 12px;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink);
  display:inline-flex;
  align-items:center;
  gap:10px;
  touch-action: manipulation;
  text-align:left;
}
.tag::before{
  content:"";
  flex-shrink:0;
  width:10px; height:10px;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--ink);
}
.tag.active{ background: var(--accent); }
.tag.active::before{ background: var(--ink); box-shadow:none; }

.filter-status{ text-align:center; font-size: 22px; color: var(--cream); margin: -8px 0 28px; min-height: 1.4em; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.filter-status a{ color: var(--teal); text-decoration: underline; cursor:pointer; }

/* ---------- hire banner ---------- */
.hire{
  position:relative;
  margin-top: 40px;
  padding: clamp(20px,3vw,28px);
  display:flex; align-items:center; justify-content:space-between; gap: 20px; flex-wrap:wrap;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 8px, transparent 8px 16px),
    var(--wood-dark);
  color: var(--cream);
  --rot:-.4deg;
  transform: rotate(var(--rot));
}
.hire-title{ margin:0 0 8px; font-size: clamp(13px, 2.6vw, 18px); line-height:1.5; text-shadow: 3px 3px 0 var(--orange-dark); }
.hire-sub{ margin:0; font-size: 24px; text-shadow: 2px 2px 0 rgba(0,0,0,.45); }
.hire-btn{
  font-family:'Press Start 2P', monospace;
  font-size: 15px;
  background: var(--orange);
  color: var(--ink);
  border: none;
  padding: 18px 28px;
  min-height: 56px;
  letter-spacing: 2px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center;
  white-space:nowrap;
  touch-action: manipulation;
  animation: bob 1.6s steps(2) infinite;
}
@keyframes bob{ 50%{ transform: translateY(-4px); } }

/* ---------- section headings ---------- */
.section-heading{ text-align:center; margin: 72px 0 34px; position:relative; }
.section-heading::before{
  content:"";
  position:absolute; left:0; right:0; top:50%;
  height:4px; margin-top:-2px;
  background: repeating-linear-gradient(90deg, rgba(255,244,214,.5) 0 8px, transparent 8px 16px);
}
.section-heading h2{
  font-family:'Press Start 2P', monospace;
  font-size: clamp(13px, 3.2vw, 20px);
  line-height:1.5;
  color: var(--ink);
  letter-spacing:3px;
  margin:0;
  display:inline-block;
  background: var(--accent);
  padding: 14px 22px;
  position:relative;
  z-index:1;
}

/* ---------- recent work cards ---------- */
.work-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 40px 30px;
  padding-top: 8px;
  align-items:start;      /* cards keep their natural height, so mixed picture shapes sit nicely */
  grid-auto-flow: dense;  /* fills gaps left by wide cards */
}
.work-card.is-wide{ grid-column: span 2; }
.work-card{
  position:relative;
  background: var(--cream);
  display:flex;
  flex-direction:column;
  --rot:0deg;
  transform: rotate(var(--rot));
  transition: transform .15s steps(3);
  animation: pop .35s steps(5) both;
  cursor:pointer;
  -webkit-user-select:none; user-select:none;
}
.work-card:nth-child(3n+1){ --rot:-1.2deg; }
.work-card:nth-child(3n+2){ --rot:.9deg; }
.work-card:nth-child(3n)  { --rot:-.5deg; }
@keyframes pop{
  from{ opacity:0; transform: translateY(14px) rotate(var(--rot)); }
  to  { opacity:1; transform: translateY(0)    rotate(var(--rot)); }
}

.thumb{
  aspect-ratio: 16/10;
  background-color: var(--accent-dark);
  background-image: radial-gradient(rgba(255,255,255,.18) 2px, transparent 2.5px);
  background-size: 14px 14px;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
  border-bottom: 4px solid var(--ink);
}
.thumb img{ width:100%; height:100%; object-fit:cover; }
.thumb img.fit-contain{ object-fit:contain; }
.thumb img.pixelated, .viewer-media img.pixelated{ image-rendering: pixelated; }
/* ratio: "auto" -> show the whole picture at its natural shape */
.thumb.is-auto{ aspect-ratio:auto; }
.thumb.is-auto img{ height:auto; max-height:560px; object-fit:contain; }
.missing-img{
  color: var(--cream);
  font-size: 20px;
  text-align:center;
  padding: 14px;
  overflow-wrap:anywhere;
}
.size-hint{ display:block; margin-top:10px; font-size:19px; opacity:.85; }
.missing-img b{ font-family:'Press Start 2P', monospace; font-size: 9px; display:block; margin-bottom:10px; color: var(--cream); line-height:1.5; }

.work-body{ padding: 18px 20px 22px; display:flex; flex-direction:column; gap:8px; flex:1; }
.work-cat{
  align-self:flex-start;
  font-family:'Press Start 2P', monospace;
  font-size: 8px;
  line-height:1.5;
  background: var(--accent);
  color: var(--ink);
  padding: 6px 9px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.work-title{ font-family:'Press Start 2P', monospace; font-size: 14px; line-height:1.5; margin: 2px 0 6px; }
.work-desc{
  font-size: 22px; color: var(--ink-soft); margin:0;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:4; overflow:hidden;
}
.work-more{
  align-self:flex-start;
  margin-top:10px;
  font-size:10px;
  letter-spacing:1px;
  padding-bottom:5px;
  border-bottom:3px solid var(--accent);
}
.work-card:focus-visible{ outline:4px solid var(--teal); outline-offset:8px; }

/* ---------- how I work / how I deliver ---------- */
.process-grid{
  display:grid;
  grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
  gap: 40px 30px;
  align-items:start;
  padding-top: 8px;
}
.panel{
  position:relative;
  background: var(--cream);
}
.panel:nth-child(1){ --rot:-.5deg; transform: rotate(var(--rot)); }
.panel:nth-child(2){ --rot:.6deg;  transform: rotate(var(--rot)); }
.panel-title{
  font-size: 12px;
  line-height:1.5;
  letter-spacing: 2px;
  margin: 0;
  padding: 16px 20px;
  background: var(--accent);
  color: var(--ink);
  border-bottom: 4px solid var(--ink);
}

/* numbered steps */
.steps{ list-style:none; margin:0; padding:22px; counter-reset: step; display:grid; gap: 22px; }
.steps li{
  counter-increment: step;
  display:grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 20px;
  align-items:start;
  padding-left: 3px;
}
.steps li::before{
  content: counter(step);
  width: 38px; height: 38px;
  background: var(--accent);
  color: var(--ink);
  font-family:'Press Start 2P', monospace;
  font-size: 14px;
  display:flex; align-items:center; justify-content:center;
  box-shadow: -3px 0 0 var(--ink), 3px 0 0 var(--ink), 0 -3px 0 var(--ink), 0 3px 0 var(--ink),
              inset 3px 3px 0 rgba(255,255,255,.5), inset -3px -3px 0 rgba(0,0,0,.2),
              4px 5px 0 rgba(0,0,0,.3);
}
.step-title{ font-family:'Press Start 2P', monospace; font-size: 12px; margin: 4px 0 8px; line-height:1.5; }
.step-desc{ margin:0; font-size: 22px; color: var(--ink-soft); }

/* delivery rows */
.delivery-list{ list-style:none; margin:0; padding:22px; }
.delivery-list li{ padding: 14px 0; border-bottom: 4px dotted rgba(29,18,10,.3); }
.delivery-list li:first-child{ padding-top: 0; }
.delivery-list li:last-child{ border-bottom:none; padding-bottom:0; }
.delivery-label{
  display:inline-block;
  font-family:'Press Start 2P', monospace;
  font-size: 9px;
  line-height:1.5;
  letter-spacing: 1px;
  color: var(--ink);
  background: var(--accent);
  padding: 5px 8px;
  margin-bottom: 8px;
  box-shadow: 2px 2px 0 rgba(0,0,0,.35);
}
.delivery-value{ display:block; font-size: 22px; }

/* colour cycle for steps + delivery items: orange, teal, orange, teal... */
.steps li:nth-child(odd), .delivery-list li:nth-child(odd){ --accent:var(--orange); }
.steps li:nth-child(even), .delivery-list li:nth-child(even){ --accent:var(--teal); }

/* ---------- elsewhere + footer ---------- */
.elsewhere{ margin-top: 20px; text-align:center; }
.social-row{ display:flex; flex-wrap:wrap; justify-content:center; gap: 20px; margin-top: 10px; }
.social-btn{
  font-family:'Press Start 2P', monospace;
  font-size: 12px;
  line-height:1.4;
  color: var(--ink);
  padding: 15px 20px;
  min-height: 52px;
  text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  touch-action: manipulation;
}
/* social buttons: simple cream, they light up orange on hover */
.social-btn{ background: var(--cream); }
.social-btn::first-letter{ color: var(--orange-dark); }

footer.credit{ text-align:center; color: var(--cream-dim); font-size: 20px; margin-top: 40px; text-shadow: 2px 2px 0 rgba(0,0,0,.45); }

a:focus-visible, button:focus-visible{ outline: 4px solid var(--teal); outline-offset: 4px; }

/* ---------- project viewer (opens when a card is clicked) ---------- */
body.no-scroll{ overflow:hidden; }
.viewer-overlay{
  position:fixed; inset:0; z-index:60;
  background: rgba(15,8,3,.88);
  display:flex; align-items:center; justify-content:center;
  padding:
    calc(22px + env(safe-area-inset-top, 0px))
    calc(22px + env(safe-area-inset-right, 0px))
    calc(22px + env(safe-area-inset-bottom, 0px))
    calc(22px + env(safe-area-inset-left, 0px));
}
.viewer-overlay[hidden]{ display:none; }
.viewer-panel{
  position:relative;
  width:min(880px, 100%);
  max-height:100%;
  overflow-y:auto;
  overscroll-behavior:contain;
  background: var(--cream);
  box-shadow:
    -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink),
    8px 10px 0 0 rgba(0,0,0,.5);
}
.viewer-close{
  position:absolute; top:12px; right:12px; z-index:2;
  width:46px; height:46px;
  background: var(--ink); color: var(--cream);
  border:none; cursor:pointer;
  font-family:'Press Start 2P', monospace; font-size:14px;
  box-shadow: 0 0 0 3px var(--cream);
  touch-action: manipulation;
}
.viewer-close:active{ transform: translate(2px,2px); }
.viewer-media{
  background-color: var(--accent-dark);
  background-image: radial-gradient(rgba(255,255,255,.18) 2px, transparent 2.5px);
  background-size: 14px 14px;
  border-bottom:4px solid var(--ink);
  display:flex; align-items:center; justify-content:center;
}
.viewer-media[hidden]{ display:none; }
.viewer-media img{
  display:block;
  max-width:100%;
  max-height:min(64vh, 700px);
  width:auto; height:auto;
  object-fit:contain;
}
.viewer-media .missing-img{ padding:40px 20px; }
.viewer-body{ padding:22px 26px 28px; display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
.viewer-title{ font-size: clamp(14px, 2.8vw, 20px); line-height:1.5; margin:0; }
.viewer-desc{ margin:0; font-size:24px; color: var(--ink-soft); max-width:60ch; }
.viewer-link{
  margin-top:8px;
  font-family:'Press Start 2P', monospace; font-size:11px; line-height:1.4;
  background: var(--orange); color: var(--ink);
  padding:14px 18px; min-height:48px;
  display:inline-flex; align-items:center; text-decoration:none;
  box-shadow:
    -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink), 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink),
    inset 3px 3px 0 0 rgba(255,255,255,.5), inset -3px -3px 0 0 rgba(0,0,0,.18),
    5px 6px 0 0 rgba(0,0,0,.4);
}
.viewer-link[hidden]{ display:none; }
.viewer-link:active{ transform: translate(3px,3px); }

/* ---------- hover effects (only on devices that can hover — never stuck on phones) ---------- */
@media (hover:hover){
  .work-card:hover{ transform: translateY(-8px) rotate(0deg); }
  .btn:hover, .social-btn:hover, .tag:hover{ filter: brightness(1.08); }
  .tag:not(.active):hover{ background: #fff; }
  .hire-btn:hover{ background: #ff9a5c; }
  .social-btn:hover{ background: var(--orange); }
}

/* ---------- press feedback (works with touch too) ---------- */
.btn:active, .tag:active, .social-btn:active, .hire-btn:active{
  transform: translate(3px,3px);
  box-shadow:
    -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink), 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink),
    inset 3px 3px 0 0 rgba(0,0,0,.15);
  animation:none;
}

/* ============================================================
   TABLET
   ============================================================ */
@media (max-width: 900px){
  .work-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero{ grid-template-columns: 180px minmax(0,1fr); gap: 28px; }
  .process-grid{ grid-template-columns: minmax(0,1fr); }
  .panel:nth-child(n){ --rot:0deg; }
}

/* ============================================================
   PHONE
   ============================================================ */
@media (max-width: 620px){
  body{ font-size: 21px; padding-left: calc(8px + env(safe-area-inset-left, 0px)); padding-right: calc(8px + env(safe-area-inset-right, 0px)); padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .page-inner{ box-shadow: inset 0 0 0 3px var(--wood-dark), inset 0 0 24px rgba(0,0,0,.4); }
  .frame{ padding: 8px 20px 32px; }
  .frame-bolt{ width:10px; height:10px; }
  .frame-bolt.tl{ top:10px; left:10px; }
  .frame-bolt.tr{ top:10px; right:10px; }
  .frame-bolt.bl{ bottom:10px; left:10px; }
  .frame-bolt.br{ bottom:10px; right:10px; }

  /* header: logo + support button on one line, hearts tucked away */
  .topbar{ padding: 10px 12px; margin-top: 16px; gap:8px; }
  .logo{ font-size: 13px; letter-spacing:1px; }
  .logo::before{ margin-right:10px; width:10px; height:10px; box-shadow: 10px 0 0 var(--orange); }
  .hud{ display:none; }
  .btn{ font-size: 10px; padding: 10px 12px; }

  /* intro stacks; avatar becomes a horizontal badge */
  .hero{ grid-template-columns: minmax(0,1fr); gap: 36px; margin-top: 44px; }
  .avatar-card{
    display:grid;
    grid-template-columns: 108px minmax(0,1fr);
    align-items:center;
    gap:18px;
    text-align:left;
    padding:14px;
    --rot:0deg;
  }
  .avatar-card::before{ left:38px; right:auto; }
  .avatar-box{ width:108px; padding:0; }
  .avatar-meta{ margin:0; }
  .avail-tag{ display:inline-block; margin:0; }
  .avail-note{ margin:10px 0 0; font-size:22px; }
  .intro-card{ padding: 22px 18px 20px; --rot:0deg; }
  .intro-card h1{ font-size: 18px; margin-bottom:14px; }
  .intro-card p{ font-size: 21px; }
  .contact-line{ flex-direction:column; gap:10px; font-size:22px; }

  /* filter buttons: big, easy to tap */
  .tags{ gap: 14px 12px; padding: 4px 4px 8px; }
  .tag{ font-size: 9px; padding: 10px; }

  /* hire banner stacks, button spans the full width */
  .hire{ flex-direction:column; align-items:stretch; gap:18px; margin-top:44px; --rot:0deg; }
  .hire-btn{ width:100%; font-size:14px; }

  .section-heading{ margin: 60px 0 30px; }
  .section-heading h2{ padding: 12px 14px; letter-spacing:2px; }

  /* one card per row */
  .work-grid{ grid-template-columns: minmax(0,1fr); gap: 44px; }
  .work-card:nth-child(3n+1){ --rot:-.6deg; }
  .work-card:nth-child(3n+2){ --rot:.5deg; }
  .work-card:nth-child(3n)  { --rot:-.3deg; }
  .work-body{ padding: 16px 16px 20px; }
  .work-desc{ font-size: 22px; }
  .work-card.is-wide{ grid-column: auto; }
  .viewer-overlay{ padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .viewer-media img{ max-height: 52vh; }
  .viewer-body{ padding: 18px 16px 24px; }
  .viewer-desc{ font-size: 22px; }

  .panel-title{ padding: 14px 16px; font-size: 11px; }
  .steps, .delivery-list{ padding: 20px 16px; }
  .steps li{ gap: 16px; }

  /* social buttons in a neat 2x2 grid */
  .social-row{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
  .social-btn{ font-size: 10px; padding: 14px 6px; }

  footer.credit{ font-size: 19px; margin-top: 34px; }
}

/* very small phones */
@media (max-width: 360px){
  .frame{ padding-left:18px; padding-right:18px; }
  .intro-card h1{ font-size: 16px; }
  .logo{ font-size: 11px; }
  .section-heading h2{ font-size: 12px; letter-spacing:1px; }
  .tag{ font-size: 8px; }
  .social-btn{ font-size: 9px; }
}

/* ---------- landscape phones: don't let the avatar badge get too tall ---------- */
@media (max-height: 480px) and (orientation: landscape){
  .section-heading{ margin: 48px 0 26px; }
}

/* ---------- respect people who prefer less motion ---------- */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; scroll-behavior:auto !important; }
}
