/* ============================================================
   nikolaskeuser.com — v2 personal portrait
   Warm dark palette, editorial type, image-driven sections.
   ============================================================ */

:root {
  /* Palette — warm dark, photographic */
  --bg:        #14110e;
  --bg-alt:    #1c1814;
  --bg-deep:   #0c0a08;
  --text:      #ebe4d3;
  --text-dim:  #9a9180;
  --text-dimmer: #6b6453;
  --line:      rgba(235, 228, 211, 0.12);
  --line-2:    rgba(235, 228, 211, 0.22);

  /* Accents */
  --accent-warm:   #d6a85f;    /* warm gold for hero/School accents */
  --accent-hh:     #00d4ff;    /* Hydro Halo brand cyan */

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --max-w: 1180px;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture { max-width: 100%; display: block; }

::selection { background: var(--accent-warm); color: var(--bg-deep); }

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

/* -------- nav (minimal, fixed top) -------- */
.nk-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: linear-gradient(180deg, rgba(20,17,14,0.85), rgba(20,17,14,0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nk-nav-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text);
  font-variation-settings: "opsz" 144;
}

.nk-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
}
.nk-nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
.nk-nav-links a:hover { color: var(--text); }

/* -------- shared section primitives -------- */
.nk-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin: 0 0 12px;
  font-weight: 500;
}
.nk-eyebrow-light { color: rgba(255,255,255,0.85); }

.nk-section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 24px;
  font-variation-settings: "opsz" 144;
}
.nk-section-title-light { color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,0.6); }

.nk-section-body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  max-width: 50ch;
}
.nk-section-body p { margin: 0 0 14px; }
.nk-section-body p:last-child { margin-bottom: 0; }
.nk-section-body em {
  color: var(--text-dim);
  font-style: italic;
}
.nk-section-body-light {
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.nk-section-body-light em { color: rgba(255,255,255,0.65); }

.nk-link {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--text-dimmer);
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nk-link:hover {
  color: var(--accent-warm);
  border-bottom-color: var(--accent-warm);
}

/* -------- HERO -------- */
.nk-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gutter);
  position: relative;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(214,168,95,0.06), transparent 60%),
    var(--bg);
}
.nk-hero-inner {
  max-width: var(--max-w);
  width: 100%;
  text-align: center;
}
.nk-hero .nk-eyebrow {
  font-family: var(--font-body);
  letter-spacing: 0.4em;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.nk-hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.6rem, 12vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  font-variation-settings: "opsz" 144;
}
.nk-hero-line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: nk-rise 1.2s cubic-bezier(0.2,0.7,0.2,1) forwards;
}
.nk-hero-line-2 {
  animation-delay: 0.18s;
  color: var(--text-dim);
  font-style: italic;
}
.nk-hero-line-3 {
  animation-delay: 0.36s;
  color: var(--accent-warm);
}
@keyframes nk-rise {
  to { opacity: 1; transform: translateY(0); }
}

.nk-hero-sub {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 38ch;
  margin: 0 auto;
  opacity: 0;
  animation: nk-rise 1.2s 0.55s cubic-bezier(0.2,0.7,0.2,1) forwards;
}

.nk-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  opacity: 0;
  animation: nk-rise 1.2s 0.9s cubic-bezier(0.2,0.7,0.2,1) forwards;
}
.nk-scroll-cue-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, var(--text-dim));
  animation: nk-scroll-pulse 2.2s ease-in-out infinite;
}
.nk-scroll-cue-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
@keyframes nk-scroll-pulse {
  0%, 100% { transform: scaleY(0.6); transform-origin: top; opacity: 0.5; }
  50%      { transform: scaleY(1);   transform-origin: top; opacity: 1; }
}

/* -------- generic sections -------- */
.nk-section {
  min-height: 100vh;
  padding: 96px var(--gutter) 96px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.nk-section-alt {
  background: var(--bg-alt);
}

.nk-section-marker {
  position: absolute;
  top: 32px;
  left: var(--gutter);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  font-weight: 500;
}
.nk-section-marker-light { color: rgba(255,255,255,0.75); z-index: 3; }

.nk-section-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
.nk-section-grid-flip {
  grid-template-columns: 1fr 1.05fr;
}
.nk-section-grid-flip .nk-section-copy { order: 2; }
.nk-section-grid-flip .nk-section-media { order: 1; }

.nk-section-copy { min-width: 0; }

.nk-section-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-deep);
  overflow: hidden;
  border: 1px solid var(--line);
}
.nk-section-media img,
.nk-section-media picture,
.nk-section-media picture img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.nk-section-media-hh {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0,212,255,0.08), transparent 70%),
    var(--bg-deep);
}
.nk-section-media-hh picture,
.nk-section-media-hh img { object-fit: contain; padding: 8% 6%; }

.nk-accent-hh { color: var(--accent-hh); }

/* placeholder boxes for media you haven't dropped in yet */
.nk-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 12px,
      rgba(235,228,211,0.025) 12px 24px
    );
  color: var(--text-dimmer);
  font-family: var(--font-body);
}
.nk-placeholder-label {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nk-placeholder-hint {
  font-size: 0.72rem;
  color: var(--text-dimmer);
  letter-spacing: 0.06em;
}

/* -------- SWIM SECTION (full bleed) -------- */
.nk-section-swim {
  padding: 0;
  min-height: 100vh;
  background: #000;
  overflow: hidden;
  position: relative;
  display: block;
}

.nk-swim-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}
.nk-swim-photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
  filter: brightness(0.92);
}

.nk-swim-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 4;
  padding: 56px var(--gutter) 64px;
  max-width: 640px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
  width: 100%;
}
.nk-swim-overlay .nk-eyebrow { margin-bottom: 14px; }
.nk-swim-overlay .nk-section-title { margin-bottom: 18px; }
.nk-swim-overlay .nk-section-body { max-width: 52ch; }

/* -------- contact -------- */
.nk-contact {
  padding: 120px var(--gutter) 96px;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.nk-contact-email {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  display: inline-block;
  margin-top: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  font-variation-settings: "opsz" 144;
  font-style: italic;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nk-contact-email:hover {
  color: var(--accent-warm);
  border-bottom-color: var(--accent-warm);
}

/* -------- footer -------- */
.nk-footer {
  padding: 26px var(--gutter);
  text-align: center;
  color: var(--text-dimmer);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--line);
}

/* -------- responsive -------- */
@media (max-width: 880px) {
  :root { --gutter: 22px; }
  .nk-section-grid,
  .nk-section-grid-flip {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .nk-section-grid-flip .nk-section-copy { order: 1; }
  .nk-section-grid-flip .nk-section-media { order: 2; }
  .nk-section-media { aspect-ratio: 4 / 3; max-height: 60vh; }
  .nk-nav-links { gap: 16px; }
  .nk-nav-links a { font-size: 0.7rem; letter-spacing: 0.1em; }
  .nk-swim-overlay { padding: 36px 22px 44px; }
}

@media (max-width: 520px) {
  .nk-hero-title { font-size: clamp(3rem, 18vw, 4.8rem); }
  .nk-nav { padding: 14px 18px; }
  .nk-nav-links { gap: 12px; }
  .nk-nav-links a { font-size: 0.66rem; letter-spacing: 0.08em; }
}

/* -------- reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .nk-hero-line, .nk-hero-sub, .nk-scroll-cue {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   STUDIO — game storefront grid (added 2026-06-05)
   Header-card grid of Nik's Games titles, split Shipped / In dev.
   All new classes; does not affect older pages.
   ============================================================ */
.nk-section-studio { justify-content: flex-start; }
.nk-studio { max-width: var(--max-w); margin: 0 auto; width: 100%; }

.nk-studio-head { max-width: 46rem; }
.nk-studio-head .nk-section-title { margin-bottom: 20px; max-width: 15ch; }
.nk-studio-head .nk-section-body { max-width: 56ch; }

.nk-studio-group { margin-top: 52px; }
.nk-studio-group-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.nk-studio-group-title span { color: var(--text-dimmer); letter-spacing: 0.14em; }

.nk-studio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.nk-game-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  overflow: hidden;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nk-game-card:hover {
  border-color: var(--line-2);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}
.nk-game-art {
  aspect-ratio: 460 / 215;
  overflow: hidden;
  background: #000;
}
.nk-game-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.2,0.7,0.2,1);
}
.nk-game-card:hover .nk-game-art img { transform: scale(1.04); }

.nk-game-meta { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 7px; }
.nk-game-titlerow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.nk-game-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-variation-settings: "opsz" 144;
}
.nk-game-status {
  flex: none;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-warm);
  border: 1px solid var(--line-2);
  padding: 4px 8px;
  white-space: nowrap;
}
.nk-game-genre {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  margin: 0;
}
.nk-game-note {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 4px 0 0;
}
.nk-game-steam {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  transition: color 0.2s ease;
}
.nk-game-card:hover .nk-game-steam { color: var(--accent-warm); }

/* swim section: a light link variant that reads on the dark photo */
.nk-link-light { color: rgba(255,255,255,0.92); border-bottom-color: rgba(255,255,255,0.5); }
.nk-link-light:hover { color: var(--accent-warm); border-bottom-color: var(--accent-warm); }

@media (max-width: 880px) {
  .nk-studio-grid { grid-template-columns: 1fr; gap: 16px; }
  .nk-studio-group { margin-top: 40px; }
}

/* ============================================================
   3D HERO (Three.js extruded wordmark) + MOUSE PARALLAX
   Added 2026-06-05. js/hero3d.js assembles "NIKOLAS KEUSER" in 3D on
   load and tilts it toward the mouse. The HTML .nk-hero-fallback name
   shows when WebGL/JS is unavailable or reduced-motion is on. Section
   images parallax on mousemove. All gated by prefers-reduced-motion.
   ============================================================ */
/* the wrapper is taller than the viewport; the hero sticks while you scroll
   through it, which is what makes the 3D scroll animation visible */
#nk-hero-wrapper { position: relative; height: 200vh; }
.nk-hero { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.nk-hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  display: block;
}
.nk-hero-fallback {
  position: relative; z-index: 2;
  margin: 0;
  padding: 0 var(--gutter);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
  font-variation-settings: "opsz" 144;
  transition: opacity 0.45s ease;
}
/* once the 3D hero is live, fade the HTML fallback out (kept in DOM for SEO + a11y) */
.nk-hero3d-on .nk-hero-fallback { opacity: 0; pointer-events: none; }
.nk-scroll-cue { z-index: 3; transition: opacity 0.4s ease; }
.nk-scroll-cue.nk-cue-hide { opacity: 0 !important; }

/* mouse parallax on section imagery — hover-capable, motion-OK devices only.
   Inline JS sets --px/--py per element from its data-depth. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .nk-parallax { transition: transform 0.3s cubic-bezier(0.2,0.7,0.2,1); will-change: transform; }
  .nk-section-media-school img.nk-parallax { transform: scale(1.06) translate3d(var(--px,0px), var(--py,0px), 0); }
  .nk-section-media-hh img.nk-parallax { transform: translate3d(var(--px,0px), var(--py,0px), 0); }
  .nk-swim-photo.nk-parallax { transform: scale(1.08) translate3d(var(--px,0px), var(--py,0px), 0); }
}
