@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&family=Oxanium:wght@600;700;800&family=Space+Grotesk:wght@300;400;500;700&display=swap");

/* ============================================================
   VARIABLES
   ============================================================ */
:root{
  --bg: #0B0F1A;
  --surface: #14181A;
  --paper: #FAF9F7;
  --body-text: rgba(250,249,247,0.78);
  --muted: rgba(250,249,247,0.52);

  --teal: #2AA8BC;
  --green: #8DBE3F;
  --orange: #F07C22;
  --yellow: #E8B32B;

  --bloom-teal: #0F7F91;
  --bloom-yellow: #C28A00;
  --bloom-green: #5F8C1F;
  --bloom-orange: #D2600E;
  --bloom-blue: #16407C;
  --bloom-plum: #8E1C55;

  /* avatar crop, nudge by hand once live */
  --avatar-pos: 72% 28%;
  --hero-image-pos: 50% 20%;
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

h1, .wordmark, .avatar-initials{
  font-family: "Oxanium", sans-serif;
}

a{ text-decoration: none; color: inherit; }
button{ font-family: inherit; }

/* ============================================================
   PAGE CONTAINER
   ============================================================ */
.page-container{
  width: 100%;
}

/* ============================================================
   STRETCHED GRID NAV
   ============================================================ */
.site-nav{
  margin-top: 28px;
  border-top: 1px solid rgba(250,249,247,0.12);
  border-bottom: 1px solid rgba(250,249,247,0.12);
  display: grid;
  grid-template-columns: auto repeat(6, 1fr);
}

.nav-cell{
  padding: 22px 20px;
  border-right: 1px solid rgba(250,249,247,0.12);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.nav-cell:last-child{
  border-right: none;
}

.nav-cell.wordmark-cell{
  display: flex;
  align-items: center;
  padding: 22px 32px;
}

.wordmark{
  display: flex;
  flex-direction: column;
  line-height: 0.86;
  white-space: nowrap;
}

.wordmark-line1,
.wordmark-line2{
  font-family: "Oxanium", sans-serif;
  letter-spacing: -0.02em;
  transition: color 200ms ease;
}

.wordmark-line1{
  font-weight: 600;
  font-size: 24px;
  color: var(--teal);
}

.wordmark-line2{
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
  color: var(--green);
}

.nav-cell .num{
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0.52;
  color: var(--muted);
  transition: color 200ms ease;
}

.nav-cell .label{
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.01em;
  color: var(--body-text);
  transition: color 200ms ease;
}

.nav-cell:hover{ color: var(--bg); }
.nav-cell:hover .num,
.nav-cell:hover .label,
.nav-cell:hover .wordmark-line1,
.nav-cell:hover .wordmark-line2{ color: var(--bg); }

.nav-cell.wordmark-cell:hover{ background: var(--orange); }
.nav-cell:nth-child(2):hover{ background: var(--teal); }
.nav-cell:nth-child(3):hover{ background: var(--green); }
.nav-cell:nth-child(4):hover{ background: var(--orange); }
.nav-cell:nth-child(5):hover{ background: var(--yellow); }
.nav-cell:nth-child(6):hover{ background: var(--teal); }
.nav-cell:nth-child(7):hover{ background: var(--green); }

@media (max-width: 900px){
  .site-nav{
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-cell.wordmark-cell{
    grid-column: 1 / -1;
  }
  .nav-cell:nth-child(2n){
    border-right: none;
  }
  .nav-cell:nth-child(-n+5){
    border-bottom: 1px solid rgba(250,249,247,0.12);
  }
}

/* ============================================================
   CURRENT PAGE MARKER
   (non-link nav-cell representing the page you're on)
   ============================================================ */
.nav-cell.current{
  cursor: default;
  position: relative;
}

.nav-cell.current .num,
.nav-cell.current .label{
  color: var(--paper);
  opacity: 1;
}

.nav-cell.current::after{
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: -1px;
  height: 2px;
  background: var(--teal);
}

.nav-cell.current:hover{
  background: transparent;
  color: inherit;
}

.nav-cell.current:hover .num,
.nav-cell.current:hover .label{
  color: var(--paper);
  opacity: 1;
}

/* ============================================================
   PLACEHOLDER PAGE CONTENT
   (temporary — replaced when each page gets real content)
   ============================================================ */
.page-content{
  padding: 64px 40px;
}

.page-content h1{
  font-weight: 600;
  font-size: clamp(32px, 4vw, 56px);
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}

.page-content p{
  font-size: 16px;
  color: var(--body-text);
  margin: 0;
}

/* ============================================================
   WORK SAMPLES — BENTO MOSAIC
   (one continuous grid — Writing, Branding, UX Design.
   No headings, no per-brand containers — client identity lives
   in the creative, not in page text.

   Extensible by design: to add a tile, add one more .work-image
   div with a size class (small / wide / tall / large) inside
   .work-mosaic. grid-auto-flow: dense handles placement — the
   column/row definitions never need to change. A stray gap can
   appear if a given mix of tile sizes doesn't divide evenly into
   the 6-column base; that's an expected trade-off of staying
   extensible rather than hand-fitting one exact tile count.
   ============================================================ */
.work-mosaic{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(180px, 13vw, 260px);
  grid-auto-flow: row dense;
  gap: 0;
}

.work-image{
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
}

/* tile-size vocabulary — every .work-image takes exactly one */
.work-image.small{ grid-column: span 1; grid-row: span 1; }
.work-image.wide{ grid-column: span 2; grid-row: span 1; }
.work-image.tall{ grid-column: span 1; grid-row: span 2; }
.work-image.large{ grid-column: span 3; grid-row: span 3; }

.work-image img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

/* crop-position utilities — for tiles where a plain centre crop
   would cut off a face, logo or tagline that isn't centred in
   the source image */
.work-image img.pos-top{ object-position: 50% 20%; }
.work-image img.pos-bottom{ object-position: 50% 85%; }
.work-image img.pos-right{ object-position: 100% 50%; }
.work-image img.pos-bottom-right{ object-position: 100% 90%; }

/* ============================================================
   LIGHTBOX
   (full-size view for any .work-image — dense body copy in some
   scans isn't legible at card size; click through to read)
   ============================================================ */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(11,15,26,0.92);
}

.lightbox.open{
  display: flex;
}

.lightbox-img{
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.6);
}

.lightbox-close{
  position: absolute;
  top: 24px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: var(--paper);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover{
  background: rgba(255,255,255,0.12);
}

body.lightbox-locked{
  overflow: hidden;
}

/* ============================================================
   WRITING — CUBE PLATE GRID
   (.plate-grid / .plate-card for the Writing work gallery.
   Distinct from the bento .work-mosaic reserved for the
   Award School page.)
   ============================================================ */
.plate-grid{
  column-count: 1;
  column-gap: 20px;
}

@media (min-width: 640px){  .plate-grid{ column-count: 2; } }
@media (min-width: 1024px){ .plate-grid{ column-count: 3; } }
@media (min-width: 1280px){ .plate-grid{ column-count: 4; } }

.plate-card{
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  cursor: pointer;
  background: linear-gradient(180deg, #14181F 0%, #0B0F1A 100%);
  border-radius: 16px;
  padding: 12px;
  --plate-accent: 42, 168, 188; /* teal #2AA8BC */
  box-shadow: inset 0 0 0 1px rgba(var(--plate-accent), 0.2), 8px 8px 20px rgba(0,0,0,0.5);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.plate-card:nth-child(3n+2){ --plate-accent: 141, 190, 63; } /* green #8DBE3F */
.plate-card:nth-child(3n){ --plate-accent: 240, 124, 34; }   /* orange #F07C22 */

.plate-card:hover{
  transform: translateY(-6px);
  box-shadow: inset 0 0 0 1px rgba(var(--plate-accent), 0.7), 12px 12px 28px rgba(0,0,0,0.6);
}

.plate-card img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.plate-caption{
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255,255,255,0.85);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease-out, transform 200ms ease-out;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55);
}

.plate-card:hover .plate-caption{
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.to-top{
  --to-top-accent: var(--teal);
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 80;
  width: 48px;
  height: 48px;
  border: 1px solid color-mix(in srgb, var(--to-top-accent) 35%, transparent);
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: var(--to-top-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.to-top:hover{
  background: rgba(0,0,0,0.8);
  border-color: var(--to-top-accent);
  transform: translateY(-3px);
}
.to-top svg{ width: 22px; height: 22px; }
