﻿/* ============================================================
   Theme tokens. Dark is the default (:root); light overrides
   under [data-theme="light"]. The data-theme attribute is set
   before first paint by the inline script in each page's <head>.
   ============================================================ */
:root {
  color-scheme: dark;
  --bg: #080b15;
  --bg-gradient:
    radial-gradient(circle at top left, rgba(255, 158, 194, 0.16), transparent 24%),
    radial-gradient(circle at bottom right, rgba(116, 225, 207, 0.16), transparent 24%),
    linear-gradient(135deg, #05070f 0%, #0b1020 50%, #10172c 100%);
  --surface: rgba(20, 25, 40, 0.82);
  --surface-strong: #151b2d;
  --surface-subtle: rgba(255, 255, 255, 0.05);
  --gradient-base: rgba(15, 24, 37, 0.95);
  --header-bg: rgba(8, 11, 21, 0.7);
  --overlay: linear-gradient(135deg, rgba(8, 11, 21, 0.95), rgba(24, 29, 49, 0.95));
  --text: #faf6ff;
  --muted: #b6b4c8;
  --accent: #9a8dff;
  --accent-2: #ff9ec2;
  --accent-3: #74e1cf;
  --accent-4: #8fc4ff;
  --on-accent: #08101a;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

[data-theme="light"] {
  color-scheme: light;
  /* Dimmed lavender-slate. Nothing here is pure white: the page sits
     well below it and cards are a soft off-white, so the whole thing
     reads as paper rather than a lightbulb. */
  --bg: #d5d3e3;
  --bg-gradient:
    radial-gradient(circle at top left, rgba(190, 112, 152, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(74, 162, 147, 0.11), transparent 34%),
    linear-gradient(135deg, #dbd9e8 0%, #d4d2e2 50%, #d1dcdc 100%);
  --surface: #eeedf4;
  --surface-strong: #f4f3f8;
  --surface-subtle: rgba(30, 26, 66, 0.07);
  --gradient-base: #eeedf4;
  --header-bg: rgba(219, 217, 232, 0.86);
  --overlay: linear-gradient(135deg, rgba(213, 211, 227, 0.95), rgba(195, 193, 214, 0.95));
  --text: #191630;
  --muted: #494565;
  --accent: #6a53f0;
  --accent-2: #c93a7e;
  --accent-3: #0b6455;
  --accent-4: #345f9e;
  --on-accent: #ffffff;
  --border: rgba(30, 26, 66, 0.18);
  --shadow: 0 16px 38px rgba(45, 38, 92, 0.14);
}

* {
  box-sizing: border-box;
}

/* Any `display` rule we write would otherwise beat the browser's
   default [hidden] styling, leaving hidden elements visible. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ---- Page transition + entrance ---- */
.page-transition-layer {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateY(2vh) scale(1.01);
}

body.page-transitioning .page-transition-layer {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

body.page-loaded .page-transition-layer {
  opacity: 0;
  transform: translateY(-2vh) scale(0.995);
}

body.page-loaded .site-header,
body.page-loaded main,
body.page-loaded .site-footer {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.site-header,
main,
.site-footer {
  opacity: 0;
  transform: translateY(18px) scale(0.995);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-transitioning .site-header,
body.page-transitioning main,
body.page-transitioning .site-footer {
  opacity: 0.34;
  transform: translateY(10px) scale(0.995);
  transition-duration: 0.35s;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Background shapes ---- */
.background-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

.shape-one {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(255, 158, 194, 0.32), transparent 70%);
  top: -150px;
  right: -110px;
}

.shape-two {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(116, 225, 207, 0.24), transparent 72%);
  bottom: -100px;
  left: -100px;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ---- Header + nav ---- */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  max-width: 1120px;
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

/* ---- Hidden admin shortcut ----
   Holding the logo fills it with the accent gradient. Without the
   feedback a long press just feels like the link is broken. */
.brand {
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}

.brand.is-holding {
  user-select: none;
}

.brand.is-holding::after {
  opacity: 1;
  transform: scaleX(1);
  transition: transform 0.7s linear;
}

/* Brief flash as the page hands off to /admin. */
body.admin-unlocked .site-header {
  transition: opacity 0.4s ease;
  opacity: 0.35;
}

@media (prefers-reduced-motion: reduce) {
  .brand.is-holding::after {
    transition: none;
    transform: scaleX(1);
  }

  body.admin-unlocked .site-header {
    transition: none;
  }
}

.site-nav {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, background-color 0.2s ease;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: rgba(154, 141, 255, 0.2);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent-3);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 999px;
}

/* ---- Layout ---- */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.section {
  padding: 3.25rem 0 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 1.8rem;
  align-items: center;
  padding-top: 2.25rem;
}

.eyebrow,
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-3);
  margin-bottom: 0.75rem;
}

.hero h1,
.section h2 {
  margin: 0 0 1rem;
  line-height: 1.1;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  max-width: 660px;
}

.lead {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  box-shadow: 0 12px 28px rgba(154, 141, 255, 0.22);
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.hero-card,
.info-card,
.project-card {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 1.35rem;
  backdrop-filter: blur(16px);
}

.hero-card h2 {
  font-size: 1.12rem;
  margin-top: 0;
}

.hero-card ul {
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.85;
}

.card-pill {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(116, 225, 207, 0.2);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-3);
  margin-bottom: 0.9rem;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.info-card p,
.project-card p {
  color: var(--muted);
  line-height: 1.8;
}

.section-header {
  margin-bottom: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* ---- Project cards ---- */
/* h2 rather than h3: these cards sit directly under the page h1, so
   h3 would skip a heading level. */
.project-card h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  /* Explicit size so promoting h3 -> h2 changes the outline, not the look. */
  font-size: 1.15rem;
  line-height: 1.3;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.project-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.project-year {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.tag-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0.6rem 0 0;
}

.tag-row li {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--accent-3);
}

.project-card .text-link {
  margin-top: auto;
}

/* ---- Hobbies ---- */
.hobby-section {
  margin-top: 1.2rem;
}

.hobby-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hobby-chip {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hobby-chip:hover,
.hobby-chip.active {
  transform: translateY(-1px);
  border-color: var(--accent-3);
  background: rgba(116, 225, 207, 0.18);
}

.hobby-preview {
  min-height: 190px;
}

/* ---- Game reviews ---- */
.steam-review-section {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
}

.steam-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.steam-library-output {
  display: grid;
  gap: 0.75rem;
}

.steam-library-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.95rem 1rem;
  background: linear-gradient(135deg, rgba(154, 141, 255, 0.16), var(--gradient-base));
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.steam-library-card .game-card-header {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  width: 100%;
}

.steam-library-card .game-icon {
  width: clamp(140px, 28vw, 220px);
  height: auto;
  aspect-ratio: 460 / 215;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  flex-shrink: 0;
  display: block;
}

.steam-library-card .game-card-main {
  flex: 1;
  min-width: 0;
}

.steam-library-card .game-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
  width: 100%;
}

.steam-library-card strong {
  display: block;
  margin-bottom: 0;
  line-height: 1.35;
}

.game-title-link {
  color: inherit;
  text-decoration: none;
}

.game-title-link:hover {
  text-decoration: underline;
}

.steam-library-card .review-rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--on-accent);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  box-shadow: 0 10px 28px rgba(116, 225, 207, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.steam-library-card small {
  color: var(--accent-3);
}

/* ---- Kanban (read-only) ---- */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.kanban-column {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1rem;
  background: var(--surface-subtle);
  min-height: 260px;
}

.kanban-column h3 {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-3);
}

.kanban-dropzone {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 180px;
}

.kanban-card {
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(154, 141, 255, 0.18), var(--gradient-base));
  border-radius: 18px;
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}

.kanban-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.kanban-label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-3);
}

/* ---- Misc ---- */
.text-link {
  display: inline-block;
  margin-top: 0.7rem;
  color: var(--accent-3);
  font-weight: 700;
  text-decoration: none;
}

.site-footer {
  max-width: 1120px;
  margin: 2rem auto 0;
  padding: 1.5rem 1.5rem 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--accent-3);
  font-weight: 700;
  text-decoration: none;
}

/* ---- About page ---- */
.about-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* h2 rather than h3: these cards sit directly under the page h1. */
.about-card h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.about-card p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 0.7rem;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-card-media {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.05fr);
  gap: 1.4rem;
  align-items: center;
}

.about-card-media.media-left .about-card-copy {
  order: 2;
}

.about-card-media.media-left .slideshow {
  order: 1;
}

/* ---- Video ---- */
.about-card-media-slot {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.video-figure {
  margin: 0;
  min-width: 0;
}

/* ---- "MUST WATCH" sticker ----
   Deliberately cheesy: a rotated sticker slapped over the corner of
   the video, with an occasional wobble so it catches the eye without
   nagging. The glow around the frame sells the joke. */
/* ---- Feature video: full width, centred, in a device frame ----
   A 9:16 clip beside a paragraph is always cramped, so this layout
   gives it the whole card and stacks the text above. The bezel makes
   the portrait shape read as deliberate rather than accidental. */
.about-feature {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  text-align: center;
}

.about-feature-copy {
  max-width: 46ch;
}

.about-feature .video-figure {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* The frame itself */
.about-feature .video-stage {
  padding: 0.7rem;
  border-radius: 30px;
  background: linear-gradient(160deg, #2a2f45, #12151f);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 18px 46px -12px rgba(0, 0, 0, 0.65);
}

.about-feature .video-player {
  border-radius: 22px;
  border: 0;
  max-height: min(68vh, 560px);
}

/* Speaker slit above the screen, purely decorative. */
.about-feature .video-stage::before {
  content: "";
  position: absolute;
  top: 0.26rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3.2rem;
  height: 0.22rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  z-index: 1;
}

.about-feature .video-badge {
  top: -0.5rem;
  left: -0.9rem;
}

/* The glow belongs on the bezel, not tight to the screen. */
.about-feature.about-card .video-figure.has-badge .video-stage {
  border-radius: 30px;
}

/* Shrink-wraps the video so the badge sits on the video's own corner
   rather than floating in empty column space. Not inline-block: that
   makes the box size from the child's intrinsic dimensions, which for
   a <video> come from the poster — a mismatched poster then builds the
   box at the wrong aspect and letterboxes the clip into a sliver. */
.video-stage {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.video-figure.has-badge .video-stage {
  border-radius: 18px;
  box-shadow:
    0 0 0 2px var(--accent-2),
    0 0 26px -4px var(--accent-2);
  animation: badge-glow 2.8s ease-in-out infinite;
}

@keyframes badge-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 2px var(--accent-2),
      0 0 20px -6px var(--accent-2);
  }
  50% {
    box-shadow:
      0 0 0 2px var(--accent),
      0 0 34px -2px var(--accent);
  }
}

.video-badge {
  position: absolute;
  top: -0.7rem;
  left: -0.7rem;
  z-index: 2;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transform: rotate(-9deg);
  transform-origin: center;
  animation: badge-wobble 4s ease-in-out infinite;
  pointer-events: none;
}

/* Mostly still, with a shake every few seconds. */
@keyframes badge-wobble {
  0%,
  82%,
  100% {
    transform: rotate(-9deg) scale(1);
  }
  86% {
    transform: rotate(-14deg) scale(1.07);
  }
  90% {
    transform: rotate(-4deg) scale(1.07);
  }
  94% {
    transform: rotate(-11deg) scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-badge,
  .video-figure.has-badge .video-stage {
    animation: none !important;
  }
}

/* width/height auto lets the element take the clip's own aspect ratio,
   capped in both directions. No object-fit needed, so nothing gets
   letterboxed. The height cap matters because phone footage is often
   portrait, and a 9:16 clip at full column width is taller than the
   viewport. */
.video-player {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #000;
}

/* Fixed ratio so the iframe doesn't collapse before it loads. */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* ---- Slideshow (one photo at a time, arrow controls) ---- */
.slideshow {
  min-width: 0;
}

.slideshow-frame {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slideshow-viewport {
  flex: 1;
  min-width: 0;
}

.slide {
  display: none;
  margin: 0;
}

.slide.is-active {
  display: block;
  animation: slide-fade 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slide-fade {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* The photo is a button so it is keyboard-reachable */
.slide-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 18px;
}

.slide-open:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 3px;
}

.slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  display: block;
  background: var(--surface-subtle);
  transition: filter 0.2s ease;
}

.slide-open:hover img {
  filter: brightness(1.06);
}

.slide figcaption,
.gallery-item figcaption {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.slideshow-arrow {
  flex-shrink: 0;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.slideshow-arrow:hover {
  border-color: var(--accent-3);
  transform: scale(1.06);
}

.slideshow-counter {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  margin: 0.55rem 0 0;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(6, 8, 16, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  animation: lightbox-in 0.2s ease;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-image {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 16px;
  display: block;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #e8e5f5;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: center;
  max-width: 60ch;
}

.lightbox-close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.06);
}

body.lightbox-open {
  overflow: hidden;
}

/* ---- Hobby subsections ---- */
.hobby-subsection {
  margin-top: 1.8rem;
}

.hobby-subheading {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.hobby-subintro {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 1rem;
}

/* ---- Embeds ---- */
.embed-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.embed-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.embed-note {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 0.85rem;
}

.spotify-embed {
  width: 100%;
  border: 0;
  border-radius: 12px;
  display: block;
}

.embed-missing {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ---- Link cards ---- */
.link-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.link-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  padding: 1.1rem;
}

.link-card-title {
  display: inline-block;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--accent-3);
  text-decoration: none;
  margin-bottom: 0.45rem;
}

a.link-card-title:hover {
  text-decoration: underline;
}

.link-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* ---- 404 ---- */
.error-section {
  min-height: 48vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 40rem;
}

/* ---- Home: hero without the side card ---- */
.hero-wide {
  display: block;
}

.hero-wide .hero-copy {
  max-width: 46rem;
}

.hero-wide .lead p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin: 0 0 0.7rem;
}

.hero-wide .lead p:last-child {
  margin-bottom: 0;
}

/* ---- Home: latest strip ---- */
.latest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.latest-card {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  padding: 1.2rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.latest-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-3);
}

.latest-card:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 2px;
}

.latest-kind {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-3);
}

.latest-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.latest-meta {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.latest-body {
  margin: 0.25rem 0 0;
  color: var(--muted);
  line-height: 1.7;
  /* Keep cards even regardless of how long the entry is */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Home: explore cards ---- */
/* Fixed at 3 so the six cards read as two even rows. auto-fit would
   fit four across at this container width and leave a ragged 4 + 2. */
.explore-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.explore-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.explore-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-3);
}

.explore-card:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 2px;
}

.explore-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.explore-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.explore-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.explore-go {
  margin-top: auto;
  padding-top: 0.7rem;
  color: var(--accent-3);
  font-weight: 700;
  font-size: 0.9rem;
}

.accent-mint {
  background: linear-gradient(135deg, rgba(116, 225, 207, 0.24), var(--gradient-base));
}

.accent-lilac {
  background: linear-gradient(135deg, rgba(154, 141, 255, 0.22), var(--gradient-base));
}

.accent-sky {
  background: linear-gradient(135deg, rgba(143, 196, 255, 0.2), var(--gradient-base));
}

.accent-rose {
  background: linear-gradient(135deg, rgba(255, 158, 194, 0.2), var(--gradient-base));
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.15rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-3);
}

.contact-card:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 2px;
}

.contact-icon {
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.contact-body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.contact-platform {
  font-weight: 800;
  font-size: 1rem;
}

.contact-handle {
  color: var(--accent-3);
  font-weight: 700;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.contact-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---- Resume ---- */
.resume-subhead {
  margin: -0.4rem 0 0.8rem;
  color: var(--accent-3);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.resume-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.9rem;
}

.resume-meta a {
  color: var(--accent-3);
  text-decoration: none;
}

.resume-meta a:hover {
  text-decoration: underline;
}

.resume-meta-sep {
  opacity: 0.5;
}

.resume-download {
  margin-top: 0.4rem;
}

.resume-section {
  margin-top: 2.5rem;
}

.resume-section-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-3);
  padding-bottom: 0.6rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--border);
}

.resume-entry {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.resume-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.resume-role {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
}

.resume-org {
  margin: 0.2rem 0 0;
  color: var(--accent-3);
  font-weight: 700;
  font-size: 0.95rem;
}

.resume-dates {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.resume-summary {
  color: var(--muted);
  line-height: 1.8;
  margin: 0.8rem 0 0;
}

.resume-points {
  margin: 0.8rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.8;
  display: grid;
  gap: 0.4rem;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.skill-group {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  padding: 1.1rem;
}

.skill-group-title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
}

/* ---- Articles + table of contents ---- */
.toc {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  border-radius: 20px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  /* Clear the sticky header when jumped to from an article */
  scroll-margin-top: 6rem;
}

.toc-label {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-3);
}

.toc-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.toc-list li {
  color: var(--muted);
}

.toc-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.5;
}

.toc-list a:hover {
  color: var(--accent-3);
  text-decoration: underline;
}

.article-list {
  display: grid;
  gap: 1rem;
}

.article-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  padding: 1.35rem;
  box-shadow: var(--shadow);
  /* Keeps the title clear of the sticky header when deep-linked */
  scroll-margin-top: 6rem;
}

.article-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.article-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
}

.article-date {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-card p {
  color: var(--muted);
  line-height: 1.85;
  margin: 0 0 0.9rem;
}

.article-back {
  display: inline-block;
  color: var(--accent-3);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.article-back:hover {
  text-decoration: underline;
}

/* ---- Top artists ---- */
.artist-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem;
}

/* Square so the artwork reads as artwork; text sits over the bottom. */
.artist-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 1 / 1;
  padding: 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

a.artist-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-3);
}

a.artist-card:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 2px;
}

/* With artwork behind it the card commits to a dark treatment in both
   themes — album art wants a dark scrim, and it keeps contrast
   predictable regardless of how bright the image is. */
.artist-card.has-image {
  isolation: isolate;
  border-color: transparent;
  color: #f6f4ff;
}

.artist-card.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--artist-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Scrim weighted to the bottom, where the name sits. The top stays
   clear so most of the artwork is visible. */
.artist-card.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(6, 8, 18, 0.1) 0%,
    rgba(6, 8, 18, 0.2) 42%,
    rgba(6, 8, 18, 0.82) 78%,
    rgba(6, 8, 18, 0.95) 100%
  );
}

a.artist-card.has-image:hover::before {
  transform: scale(1.09);
}

.artist-card.has-image .artist-name {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.artist-card.has-image .artist-note {
  color: #cfcbe4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.artist-card.has-image .artist-rank {
  color: #ffffff;
  background: rgba(6, 8, 18, 0.55);
  backdrop-filter: blur(6px);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Badge in the corner rather than inline, so it never competes with
   the name for space on a narrow card. */
.artist-rank {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 0.85rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--accent-3);
}

.artist-body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.artist-name {
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.artist-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  /* Two lines max so cards stay uniform */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Food reviews ---- */
.food-list {
  display: grid;
  gap: 1rem;
}

.food-card {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 20px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.food-photo {
  width: clamp(120px, 24vw, 190px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  flex-shrink: 0;
  display: block;
}

.food-body {
  flex: 1;
  min-width: 0;
}

.food-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.food-dish {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.food-restaurant {
  margin: 0.2rem 0 0;
  color: var(--accent-3);
  font-weight: 700;
  font-size: 0.9rem;
}

.food-rating {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--on-accent);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.food-card p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 0.7rem;
}

.food-card p:last-child {
  margin-bottom: 0;
}

@media (max-width: 620px) {
  .food-card {
    flex-direction: column;
  }

  .food-photo {
    width: 100%;
    aspect-ratio: 16 / 10;
  }
}

/* ---- Galleries ---- */
.gallery {
  display: grid;
  gap: 1rem;
}

.gallery-item {
  margin: 0;
  min-width: 0;
}

.gallery-item img {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  object-fit: cover;
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gallery-grid .gallery-item img {
  aspect-ratio: 1 / 1;
}

.gallery-wide {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.gallery-wide .gallery-item img {
  aspect-ratio: 16 / 10;
}

/* Pokemon-style cards: lift + tilt toward the cursor */
.gallery-pop {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  perspective: 1000px;
}

/* Deliberately no `will-change` or `transform-style: preserve-3d`
   here: both promote the card to a compositor layer that is
   rasterized at its un-scaled size and then stretched, which makes
   the popped-out card look soft. Letting the browser re-rasterize
   after the transform keeps it sharp. */
.gallery-pop .gallery-item {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(0) scale(1);
  /* Eases in on enter and back out on leave... */
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ...but tracks the cursor near-instantly while hovering, so the
   tilt doesn't lag behind the pointer and read as choppy. */
.gallery-pop .gallery-item.is-tilting {
  transition: transform 0.09s linear;
}

.gallery-pop .gallery-item img {
  aspect-ratio: 63 / 88;
  box-shadow: var(--shadow);
  transition: box-shadow 0.35s ease;
}

/* A shadow on the image (rather than a drop-shadow filter on the
   card) avoids the extra rasterization pass that softens the art. */
.gallery-pop .gallery-item:hover img {
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.42);
}

.gallery-pop .gallery-item:hover {
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-12px) scale(1.06);
  z-index: 2;
}

/* Glare — a soft highlight that follows the cursor across the card.
   Sized by aspect-ratio so it covers the art but not the caption. */
.gallery-pop .gallery-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 63 / 88;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(
      circle at var(--glare-x, 50%) var(--glare-y, 50%),
      rgba(255, 255, 255, 0.85),
      rgba(255, 255, 255, 0.35) 28%,
      rgba(255, 255, 255, 0) 62%
    );
}

.gallery-pop .gallery-item:hover::after {
  opacity: 1;
}

/* No art to catch the light */
.gallery-pop .image-missing::after {
  display: none;
}

/* Missing image files degrade to a labelled placeholder */
.image-missing img {
  display: none;
}

.image-missing .slide-open {
  display: none;
}

.image-missing::before {
  content: "Image coming soon";
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface-subtle);
}

.gallery-pop .image-missing::before {
  aspect-ratio: 63 / 88;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .about-card-media {
    grid-template-columns: 1fr;
  }

  .about-card-media.media-left .about-card-copy,
  .about-card-media.media-left .slideshow {
    order: initial;
  }
}

@media (max-width: 860px) {
  .hero,
  .section-grid,
  .card-grid,
  .kanban-board {
    grid-template-columns: 1fr;
  }

  /* Six cards in a single column is a long scroll — keep two rows
     of three's shape by pairing them up on tablets. */
  .explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  /* Single column on phones — two would squeeze the copy too far. */
  .explore-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 1.5rem;
    right: 1.5rem;
    flex-direction: column;
    margin: 0.5rem 0 0;
    padding: 0.6rem;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .hero {
    padding-top: 1rem;
  }
}

/* ---- Admin editor (admin.html) ---- */
.admin-login {
  display: grid;
  gap: 0.6rem;
  max-width: 26rem;
  margin-top: 1rem;
}

.admin-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-bar h1 {
  margin: 0;
}

.admin-bar-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 1rem;
}

.admin-status {
  min-height: 1.4rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-status.ok {
  color: var(--accent-3);
}

.admin-status.error,
.admin-error {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.9rem;
}

.admin-list {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-item {
  display: grid;
  gap: 0.75rem;
}

.admin-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.admin-toggle input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* Unmistakable at a glance when scrolling a list of posts. */
.admin-item.is-draft {
  border-style: dashed;
  border-color: var(--accent-2);
}

.admin-item.is-draft .admin-item-head strong {
  color: var(--accent-2);
}

.admin-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-field input,
.admin-field select,
.admin-field textarea,
.admin-login input {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
}

.admin-field textarea {
  resize: vertical;
  line-height: 1.7;
}

.admin-field input:focus-visible,
.admin-field select:focus-visible,
.admin-field textarea:focus-visible,
.admin-login input:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 1px;
}

.admin-login label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Admin: photo upload ---- */
.upload-field {
  display: grid;
  gap: 0.6rem;
}

.upload-preview {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 4.5rem;
  padding: 0.6rem;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: var(--surface-subtle);
}

.upload-preview img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.upload-preview code {
  font-size: 0.75rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.upload-empty {
  color: var(--muted);
  font-size: 0.85rem;
  padding-left: 0.3rem;
}

.upload-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* The label is the visible control; the input itself stays hidden but
   focusable so keyboard users still reach it. */
.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-button {
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.55rem 0.9rem;
}

.upload-button.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.upload-input:focus-visible + .upload-folder,
.upload-button:focus-within {
  outline: 2px solid var(--accent-3);
  outline-offset: 2px;
}

.upload-folder {
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.7rem;
}

.upload-intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.9rem;
}

.upload-results {
  display: grid;
  gap: 0.5rem;
}

.upload-results:not(:empty) {
  margin-top: 0.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.upload-result {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.upload-result img {
  width: 2.8rem;
  height: 2.8rem;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.upload-result code {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.upload-status {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.upload-status.ok {
  color: var(--accent-3);
}

.upload-status.error {
  color: var(--accent-2);
}

.admin-remove {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-remove:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

/* ---- Print (mainly for the resume page) ----
   Strips chrome and decoration so Ctrl+P produces a clean copy. */
@media print {
  .site-header,
  .site-footer,
  .background-shape,
  .page-transition-layer,
  .theme-toggle,
  .nav-toggle,
  .resume-download {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  main {
    padding: 0;
    max-width: none;
  }

  .site-header,
  main,
  .site-footer {
    opacity: 1 !important;
    transform: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .resume-entry,
  .skill-group {
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
  }

  .resume-section {
    break-inside: avoid;
  }

  .resume-org,
  .resume-section-title,
  .resume-meta a {
    color: #000 !important;
  }

  .resume-summary,
  .resume-points,
  .resume-meta {
    color: #333 !important;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .site-header,
  main,
  .site-footer {
    opacity: 1 !important;
    transform: none !important;
  }

  .page-transition-layer {
    display: none !important;
  }

  .gallery-pop .gallery-item,
  .gallery-pop .gallery-item:hover {
    transform: none !important;
  }

  .gallery-pop .gallery-item::after {
    display: none !important;
  }

  .slide.is-active,
  .lightbox {
    animation: none !important;
  }
}
