/* ---------------------------------------------------------------------------
   Jackson Studner - art portfolio
   Paper-and-ink zine styling. The work here is hand painted wood, copic marker,
   enamel pins and washi tape, so the page is built to look like a craft table
   rather than a software dashboard.
   --------------------------------------------------------------------------- */

:root {
  --paper:      #f7f2e7;
  --paper-2:    #efe6d4;
  --paper-3:    #e6dbc4;
  --ink:        #2a231d;
  --ink-soft:   #6b5d50;
  --ink-faint:  #9b8b7a;
  --rule:       #d8cbb2;

  --gold:  #c08a2e;
  --teal:  #35807a;
  --plum:  #6d4b7c;
  --rust:  #b0503a;

  --shadow-sm: 0 1px 2px rgba(42,35,29,.10), 0 3px 8px rgba(42,35,29,.06);
  --shadow-md: 0 2px 4px rgba(42,35,29,.12), 0 10px 24px rgba(42,35,29,.10);
  --shadow-lg: 0 4px 8px rgba(42,35,29,.14), 0 20px 48px rgba(42,35,29,.14);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace;

  --wrap: 1180px;
}

:root[data-theme="dark"] {
  --paper:     #171310;
  --paper-2:   #201a15;
  --paper-3:   #2a221b;
  --ink:       #ece2d2;
  --ink-soft:  #b3a595;
  --ink-faint: #7d7062;
  --rule:      #3a3129;

  --gold: #e0a84a;
  --teal: #58b0a8;
  --plum: #a880bb;
  --rust: #d7745a;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 3px 8px rgba(0,0,0,.3);
  --shadow-md: 0 2px 4px rgba(0,0,0,.45), 0 10px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 4px 8px rgba(0,0,0,.5), 0 20px 48px rgba(0,0,0,.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #171310;
    --paper-2:   #201a15;
    --paper-3:   #2a221b;
    --ink:       #ece2d2;
    --ink-soft:  #b3a595;
    --ink-faint: #7d7062;
    --rule:      #3a3129;
    --gold: #e0a84a;
    --teal: #58b0a8;
    --plum: #a880bb;
    --rust: #d7745a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 3px 8px rgba(0,0,0,.3);
    --shadow-md: 0 2px 4px rgba(0,0,0,.45), 0 10px 24px rgba(0,0,0,.4);
    --shadow-lg: 0 4px 8px rgba(0,0,0,.5), 0 20px 48px rgba(0,0,0,.45);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  /* Faint fibre speckle so large flat areas read as paper, not as a screen. */
  background-image:
    radial-gradient(circle at 15% 12%, rgba(140,120,90,.05) 0 1px, transparent 1px),
    radial-gradient(circle at 62% 47%, rgba(140,120,90,.045) 0 1px, transparent 1px),
    radial-gradient(circle at 84% 78%, rgba(140,120,90,.05) 0 1px, transparent 1px);
  background-size: 37px 37px, 53px 53px, 71px 71px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.012em;
  margin: 0 0 .5em;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; z-index: 200; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

/* --- tape ---------------------------------------------------------------- */
/* Used to pin things down the way a physical zine layout would. */
.tape {
  position: absolute;
  width: 118px; height: 27px;
  background: rgba(216,199,150,.62);
  border-left: 1px dashed rgba(255,255,255,.35);
  border-right: 1px dashed rgba(255,255,255,.35);
  box-shadow: 0 1px 3px rgba(42,35,29,.14);
  pointer-events: none;
}
:root[data-theme="dark"] .tape { background: rgba(190,165,110,.30); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tape { background: rgba(190,165,110,.30); }
}

/* --- nav ----------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-in {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  height: 66px; display: flex; align-items: center; gap: 26px;
}
.brand {
  font-family: var(--display); font-weight: 700; font-size: 1.06rem;
  letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
}
.brand small {
  display: block; font-family: var(--body); font-weight: 500;
  font-size: .625rem; letter-spacing: .19em; text-transform: uppercase;
  color: var(--ink-faint); margin-top: 1px;
}
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  text-decoration: none; font-size: .875rem; font-weight: 500;
  padding: 7px 13px; border-radius: 999px; color: var(--ink-soft);
  transition: background .16s, color .16s;
}
.nav-links a:hover { background: var(--paper-3); color: var(--ink); }
.nav-links a.on { background: var(--ink); color: var(--paper); }

.themer {
  margin-left: 8px; border: 1px solid var(--rule); background: transparent;
  color: var(--ink-soft); width: 36px; height: 36px; border-radius: 999px;
  cursor: pointer; display: grid; place-items: center; flex: none;
}
.themer:hover { background: var(--paper-3); color: var(--ink); }
.themer .moon { display: none; }
:root[data-theme="dark"] .themer .moon { display: block; }
:root[data-theme="dark"] .themer .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themer .moon { display: block; }
  :root:not([data-theme="light"]) .themer .sun { display: none; }
}

.burger { display: none; margin-left: auto; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 66px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px 16px 16px; margin: 0;
    transform: translateY(-130%); transition: transform .22s ease;
    align-items: stretch;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 14px; border-radius: 8px; }
  .burger { display: block; }
  .themer { position: absolute; right: 62px; top: 15px; margin: 0; }
}

/* --- hero ---------------------------------------------------------------- */
.hero { padding: 76px 0 54px; position: relative; }
.hero-kicker {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.9rem, 8.5vw, 5.6rem);
  font-weight: 600; margin: 0 0 .18em; letter-spacing: -.028em;
}
.hero h1 em {
  font-style: italic; font-weight: 300; color: var(--teal);
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--ink-soft);
  max-width: 62ch; margin: 0 0 30px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  font-size: .9rem; padding: 12px 24px; border-radius: 999px;
  border: 1.5px solid var(--ink); transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-line { color: var(--ink); }
.btn-line:hover { background: var(--paper-3); transform: translateY(-2px); }

/* --- stamped metric tiles ------------------------------------------------ */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px; margin: 8px 0 0;
}
.stat {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 10px; padding: 20px 18px; position: relative;
}
.stat b {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.4rem); line-height: 1; letter-spacing: -.02em;
  color: var(--ink);
}
.stat span {
  display: block; margin-top: 8px; font-size: .74rem; letter-spacing: .11em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 600;
}
.stat.accent-gold b { color: var(--gold); }
.stat.accent-teal b { color: var(--teal); }
.stat.accent-plum b { color: var(--plum); }
.stat.accent-rust b { color: var(--rust); }

/* --- sections ------------------------------------------------------------ */
.sec { padding: 62px 0; }
.sec + .sec { padding-top: 10px; }
.sec-tint { background: var(--paper-2); border-block: 1px solid var(--rule); }

.sec-head { margin-bottom: 34px; max-width: 68ch; }
.sec-label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 12px;
}
.sec-head h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); margin-bottom: .34em; }
.sec-head p { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }

/* --- project cards ------------------------------------------------------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 26px; }
.project {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project > img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--paper-3); }
/* Infographics get letterboxed rather than cropped; cropping eats the contents list. */
.project > img.fit-contain { object-fit: contain; background: var(--paper-3); }
.project-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.project h3 { font-size: 1.42rem; margin-bottom: .1em; }
.project .role {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 14px;
}
.project p { margin: 0 0 16px; color: var(--ink-soft); font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.chip {
  font-size: .73rem; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: var(--paper-3); color: var(--ink-soft); border: 1px solid var(--rule);
}
.chip-hi { background: var(--gold); color: #2a231d; border-color: transparent; }
.project-links { display: flex; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.project-links a {
  font-size: .82rem; font-weight: 600; text-decoration: none;
  color: var(--ink); border-bottom: 1.5px solid var(--gold); padding-bottom: 1px;
}
.project-links a:hover { color: var(--gold); }

/* --- category cards ------------------------------------------------------ */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.cat {
  text-decoration: none; border: 1px solid var(--rule); border-radius: 12px;
  overflow: hidden; background: var(--paper); box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--paper-3); }
.cat-body { padding: 18px 20px 22px; }
.cat h3 { font-size: 1.2rem; margin-bottom: .25em; }
.cat p { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.cat .count {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-faint); margin-top: 12px;
}

/* --- page header --------------------------------------------------------- */
.phead { padding: 54px 0 30px; }
.crumb { font-size: .8rem; color: var(--ink-faint); margin-bottom: 18px; }
.crumb a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
.crumb a:hover { color: var(--gold); }
.phead h1 { font-size: clamp(2.3rem, 6vw, 3.7rem); margin-bottom: .22em; }
.phead .lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 66ch; margin: 0 0 20px; }

/* --- prose --------------------------------------------------------------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.62rem; margin: 2em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 650; }

.layout { display: grid; grid-template-columns: minmax(0,1fr) 268px; gap: 52px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; gap: 34px; } }

.side {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 12px; padding: 22px; position: sticky; top: 88px;
}
@media (max-width: 900px) { .side { position: static; } }
.side h4 {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .17em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 10px;
}
.side h4 + ul { margin: 0 0 22px; }
.side ul:last-child { margin-bottom: 0; }
.side ul { list-style: none; padding: 0; }
.side li { font-size: .87rem; color: var(--ink-soft); padding: 4px 0; border-bottom: 1px solid var(--rule); }
.side li:last-child { border-bottom: 0; }

/* --- gallery ------------------------------------------------------------- */
.gal-head { display: flex; align-items: baseline; gap: 14px; margin: 46px 0 18px; flex-wrap: wrap; }
.gal-head h2 { margin: 0; font-size: 1.62rem; }
.gal-head .n {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-faint);
}
.gal-note { color: var(--ink-soft); font-size: .93rem; margin: 0 0 22px; max-width: 66ch; }

/* The gallery runs the full page width, so three columns land around 380px
   each: big enough to read a character sheet without opening the lightbox. */
.gal { columns: 3; column-gap: 18px; }
@media (max-width: 800px) { .gal { columns: 2; } }
@media (max-width: 520px) { .gal { columns: 1; } }

.shot {
  break-inside: avoid; margin: 0 0 18px; background: var(--paper);
  border: 1px solid var(--rule); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow-sm); cursor: zoom-in;
  transition: transform .18s, box-shadow .18s;
  display: block; width: 100%; padding: 0; text-align: left;
  font: inherit; color: inherit;
}
.shot:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.shot:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.shot img { width: 100%; height: auto; background: var(--paper-3); }
.shot figcaption {
  padding: 11px 14px 13px; font-size: .82rem; line-height: 1.45; color: var(--ink-soft);
}
.shot .credit {
  display: block; margin-top: 5px; font-size: .72rem; color: var(--ink-faint); font-style: italic;
}

/* --- lightbox ------------------------------------------------------------ */
.lb {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(20,16,12,.93); padding: 24px;
  align-items: center; justify-content: center;
}
.lb.on { display: flex; }
.lb-fig { margin: 0; max-width: 1400px; max-height: 100%; display: flex; flex-direction: column; }
.lb-fig img {
  max-width: 100%; max-height: calc(100vh - 150px);
  width: auto; height: auto; margin: 0 auto; border-radius: 4px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
.lb-cap {
  color: #ece2d2; text-align: center; padding: 16px 8px 0;
  font-size: .9rem; line-height: 1.5; max-width: 70ch; margin: 0 auto;
}
.lb-cap .credit { display: block; margin-top: 6px; font-size: .78rem; color: #a89b8c; font-style: italic; }
.lb button {
  position: absolute; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  color: #f2ece0; width: 46px; height: 46px; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; font-size: 1.3rem; line-height: 1;
}
.lb button:hover { background: rgba(255,255,255,.2); }
.lb-x { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 620px) {
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .lb { padding: 12px; }
}

/* --- pager --------------------------------------------------------------- */
.pager {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--rule);
}
.pager a { text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--ink); }
.pager a:hover { color: var(--gold); }

/* --- footer -------------------------------------------------------------- */
.foot { border-top: 1px solid var(--rule); background: var(--paper-2); margin-top: 70px; padding: 40px 0 46px; }
.foot-in { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.foot-brand { font-family: var(--display); font-weight: 700; font-size: 1rem; }
.foot-links { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.foot-links a { font-size: .87rem; color: var(--ink-soft); text-decoration: none; }
.foot-links a:hover { color: var(--gold); }
.foot-note { width: 100%; font-size: .78rem; color: var(--ink-faint); margin: 4px 0 0; }
