:root{  
  --bg: #4e1111;
  --bg2:#4e1111;

  /* TYPOGRAPHY (warm white) */
  --ink:#f0ece2;
  --muted: rgba(250, 247, 245, 0.75);

  /* BRAND COLORS (keep burgundy for borders/background accents) */
  --accent:#4e1111;
  --accent2:#b46b6b;

  --border: rgba(250, 247, 245, 0.35);
  --shadow: 0 12px 30px rgba(0,0,0,.08);
  --radius: 14px;
  --max: 1040px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
}

img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
.container{ width:min(var(--max), calc(100% - 48px)); margin-inline:auto; }

/* Bold + glow highlight (keeps same font + same size) */
.hl{
  font-weight: 700;
  color: #D7E18B;
  white-space: nowrap;
}


/* Top bar */
.topbar{
  position: sticky;
  top:0;
  z-index:20;
  background: #4e1111;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(250,247,245,.10);
}

/* ============================= */
/* UNIFIED LINK HOVER (NO UNDERLINE, NO GROWING LINE) */
/* Applies to: navlinks, mobilemenu, email/github/linkedin, project + figma links */
/* ============================= */

.navlinks a,
.mobilemenu a,
.contact-card a,
.proj-link,
.mini-link{
  position: relative;
  display: inline-block;
  opacity: .85;
  text-decoration: none;
  transition: opacity .25s ease, transform .25s ease;

  /* consistent hover hit-area, no layout shift */
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 8px;
}

.navlinks a::before,
.mobilemenu a::before,
.contact-card a::before,
.proj-link::before,
.mini-link::before{
  content:"";
  position:absolute;
  inset:-2px -6px;          /* matches padding/margin above */
  border-radius: 10px;
  background: rgba(250,247,245,.10);
  opacity: 0;
  transform: translateY(1px);
  transition: opacity .28s ease, transform .28s ease;
  pointer-events: none;
}

.navlinks a:hover,
.mobilemenu a:hover,
.contact-card a:hover,
.proj-link:hover,
.mini-link:hover,
.navlinks a:focus-visible,
.mobilemenu a:focus-visible,
.contact-card a:focus-visible,
.proj-link:focus-visible,
.mini-link:focus-visible{
  opacity: 1;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.navlinks a:hover::before,
.mobilemenu a:hover::before,
.contact-card a:hover::before,
.proj-link:hover::before,
.mini-link:hover::before,
.navlinks a:focus-visible::before,
.mobilemenu a:focus-visible::before,
.contact-card a:focus-visible::before,
.proj-link:focus-visible::before,
.mini-link:focus-visible::before{
  opacity: 1;
  transform: translateY(0);
}

/* hard-kill underline on active/click too */
.navlinks a:active,
.mobilemenu a:active,
.contact-card a:active,
.proj-link:active,
.mini-link:active{
  text-decoration: none !important;
}

/* Layout */
.nav{ display:flex; align-items:center; justify-content:space-between; padding: 14px 0; gap:16px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:600; letter-spacing:.08em; }
.brand-dot{ width:10px; height:10px; border-radius:999px; background: rgba(250,247,245,.9); }
.brand-text{ font-size: 30px; color: var(--ink); }

.navlinks{ display:flex; gap:18px; align-items:center; }
.navlinks a{
  font-size: 12px;
  letter-spacing:.12em;
  color: var(--ink);
  /* keep simple; hover handled above */
}

.navtoggle{
  display:none;
  background:transparent;
  border:1px solid rgba(250,247,245,.25);
  border-radius: 10px;
  padding:10px;
  cursor:pointer;
  transition: transform .2s ease, background .2s ease;
}
.navtoggle:hover{ background: rgba(250,247,245,.06); transform: translateY(-1px); }
.navtoggle span{
  display:block;
  width:18px;
  height:2px;
  background: var(--ink);
  margin:4px 0;
  border-radius:99px;
}

.mobilemenu{
  display:none;
  padding: 8px 0 16px;
  border-top: 1px solid rgba(250,247,245,.10);
}
.mobilemenu a{
  display:block;
  padding: 10px 0;
  font-size: 12px;
  letter-spacing:.12em;
  color: var(--ink);

  /* keep block spacing; unified hover still works */
  margin: 0;               /* override unified negative margin for block links */
  padding: 10px 6px;       /* keep tappable height + slight side padding */
  border-radius: 10px;
}
.mobilemenu a::before{
  inset: 6px 0;            /* pill stays inside row height */
  border-radius: 10px;
}
.mobilemenu.show{ display:block; }

/* Hero */
.hero{
  position:relative;
  padding: clamp(72px, 10vh, 140px) 0 clamp(140px, 18vh, 200px);
}

.hero-grid{
  display:grid;
  /* give the left column more room so the title fits */
  grid-template-columns: minmax(0,1.35fr) minmax(0,0.85fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.display{
  font-family: "Bebas Neue", system-ui, sans-serif;

  /* tuned so it won’t hit the “wrap point” at ~1131px */
  font-size: clamp(56px, 6.2vw, 92px);

  line-height: .88;
  margin:0;
  color: var(--ink);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 rgba(0,0,0,.08);

  /* IMPORTANT: keep HYACINTH BUTRON on one line */
  white-space: nowrap;
}

.subline{
  display:flex;
  align-items:center;
  gap:12px;
  margin: 10px 0 18px;
}
.rule{ height:1px; width: 64px; background: rgba(250,247,245,.25); }
.subcaps{
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .8;
  color: rgb(225, 225, 139);
}


.lead{
  max-width: 52ch;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
}

.cta-row{ display:flex; gap: 10px; flex-wrap: wrap; }
.cta-row .btn{
  color: var(--ink)
}


/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--ink);
  transition:
    transform .25s ease,
    box-shadow .25s ease,
    background .25s ease,
    filter .25s ease,
    color .25s ease;
  will-change: transform;
}

.btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.btn:active{
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0,0,0,.14);
}
.btn:focus-visible{
  outline: 3px solid rgba(250,247,245,.22);
  outline-offset: 3px;
}

.btn-solid{
  background: rgba(250,247,245,.08);
  color: var(--ink);
  border-color: rgba(250,247,245,.35);
}
.btn-solid:hover{ filter: brightness(1.05); }

.btn-outline{
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover{ background: rgba(250,247,245,.08); }

.hero-right{ position:relative; min-height: 260px; }

.photo-frame{
  position:relative;
  width: min(420px, 100%);
  margin-left:auto;
  border: 2px solid rgba(250,247,245,.35);
  border-radius: 12px;
  overflow:hidden;
  box-shadow: var(--shadow);
  background: rgba(250,247,245,.04);
}

.photo-frame img{
  width:100%;
  height:auto;
}

.photo-accent{
  position:absolute;
  inset:auto 12px 12px auto;
  width: 46px;
  height: 46px;
  background: rgba(250,247,245,.10);
  border: 1px solid rgba(250,247,245,.20);
  border-radius: 6px;
}

.watermark{
  position:absolute;
  right: 0;
  top: 22px;
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: clamp(120px, 12vw, 180px);
  opacity:.08;
  color: rgba(250,247,245,.55);
  line-height:1;
  pointer-events:none;
}

/* FIXED + BIGGER SCROLL HINT */
.scrollhint{
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  bottom: 12px; 
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(250,247,245,.28);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  opacity:.65;
  transition: opacity .2s ease, transform .2s ease;
}
.scrollhint:hover{ opacity:1; transform: translateX(-50%) translateY(-2px); }

/* Sections */
.section{ padding: clamp(78.84px, 8vw, 140px) 0; }
:root{
  /* adjust if your topbar is taller/shorter */
  --topbar-h: 64px;
}

/* make anchor jumps land nicely below sticky top bar */
.section{
  scroll-margin-top: calc(var(--topbar-h) + 18px);
}

.section.alt{ background: var(--bg2); }

.section-title{
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing:.02em;
  margin: 0 0 12px;
  color: var(--ink);
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgba(0,0,0,.06);
}

/* INTRO TITLE + PHILOSOPHY CARD HORIZONTAL ALIGNMENT */
/* ABOUT / INTRO = full-screen section */
#intro.section{
  min-height: calc(100svh - var(--topbar-h));
  display: grid;
  align-content: center;               /* centers the whole intro block vertically */
  padding-block: clamp(90px, 10vh, 140px);
}

.intro-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(18px, 3vw, 40px);
  row-gap: 12px;
  align-items: start;
}

.intro-title{
  grid-column: 1;
  grid-row: 1;
}

.intro-text{
  grid-column: 1;
  grid-row: 2;
  max-width: 68ch;
}

.intro-card{
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 520px;
  margin-left: auto;
}

.section-note{
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  max-width: none !important;
  width: 100%;
}

/* ===== FIX: FULL-WIDTH SECTION INTRO PARAGRAPHS (Coding / Figma / Branding) ===== */
#coding .section-note,
#figma .section-note,
#branding .section-note,
#projects .section-note{
  max-width: none !important;
  width: 100%;
}

/* If those sections wrap content in .textblock, remove its max-width too */
#coding .textblock,
#figma .textblock,
#branding .textblock,
#projects .textblock{
  max-width: none !important;
  width: 100%;
}

#coding .textblock p,
#figma .textblock p,
#branding .textblock p,
#projects .textblock p{
  max-width: none !important;
  width: 100%;
}

/* ✅ INTRO + PHILOSOPHY BALANCED LAYOUT */
.two-col{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
  gap: clamp(18px, 3vw, 40px);
  align-items: stretch; /* ✅ important: both columns become same height */
}


/* Left text column */
.textblock{
  max-width: 68ch;
}
.textblock p{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* Right card */
.card{
  border: 2px solid rgba(250,247,245,.35);
  border-radius: 14px;
  background: rgba(250,247,245,.04);
  padding: clamp(16px, 2.4vw, 24px);
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  gap: 10px;

  max-width: 520px;
  margin-left: auto;

  height: 100%; /* ✅ fills the full column height */
}


.card-title{
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: 24px;
  margin: 0;
  color: var(--ink);
  letter-spacing:.04em;
  text-transform: uppercase;
  line-height: 1;
}

.card-title::after{
  content:"";
  display:block;
  height: 1px;
  width: 64px;
  background: rgba(250,247,245,.22);
  margin-top: 10px;
}

.card-text{
  margin: 14px 0 0;   /* creates space below the title area */
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  flex: 1;            /* keeps the card stretching nicely */
}



/* Project stack */
.stack{ display:flex; flex-direction:column; gap: 16px; }

.proj{
  position:relative;
  border: 2px solid rgba(250,247,245,.35);
  border-radius: 12px;
  background: rgba(250,247,245,.04);
  padding: 16px 16px 16px 14px;
  display:grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  box-shadow: var(--shadow);
  overflow:hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.proj:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,.14);
}

.proj-num{
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: 48px;
  color: rgb(215, 225, 139);
  line-height:1;
}

.proj-top{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
}

.proj-title{
  margin:0;
  font-size: 14px;
  letter-spacing:.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.proj-link{
  font-size: 12px;
  color: var(--ink);
  /* hover handled by unified link rules */
}

.proj-desc{ margin: 6px 0 10px; color: var(--muted); font-size: 13px; }

.tags{ display:flex; gap: 8px; flex-wrap:wrap; }
.tag{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(250,247,245,.25);
  color: var(--ink);
  background: rgba(250,247,245,.06);
}

.corner{
  position:absolute;
  right: 14px;
  bottom: 14px;
  width: 18px;
  height: 18px;
  background: rgba(250,247,245,.10);
  border: 1px solid rgba(250,247,245,.18);
  border-radius: 4px;
}

/* Figma grid cards */
.grid-2{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.mini{
  position:relative;
  border: 2px solid rgba(250,247,245,.35);
  border-radius: 12px;
  background: rgba(250,247,245,.04);
  padding: 14px;
  box-shadow: var(--shadow);
  overflow:hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.mini:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,.14);
}

.mini-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom: 10px;
}

.mini-num{
  font-family: "Bebas Neue", system-ui, sans-serif;
  color: rgb(215, 225, 139);
  font-size: 26px;
}

.mini-link{
  font-size: 12px;
  color: var(--ink);
  /* hover handled by unified link rules */
}

.mini-title{
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing:.10em;
  text-transform: uppercase;
  color: var(--ink);
}
.mini-desc{ margin: 0 0 10px; color: var(--muted); font-size: 13px; }

/* Gallery */
.gallery{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.shot{
  border: 1px solid rgba(250,247,245,.22);
  border-radius: 12px;
  overflow:hidden;
  background: rgba(250,247,245,.04);
  padding:0;
  cursor:pointer;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.shot img{ width:100%; height:100%; object-fit:cover; }

.shot:hover{
  border-color: rgba(250,247,245,.45);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,.14);
}

.shot:focus-visible{
  outline: 3px solid rgba(250,247,245,.22);
  outline-offset: 4px;
}

/* --- Branding horizontal slider (jade-like) --- */
.brand-slider{
  position: relative;
  margin-top: 18px;
}

.brand-track{
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 10px 6px 18px;
  cursor: grab;
  user-select: none;
}

.brand-track::-webkit-scrollbar{ height: 0; }
.brand-track{ scrollbar-width: none; }

.brand-track .shot{
  flex: 0 0 clamp(260px, 26vw, 420px);
  height: clamp(220px, 28vw, 340px);
  scroll-snap-align: start;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, filter .25s ease;
}

.brand-track .shot img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

.brand-track .shot:hover{
  transform: translateY(-8px);
  filter: brightness(1.02);
}

.brand-track .shot:focus-visible{
  outline: 3px solid rgba(250,247,245,.22);
  outline-offset: 4px;
}

/* Nav arrows */
.brand-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(250,247,245,.25);
  background: rgba(78,17,17,.85);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}

.brand-nav:hover{
  transform: translateY(-50%) scale(1.05);
  background: rgba(78,17,17,.95);
}

.brand-nav.prev{ left: -10px; }
.brand-nav.next{ right: -10px; }

@media (max-width: 700px){
  .brand-nav{ display:none; }
  .brand-track{ padding-inline: 2px; }
}

/* Footer */
.footer{
  background: #4e1111;
  color: var(--ink);
  padding: 64px 0 28px;
}

.footer-title{
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: clamp(44px, 6vw, 78px);
  line-height: .9;
  margin: 0 0 22px;
  letter-spacing:.03em;
  text-transform: uppercase;
  color: var(--ink);
}

.footer-rule{
  height:1px;
  background: rgba(250,247,245,.25);
  margin: 18px 0 26px;
}

.footer-sub{
  margin:0 0 12px;
  font-size: 12px;
  letter-spacing:.18em;
  text-transform: uppercase;
  opacity:.9;
  color: rgb(215, 225 , 139);
}

.contact-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.contact-card{
  border: 1px solid rgba(250,247,245,.25);
  border-radius: 12px;
  padding: 14px;
  background: rgba(0,0,0,.10);
  color: var(--ink);
}

.contact-label{
  font-size: 11px;
  letter-spacing:.16em;
  text-transform: uppercase;
  opacity:.85;
  margin-bottom: 6px;
  color: var(--ink);
}

.contact-card a{
  opacity:.95;
  color: var(--ink);
  /* hover handled by unified link rules */
}

.footer-bottom{
  margin-top: 22px;
  opacity:.85;
  font-size: 12px;
  text-align:center;
  color: var(--ink);
}

/* Lightbox */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 24px;
  z-index:50;
}
.lightbox[aria-hidden="false"]{ display:flex; }

.lightbox img{
  max-width: min(980px, 100%);
  max-height: 86vh;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.4);
  background: rgba(250,247,245,.04);
}

.lightbox-close{
  position:absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(250,247,245,.25);
  background: rgba(0,0,0,.35);
  color: var(--ink);
  font-size: 18px;
  cursor:pointer;
  transition: background .2s ease, transform .2s ease;
}
.lightbox-close:hover{ background: rgba(0,0,0,.5); transform: translateY(-1px); }

/* Scroll reveal animations */
.reveal{
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(.2,.65,.3,1);
  will-change: opacity, transform;
}
.reveal.show{
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-right{ order:-1; }
  .photo-frame{ margin-left: 0; width: min(420px, 100%); }

  .two-col{ grid-template-columns: 1fr; }
  .textblock{ max-width: 75ch; }
  .card{ max-width: 100%; margin-left: 0; }

  .grid-2{ grid-template-columns: 1fr; }
  .gallery{ grid-template-columns: repeat(2, 1fr); }
  .contact-grid{ grid-template-columns: 1fr; }

  .navlinks{ display:none; }
  .navtoggle{ display:block; }

  .intro-grid{ grid-template-columns: 1fr; }
  .intro-card{
    grid-column: 1;
    grid-row: auto;
    margin-left: 0;
  }
}

/* ========================================= */
/* RESPONSIVE SYSTEM (DESKTOP-FIRST)         */
/* Uses ONLY max-width breakpoints           */
/* Targets: 392–1280 with key bands:         */
/* 500–767, 768–1023, 1024–1280              */
/* ========================================= */

/* ---------- Base (DEFAULT): 1024px–1280px ---------- */
/* Your existing desktop styles already cover this.
   Optional: tighten container a bit at the very top end. */
@media (max-width: 1280px){
  .container{ width:min(var(--max), calc(100% - 48px)); }
}

/* ---------- 768px–1023px (Flexbox + Grid + Grid-Area) ---------- */
@media (max-width: 1023px){
  /* Container breathing room */
  .container{ width:min(var(--max), calc(100% - 40px)); }

  /* Top nav -> mobile toggle */
  .navlinks{ display:none; }
  .navtoggle{ display:block; }

  /* HERO: Grid -> single column */
  .hero-grid{
    grid-template-columns: 1fr;
    gap: clamp(20px, 4vw, 40px);
  }
  .hero-right{ order:-1; }
  .photo-frame{ margin-left: 0; width: min(420px, 100%); }

  /* INTRO: Grid Areas for clear stacking */
  .intro-grid{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "title"
      "text"
      "card";
    row-gap: 14px;
  }
  .intro-title{ grid-area: title; }
  .intro-text{ grid-area: text; max-width: 75ch; }
  .intro-card{ grid-area: card; max-width: 100%; margin-left: 0; }

  /* TWO-COL sections -> single column */
  .two-col{ grid-template-columns: 1fr; }
  .card{ max-width: 100%; margin-left: 0; }

  /* Figma grid: 2 -> 1 column for nicer reading */
  .grid-2{ grid-template-columns: 1fr; }

  /* Gallery: 3 -> 2 columns */
  .gallery{ grid-template-columns: repeat(2, 1fr); }

  /* Footer contact: 3 -> 1 column */
  .contact-grid{ grid-template-columns: 1fr; }

  /* Project cards: keep grid but slightly tighter */
  .proj{
    grid-template-columns: 64px 1fr;
    gap: 12px;
  }
  .proj-num{ font-size: 44px; }

  /* Project top row: Flexbox adapts */
  .proj-top{
    display:flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }
}

/* ---------- 500px–767px (Flexbox + Grid + Grid-Area) ---------- */
@media (max-width: 767px){
  .display{
    white-space: normal; /* allow wrap on small screens */
  }
  
  /* Container: more compact for small devices */
  .container{ width:min(var(--max), calc(100% - 32px)); }

  /* HERO: spacing + typography balance */
.hero{
  position: relative;
  padding: clamp(170px, 22vh, 280px) 0 clamp(140px, 18vh, 200px);
}



  .display{ font-size: clamp(44px, 10vw, 72px); }
  .lead{ font-size: 14px; }

  /* CTA row uses Flexbox already – ensure nice wrap */
  .cta-row{ gap: 10px; }
  .btn{ height: 42px; padding: 0 14px; }


  .cta-row .btn-solid{
  background: transparent;
  border-color: rgba(250,247,245,.35);
}


  /* Projects: make header stack using Flexbox */
  .proj-top{
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* Project layout: grid still works, slightly tighter */
  .proj{ grid-template-columns: 56px 1fr; }
  .proj-num{ font-size: 40px; }

  /* Gallery: 2 -> 1 column for clean focus */
  .gallery{ grid-template-columns: 1fr; }

  /* Branding slider arrows already hidden at 700px; keep */
}

/* ---------- 392px–499px (tightest phones) ---------- */
@media (max-width: 499px){
  .container{ width:min(var(--max), calc(100% - 24px)); }

  /* Make nav brand text wrap nicer */
  .brand-text{
    font-size: 11px;
    letter-spacing: .06em;
  }

  /* Keep headings readable */
  .section-title{ font-size: clamp(30px, 7vw, 40px); }

  /* Buttons full-width feels better on very small screens */
  .cta-row{ flex-direction: column; align-items: stretch; }
  .cta-row .btn{ width: 100%; }

  /* Project card padding slightly smaller */
  .proj{ padding: 14px; }
}
