.side-nav {
  position: fixed;
  top: 2rem;
  left: 1.5rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.side-nav a { color: #DEDEDE; transition: color 0.15s ease; }
.side-nav a:hover,
.side-nav a:focus-visible,
.side-nav a.active { color: #fff; }
.side-nav a.active::before { content: "▸ "; }

.page {
  position: relative;
  z-index: 1;
  margin-left: 9.5rem;
  max-width: 800px;
}

@media (max-width: 700px) {
  .side-nav {
    position: sticky; top: 0; left: auto;
    flex-direction: row; flex-wrap: wrap; gap: 0.4rem 1rem;
    padding: 0.7rem 1rem;
    background: #000;
  }
  .page { margin-left: 0; }
}

:root {
  --bg: #ffffff;
  --ink: #000000;
  --ink-dim: #8a8a8a;
  --signal: #ffffff;
  --signal-2: #9a9a9a;
  --line: rgba(255, 255, 255, 0.14);
  --header-h: 3rem;

  --font-display: 'Inconsolata', monospace;
  --font-mono: 'Inconsolata', monospace;
  --font-ascii: 'Noto Color Emoji';
  /* --font-body: 'IBM Plex Mono', monospace; */
  --font-body: 'Inconsolata', monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ---------- ASCII field ---------- */

.ascii-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  overflow: hidden;
  font-family: var(--font-ascii);
  user-select: none;
  /* animation: flicker 7s infinite; */
}

.ascii-field .cell {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-dim);
  opacity: 0.0;
  transition: opacity 2.6s ease, color 2.6s ease;
}

.ascii-field .cell.active {
  color: var(--ink);
  opacity: 1;
  transition: opacity 0.01s ease, color 0.01s ease;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0px,
    rgba(0, 0, 0, 0.35) 1px,
    transparent 1px,
    transparent 3px
  );
  /* mix-blend-mode: overlay; */
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(90% 80% at center, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
  /* background: radial-gradient(90% 80% at center, #e66465, #9198e5); */
}

.clear-hint {
  position: fixed;
  right: 1rem;
  bottom: 0.85rem;
  z-index: 1;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0.55;
  pointer-events: none;
}

/* @keyframes flicker {
  0%, 100% { filter: brightness(1); }
  92% { filter: brightness(1); }
  93% { filter: brightness(1.5) contrast(1.3); }
  94% { filter: brightness(0.85); }
  95% { filter: brightness(1); }
  96.5% { filter: brightness(1.35); }
  97% { filter: brightness(1); }
} */

@media (prefers-reduced-motion: reduce) {
  .ascii-field { animation: none; }
  .ascii-field .cell { transition: none; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #000;
  padding: 0.4rem 0.85rem;
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- site header (present on every page) ---------- */

.site-header {
  position: relative;
  z-index: 2;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--line);
  /* background: var(--bg); */
}

.site-header .mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  gap: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-nav a {
  color: var(--ink-dim);
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.site-nav a.active {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  min-height: 44vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1.5rem;
  pointer-events: none;
}

.hero > * {
  pointer-events: auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.75rem;
  opacity: 0.8;
}

/* .cursor-blink {
  display: inline-block;
  animation: blink 1s steps(1) infinite;
} */

/* @keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
} */

.name {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 6vw, 2.25rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
}

/* grayscale glitch text: two ghosted copies stutter behind the real text */

/* .glitch-text {
  isolation: isolate;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: var(--bg);
  clip-path: inset(0 0 0 0);
}

.glitch-text::before {
  color: var(--signal);
  z-index: -1;
  animation: glitch-1 4.5s infinite linear alternate-reverse;
}

.glitch-text::after {
  color: var(--signal-2);
  z-index: -2;
  animation: glitch-2 5.5s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0%   { clip-path: inset(4% 0 88% 0); transform: translate(2px, 0); }
  10%  { clip-path: inset(62% 0 5% 0); transform: translate(-2px, 0); }
  20%  { clip-path: inset(20% 0 60% 0); transform: translate(1px, 0); }
  30%  { clip-path: inset(80% 0 3% 0); transform: translate(-1px, 0); }
  40%  { clip-path: inset(45% 0 40% 0); transform: translate(2px, 0); }
  50%  { clip-path: inset(10% 0 75% 0); transform: translate(0, 0); }
  60%  { clip-path: inset(70% 0 15% 0); transform: translate(-2px, 0); }
  70%  { clip-path: inset(30% 0 50% 0); transform: translate(1px, 0); }
  80%  { clip-path: inset(55% 0 30% 0); transform: translate(-1px, 0); }
  90%  { clip-path: inset(5% 0 85% 0); transform: translate(2px, 0); }
  100% { clip-path: inset(40% 0 45% 0); transform: translate(0, 0); }
}

@keyframes glitch-2 {
  0%   { clip-path: inset(70% 0 10% 0); transform: translate(-2px, 0); }
  15%  { clip-path: inset(15% 0 70% 0); transform: translate(2px, 0); }
  30%  { clip-path: inset(50% 0 30% 0); transform: translate(-1px, 0); }
  45%  { clip-path: inset(5% 0 90% 0); transform: translate(1px, 0); }
  60%  { clip-path: inset(65% 0 20% 0); transform: translate(-2px, 0); }
  75%  { clip-path: inset(25% 0 55% 0); transform: translate(2px, 0); }
  90%  { clip-path: inset(80% 0 5% 0); transform: translate(-1px, 0); }
  100% { clip-path: inset(35% 0 45% 0); transform: translate(1px, 0); }
}

.glitch-text.glitch-burst::before {
  animation: glitch-1 0.25s infinite linear alternate-reverse;
}

.glitch-text.glitch-burst::after {
  animation: glitch-2 0.2s infinite linear alternate-reverse;
}

@media (prefers-reduced-motion: reduce) {
  .glitch-text::before,
  .glitch-text::after {
    animation: none;
    display: none;
  }
  .cursor-blink { animation: none; }
}

.tagline {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-dim);
  max-width: 36ch;
  margin: 0.75rem 0 0;
} */

/* ---------- Page title (non-hero pages) ---------- */

.page-title {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  padding: 2.25rem 1.5rem 0;
}

.page-title h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0;
  text-transform: lowercase;
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  padding: 2.5rem 1.5rem;
  /* background: var(--bg); */
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  border-top: none;
}

.label {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1rem;
}

/* etc line under project list */

.etc {
  margin: 0.85rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink);
}

/* about */

.about-text {
  font-size: 0.9rem;
  max-width: 64ch;
  color: var(--ink);
}

/* work / project list */

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work-item {
  border-bottom: none;
  padding: 0.25rem 0;
}

.work-item a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.35rem 1.25rem;
  padding: 0;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.work-item a:hover,
.work-item a:focus-visible {
  color: var(--ink);
  padding-left: 0.2rem;
  /* text-shadow: -1px 0 var(--signal-2), 1px 0 var(--ink); */
}

.work-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.88rem;
}

.work-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
}

/* events */

.events-block {
  margin-bottom: 1.75rem;
}

.events-block:last-child {
  margin-bottom: 0;
}

.events-subhead {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin: 0 0 0.75rem;
  opacity: 0.7;
}

.events-empty {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink);
  font-style: italic;
  margin: 0;
}

.year-group {
  border-bottom: 1px solid var(--line);
}

.year-group summary {
  cursor: pointer;
  list-style: none;
  padding: 0.65rem 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.year-group summary::-webkit-details-marker {
  display: none;
}

.year-group summary::before {
  content: '▸';
  display: inline-block;
  font-size: 0.8em;
  transition: transform 0.15s ease;
}

.year-group[open] summary::before {
  transform: rotate(90deg);
}

.year-group summary:hover,
.year-group summary:focus-visible {
  color: var(--ink);
}

.year-group summary .count {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--ink);
}

.events-list {
  list-style: none;
  margin: 0;
  padding: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.events-list li {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink);
  display: flex;
  gap: 1rem;
}

.ev-date {
  font-family: var(--font-mono);
  color: var(--ink);
  flex-shrink: 0;
  width: auto;          /* was 3rem */
  white-space: nowrap;  /* keeps "18 - 20.3.27" on one line */
  font-size: 0.75rem;
}
/* photos */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.photo {
  margin: 0 auto;
}

.photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  /* background: #111; */
}

.photo figcaption {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-dim);
  margin-top: 0.3rem;
}

/* contact / footer links */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.contact-list a {
  color: var(--ink-dim);
  transition: color 0.15s ease;
}

.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--ink);
}

/* footer */

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1rem;
  /* background: var(--bg); */
}

.footer-links {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links a {
  color: var(--ink);
  transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
}

.footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-dim);
}

.work-item a:not([href]) { pointer-events: none; }

.video {
  position: relative;
  width: 100%;
  max-width: 560px;          /* player width: change to taste */
  aspect-ratio: 16 / 9;
  margin-top: 0.6rem;
  background: #111;
}
.video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.hero {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 1.5rem 2rem;
}
.hero-text { min-width: 0; }
.hero-photo {
  flex-shrink: 0;
  width: clamp(100px, 14vw, 160px);   /* photo size */
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #111;
}
@media (max-width: 600px) { .hero { flex-wrap: wrap; } }

.projects-note { margin: 0 0 1rem; font-family: var(--font-body); font-size: 0.8rem; color: var(--ink-dim); }
.projects-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.detail { margin-bottom: 2.5rem; }
.detail-title { margin: 0; font-family: var(--font-display); font-weight: 550; font-size: 0.8rem; }
.detail-meta  { margin: 0.2rem 0 0.6rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-dim); }
.detail-text  { margin: 0; max-width: 70ch; font-size: 0.85rem; line-height: 1.55; }
.detail-text a { text-decoration: underline; text-underline-offset: 2px; }

.detail-media { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.9rem; }
.detail-media figure { margin: 0; flex: 0 1 260px; }
.detail-media img,
.detail-media video { display: block; width: 100%; height: auto; background: #111; }
.detail-media figcaption { margin-top: 0.3rem; font-family: var(--font-mono); font-size: 0.65rem; color: var(--ink-dim); }
.detail-media .video { flex: 0 1 460px; margin-top: 0; }   /* reuses your .video player rules */

.ascii-field { pointer-events: none; }
.side-nav { position: fixed; z-index: 5; }

.scanlines { display: none; }
