/* ==========================================================================
   bencudjoe.com — stylesheet
   Sections: 1 Tokens · 2 Base · 3 Layout/grid · 4 Header · 5 Footer
             6 Marquee · 7 Home · 8 Work · 9 About · 10 Contact
             11 Project · 12 Lightbox · 13 Responsive
   ========================================================================== */

/* 1 · TOKENS ------------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --text: #121212;         /* primary near-black */
  --muted: #757575;        /* secondary grey     */
  --black: #000000;
  --line: #e9e9e9;         /* hairline rules / dividers */
  --field: #d9d9d9;        /* form underlines    */

  --head: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --pad: 20px;             /* page side padding  */
  --gap: 36px;             /* gap between the 3 columns */
  --side: 1fr;             /* side-rail column    */
  --center: 1.85fr;        /* center column (wider) */
  --head-h: 57px;          /* sticky header height */
  --maxw: 1680px;          /* very-wide screens stop here */

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 2 · BASE --------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
::selection { background: #121212; color: #fff; }

/* shared type helpers (Geist, tight tracking) */
.h-hero   { font-family: var(--head); font-size: clamp(40px, 6vw, 56px); font-weight: 500; letter-spacing: -0.05em; line-height: 1.0; color: var(--text); }
.h-lead   { font-family: var(--head); font-size: clamp(21px, 2.1vw, 26px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.28; color: var(--text); }
.h-sec    { font-family: var(--head); font-size: 26px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.2; }
.h-label  { font-family: var(--head); font-size: 18px; font-weight: 500; letter-spacing: -0.03em; }
.t-body   { font-family: var(--head); font-size: 14px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.55; color: var(--muted); }
.muted    { color: var(--muted); }

/* 3 · LAYOUT / GRID ------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.grid {
  display: grid;
  grid-template-columns: var(--side) var(--center) var(--side);
  column-gap: var(--gap);
  min-height: calc(100vh - var(--head-h));
  align-items: stretch;
}
/* the two vertical hairline rules frame the center column */
.grid > .col-center {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 44px 20px;
  min-width: 0;
}
.grid > .col-left,
.grid > .col-right { padding: 40px 0; min-width: 0; }

/* sticky rails: pinned under the header, content pushed to top & bottom */
.rail {
  position: sticky;
  top: var(--head-h);
  min-height: calc(100vh - var(--head-h) - 80px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.rail-top { display: flex; flex-direction: column; gap: 20px; }
.rail-bottom { display: flex; flex-direction: column; gap: 14px; }

/* 4 · HEADER ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.site-header .bar {
  height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-family: var(--body); font-weight: 600; font-size: 16px; letter-spacing: -0.02em; color: var(--black); }
.nav { display: flex; gap: 22px; }
.nav a {
  font-family: var(--body); font-weight: 600; font-size: 14px; letter-spacing: -0.03em;
  color: var(--muted); transition: color .18s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }
.cta {
  font-family: var(--body); font-weight: 600; font-size: 14px; letter-spacing: -0.03em;
  color: var(--text);
}
.cta:hover { opacity: .6; }
.nav-toggle { display: none; background: none; border: 0; padding: 6px; }
.nav-toggle span { display: block; width: 20px; height: 1.6px; background: var(--text); margin: 4px 0; transition: transform .25s var(--ease), opacity .2s; }

/* 5 · FOOTER ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .bar {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--head); font-size: 13px; letter-spacing: -0.02em; color: var(--muted);
}
.contact-line { font-family: var(--body); font-weight: 600; letter-spacing: -0.03em; color: var(--text); }
.contact-line.small { font-size: 14px; }
.contact-line.big { font-size: 16px; }

.socials { display: flex; gap: 14px; align-items: center; }
.socials a { color: var(--muted); transition: color .18s var(--ease); display: inline-flex; }
.socials a:hover { color: var(--text); }
.socials svg { width: 16px; height: 16px; display: block; }

/* 6 · MARQUEE ------------------------------------------------------------ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap; padding: 34px 0;
}
.marquee-track { display: inline-flex; align-items: center; will-change: transform; animation: marquee 26s linear infinite; }
.marquee a { display: inline-flex; align-items: center; }
.marquee .item {
  font-family: var(--head); font-weight: 500; font-size: clamp(44px, 8vw, 80px);
  letter-spacing: -0.04em; color: var(--text); padding: 0 34px;
}
.marquee .star { color: var(--text); font-size: clamp(20px, 3vw, 30px); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 7 · HOME --------------------------------------------------------------- */
.skills { display: flex; flex-direction: column; gap: 8px; }
.skills p { font-family: var(--head); font-size: 16px; font-weight: 500; letter-spacing: -0.03em; color: var(--text); }
.icon-link { color: var(--text); display: inline-flex; }
.icon-link svg { width: 18px; height: 18px; }
.icon-badge { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; }
.icon-badge svg { width: 14px; height: 14px; }

.intro-lead .rest { color: var(--muted); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 48px 0 22px; }
.section-head .count { font-family: var(--head); font-size: 12px; letter-spacing: -0.03em; color: var(--muted); }

.worklist { display: flex; flex-direction: column; gap: 40px; }
.work-item { display: block; }
.work-item .frame { overflow: hidden; background: #f2f2f2; border-radius: 2px; }
.work-item .frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease); }
.work-item:hover .frame img { transform: scale(1.03); }
.work-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 12px; gap: 12px; }
.work-row .name { font-family: var(--head); font-size: 14px; font-weight: 500; letter-spacing: -0.03em; color: var(--text); }
.work-row .name .sep { color: var(--muted); }
.work-row .name .cat { color: var(--muted); }
.work-row .yr { font-family: var(--head); font-size: 14px; font-weight: 500; letter-spacing: -0.03em; color: var(--muted); white-space: nowrap; }

/* 8 · WORK page ---------------------------------------------------------- */
.page-title { margin: 8px 0 34px; }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 34px; }
.work-grid .work-row { margin-top: 12px; }

/* 9 · ABOUT -------------------------------------------------------------- */
.about-portrait { width: 100%; max-width: 220px; border-radius: 3px; overflow: hidden; }
.about-portrait img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.prose p { font-family: var(--head); font-size: 15px; font-weight: 500; letter-spacing: -0.02em; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.prose p.black { color: var(--text); }

.block { margin-top: 64px; }
.block > .block-title { margin-bottom: 24px; }

.whatido { display: flex; flex-direction: column; gap: 0; }
.whatido .row { display: grid; grid-template-columns: 1fr 200px; gap: 28px; padding: 26px 0; border-top: 1px solid var(--line); align-items: start; }
.whatido .row:last-child { border-bottom: 1px solid var(--line); }
.whatido h3 { font-family: var(--head); font-size: 17px; font-weight: 500; letter-spacing: -0.03em; margin-bottom: 10px; }
.whatido .row p { font-family: var(--head); font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; line-height: 1.55; }
.whatido .thumb { overflow: hidden; border-radius: 2px; background: #f2f2f2; }
.whatido .thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.tools { display: flex; flex-direction: column; }
.tools .tool { padding: 18px 4px; border-top: 1px solid var(--line); font-family: var(--head); font-size: 17px; font-weight: 500; letter-spacing: -0.03em; }
.tools .tool:last-child { border-bottom: 1px solid var(--line); }

.exp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.btn-inline { font-family: var(--head); font-size: 14px; font-weight: 500; letter-spacing: -0.02em; color: var(--text); display: inline-flex; align-items: center; gap: 7px; }
.btn-inline:hover { opacity: .6; }
.exp-item { padding: 26px 0; border-top: 1px solid var(--line); }
.exp-item:last-child { border-bottom: 1px solid var(--line); }
.exp-item h3 { font-family: var(--head); font-size: 17px; font-weight: 500; letter-spacing: -0.03em; }
.exp-item .meta { font-family: var(--head); font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; margin-top: 3px; }
.exp-item .desc { font-family: var(--head); font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; line-height: 1.6; margin-top: 14px; }

.stats { display: flex; flex-direction: column; }
.stats .stat { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.stats .stat:last-child { border-bottom: 1px solid var(--line); }
.stats .num { font-family: var(--head); font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; }
.stats .lbl { font-family: var(--head); font-size: 14px; font-weight: 500; letter-spacing: -0.02em; text-align: right; }

/* 10 · CONTACT ----------------------------------------------------------- */
.contact-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.contact-head .who { display: flex; flex-direction: column; gap: 4px; }
.contact-sub { font-family: var(--head); font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; max-width: 34ch; margin: 14px 0 30px; }

.form { display: flex; flex-direction: column; }
.field { padding: 22px 0; border-bottom: 1px solid var(--line); }
.field label { display: block; font-family: var(--head); font-size: 13px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); margin-bottom: 12px; }
.field input, .field textarea {
  width: 100%; border: 0; background: transparent; outline: none;
  font-family: var(--head); font-size: 16px; font-weight: 500; letter-spacing: -0.02em; color: var(--text);
  padding: 0; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #b3b3b3; }
.field textarea { min-height: 84px; line-height: 1.5; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; }
.btn-send { font-family: var(--head); font-size: 15px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); background: none; border: 0; padding: 0; }
.btn-send:hover { opacity: .6; }
.btn-send:disabled { opacity: .4; cursor: default; }
.form-status { font-family: var(--head); font-size: 13px; font-weight: 500; letter-spacing: -0.02em; }
.form-status.ok { color: #1a8f43; }
.form-status.err { color: #c1121f; }

/* 11 · PROJECT ----------------------------------------------------------- */
.proj-title { margin-bottom: 22px; }
.proj-thumb { width: 100%; max-width: 200px; overflow: hidden; border-radius: 2px; background: #f2f2f2; }
.proj-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.meta { display: flex; flex-direction: column; }
.meta .m { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.meta .m:last-child { border-bottom: 1px solid var(--line); }
.meta .k { font-family: var(--head); font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; }
.meta .v { font-family: var(--head); font-size: 14px; font-weight: 500; letter-spacing: -0.02em; text-align: right; }

.proj-intro { margin-bottom: 22px; }
.pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 100px; font-family: var(--head); font-size: 13px; font-weight: 500; letter-spacing: -0.02em; color: var(--text); transition: background .2s var(--ease); }
.pill:hover { background: #f5f5f5; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #1a8f43; }
.cap { font-family: var(--head); font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; margin: 4px 0 14px; }

.gallery { display: flex; flex-direction: column; gap: 16px; }
.gallery figure { margin: 0; }
.gallery .shot { width: 100%; overflow: hidden; border-radius: 2px; background: #f2f2f2; cursor: zoom-in; }
.gallery .shot img { width: 100%; height: auto; display: block; transition: opacity .2s var(--ease); }

.writeup { display: flex; flex-direction: column; gap: 26px; }
.writeup .sec .st { font-family: var(--head); font-size: 15px; font-weight: 500; letter-spacing: -0.03em; margin-bottom: 8px; }
.writeup .sec p { font-family: var(--head); font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; line-height: 1.6; }
.writeup ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.writeup ul li { position: relative; padding-left: 16px; font-family: var(--head); font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; line-height: 1.55; }
.writeup ul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.writeup ul li b { color: var(--text); font-weight: 500; }

.proj-nav { display: flex; flex-direction: column; gap: 4px; }
.proj-nav .lbl { font-family: var(--head); font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; }
.proj-nav a { font-family: var(--head); font-size: 15px; font-weight: 500; letter-spacing: -0.03em; color: var(--text); }
.proj-nav a:hover { opacity: .6; }
.proj-nav .grp + .grp { margin-top: 16px; }
.proj-nav .grp.next { text-align: right; }

/* 12 · LIGHTBOX ---------------------------------------------------------- */
.lb { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
      background: rgba(255,255,255,0.96); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s; }
.lb.open { opacity: 1; visibility: visible; }
.lb-stage { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 72px 84px; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; box-shadow: 0 24px 80px rgba(0,0,0,0.18);
          opacity: 0; transform: scale(.985); transition: opacity .32s var(--ease), transform .32s var(--ease); }
.lb-img.show { opacity: 1; transform: scale(1); }
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
          background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
          box-shadow: 0 6px 20px rgba(0,0,0,0.08); transition: transform .2s var(--ease), opacity .2s; z-index: 2; }
.lb-btn:hover { transform: translateY(-50%) scale(1.06); }
.lb-btn:active { transform: translateY(-50%) scale(.96); }
.lb-prev { left: 22px; } .lb-next { right: 22px; }
.lb-btn svg { width: 18px; height: 18px; }
.lb-close { position: absolute; top: 20px; right: 22px; width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,0.08); z-index: 2; transition: transform .2s var(--ease); }
.lb-close:hover { transform: rotate(90deg); }
.lb-close svg { width: 16px; height: 16px; }
.lb-count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
            font-family: var(--head); font-size: 13px; font-weight: 500; letter-spacing: -0.02em; color: var(--muted); z-index: 2; }
body.lb-lock { overflow: hidden; }

/* 13 · RESPONSIVE -------------------------------------------------------- */
@media (max-width: 1180px) {
  :root { --gap: 32px; }
  .whatido .row { grid-template-columns: 1fr 160px; }
}

/* Tablet & below → single column, static rails, hamburger nav */
@media (max-width: 900px) {
  :root { --pad: 18px; }
  .grid { grid-template-columns: 1fr; min-height: 0; }
  .grid > .col-center { border-left: 0; border-right: 0; padding: 8px 0 40px; order: 2; }
  .grid > .col-left { order: 1; padding: 28px 0 8px; }
  .grid > .col-right { order: 3; padding: 8px 0 40px; }
  .rail { position: static; min-height: 0; display: block; }
  .rail-top { gap: 22px; }
  .rail-bottom { margin-top: 28px; }

  .nav, .header-cta { display: none; }
  .nav-toggle { display: block; }
  .site-header.menu-open .nav {
    display: flex; position: absolute; left: 0; right: 0; top: var(--head-h);
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 6px var(--pad) 16px;
  }
  .site-header.menu-open .nav a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .site-header.menu-open .nav-toggle span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
  .site-header.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

  .about-portrait { max-width: 260px; }
  .stats { margin-top: 10px; }
  .proj-nav .grp.next { text-align: left; }
  .lb-stage { padding: 60px 16px; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
}

@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; }
  .whatido .row { grid-template-columns: 1fr; }
  .whatido .thumb { max-width: 260px; }
  .site-footer .bar { height: auto; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 0; }
  .marquee .item { padding: 0 22px; }
}

/* motion-reduced users */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .marquee-track { animation: none; }
  .work-item .frame img { transition: none; }
}

/* 14 · ENTRANCE REVEAL — scroll-triggered ("Layer in View", fires once) --------
   Three groups — KEEP IN SYNC with REVEAL_WORD / REVEAL_BLOCK / REVEAL_FADE in main.js:
     word  = short text, split per word  (blur+rise+fade, 20ms per-word stagger)
     block = long-form text as ONE unit  (same blur+rise+fade, 20ms sibling stagger)
     fade  = non-text blocks             (opacity only,      20ms sibling stagger) ---- */
html.reveal-armed :is(
  h1, h2, h3, .intro-lead, .writeup .st, .exp-item h3, .whatido h3, .contact-sub, .cap,
  .prose p, .writeup p, .writeup li, .exp-item .desc, .whatido p, .tool,
  .frame, .shot, .about-portrait, .proj-thumb, .whatido .thumb, .meta, .stats,
  .work-row, .proj-nav, .pill, .marquee) { opacity: 0; }

/* per-word: after JS splits it, show the block, keep its words hidden */
[data-rv="word"] { opacity: 1 !important; }
[data-rv="word"] .rw { display: inline-block; opacity: 0; }

@keyframes rvText { from { opacity: 0; filter: blur(5px); transform: translateY(10px); }
                    to   { opacity: 1; filter: blur(0);  transform: none; } }
@keyframes rvFade { from { opacity: 0; } to { opacity: 1; } }

[data-rv="word"].rv-in .rw { animation: rvText 600ms cubic-bezier(0.25, 1, 0.5, 1) both; animation-delay: var(--rd, 0ms); }  /* Effect A — per word */
[data-rv="block"].rv-in    { animation: rvText 600ms cubic-bezier(0.25, 1, 0.5, 1) both; animation-delay: var(--rd, 0ms); }  /* Effect A — whole block */
[data-rv="fade"].rv-in     { animation: rvFade 600ms cubic-bezier(0.44, 0, 0.56, 1) both; animation-delay: var(--rd, 0ms); }  /* Effect B — fade */

@media (prefers-reduced-motion: reduce) {
  html.reveal-armed :is(
    h1,h2,h3,.intro-lead,.writeup .st,.exp-item h3,.whatido h3,.contact-sub,.cap,
    .prose p,.writeup p,.writeup li,.exp-item .desc,.whatido p,.tool,
    .frame,.shot,.about-portrait,.proj-thumb,.whatido .thumb,.meta,.stats,
    .work-row,.proj-nav,.pill,.marquee), [data-rv="word"] .rw { opacity: 1 !important; }
  [data-rv].rv-in, [data-rv="word"].rv-in .rw { animation: none !important; filter: none !important; transform: none !important; }
}
