/* =========================
   0) Base / Typography
   ========================= */
*{ box-sizing:border-box; }
html, body{ height:100%; }

:root{
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
  --border: rgba(255,255,255,0.14);
}

/* Remove any neon/purple glow from ALL text */
h1,h2,h3,h4,h5,h6,
p,span,a,li,
.brand-title,.section-title,.page-title,.page-sub,
.meta-row,.footer,.footer a{
  text-shadow:none !important;
}

/* Calm readable links */
a{
  color: rgba(255,255,255,0.82);
  text-decoration:none;
}
a:hover{ color: rgba(255,255,255,0.95); }

/* Images never overflow */
img{ max-width:100%; height:auto; display:block; }

/* Body */
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x:hidden;
  overflow-y:auto;

  /* CHANGED: base only (gradient moved to stable fixed layer below) */
  background: #02020a;

  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* CHANGED: stable universe gradient layer to prevent seams/banding */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-3;
  pointer-events:none;

  background:
    radial-gradient(1200px 800px at 70% 20%, rgba(130,80,255,0.25), transparent 100%),
    radial-gradient(900px 700px at 20% 80%, rgba(0,180,255,0.18), transparent 55%),
    radial-gradient(700px 500px at 40% 40%, rgba(255,120,180,0.12), transparent 55%),
    #02020a;

  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

/* Landing page locks scroll */
body.page-landing{ overflow:hidden; }
body:not(.page-landing){ -webkit-overflow-scrolling: touch; }


/* =========================
   1) Background Layers
   ========================= */
.bg{
  position:fixed;
  inset:0;
  overflow:hidden;

  /* CHANGED: keep bg behind all content + behind foreground stack cleanly */
  z-index:-2;

  pointer-events:none;
}

/* Smooth out the “split” with a bottom blend */
.bg::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:55vh;
  background: linear-gradient(
    to bottom,
    rgba(2,2,10,0) 0%,
    rgba(2,2,10,0.12) 35%,
    rgba(2,2,10,0.35) 70%,
    rgba(2,2,10,0.55) 100%
  );
  pointer-events:none;
}

/* soft space haze */
.bg::before{
  content:"";
  position:absolute;
  inset:-20%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.05), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.04), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(255,255,255,0.03), transparent 55%);
  filter: blur(10px);
  opacity:0.9;
}

/* Nebula */
.nebula{
  position:absolute;
  inset:-30%;
  background:
    radial-gradient(closest-side at 20% 30%, rgba(170,120,255,0.18), transparent 60%),
    radial-gradient(closest-side at 80% 20%, rgba(90,200,255,0.14), transparent 62%),
    radial-gradient(closest-side at 70% 75%, rgba(255,120,180,0.12), transparent 58%),
    radial-gradient(closest-side at 35% 80%, rgba(120,255,220,0.10), transparent 60%);

  /* CHANGED: slightly reduced blur to reduce banding artifacts */
  filter: blur(20px) saturate(120%);

  opacity:0.85;

  /* CHANGED: remove blend mode (common cause of visible “breaks”) */
  mix-blend-mode: normal;

  transform: translate3d(0,0,0);

  /* keep float but without scale (scale causes seams on blurred gradients) */
  animation: nebulaFloat 18s ease-in-out infinite alternate;

  pointer-events:none;
  will-change: transform;
}

@keyframes nebulaFloat{
  /* CHANGED: removed scale() entirely */
  0%{ transform: translate3d(-2%, -1%, 0); }
  100%{ transform: translate3d(2%, 1.5%, 0); }
}

/* Stars */
.stars{
  position:absolute;
  inset:0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.95), transparent 50%),
    radial-gradient(1px 1px at 18% 72%, rgba(255,255,255,0.85), transparent 50%),
    radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.9), transparent 50%),
    radial-gradient(1px 1px at 33% 15%, rgba(255,255,255,0.75), transparent 50%),
    radial-gradient(1px 1px at 40% 85%, rgba(255,255,255,0.8), transparent 50%),
    radial-gradient(1px 1px at 55% 30%, rgba(255,255,255,0.9), transparent 50%),
    radial-gradient(1px 1px at 62% 60%, rgba(255,255,255,0.7), transparent 50%),
    radial-gradient(1px 1px at 70% 10%, rgba(255,255,255,0.85), transparent 50%),
    radial-gradient(1px 1px at 78% 45%, rgba(255,255,255,0.8), transparent 50%),
    radial-gradient(1px 1px at 88% 70%, rgba(255,255,255,0.9), transparent 50%);
  background-size: 240px 240px;
  opacity:0.75;
  transform: translateZ(0);
  animation: drift 220s linear infinite, twinkle 12s ease-in-out infinite;
  will-change: transform;
}
.stars2{
  position:absolute;
  inset:0;
  background-image: inherit;
  background-size: 180px 180px;
  opacity:0.55;
  filter: blur(0.3px);
  transform: translateZ(0);
  animation: drift 320s linear infinite, twinkle 14s ease-in-out infinite;
  will-change: transform;
}
.stars3{
  position:absolute;
  inset:0;
  background-image: inherit;
  background-size: 120px 120px;
  opacity:0.40;
  filter: blur(0.6px);
  transform: translateZ(0);
  animation: drift 420s linear infinite, twinkle 16s ease-in-out infinite;
  will-change: transform;
}

@keyframes twinkle{
  0%,100%{ opacity:0.75; }
  50%{ opacity:0.9; }
}
@keyframes drift{
  from{ transform: translate3d(0,0,0); }
  to{ transform: translate3d(-120px, 80px, 0); }
}

/* Shooting stars */
.shooting-layer{
  position:absolute;
  inset:0;
  pointer-events:none;
}
.shooting-star{
  position:absolute;
  width:180px;
  height:2px;
  transform: rotate(var(--angle, -25deg));
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.95), rgba(255,255,255,0));
  filter: drop-shadow(0 0 8px rgba(170, 220, 255, 0.55));
  opacity:0;
  animation: shoot var(--dur, 1.2s) ease-out forwards;
}
.shooting-star::after{
  content:"";
  position:absolute;
  right:20px;
  top:50%;
  width:10px;
  height:10px;
  transform: translateY(-50%);
  border-radius:50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 18px rgba(160, 220, 255, 0.7);
}
@keyframes shoot{
  0%{
    opacity:0;
    transform: translate3d(0,0,0) rotate(var(--angle, -25deg));
  }
  10%{ opacity:1; }
  100%{
    opacity:0;
    transform: translate3d(
      var(--dx, -520px),
      var(--dy, 220px),
      0
    ) rotate(var(--angle, -25deg));
  }
}

/* CHANGED: extra tone-down specifically for portfolio (helps load feel) */
body.page-portfolio .nebula,
body.page-portfolio .stars,
body.page-portfolio .stars2,
body.page-portfolio .stars3,
body.page-portfolio .shooting-layer{
  animation-play-state: paused !important;
}


/* =========================
   2) Landing Foreground (INDEX / ENTER PAGE)
   ========================= */
.content{
  position:relative;
  z-index:2;
  height:100%;
  display:grid;
  place-items:center;
  text-align:center;
  padding:28px;
}

.hero{
  max-width:720px;
  padding:28px 22px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 60px rgba(0,0,0,0.45);
}

.eyebrow{
  font-size:11px;
  letter-spacing:0.28em;
  text-transform:uppercase;
  color: rgba(255,255,255,0.72);
  margin-bottom:12px;
}

.content h1{
  margin:0 0 12px;
  font-weight:650;
  font-size: clamp(42px, 6.1vw, 76px);
  letter-spacing:-0.02em;
  line-height:1.05;
}

.content p{
  margin:0 auto;
  max-width:56ch;
  font-size: clamp(15px, 2vw, 19px);
  letter-spacing:0.01em;
  line-height:1.65;
  color: rgba(255,255,255,0.74);
}

.content p.hero-script{
  font-family: "Ephesis", cursive;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height:1.15;
  letter-spacing:0;
  margin-top:10px;
  margin-bottom:18px;
  max-width:28ch;
  color: rgba(255,255,255,0.82);
}

@media (max-width:560px){
  .content p.hero-script{
    font-size:30px;
    max-width:32ch;
  }
}

/* Enter button */
.enter-btn{
  margin-top:22px;
  padding:14px 38px;
  font-size:13px;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:#fff;
  background: rgba(255,255,255,0.06);
  border:1.5px solid rgba(255,255,255,0.55);
  border-radius:999px;
  cursor:pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.enter-btn:hover{
  background: rgba(255,255,255,0.14);
  box-shadow: 0 0 28px rgba(160, 200, 255, 0.45);
  transform: translateY(-2px);
}

/* Enter glow pulse */
.enter-btn{ position:relative; }
.enter-btn::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:999px;
  background: radial-gradient(circle, rgba(160, 200, 255, 0.35), transparent 60%);
  opacity:0;
  filter: blur(14px);
  transition: opacity 0.3s ease;
  pointer-events:none;
}
.enter-btn:hover::after{ opacity:1; }

@keyframes pulseGlow{
  0%{ box-shadow: 0 0 0 rgba(160,200,255,0.0); }
  50%{ box-shadow: 0 0 26px rgba(160,200,255,0.35); }
  100%{ box-shadow: 0 0 0 rgba(160,200,255,0.0); }
}
.enter-btn:hover{ animation: pulseGlow 2.4s ease-in-out infinite; }

/* Button entrance */
.enter-btn{
  opacity:0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.enter-btn.show{
  opacity:1;
  transform: translateY(0);
}

/* Transition overlay */
.transition{
  position:fixed;
  inset:0;
  background: radial-gradient(900px 700px at 50% 50%, rgba(255,255,255,0.14), rgba(0,0,0,0.85));
  opacity:0;
  pointer-events:none;
  z-index:9999;
  transition: opacity 450ms ease;
}
.transition.on{ opacity:1; }


/* =========================
   3) Foreground Layers
   ========================= */
.content, .topbar, .home, .footer, header, main, section{
  position:relative;
  z-index:2;
}


/* =========================
   4) Topbar / Nav
   ========================= */
.topbar{
  padding:22px 24px 10px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}

.brand-title{
  font-size:18px;
  letter-spacing:0.12em;
  text-transform:uppercase;
}
.brand-sub{
  margin-top:6px;
  font-size:13px;
  opacity:0.70;
}

.nav{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.nav-link{
  font-size:12px;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color: rgba(255,255,255,0.62);
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.nav-link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.78);
}
.nav-link.is-active{
  color: rgba(255,255,255,0.80);
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.07);
}
.nav-link-ghost{
  color: rgba(255,255,255,0.52);
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
.nav-link-ghost:hover{
  color: rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}

@media (max-width:720px){
  .topbar{ align-items:flex-start; flex-direction:column; }
  .nav{ justify-content:flex-start; }
  .nav-link{
    color: rgba(255,255,255,0.55);
    border-color: rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.22);
  }
}


/* =========================
   5) Page Layout
   ========================= */
.home{
  padding:18px 24px 64px;
  max-width:1100px;
  margin:0 auto;
}

.section-title{
  margin:14px 0 18px;
  font-size:14px;
  letter-spacing:0.18em;
  text-transform:uppercase;
  opacity:0.9;
}


/* =========================
   6) Hero Image
   ========================= */
.hero-shot{ margin:10px 0 18px; }

.hero-link{
  display:block;
  border-radius:22px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.16);
  box-shadow: 0 18px 55px rgba(0,0,0,0.45);
  transform: translateZ(0);
}

.hero-img{
  width:100%;
  aspect-ratio: 21 / 9;
  object-fit:cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}
.hero-link:hover .hero-img{
  transform: scale(1.02);
  filter: contrast(1.03);
}
@media (max-width:900px){
  .hero-img{ aspect-ratio: 16 / 10; }
}
@media (max-width:560px){
  .hero-shot{ margin:6px 0 12px; }
  .hero-img{ aspect-ratio: 16 / 9; }
}


/* =========================
   7) About / Cards / Type
   ========================= */
.about{ margin-top:10px; }

.about-card{
  border-radius:22px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.16);
  backdrop-filter: blur(10px);
  padding:18px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}

.about-lead{
  margin:0 0 10px;
  font-size:18px;
  line-height:1.55;
  color: rgba(255,255,255,0.88);
}

/* UPDATED: bigger + cleaner paragraph type everywhere */
.about-body{
  margin:0;
  font-size: clamp(16px, 1.15vw, 19px);
  line-height:1.85;
  letter-spacing:0.012em;
  color: rgba(255,255,255,0.74);
  max-width:70ch;

  /* mobile safety so words never blow out the card */
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  text-align: left;
}

.signature{
  margin:18px 0 0;
  font-family:"Ephesis", cursive;
  font-size: clamp(22px, 4vw, 32px);
  line-height:1.2;
  color: rgba(255,255,255,0.62);
  max-width:24ch;
  transform: translateY(2px);
}


/* =========================
   8) Accessibility Type Boost
   Bio / Statement / Resume
   ========================= */
body.page-statement .about-body,
body.page-bio .about-body,
body.page-resume .about-body{
  font-size: clamp(19px, 1.65vw, 24px);
  line-height: 1.95;
  color: rgba(255,255,255,0.88);
  max-width: 85ch;
  margin-bottom: 2.4rem;

  /* UPDATED: readability + mobile-safe wrapping */
  letter-spacing: 0.012em;
  overflow-wrap: anywhere;
  hyphens: auto;

  /* default to LEFT on small screens to avoid ugly spacing */
  text-align: left;
}

/* UPDATED: justify only on wider screens so it looks “stretched” without weird gaps */
@media (min-width: 768px){
  body.page-statement .about-body,
  body.page-bio .about-body,
  body.page-resume .about-body{
    text-align: justify;
    text-justify: inter-word;
    text-align-last: left;
    word-spacing: 0.02em;
  }
}

body.page-statement .section-title,
body.page-bio .section-title,
body.page-resume .section-title{
  font-size: clamp(15px, 1.1vw, 18px);
  letter-spacing: 0.16em;
}

/* Bio card should span like Statement/Resume */
body.page-bio .about-card{
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}


/* =========================
   9) Gallery Grid
   ========================= */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
}

.tile{
  position:relative;
  margin:0;
  grid-column: span 4;
}

.tile img{
  width:100%;
  height:260px;
  object-fit:cover;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;

  /* optional paint optimization (safe) */
  content-visibility: auto;
  contain-intrinsic-size: 260px 400px;
}
.tile:hover img{
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0,0,0,0.5);
}

.cap{
  position:absolute;
  left:12px;
  right:12px;
  bottom:12px;
  padding:10px 12px;
  border-radius:14px;
  font-size:12px;
  letter-spacing:0.16em;
  text-transform:uppercase;
  color: rgba(255,255,255,0.78);
  background: rgba(0,0,0,0.38);
  border:1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
  opacity:0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.tile:hover .cap{
  opacity:1;
  transform: translateY(0);
}

/* Desktop layout variety */
.grid .tile:nth-child(1){ grid-column: span 7; }
.grid .tile:nth-child(2){ grid-column: span 5; }
.grid .tile:nth-child(3){ grid-column: span 4; }
.grid .tile:nth-child(4){ grid-column: span 4; }
.grid .tile:nth-child(5){ grid-column: span 4; }
.grid .tile:nth-child(6){ grid-column: span 6; }
.grid .tile:nth-child(7){ grid-column: span 6; }
.grid .tile:nth-child(8){ grid-column: span 5; }
.grid .tile:nth-child(9){ grid-column: span 7; }

@media (max-width:900px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .tile{ grid-column: span 1 !important; }
  .tile img{ height:240px; }
  .cap{ opacity:1; transform: translateY(0); }
}

@media (max-width:560px){
  .grid{ grid-template-columns: 1fr; }
  .tile img{ height:auto; aspect-ratio: 4 / 5; }
}


/* =========================
   10) Footer
   ========================= */
.footer{
  padding:26px 24px 34px;
  margin-top:44px;
}
.footer-inner{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,0.12);
}
.footer-brand{
  font-size:12px;
  letter-spacing:0.22em;
  text-transform:uppercase;
  color: rgba(255,255,255,0.8);
}
.footer-copy{
  font-size:12px;
  color: rgba(255,255,255,0.6);
}
@media (max-width:720px){
  .footer-inner{ flex-direction:column; align-items:flex-start; }
}


/* =========================
   11) Lightbox
   ========================= */
.lightbox{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.86);
  display:grid;
  place-items:center;
  opacity:0;
  pointer-events:none;
  transition: opacity 200ms ease;
  z-index:99999;
  touch-action: manipulation;
  overflow-y: auto;
  padding: 80px 0; /* breathing room top/bottom */
}
.lightbox.on{
  opacity:1;
  pointer-events:auto;
}

.lb-img{
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.14);
  box-shadow: 0 30px 90px rgba(0,0,0,0.65);
  touch-action: manipulation;
}

/* Close button always clickable */
.lb-close{
  position:fixed;
  top:18px;
  right:18px;
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  color:#fff;
  font-size:28px;
  line-height:0;
  cursor:pointer;
  backdrop-filter: blur(8px);
  z-index: 100000;
  pointer-events: auto;
}

/* Scroll stack (portfolio mode) */
.lb-stack{
  display: none; /* hidden by default; JS turns on when needed */
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.lb-stack img{
  max-width: min(92vw, 1100px);
  max-height: none;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 30px 90px rgba(0,0,0,0.65);
}

/* Ensure inner elements remain clickable when open */
.lightbox *{
  pointer-events: auto;
}

/* Pause background motion while lightbox is open (performance + click reliability) */
body.lightbox-open .nebula,
body.lightbox-open .stars,
body.lightbox-open .stars2,
body.lightbox-open .stars3,
body.lightbox-open .shooting-layer,
body.lightbox-open canvas{
  animation-play-state: paused !important;
}

/* Optional: reduce Safari mobile lag from backdrop blur */
@media (max-width:768px){
  .lb-close{ backdrop-filter: none; }
}


/* =========================
   12) Floating Affirmations
   ========================= */
.floating-affirmation{
  position:fixed;
  z-index:1;
  pointer-events:none;

  width: max-content;
  max-width: min(82vw, 520px);
  padding:14px 20px;
  border-radius:999px;

  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
  border:1px solid rgba(255,255,255,0.14);

  text-align:center;
  font-size: clamp(14px, 2.2vw, 18px);
  line-height:1.6;
  letter-spacing:0.02em;
  color: rgba(255,255,255,0.88);

  opacity:0;

  left: var(--ax, 70vw);
  top:  var(--ay, 70vh);

  --dx: 0px;
  --dy: 0px;

  transform: translate(-50%, -50%) translate3d(0, 8px, 0);
  transition: opacity 1.2s ease, transform 6.5s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.floating-affirmation.show{
  opacity:0.85;
  transform: translate(-50%, -50%) translate3d(var(--dx), var(--dy), 0);
}

/* Keep affirmations away from last lines on small screens */
@media (max-width:979px){
  body.page-bio .home,
  body.page-statement .home,
  body.page-resume .home{
    padding-bottom:120px;
  }
}


/* =========================
   13) Desktop Scale + Spacing
   ========================= */

/* Base about-body: fills the card everywhere */
.about-body{
  font-size: clamp(16px, 1.1vw, 19px);
  line-height: 1.85;

  max-width: 100%;
  width: 100%;

  overflow-wrap: anywhere;
  hyphens: none;
}

/* Tablet/Desktop: stretch lines across the card */
@media (min-width: 768px){
  .about-body{
    text-align: justify;
    text-justify: inter-word;
    text-align-last: left;
  }
}

/* Mobile: keep it clean */
@media (max-width: 767px){
  .about-body{
    text-align: left;
  }
}

@media (min-width:1024px){
  body:not(.page-landing) main{
    max-width:1180px;
    margin:0 auto;
    padding-left:28px;
    padding-right:28px;
  }

  .home{
    max-width:1180px;
    margin:0 auto;
    padding-left:28px;
    padding-right:28px;
  }

  .about, .gallery{
    max-width:1240px;
    margin-left:auto;
    margin-right:auto;
  }

  body{
    font-size:18px;
    line-height:1.75;
  }

  .about-lead{
    font-size:1.35rem;
    line-height:1.35;
  }

  .section-title{
    font-size:1.15rem;
    letter-spacing:0.14em;
  }

  .about-card{ padding:28px; }

  .grid{ gap:18px; }

  .tile img{ min-height:240px; object-fit:cover; }

  .cap{ font-size:0.95rem; }

  .signature{
    font-size: clamp(20px, 1.7vw, 28px);
    max-width:30ch;
  }
}

/* Mobile readability tweaks */
@media (max-width:560px){
  .home{ padding-top:10px; }

  .section-title{
    font-size:13px;
    letter-spacing:0.2em;
    margin-bottom:12px;
  }

  .about{ margin-top:14px; }
  .about + .about{ margin-top:18px; }

  .about-card{ padding:20px; }

  /* Bigger text for accessibility on small screens */
  .about-body{
    font-size:19px;
    line-height:1.95;
    max-width:100%;
    color: rgba(255,255,255,0.84);
    text-align: left;
  }

  body.page-statement .about-body,
  body.page-bio .about-body,
  body.page-resume .about-body{
    font-size: 19px;
    line-height: 1.95;
    text-align: left;
    word-spacing: 0;
  }

  .signature{
    font-size:26px;
    max-width:100%;
    margin-top:16px;
  }
}

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce){
  * { scroll-behavior: auto !important; }
  .nav-link, .hero-img, .enter-btn { transition: none; }
}

/* =========================
   Resume page formatting
   ========================= */

.page-resume .about-card.resume {
  max-width: 920px;
  margin: 0 auto;
  padding: 26px 22px;
}

/* Header */
.resume__header {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.resume__name {
  margin: 0 0 10px 0;
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Contact line */
.resume__meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 14.5px;
  opacity: 0.9;
}

.resume__meta a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.resume__meta a:hover {
  border-bottom-color: rgba(170, 120, 255, 0.95);
}

/* Sections */
.resume__section {
  padding-top: 6px;
  margin-top: 14px;
}

.resume__heading {
  margin: 0 0 10px 0;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

.resume__heading::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 10px;
  background: linear-gradient(90deg, rgba(170, 120, 255, 0.85), transparent);
  opacity: 0.6;
}

/* Entry grid */
.resume__entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 10px 0;
}

.resume__year {
  font-size: 14px;
  white-space: nowrap;
  opacity: 0.85;
}

.resume__title {
  font-weight: 650;
  font-size: 15.5px;
  margin-bottom: 2px;
}

.resume__org {
  font-size: 14.5px;
  opacity: 0.85;
}

.resume__detail {
  font-size: 14px;
  opacity: 0.7;
  margin-top: 2px;
}

/* Centered resume header */
.resume__header--centered {
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.resume__meta--centered {
  justify-content: center;
}

.resume__icon {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  opacity: 0.75;
}

/* Mobile */
@media (max-width: 560px) {
  .resume__entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* Print friendly */
@media print {
  .bg, .topbar, .footer { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .about-card.resume { border: none !important; box-shadow: none !important; }
}
