/* Scroll reveal: sections fade + lift in as they enter the viewport */
[data-reveal]{
  opacity: 0;
  transform: translateY(48px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
[data-reveal].in-view{
  opacity: 1;
  transform: translateY(0);
}

/* Stagger child reveals slightly after their parent section */
section.in-view [data-reveal]{
  transition-delay: .12s;
}

/* Horizontal-scroll project gallery */
.gallery{
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 24px 16px 32px;
  margin: 16px auto;
  width: clamp(0px, 98vw, 1200px);
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar{ display: none; }

.gallery .card{
  flex: 0 0 280px;
  scroll-snap-align: start;
  background-color: #000;
  border: 1px solid #ffb000;
  box-shadow: 6px 6px #ffb00026, 12px 12px #52525233;
  padding: 20px 18px;
  text-align: left;
  min-height: 160px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
  cursor: url(/images/cursor.png?v=1) 8 8, auto;
}
.gallery .card:hover{
  transform: translateY(-6px);
  box-shadow: 8px 8px #ffb00040, 16px 16px #52525266;
}
.gallery .card h3{
  text-align: left;
  color: #ffb000;
  font-family: public-pixel, monospace;
  font-size: 1em;
  padding: 0;
  margin: 0 0 12px;
}
.gallery .card p{
  width: auto;
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: #f5d27c;
  line-height: 1.5;
}

/* Soft scroll-edge fade so cards feel like they bleed into the page */
.gallery{
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

/* ── Project card hover expand + tilt ──────────────────────────────── */
.gallery .card{
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, min-height .35s;
  perspective: 600px;
}
.gallery .card:hover{
  min-height: 200px;
}
.card-link{
  display: block;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #ffb00030;
  color: #ffb000;
  font-family: chill, sans-serif;
  font-size: 12px;
  letter-spacing: .06em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s .05s, transform .3s .05s;
  text-decoration: none;
}
.gallery .card:hover .card-link{
  opacity: 1;
  transform: translateY(0);
}

/* Section dividers feel weightier on long scroll */
section{
  padding-top: 24px;
}

/* Smooth scroll for the whole page */
html{
  scroll-behavior: smooth;
}

/* ── Text visibility: var(--color) is #000 on black bg, override ─────── */
main { color: #e8e8e8; }
h3   { color: #ffb000; }
section:after { border-bottom-color: #ffb00030; }
hr            { border-bottom-color: #ffb00030; }
.skills li    { border-color: #ffb000; }

/* ── Scroll progress bar ────────────────────────────────────────────── */
#scroll-progress{
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #ff6600, #ffb000, #f5d27c);
  z-index: 10;
  transition: width .1s linear;
  box-shadow: 0 0 8px #ffb000aa;
}

/* ── Scroll-down hint ───────────────────────────────────────────────── */
#scroll-hint{
  position: fixed;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  font-family: chill, sans-serif;
  font-size: 13px;
  letter-spacing: .12em;
  color: #ffb000;
  background: rgba(0,0,0,.8);
  border: 1px solid #ffb00070;
  padding: 5px 22px;
  z-index: 4;
  pointer-events: none;
  animation: hint-bob 2.2s ease-in-out infinite;
  transition: opacity .6s;
}
html[data-scroll=true] #scroll-hint{ opacity: 0; }
@keyframes hint-bob{
  0%,100%{ opacity:.5; transform: translateX(-50%) translateY(0); }
  50%    { opacity:1;   transform: translateX(-50%) translateY(-5px); }
}

/* ── Brand tag top-left ─────────────────────────────────────────────── */
#brand-tag{
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 5;
  font-family: public-pixel, monospace;
  font-size: 10px;
  color: #ffb000;
  letter-spacing: .08em;
  pointer-events: none;
  opacity: .65;
  transition: opacity .3s;
}
html[data-scroll=true] #brand-tag{ opacity: .9; }

/* ── Ambient side canvases ──────────────────────────────────────────── */
.side-canvas{
  position: fixed;
  top: 0;
  width: 160px;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}


/* ── Interests grid ─────────────────────────────────────────────────── */
.interests-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  width: clamp(0px, 95vw, 900px);
  margin: 16px auto;
  text-align: left;
}
.interest-card{
  border: 1px solid #ffb00040;
  background: #060606;
  padding: 16px 18px;
  transition: border-color .3s, box-shadow .3s;
}
.interest-card:hover{
  border-color: #ffb000;
  box-shadow: 4px 4px #ffb00018;
}
.interest-card h3{
  color: #ffb000 !important;
  font-size: .82em !important;
  text-align: left !important;
  padding: 0 0 8px !important;
  margin: 0 !important;
}
.interest-card p{
  font-size: 13px;
  color: #999;
  padding: 0;
  width: auto;
  margin: 0;
  line-height: 1.6;
}

/* ── Photo strip ────────────────────────────────────────────────────── */
.photo-strip{
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 16px 24px 24px;
  margin: 16px auto;
  width: clamp(0px, 98vw, 1200px);
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.photo-strip::-webkit-scrollbar{ display: none; }
.photo-item{
  flex: 0 0 clamp(220px, 55vw, 360px);
  height: 460px;
  scroll-snap-align: start;
  border: 1px solid #ffb00030;
  overflow: hidden;
  position: relative;
  background: #0a0a0a;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s;
}
.photo-item:hover{
  transform: translateY(-4px);
  border-color: #ffb00070;
}
.photo-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.85) contrast(1.1) saturate(.9);
  transition: filter .4s;
}
.photo-item:hover img{ filter: brightness(1) contrast(1.05); }
.photo-num{
  position: absolute;
  bottom: 12px;
  left: 14px;
  color: #ffb000;
  font-family: public-pixel, monospace;
  font-size: .75em;
  opacity: .5;
  pointer-events: none;
}
.photo-placeholder{
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(155deg, #0d0d0d 0%, #141414 50%, #0a0a0a 100%);
  color: #333;
  font-family: public-pixel, monospace;
  font-size: .7em;
  letter-spacing: .1em;
}

/* ── GitHub activity ────────────────────────────────────────────────── */
#gh-contrib-wrap{
  width: clamp(0px, 95vw, 900px);
  margin: 16px auto;
  padding: 14px 16px;
  border: 1px solid #ffb00025;
  background: #050505;
  overflow-x: auto;
}
#gh-contrib-wrap img{
  width: 100%;
  min-width: 500px;
  filter: invert(1) sepia(1) saturate(8) hue-rotate(2deg) brightness(.9);
}
.gh-repos{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px 0;
  justify-content: center;
  list-style: none;
  width: clamp(0px, 95vw, 900px);
  margin: 0 auto;
}
.gh-repos li{
  display: inline-block;
  padding: 4px 10px;
  border: 1px dashed #ffb00060;
  color: #f5d27c;
  font-size: 13px;
  font-family: chill, sans-serif;
}

/* ── Auto-loop photo section ────────────────────────────────────────── */
#section-gallery-loop{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  overflow: hidden;
  position: relative;
}
.loop-viewport{
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 16px 0;
}
.loop-viewport:before,
.loop-viewport:after{
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}
.loop-viewport:before{ left:0;  background: linear-gradient(to right, #000, transparent); }
.loop-viewport:after { right:0; background: linear-gradient(to left,  #000, transparent); }
.loop-track{
  display: flex;
  gap: 12px;
  width: max-content;
  animation: loop-slide 32s linear infinite;
}
.loop-track:hover{ animation-play-state: paused; }
.loop-track-2{
  animation-duration: 40s;
  animation-direction: reverse;
  margin-top: 12px;
}
@keyframes loop-slide{
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.loop-item{
  flex: 0 0 320px;
  height: 420px;
  border: 1px solid #ffb00030;
  overflow: hidden;
  position: relative;
  background: #080808;
  transition: border-color .3s;
}
.loop-item:hover{ border-color: #ffb000; }
.loop-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.8) contrast(1.1) saturate(.85);
  transition: filter .4s, transform .6s;
}
.loop-item:hover img{
  filter: brightness(1) contrast(1.05);
  transform: scale(1.04);
}
.loop-item-placeholder{
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.loop-item-placeholder span{
  font-family: public-pixel, monospace;
  font-size: .65em;
  color: #222;
  letter-spacing: .15em;
}

/* ── Cursor glow trail ──────────────────────────────────────────────── */
.cursor-dot{
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffb000;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity .4s, width .3s, height .3s;
  box-shadow: 0 0 6px #ffb000;
}

/* ── Logo in footer ─────────────────────────────────────────────────── */
#ap-logo{
  display: block;
  margin: 0 auto 8px;
  width: 56px;
  height: 56px;
  opacity: .8;
  transition: opacity .3s, transform .3s;
}
#ap-logo:hover{ opacity: 1; transform: scale(1.08); }

/* ── Global ambient dot grid — fills black space with texture ───────── */
body::before{
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, #ffb0000b 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

/* ── CRT scanlines ──────────────────────────────────────────────────── */
body::after{
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,.022) 3px,
    rgba(0,0,0,.022) 4px
  );
  pointer-events: none;
  z-index: 9998;
}

/* ── Side canvas fade masks ─────────────────────────────────────────── */
.side-canvas{
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%);
}

/* ── Stats bar ──────────────────────────────────────────────────────── */
#stats-bar{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 18px 24px;
  margin: 0 auto 24px;
  width: clamp(0px, 92vw, 720px);
  border: 1px solid #ffb00020;
  background: #050505;
}
.stat-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 28px;
  flex: 1;
}
.stat-n{
  font-family: public-pixel, monospace;
  font-size: 1.5em;
  color: #ffb000;
  line-height: 1;
}
.stat-label{
  font-family: chill, sans-serif;
  font-size: 11px;
  color: #666;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.stat-text span:first-child{
  font-family: public-pixel, monospace;
  font-size: 1.1em;
  color: #f5d27c;
  line-height: 1;
}
.stat-divider{
  width: 1px;
  height: 36px;
  background: #ffb00018;
  flex-shrink: 0;
}

/* ── Section index numbers ──────────────────────────────────────────── */
main{ counter-reset: section-idx; }
main > section[data-reveal]{ position: relative; counter-increment: section-idx; }
main > section[data-reveal]::before{
  content: "0" counter(section-idx);
  position: absolute;
  top: 2px;
  right: 0;
  font-family: public-pixel, monospace;
  font-size: .55em;
  color: #ffb00022;
  letter-spacing: .08em;
  pointer-events: none;
  user-select: none;
}

/* ── Scroll Story Section ────────────────────────────────────────────── */
.story-outer{
  height: 180vh;
  position: relative;
}
.story-pin{
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* ambient depth — CRT amber radial glow, no solid color */
  background:
    radial-gradient(ellipse 60% 60% at 50% 50%, #ffb00006 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 20% 80%, #ff660004 0%, transparent 60%),
    #000;
}
.story-moment{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 5vw;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
  pointer-events: none;
  text-align: center;
}
.story-moment.active{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.story-kicker{
  font-family: public-pixel, monospace;
  font-size: .6em;
  color: #ffb000;
  letter-spacing: .25em;
  margin-bottom: 20px;
  opacity: .5;
}
.story-headline{
  font-family: public-pixel, monospace;
  font-size: clamp(1.5em, 5vw, 3em);
  color: #f5d27c;
  line-height: 1.25;
  margin: 0 0 20px;
}
.story-body{
  font-family: chill, sans-serif;
  font-size: clamp(.9em, 1.4vw, 1.05em);
  color: #888;
  max-width: 480px;
  line-height: 1.75;
  margin: 0;
}
.story-ghost{
  font-family: public-pixel, monospace;
  font-size: clamp(4em, 14vw, 9em);
  color: #ffb000;
  opacity: .07;
  position: absolute;
  bottom: 8%;
  right: 6%;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

/* ── Story horizontal rule ───────────────────────────────────────────── */
.story-rule{
  display: block;
  width: clamp(40px, 8vw, 80px);
  height: 1px;
  background: linear-gradient(90deg, #ffb000, #ffb00030);
  margin: 0 auto 20px;
}

/* ── Story inline metrics (Lando stats-panel pattern) ────────────────── */
.story-metrics{
  display: flex;
  gap: clamp(24px, 5vw, 60px);
  margin-top: 32px;
  justify-content: center;
  flex-wrap: wrap;
}
.story-metric{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.story-metric-n{
  font-family: public-pixel, monospace;
  font-size: clamp(1.2em, 2.5vw, 1.8em);
  color: #ffb000;
  line-height: 1;
}
.story-metric-l{
  font-family: chill, sans-serif;
  font-size: 10px;
  color: #555;
  letter-spacing: .1em;
  text-align: center;
  max-width: 160px;
}
.story-sticker{
  position: absolute;
  width: clamp(60px, 8vw, 88px);
  opacity: .15;
  pointer-events: none;
  user-select: none;
  filter: grayscale(.2);
  transition: opacity .5s;
}
.story-pin:hover .story-sticker{ opacity: .26; }
.story-dots{
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}
.story-dot{
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffb00025;
  transition: background .3s, transform .3s;
}
.story-dot.active{
  background: #ffb000;
  transform: scale(1.5);
}
.story-outer::after{
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ffb00018, transparent);
  margin: 0 8%;
}

/* Faint crosshatch grid inside story for CRT depth */
.story-pin::before{
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#ffb00010 1px, transparent 1px),
    linear-gradient(90deg, #ffb00010 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 30%, transparent 100%);
}

/* ── Ticker tape — Lando-style horizontal scrolling stat strip ───────── */
.ticker-outer{
  overflow: hidden;
  width: 100%;
  padding: 12px 0;
  border-top:    1px solid #ffb00018;
  border-bottom: 1px solid #ffb00018;
  background: #000;
  position: relative;
  z-index: 1;
}
.ticker-track{
  display: flex;
  width: max-content;
  animation: ticker-slide 28s linear infinite;
  gap: 0;
}
.ticker-outer:hover .ticker-track{ animation-play-state: paused; }
.ticker-item{
  font-family: public-pixel, monospace;
  font-size: .65em;
  color: #ffb000;
  letter-spacing: .15em;
  padding: 0 40px;
  white-space: nowrap;
  opacity: .55;
}
.ticker-sep{
  font-family: public-pixel, monospace;
  font-size: .65em;
  color: #ffb00030;
  padding: 0 10px;
  line-height: 1;
  align-self: center;
}
@keyframes ticker-slide{
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── "Now building" live badge ───────────────────────────────────────── */
.live-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: chill, sans-serif;
  font-size: 11px;
  color: #ffb000;
  letter-spacing: .1em;
  padding: 4px 10px 4px 8px;
  border: 1px solid #ffb00040;
  background: #ffb00008;
  margin-bottom: 16px;
}
.live-badge::before{
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffb000;
  animation: live-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes live-pulse{
  0%,100%{ opacity: 1; transform: scale(1); }
  50%    { opacity: .3; transform: scale(.7); }
}

/* ── Stat callout numbers (Lando-style bold stats) ───────────────────── */
.stat-callout{
  display: flex;
  gap: clamp(24px, 4vw, 60px);
  flex-wrap: wrap;
  margin-top: 28px;
}
.stat-callout-item{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-callout-n{
  font-family: public-pixel, monospace;
  font-size: clamp(1.6em, 3.5vw, 2.8em);
  color: #ffb000;
  line-height: 1;
}
.stat-callout-l{
  font-family: chill, sans-serif;
  font-size: 11px;
  color: #666;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ── Card tag chips ──────────────────────────────────────────────────── */
.card-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.card-tag{
  font-family: chill, sans-serif;
  font-size: 10px;
  color: #ffb00090;
  border: 1px solid #ffb00030;
  padding: 2px 7px;
  letter-spacing: .06em;
}

/* ── Experience timeline ─────────────────────────────────────────────── */
.exp-list{
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 8px;
}
.exp-item{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 28px;
  position: relative;
}
.exp-item::before{
  content: '';
  position: absolute;
  left: 157px;
  top: 6px;
  bottom: -40px;
  width: 1px;
  background: linear-gradient(to bottom, #ffb00030, transparent);
}
.exp-item:last-child::before{ display: none; }
.exp-date{
  font-family: public-pixel, monospace;
  font-size: .55em;
  color: #ffb000;
  opacity: .5;
  padding-top: 4px;
  text-align: right;
  line-height: 1.6;
}
.exp-role{
  font-family: public-pixel, monospace;
  font-size: .85em;
  color: #f5d27c;
  margin: 0 0 4px;
  line-height: 1.3;
}
.exp-company{
  font-family: chill, sans-serif;
  font-size: .8em;
  color: #ffb000;
  opacity: .7;
  margin-bottom: 8px;
}
.exp-desc{
  font-family: chill, sans-serif;
  font-size: 13px;
  color: #888;
  line-height: 1.65;
  margin: 0;
  max-width: 640px;
}

@media(max-width: 680px){
  .exp-item{
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .exp-item::before{ display: none; }
  .exp-date{ text-align: left; }
}

/* ── Section nav dots (right side) ──────────────────────────────────── */
#section-nav{
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 6;
  pointer-events: auto;
}
.snav-dot{
  width: 4px;
  height: 4px;
  border-radius: 2px;
  background: #ffb00020;
  cursor: pointer;
  transition: background .3s, height .3s;
}
.snav-dot.active{
  background: #ffb000;
  height: 20px;
  border-radius: 2px;
}
@media(max-width: 680px){ #section-nav{ display: none; } }

/* ── Clip-path reveal for interest cards ────────────────────────────── */
.interest-card[data-reveal]{
  opacity: 0;
  transform: none;
  clip-path: inset(0 100% 0 0);
  transition: opacity .7s ease, clip-path .7s cubic-bezier(.4, 0, .2, 1);
}
.interest-card[data-reveal].in-view{
  opacity: 1;
  clip-path: inset(0 0% 0 0);
  transform: none;
}

/* ── Hero scroll-driven exit (CSS Scroll-Driven Animations API) ─────── */
@supports (animation-timeline: view()){
  #s-intro h1{
    animation: hero-shrink linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 80%;
  }
  @keyframes hero-shrink{
    to{ opacity: .2; transform: scale(.93) translateY(-18px); }
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   LAYOUT REDESIGN
   The bundled CSS uses fixed pixel margins (e.g. margin: 380px on skills,
   335px on stats-bar) that leave ~680px content in a 1440px viewport.
   This section overrides those with a responsive padding-based system.
   ═══════════════════════════════════════════════════════════════════════ */

/* 1. Sections: horizontal padding creates the breathing room */
main > section[data-reveal]{
  padding-left:  clamp(32px, 8vw, 140px) !important;
  padding-right: clamp(32px, 8vw, 140px) !important;
}

/* 2. Reset element-level fixed padding from bundled CSS */
main h1, main h2, main h3{
  padding-left:  0 !important;
  padding-right: 0 !important;
}
main p{
  margin-left:  0 !important;
  margin-right: 0 !important;
  max-width: 600px;
}

/* 3. Skills pill list — full section width */
main ul.skills{
  margin-left:  0 !important;
  margin-right: 0 !important;
  max-width:    none !important;
  width:        100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 4. Interests grid — full section width, more columns */
.interests-grid{
  max-width:           100% !important;
  width:               100% !important;
  margin-left:         0    !important;
  margin-right:        0    !important;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)) !important;
}

/* 5. Stats bar — match section padding */
#stats-bar{
  margin-left:  clamp(32px, 8vw, 140px) !important;
  margin-right: clamp(32px, 8vw, 140px) !important;
  max-width:    none !important;
  width:        auto !important;
}

/* 6. GitHub section */
#github-activity{
  padding-left:  clamp(32px, 8vw, 140px) !important;
  padding-right: clamp(32px, 8vw, 140px) !important;
}
#gh-contrib-wrap, .gh-repos{
  max-width:    100% !important;
  margin-left:  0   !important;
  margin-right: 0   !important;
}

/* 7. Footer */
footer{
  padding-left:  clamp(32px, 8vw, 140px) !important;
  padding-right: clamp(32px, 8vw, 140px) !important;
}

/* 8. Editorial type scale */
main h1{
  font-size:   clamp(2.4em, 6.5vw, 5.2em) !important;
  line-height: 1.07                        !important;
}
main h2{
  font-size:   clamp(1.3em, 2.6vw, 2.1em) !important;
  line-height: 1.2                         !important;
}

/* 9. h2 with amber rule extending right — editorial feel */
main section h2{
  display:     flex;
  align-items: center;
  gap:         18px;
  margin-bottom: 20px;
}
main section h2::after{
  content:    '';
  flex:       1;
  height:     1px;
  background: linear-gradient(90deg, #ffb00028, transparent);
}

/* 10. Intro: vertical presence, left-aligned editorial */
#s-intro{
  padding-top:    clamp(60px, 9vh, 130px) !important;
  padding-bottom: clamp(60px, 9vh, 130px) !important;
  min-height:     52vh;
  display:        flex;
  flex-direction: column;
  justify-content: center;
}
#s-intro h3{
  margin-top: 12px;
  font-size: clamp(1em, 2vw, 1.4em) !important;
  opacity: .75;
}

/* 11. Contact — dramatic close */
#s-contact{
  padding-top:    80px   !important;
  padding-bottom: 120px  !important;
  border-top:     1px solid #ffb00018;
}
#s-contact h2{
  font-size: clamp(2.2em, 5vw, 4em) !important;
}
#s-contact p{
  color:     #bbb        !important;
  font-size: clamp(1em, 1.3vw, 1.1em) !important;
  max-width: none        !important;
}

/* 12. Subtle section background alternation for rhythm */
#s-interests{
  background: #030303;
}
#github-activity{
  background: #020202;
}
#s-contact{
  background: #030303;
}

/* 13. Experience + education — two-column at desktop */
@media(min-width: 900px){
  #s-experience, #s-education{
    display:               grid;
    grid-template-columns: max-content 1fr;
    column-gap:            60px;
    align-items:           start;
  }
  #s-experience h2, #s-education h2{
    writing-mode: vertical-rl;
    transform:    rotate(180deg);
    font-size:    clamp(1em, 1.5vw, 1.3em) !important;
    margin:       0;
    padding:      0;
    opacity:      .6;
    align-self:   start;
    padding-top:  4px;
  }
  /* remove the amber rule line for vertical headings */
  #s-experience h2::after, #s-education h2::after{
    display: none;
  }
}

/* 14. Project gallery: match section width */
.gallery{
  width:     calc(100vw - clamp(64px, 16vw, 280px)) !important;
  max-width: none !important;
  margin-left:  0 !important;
  margin-right: 0 !important;
}

/* ── Story corner bracket marks (replaces stickers) ─────────────────── */
.story-corner{
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: #ffb00035;
  border-style: solid;
}
.story-corner-tl{ top: clamp(20px,5vh,48px); left: clamp(20px,4vw,60px); border-width: 2px 0 0 2px; }
.story-corner-tr{ top: clamp(20px,5vh,48px); right: clamp(20px,4vw,60px); border-width: 2px 2px 0 0; }
.story-corner-bl{ bottom: clamp(20px,5vh,48px); left: clamp(20px,4vw,60px); border-width: 0 0 2px 2px; }
.story-corner-br{ bottom: clamp(20px,5vh,48px); right: clamp(20px,4vw,60px); border-width: 0 2px 2px 0; }

/* ── Scattered polaroid photo gallery ───────────────────────────────── */
.photo-strip{
  display: flex !important;
  overflow-x: auto !important;
  gap: 24px !important;
  padding: 40px clamp(24px, 6vw, 80px) 60px !important;
  scroll-snap-type: x proximity !important;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%) !important;
          mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%) !important;
  width: 100vw !important;
  max-width: none !important;
  margin-left: clamp(-80px, -8vw, -32px) !important;
  box-sizing: border-box;
}
.photo-item{
  flex: 0 0 clamp(200px, 28vw, 320px) !important;
  height: clamp(260px, 36vw, 420px) !important;
  scroll-snap-align: start !important;
  background: #0e0e0e !important;
  border: 1px solid #ffb00028 !important;
  overflow: hidden !important;
  position: relative !important;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s !important;
  /* Scattered rotation — alternating on nth-child */
  will-change: transform;
}
.photo-item:nth-child(odd) {
  transform: rotate(-1.4deg) translateY(8px);
  box-shadow: 4px 8px 24px #00000080;
}
.photo-item:nth-child(even) {
  transform: rotate(1.1deg) translateY(-6px);
  box-shadow: -4px 8px 24px #00000080;
}
.photo-item:hover{
  transform: rotate(0deg) translateY(-12px) scale(1.03) !important;
  box-shadow: 0 20px 40px #000000aa, 0 0 0 1px #ffb00050 !important;
  z-index: 2;
}
/* Polaroid-style bottom label strip */
.photo-item::after{
  content: attr(data-label);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #0a0a0a;
  border-top: 1px solid #ffb00015;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-num{
  position: absolute !important;
  bottom: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  color: #ffb000 !important;
  font-size: .6em !important;
  opacity: .45 !important;
  pointer-events: none !important;
  z-index: 2;
}
.photo-item img{
  filter: brightness(.82) contrast(1.08) saturate(.85) !important;
  transition: filter .5s !important;
  width: 100% !important;
  height: calc(100% - 40px) !important;
  object-fit: cover !important;
}
.photo-item:hover img{ filter: brightness(1) contrast(1.04) saturate(1) !important; }

/* Placeholder treatment for missing photos */
.photo-item:not(:has(img[src$=".jpg"]:not([style*="none"]))){
  background: linear-gradient(135deg, #0a0a0a 0%, #111 50%, #0a0a0a 100%) !important;
}

/* ── CSS Logo mark (replaces SVG in footer) ──────────────────────────── */
#ap-logo-mark{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid #ffb00060;
  margin: 0 auto 10px;
  font-family: public-pixel, monospace;
  font-size: .65em;
  color: #ffb000;
  letter-spacing: .05em;
  position: relative;
  background: #000;
  box-shadow: 0 0 12px #ffb00018, inset 0 0 12px #ffb0000a;
  transition: box-shadow .3s;
}
#ap-logo-mark:hover{
  box-shadow: 0 0 24px #ffb00035, inset 0 0 16px #ffb00015;
}
/* Corner accents on the logo mark */
#ap-logo-mark::before,
#ap-logo-mark::after{
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: #ffb000;
  border-style: solid;
}
#ap-logo-mark::before{ top: -2px; left: -2px; border-width: 1.5px 0 0 1.5px; }
#ap-logo-mark::after { bottom: -2px; right: -2px; border-width: 0 1.5px 1.5px 0; }

/* ── Section accent: thin amber left-border on hover ────────────────── */
main > section[data-reveal]{
  border-left: 2px solid transparent;
  transition: border-color .4s;
  padding-left: calc(clamp(32px, 8vw, 140px) - 2px) !important;
}
main > section[data-reveal]:hover{
  border-left-color: #ffb00020;
}

/* ── Intro section decorative coordinate ────────────────────────────── */
#s-intro::after{
  content: '40.4774° N / 74.4367° W';
  display: block;
  font-family: public-pixel, monospace;
  font-size: .5em;
  color: #ffb00025;
  letter-spacing: .15em;
  margin-top: 40px;
}

/* ── "Building since" ambient tag on intro ───────────────────────────── */
.intro-since{
  font-family: chill, sans-serif;
  font-size: 11px;
  color: #444;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════
   IRIS TASK LAYER
   ═══════════════════════════════════════════════════════════════════════ */

#pill-nav{
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 60;
  width: fit-content;
  max-width: calc(100vw - 20px);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
#pill-nav.is-visible{ opacity: 1; }
.pn-ambient{
  position: absolute;
  inset: -12px;
  border-radius: 34px;
  overflow: hidden;
  pointer-events: none;
}
.pn-ambient::before{
  content: "";
  position: absolute;
  inset: -85%;
  border-radius: 50%;
  background:
    conic-gradient(
      from 0deg,
      rgba(6,9,15,0) 0deg,
      rgba(52,65,85,0.18) 28deg,
      rgba(255,176,0,0.18) 60deg,
      rgba(255,255,255,0.58) 80deg,
      rgba(255,176,0,0.16) 96deg,
      rgba(6,9,15,0.08) 132deg,
      rgba(6,9,15,0) 180deg,
      rgba(52,65,85,0.2) 208deg,
      rgba(255,176,0,0.2) 240deg,
      rgba(255,255,255,0.56) 260deg,
      rgba(255,176,0,0.18) 284deg,
      rgba(6,9,15,0) 360deg
    );
  filter: blur(22px) saturate(125%);
  animation: pn-liquid-spin 5.5s linear infinite;
}
.pn-track{
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 18px;
  background: rgba(8, 8, 10, 0.66);
  border: 1px solid rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 24px 80px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(255,255,255,0.02);
  overflow: hidden;
  pointer-events: auto;
}
.pn-track::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 46%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  pointer-events: none;
}
.pn-btn{
  position: relative;
  z-index: 3;
  height: 40px;
  min-width: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,0.56);
  cursor: pointer;
  font-family: monospace;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: lowercase;
  transition: color .28s ease;
}
.pn-btn:hover,
.pn-btn.is-active{ color: rgba(255,255,255,0.96); }
.pn-indicator{
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 1;
  height: 40px;
  border-radius: 12px;
  pointer-events: none;
  transition:
    left .28s cubic-bezier(.4,0,.2,1),
    width .28s cubic-bezier(.4,0,.2,1);
}
.pn-indicator-glow{
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: rgba(255,176,0,0.18);
  filter: blur(14px);
  opacity: .92;
}
.pn-indicator-clip{
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
}
.pn-indicator-ring{
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background:
    conic-gradient(
      from 0deg,
      #06090f 0%,
      #3d3120 18%,
      #ffb000 32%,
      #fff4cb 36%,
      #ffffff 40%,
      #ffb000 52%,
      #3d3120 68%,
      #06090f 100%
    );
  animation: pn-spin 4.5s linear infinite;
}
.pn-indicator-inner{
  position: absolute;
  inset: 2px;
  border-radius: 10px;
  background: rgba(8,8,10,0.9);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
@keyframes pn-spin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}
@keyframes pn-liquid-spin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}

.bg-mesh{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.5s ease;
}
html[data-app-state="ready"] .bg-mesh,
html[data-app-state="failed"] .bg-mesh{ opacity: 1; }
.bg-mesh::before,
.bg-mesh::after{
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.bg-mesh::before{
  width: 72vw;
  height: 72vw;
  left: -18vw;
  bottom: -24vw;
  background: radial-gradient(circle, rgba(255,176,0,0.06) 0%, transparent 66%);
  animation: mesh-drift-1 28s ease-in-out infinite alternate;
}
.bg-mesh::after{
  width: 48vw;
  height: 48vw;
  top: -12vw;
  right: -8vw;
  background: radial-gradient(circle, rgba(255,176,0,0.045) 0%, transparent 68%);
  animation: mesh-drift-2 24s ease-in-out infinite alternate;
}
main::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 48% 30%, rgba(255,176,0,0.035), transparent 28%),
    radial-gradient(circle at 72% 72%, rgba(255,176,0,0.025), transparent 24%);
  opacity: 0;
  transition: opacity 1.5s ease;
}
html[data-app-state="ready"] main::before,
html[data-app-state="failed"] main::before{ opacity: 1; }
@keyframes mesh-drift-1{
  0%{ transform: translate(0, 0) scale(1); }
  50%{ transform: translate(8vw, -5vw) scale(1.08); }
  100%{ transform: translate(-3vw, 6vw) scale(.96); }
}
@keyframes mesh-drift-2{
  0%{ transform: translate(0, 0) scale(1); }
  50%{ transform: translate(-6vw, 4vw) scale(1.1); }
  100%{ transform: translate(3vw, -2vw) scale(.92); }
}

#s-bento{
  padding-top: 20px !important;
  padding-bottom: 34px !important;
}
.bento-head{
  max-width: 760px;
  margin-bottom: 22px;
}
.bento-kicker,
.stack-kicker,
.gallery-kicker,
.updates-kicker{
  display: inline-block;
  margin-bottom: 12px;
  color: #ffb000;
  font-family: public-pixel, monospace;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.bento-grid{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.bento-card{
  grid-column: span 4;
  min-height: 188px;
  padding: 22px;
  border: 1px solid rgba(255,176,0,0.16);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(12,12,14,0.92), rgba(4,4,6,0.98));
  box-shadow: 0 30px 70px rgba(0,0,0,0.32);
}
.bento-card-ey{
  grid-column: span 6;
  position: relative;
  overflow: hidden;
}
.bento-card-ey::after{
  content: "";
  position: absolute;
  inset: auto -20% -28% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,176,0,0.14), transparent 62%);
}
.bento-label{
  display: inline-block;
  margin-bottom: 12px;
  font-family: public-pixel, monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,176,0,0.72);
}
.bento-card strong{
  display: block;
  margin-bottom: 12px;
  font-family: chill, sans-serif;
  font-size: clamp(1.2rem, 2.3vw, 1.8rem);
  color: #f8e5b1;
}
.bento-card p{
  width: 100%;
  max-width: none;
  margin: 0;
  color: #8f8f8f;
  line-height: 1.65;
}
.bento-iris{
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 88px;
  height: 88px;
  opacity: .24;
}

#s-stack{
  padding-top: 90px !important;
  padding-bottom: 110px !important;
}
.stack-shell{
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr);
  gap: 44px;
  align-items: center;
}
.stack-stage{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.stack-deck{
  position: relative;
  width: min(100%, 420px);
  height: 430px;
  perspective: 1400px;
}
.stack-card{
  position: absolute;
  inset: 0;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(20,20,22,0.98), rgba(8,8,10,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 60px 140px rgba(0,0,0,0.42);
  transition: transform .42s cubic-bezier(.22,1,.36,1), opacity .32s ease;
  cursor: pointer;
}
.stack-card[data-layer="0"]{
  transform: translate3d(0,0,0) rotate(0deg) scale(1);
  opacity: 1;
  z-index: 5;
}
.stack-card[data-layer="1"]{
  transform: translate3d(0,18px,-60px) rotate(-4deg) scale(.97);
  opacity: .88;
  z-index: 4;
}
.stack-card[data-layer="2"]{
  transform: translate3d(0,34px,-120px) rotate(4deg) scale(.94);
  opacity: .72;
  z-index: 3;
}
.stack-card[data-layer="3"]{
  transform: translate3d(0,46px,-180px) rotate(-6deg) scale(.91);
  opacity: .54;
  z-index: 2;
}
.stack-card[data-layer="4"]{
  transform: translate3d(0,58px,-220px) rotate(5deg) scale(.88);
  opacity: .4;
  z-index: 1;
}
.stack-card.is-flying{
  transform: translate3d(120px,-80px,0) rotate(12deg) scale(1.03) !important;
  opacity: 0 !important;
}
.stack-card-kicker{
  display: inline-block;
  margin-bottom: 14px;
  font-family: public-pixel, monospace;
  font-size: 10px;
  letter-spacing: .16em;
  color: rgba(255,176,0,0.72);
  text-transform: uppercase;
}
.stack-card h3{
  margin: 0 0 14px;
  color: #fff0c8;
}
.stack-card p{
  width: 100%;
  margin: 0;
  color: #9e9e9e;
  line-height: 1.68;
}
.stack-meta{
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.stack-meta li{
  color: #c6b483;
  font-size: 13px;
  border-top: 1px solid rgba(255,176,0,0.14);
  padding-top: 8px;
}
.stack-dots{
  display: flex;
  gap: 10px;
}
.stack-dot{
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,176,0,0.22);
  cursor: pointer;
  transition: width .3s ease, background .3s ease;
}
.stack-dot.is-active{
  width: 26px;
  background: #ffb000;
}

#s-gallery{
  padding-top: 88px !important;
  padding-bottom: 96px !important;
}
.gallery-head{
  max-width: 760px;
  margin-bottom: 28px;
}
.polaroid-gallery{
  column-count: 3;
  column-gap: 22px;
}
.gallery-polaroid{
  --gallery-rot: 0deg;
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  padding: 14px 14px 20px;
  background: #f5f1ea;
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 6px;
  box-shadow: 0 28px 60px rgba(0,0,0,0.32), 0 8px 24px rgba(0,0,0,0.18);
  transform: rotate(var(--gallery-rot));
  transform-origin: center center;
  transition: transform .32s cubic-bezier(.22,1,.36,1), box-shadow .32s ease;
}
.gallery-polaroid:hover{
  transform: translateY(-12px) rotate(0deg) scale(1.01);
  box-shadow: 0 38px 80px rgba(0,0,0,0.38), 0 14px 30px rgba(0,0,0,0.22);
}
.gallery-frame{
  overflow: hidden;
  background: linear-gradient(135deg, #d7d2ca, #efebe1);
  min-height: 220px;
}
.gallery-frame img{
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: saturate(.96) contrast(1.02);
}
.gallery-caption{
  display: grid;
  gap: 6px;
  padding-top: 14px;
  color: #171717;
  opacity: .74;
  transition: opacity .25s ease, transform .25s ease;
}
.gallery-caption strong{
  font-family: public-pixel, monospace;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #0a0a0a;
}
.gallery-caption span{
  font-size: 13px;
  line-height: 1.55;
  color: #404040;
}
.gallery-polaroid:hover .gallery-caption{
  opacity: 1;
  transform: translateY(-2px);
}
.gallery-polaroid.is-placeholder .gallery-frame{
  background:
    linear-gradient(135deg, rgba(255,176,0,0.34), rgba(255,160,122,0.24)),
    #d7d2ca;
}

#s-updates{
  padding-top: 88px !important;
  padding-bottom: 88px !important;
}
.updates-head{
  max-width: 760px;
  margin-bottom: 28px;
}
.updates-shell{
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 24px;
}
.updates-sidebar,
.blog-viewer{
  border: 1px solid rgba(255,176,0,0.16);
  border-radius: 22px;
  background: rgba(6,6,8,0.8);
  box-shadow: 0 28px 70px rgba(0,0,0,0.28);
}
.updates-sidebar{
  padding: 18px;
}
.updates-terminal-help{
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,176,0,0.14);
  margin-bottom: 14px;
}
.updates-terminal-help strong{
  display: block;
  margin-bottom: 8px;
  font-family: public-pixel, monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,176,0,0.72);
}
.updates-terminal-help p,
.blog-empty{
  width: 100%;
  margin: 0;
  color: #9a9a9a;
  line-height: 1.65;
}
.blog-list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.blog-list-item{
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid rgba(255,176,0,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  color: #c7c7c7;
  cursor: pointer;
}
.blog-list-item span{
  display: block;
  margin-bottom: 6px;
  font-family: public-pixel, monospace;
  font-size: 9px;
  letter-spacing: .14em;
  color: rgba(255,176,0,0.58);
}
.blog-list-item strong{
  display: block;
  font-family: chill, sans-serif;
  font-size: 15px;
  color: #f2ddb0;
}
.blog-list-item.is-active{
  border-color: rgba(255,176,0,0.44);
  box-shadow: 0 0 0 1px rgba(255,176,0,0.18) inset;
}
.blog-viewer{
  padding: 24px;
}
.blog-viewer-meta{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: rgba(255,176,0,0.58);
  font-family: public-pixel, monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.blog-note{
  color: #ffb000;
}
.blog-body p{
  width: 100%;
  max-width: none;
  margin: 0 0 14px !important;
  color: #b0b0b0;
  line-height: 1.75;
}

@media (max-width: 1040px){
  .bento-card{ grid-column: span 6; }
  .stack-shell,
  .updates-shell{ grid-template-columns: 1fr; }
}
@media (max-width: 900px){
  .polaroid-gallery{ column-count: 2; }
}
@media (max-width: 720px){
  #brand-tag { display: none !important; }
  #scroll-hint { display: none !important; }
  #pill-nav{
    top: auto !important;
    bottom: 18px;
    width: calc(100vw - 24px);
    transform: translateX(-50%);
    max-width: 480px;
  }
  .pn-track{
    width: 100%;
    justify-content: space-between;
    gap: 0;
    padding: 4px;
    border-radius: 20px;
  }
  .pn-btn{
    height: 44px;
    min-width: 0;
    padding: 0 6px;
    font-size: 9px;
    flex: 1;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
  }
  .pn-btn svg { width: 18px; height: 18px; }
  .pn-indicator{ height: 44px; }
  /* Add safe-area padding so it clears the iPhone home bar */
  #pill-nav { bottom: calc(18px + env(safe-area-inset-bottom)); }
  .polaroid-gallery{ column-count: 1; }
  .bento-card,
  .bento-card-ey{ grid-column: 1 / -1; }
}

/* ═══════════ Visitors Photo Booth ═══════════ */
#s-visitors {
  padding: 5rem 6vw 5rem;
  background: #000;
  position: relative;
}

.visitors-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: rgba(255,176,0,0.5);
  font-family: monospace;
  text-align: center;
  margin-bottom: 0.5rem;
}

.visitors-title {
  font-family: 'TTCommonsLocal', Helvetica, Arial, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

/* Whiteboard-style photo wall */
.visitors-board {
  position: relative;
  width: 100%;
  min-height: 120px;
  margin-bottom: 3rem;
  transition: min-height 0.5s ease;
  perspective: 900px;

  /* whiteboard look */
  background: #f7f6f2;
  border: 3px solid #1a1a1a;
  border-radius: 6px;
  box-shadow:
    0 0 0 6px #000,
    0 12px 48px rgba(0,0,0,0.7),
    inset 0 0 60px rgba(0,0,0,0.06);

  overflow: hidden;
}

/* subtle whiteboard texture lines */
.visitors-board::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 28px,
    rgba(0,0,0,0.04) 28px,
    rgba(0,0,0,0.04) 29px
  );
  pointer-events: none;
  z-index: 0;
}

.visitors-empty {
  position: relative;
  z-index: 1;
  text-align: center;
  font-family: monospace;
  font-size: 0.72rem;
  color: rgba(0,0,0,0.25);
  letter-spacing: 1.5px;
  padding: 2.5rem 0;
  pointer-events: none;
}

/* Individual polaroid */
.visitor-polaroid {
  position: absolute;
  background: #fff;
  padding: 10px 10px 42px;
  width: 160px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
  transform-style: preserve-3d;
  transition: box-shadow 0.2s ease;
  will-change: transform;
  cursor: grab;
  user-select: none;
  z-index: 1;
}
.visitor-polaroid:active { cursor: grabbing; }

.visitor-polaroid img {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: cover;
  background: #111;
  pointer-events: none;
}

.visitor-polaroid-cap {
  margin-top: 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.58rem;
  color: #555;
  text-align: center;
  letter-spacing: 0.5px;
  pointer-events: none;
}

/* Webcam booth */
.visitors-booth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.booth-cam-outer {
  position: relative;
  width: 280px;
  height: 210px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,176,0,0.25);
  box-shadow: 0 0 40px rgba(255,176,0,0.08);
  background: #080808;
}

#booth-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: none;
}

#booth-canvas {
  display: none;
}

.booth-no-cam {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.22);
  font-family: monospace;
  font-size: 0.65rem;
  letter-spacing: 1.5px;
}

.booth-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transition: opacity 0.06s;
}
.booth-flash.active { opacity: 1; }

.booth-countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  font-weight: 700;
  color: #fff;
  font-family: monospace;
  z-index: 5;
  pointer-events: none;
  text-shadow: 0 2px 24px rgba(0,0,0,0.9);
  opacity: 0;
  transition: opacity 0.1s;
}
.booth-countdown-overlay.visible { opacity: 1; }

.booth-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.booth-btn {
  font-family: monospace;
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  border: 1px solid rgba(255,176,0,0.3);
  background: rgba(255,176,0,0.07);
  color: #ffb000;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}
.booth-btn:hover {
  background: rgba(255,176,0,0.15);
  border-color: rgba(255,176,0,0.55);
}
.booth-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.booth-btn-secondary {
  background: transparent;
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.4);
  font-size: 0.6rem;
  padding: 0.45rem 0.9rem;
}
.booth-btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
}

.booth-shutter-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255,176,0,0.5);
  background: rgba(255,176,0,0.1);
  color: #ffb000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px rgba(255,176,0,0.12);
}
.booth-shutter-btn:hover {
  background: rgba(255,176,0,0.22);
  box-shadow: 0 0 32px rgba(255,176,0,0.28);
  transform: scale(1.06);
}
.booth-shutter-btn:active { transform: scale(0.94); }
.booth-shutter-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.booth-count {
  font-family: monospace;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 1px;
  min-height: 1em;
}

@media (max-width: 600px) {
  .visitor-polaroid { width: 130px; padding: 8px 8px 36px; }
  .visitor-polaroid img { width: 114px; height: 114px; }
  .booth-cam-outer { width: 240px; height: 180px; }
}

/* ═══════════ Global mobile fixes ═══════════ */
html, body { overflow-x: hidden; }

@media (max-width: 768px) {
  /* Hide brand tag — pill nav takes full width, they collide */
  #brand-tag { display: none; }

  /* Push site content below pill nav */
  #site-content { padding-top: 70px; }

  /* About section: single column, no overflow */
  .profile-about-section {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 1.5rem 5vw !important;
    margin: 2rem auto !important;
    overflow: visible !important;
  }
  .about-details {
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }
  .about-details ul, .about-details p {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .profile-image-container { order: -1; max-width: 200px; margin: 0 auto; }

  /* Engineering stack: centered, clean 4-col grid */
  .tools-section {
    margin: 3rem auto !important;
    padding: 0 1rem !important;
  }
  .tools-container {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: center;
  }
  .tools-title { text-align: center; margin-bottom: 1.5rem; }
  .tools-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.75rem 0.5rem !important;
    justify-items: center;
    max-width: 320px;
    margin: 0 auto;
    padding: 0 !important;
  }
  .tool-item { align-items: center; padding: 0.15rem; }
  .tool-icon { width: 34px !important; height: 34px !important; }
  .tool-name { font-size: 0.55rem !important; text-align: center; }
  .tools-right {
    padding-left: 0 !important;
    border-left: none !important;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
  }
  .tools-description { font-size: 1rem !important; }

  /* Carousel: smaller images on phone */
  .portfolio-item img { height: 200px !important; }
  .portfolio-carousel { padding: 1.2rem 0; }

  /* GitHub contrib chart: allow scroll inside wrapper */
  #gh-contrib-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Section padding reduction */
  #s-bento, #s-stack, #s-updates, #s-gallery, #s-visitors {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Footer links wrap cleanly */
  .footer-nav { flex-wrap: wrap; }
  .footer-nav-link { flex: 1 1 45%; min-width: 0; }

  /* Tools grid: slightly smaller icons */
  .tool-icon { width: 40px !important; height: 40px !important; }

  /* Pill nav: tighter on mobile */
  #pill-nav { top: 12px; }
  .pn-btn { padding: 0 10px; font-size: 10px; }
}

@media (max-width: 480px) {
  /* Pill nav: hide text labels on tiny screens, just icons */
  .pn-btn-label { display: none; }
  .pn-btn { padding: 0 8px !important; min-width: 32px; }
  .pn-track { gap: 2px; padding: 4px; }

  /* About section tighter */
  .profile-about-section { padding: 1rem 4vw !important; }
  .about-details h3 { font-size: 0.75rem !important; }

  /* Stack deck height */
  .stack-deck { height: 320px !important; }

  /* Blog terminal full width */
  .updates-shell { gap: 12px; }
  .updates-sidebar, .blog-viewer { border-radius: 12px; }

  /* Reduce section padding more aggressively */
  #s-bento, #s-stack, #s-updates, #s-gallery, #s-visitors {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}
