@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
  --green: #33ff33;
  --green-dim: #20cc20;
  --green-dark: #0a440a;
  --green-glow: rgba(51, 255, 51, 0.4);
  --bg: #0a0a0a;
  --font-size: 18px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #000;
}

body {
  font-family: 'VT323', monospace;
  font-size: var(--font-size);
  color: var(--green);
  background: var(--bg);
  padding: 12px;
}

/* CRT monitor shell — thin green border, rounded corners */
.crt {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--green-dim);
  border-radius: 18px;
  box-shadow:
    0 0 25px rgba(51, 255, 51, 0.12),
    0 0 80px rgba(51, 255, 51, 0.04),
    inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.crt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(51, 255, 51, 0.03) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 10;
}

/* Phosphor glow warble — visible drift in electron gun intensity */
@keyframes glow-warble {
  0%   { filter: brightness(1) contrast(1); }
  10%  { filter: brightness(1.18) contrast(1.06); }
  22%  { filter: brightness(0.82) contrast(1.12); }
  35%  { filter: brightness(1.1) contrast(0.94); }
  48%  { filter: brightness(0.86) contrast(1.08); }
  60%  { filter: brightness(1.2) contrast(1.04); }
  72%  { filter: brightness(0.8) contrast(1.14); }
  85%  { filter: brightness(1.12) contrast(0.96); }
  100% { filter: brightness(1) contrast(1); }
}

/* Text glow pulse — phosphor persistence shimmer on the text itself */
@keyframes text-warble {
  0%   { text-shadow: 0 0 4px rgba(51, 255, 51, 0.3), 0 0 8px rgba(51, 255, 51, 0.1); }
  20%  { text-shadow: 0 0 6px rgba(51, 255, 51, 0.5), 0 0 14px rgba(51, 255, 51, 0.2), 0 0 25px rgba(51, 255, 51, 0.08); }
  40%  { text-shadow: 0 0 3px rgba(51, 255, 51, 0.25), 0 0 6px rgba(51, 255, 51, 0.08); }
  60%  { text-shadow: 0 0 7px rgba(51, 255, 51, 0.55), 0 0 16px rgba(51, 255, 51, 0.25), 0 0 30px rgba(51, 255, 51, 0.1); }
  80%  { text-shadow: 0 0 4px rgba(51, 255, 51, 0.3), 0 0 9px rgba(51, 255, 51, 0.12); }
  100% { text-shadow: 0 0 4px rgba(51, 255, 51, 0.3), 0 0 8px rgba(51, 255, 51, 0.1); }
}

#content {
  animation: text-warble 6s ease-in-out infinite;
}

/* Ambient phosphor bloom — green haze that breathes */
@keyframes phosphor-bloom {
  0%   { box-shadow: inset 0 0 80px rgba(51, 255, 51, 0.03), 0 0 60px rgba(51, 255, 51, 0.02); }
  25%  { box-shadow: inset 0 0 120px rgba(51, 255, 51, 0.06), 0 0 100px rgba(51, 255, 51, 0.04); }
  50%  { box-shadow: inset 0 0 80px rgba(51, 255, 51, 0.02), 0 0 50px rgba(51, 255, 51, 0.015); }
  75%  { box-shadow: inset 0 0 140px rgba(51, 255, 51, 0.07), 0 0 120px rgba(51, 255, 51, 0.05); }
  100% { box-shadow: inset 0 0 80px rgba(51, 255, 51, 0.03), 0 0 60px rgba(51, 255, 51, 0.02); }
}

.crt {
  animation: glow-warble 10s ease-in-out infinite, phosphor-bloom 7s ease-in-out infinite;
}

/* Scanlines — now contained inside the monitor frame */
.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

/* Hide scanlines on hover anywhere */
body:hover .scanlines {
  opacity: 0;
}

/* Flicker + horizontal drift — electron beam jitter */
@keyframes flicker {
  0%   { opacity: 0.97; transform: translateX(0); }
  4%   { opacity: 0.95; transform: translateX(0.4px); }
  8%   { opacity: 0.97; transform: translateX(0); }
  15%  { opacity: 0.98; transform: translateX(-0.3px); }
  20%  { opacity: 0.96; transform: translateX(0); }
  50%  { opacity: 0.97; transform: translateX(0.2px); }
  65%  { opacity: 0.98; transform: translateX(0); }
  80%  { opacity: 0.96; transform: translateX(-0.4px); }
  90%  { opacity: 0.98; transform: translateX(0.1px); }
  100% { opacity: 0.97; transform: translateX(0); }
}

#terminal {
  padding: 40px 50px;
  max-width: 1400px;
  height: 100%;
  overflow-y: auto;
  animation: flicker 8s infinite;
  display: flex;
  flex-direction: column;
}

/* CRT recall flash — page loads from memory */
@keyframes crt-recall {
  0%   { opacity: 0; }
  15%  { opacity: 0.6; }
  30%  { opacity: 0.3; }
  50%  { opacity: 0.85; }
  70%  { opacity: 0.7; }
  100% { opacity: 1; }
}

#content.recall {
  animation: crt-recall 0.3s ease-out;
}

#terminal::-webkit-scrollbar {
  width: 0;
}

/* ASCII header */
.ascii-header {
  color: var(--green);
  line-height: 1.1;
  margin-bottom: 24px;
  font-size: 14px;
  text-shadow:
    0 0 5px var(--green-glow),
    0 0 10px rgba(51, 255, 51, 0.2),
    0 0 20px rgba(51, 255, 51, 0.1);
  white-space: pre;
  flex-shrink: 0;
}

/* Content area */
#content {
  flex: 1;
  line-height: 1.6;
  min-height: 0;
  position: relative;
}

/* When portrait is present, reserve space on the right so text doesn't hide under it */
#content:has(.about-portrait-col) .about-text-col,
#content:has(.about-portrait-col) .bio-paragraph {
  padding-right: 230px;
}

@media (max-width: 700px) {
  #content:has(.about-portrait-col) .about-text-col,
  #content:has(.about-portrait-col) .bio-paragraph {
    padding-right: 100px;
  }
}

/* Lines */
.line {
  white-space: pre-wrap;
  word-wrap: break-word;
  text-shadow:
    0 0 4px rgba(51, 255, 51, 0.3),
    0 0 8px rgba(51, 255, 51, 0.1);
}

.line.dim {
  color: var(--green-dim);
}

.line.bright {
  color: #66ff66;
  text-shadow:
    0 0 6px var(--green-glow),
    0 0 12px rgba(51, 255, 51, 0.2);
}

/* Selectable items (cursor nav) */
.selectable {
  display: block;
  white-space: pre;
  padding: 2px 0;
  cursor: pointer;
  text-shadow:
    0 0 4px rgba(51, 255, 51, 0.3),
    0 0 8px rgba(51, 255, 51, 0.1);
  transition: background 0.08s, color 0.08s;
}

.selectable:hover {
  color: #88ff88;
}

/* Active cursor highlight */
.selectable.cursor-active {
  background: rgba(51, 255, 51, 0.1);
  color: #88ff88;
  text-shadow:
    0 0 8px var(--green-glow),
    0 0 18px rgba(51, 255, 51, 0.3);
}

.selectable.cursor-active::before {
  content: '\25B6 ';
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
}

/* Prompt line */
#prompt-line {
  margin-top: 16px;
  white-space: pre;
  flex-shrink: 0;
  text-shadow:
    0 0 4px rgba(51, 255, 51, 0.3),
    0 0 8px rgba(51, 255, 51, 0.1);
}

.prompt {
  color: var(--green-dim);
}

#input-display {
  color: var(--green);
}

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

.cursor {
  animation: blink 1s step-end infinite;
  color: var(--green);
  text-shadow: 0 0 6px var(--green-glow);
}

/* Vignette */
.crt::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 60%,
    rgba(0, 0, 0, 0.4) 100%
  );
  pointer-events: none;
  z-index: 11;
}

.separator {
  color: var(--green-dark);
  text-shadow: none;
}

/* =============================================
   MODAL SYSTEM
   ============================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.modal-overlay.visible {
  opacity: 1;
}

.modal-frame {
  position: relative;
  width: 90vw;
  max-width: 900px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Box-drawn border using pseudo-elements and actual border */
.modal-border {
  border: 1px solid var(--green-dark);
  box-shadow:
    0 0 15px rgba(51, 255, 51, 0.08),
    0 0 40px rgba(51, 255, 51, 0.04),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
}

/* Modal title bar */
.modal-titlebar {
  padding: 8px 16px;
  border-bottom: 1px solid var(--green-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: rgba(51, 255, 51, 0.03);
}

.modal-titlebar .title {
  color: #66ff66;
  text-shadow: 0 0 8px var(--green-glow);
  font-size: 18px;
  letter-spacing: 1px;
}

.modal-titlebar .close-hint {
  color: var(--green-dark);
  font-size: 16px;
}

/* Modal body */
.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Tighter divider when Clio badge is present */
.modal-body .modal-divider {
  margin: 10px 0;
}

.modal-body::-webkit-scrollbar {
  width: 4px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--bg);
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--green-dark);
}

/* Modal text */
.modal-body .line {
  margin-bottom: 2px;
}

/* Modal status bar */
.modal-statusbar {
  padding: 6px 16px;
  border-top: 1px solid var(--green-dark);
  font-size: 15px;
  color: var(--green-dark);
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
}

.modal-statusbar .nav-hint {
  color: var(--green-dim);
}

/* =============================================
   IMAGE VIEWER / CAROUSEL
   ============================================= */

.carousel-container {
  position: relative;
  width: 100%;
  margin: 12px 0;
  background: #000;
  border: 1px solid var(--green-dark);
  overflow: hidden;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  overflow: hidden;
}

.carousel-viewport img {
  max-width: 100%;
  max-height: 55vh;
  display: block;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-viewport img.loaded {
  opacity: 1;
}

/* Scanline load effect on images */
@keyframes img-scan-in {
  0% {
    clip-path: inset(0 0 100% 0);
    opacity: 0.6;
  }
  100% {
    clip-path: inset(0 0 0% 0);
    opacity: 1;
  }
}

.carousel-viewport img.scanning {
  animation: img-scan-in 0.4s ease-out forwards;
}

/* Carousel indicators */
.carousel-indicators {
  text-align: center;
  padding: 8px;
  color: var(--green-dark);
  font-size: 16px;
  letter-spacing: 3px;
}

.carousel-indicators .active-dot {
  color: var(--green);
  text-shadow: 0 0 6px var(--green-glow);
}

/* Carousel arrows — clickable */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green-dark);
  font-size: 28px;
  z-index: 2;
  text-shadow: 0 0 4px rgba(51, 255, 51, 0.15);
  transition: color 0.15s, text-shadow 0.15s;
  cursor: pointer;
  pointer-events: auto;
  padding: 8px;
  user-select: none;
}

.carousel-arrow:hover {
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
}

.carousel-arrow.left { left: 4px; }
.carousel-arrow.right { right: 4px; }

.carousel-arrow.flash {
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
}

/* =============================================
   VIDEO EMBED
   ============================================= */

.video-container {
  position: relative;
  width: 100%;
  margin: 12px 0;
  border: 1px solid var(--green-dark);
  background: #000;
  overflow: hidden;
}

.video-container::before {
  content: '';
  display: block;
  padding-top: 56.25%;
}

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

/* "Loading" effect for video */
@keyframes video-boot {
  0% { opacity: 0; }
  30% { opacity: 0.3; }
  60% { opacity: 0.6; }
  100% { opacity: 1; }
}

.video-container iframe {
  animation: video-boot 0.6s ease-out;
}

/* =============================================
   LINK BLOCK
   ============================================= */

.ext-link {
  display: inline-block;
  color: #66ff66;
  text-decoration: none;
  border-bottom: 1px solid var(--green-dark);
  padding-bottom: 1px;
  text-shadow: 0 0 6px var(--green-glow);
  cursor: pointer;
  transition: all 0.15s;
}

.ext-link:hover {
  color: #99ff99;
  border-bottom-color: var(--green);
  text-shadow: 0 0 12px var(--green-glow), 0 0 20px rgba(51, 255, 51, 0.2);
}

/* =============================================
   AWARD BADGE
   ============================================= */

.award-badge {
  display: inline-block;
  border: 1px solid var(--green-dim);
  padding: 2px 8px;
  font-size: 14px;
  color: #66ff66;
  text-shadow: 0 0 6px var(--green-glow);
  margin-left: 8px;
  vertical-align: middle;
}

/* =============================================
   SECTION DIVIDER IN MODAL
   ============================================= */

.modal-divider {
  border: none;
  border-top: 1px solid var(--green-dark);
  margin: 14px 0;
}

/* =============================================
   CLICKABLE NAME LINK
   ============================================= */

.name-link {
  color: #66ff66;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid var(--green-dark);
  padding-bottom: 1px;
  text-shadow:
    0 0 6px var(--green-glow),
    0 0 12px rgba(51, 255, 51, 0.15);
  transition: all 0.15s;
}

.name-link:hover {
  color: #99ff99;
  border-bottom-color: var(--green);
  text-shadow:
    0 0 10px var(--green-glow),
    0 0 20px rgba(51, 255, 51, 0.25);
}

/* =============================================
   PORTRAIT POPUP
   ============================================= */

.portrait-popup {
  position: relative;
  max-width: 720px;
  width: 90vw;
}

.portrait-popup img {
  width: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
  box-shadow:
    0 0 20px rgba(51, 255, 51, 0.12),
    0 0 60px rgba(51, 255, 51, 0.06);
}

.portrait-popup img.visible {
  opacity: 1;
}

.portrait-hint {
  text-align: center;
  margin-top: 12px;
  color: var(--green-dark);
  font-size: 15px;
}

/* =============================================
   LOGIN SCREEN
   ============================================= */

#login-screen {
  padding: 40px 50px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 700px;
}

#login-content {
  margin-top: 24px;
}

#password-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--green);
  font-family: 'VT323', monospace;
  font-size: var(--font-size);
  width: 200px;
  caret-color: transparent;
  letter-spacing: 4px;
  text-shadow:
    0 0 4px rgba(51, 255, 51, 0.3),
    0 0 8px rgba(51, 255, 51, 0.1);
}

#password-input:focus {
  outline: none;
}

#login-error {
  text-shadow: 0 0 6px rgba(136, 34, 34, 0.5);
}

@keyframes access-denied-flash {
  0%   { visibility: visible; opacity: 1; }
  50%  { opacity: 0.4; }
  100% { visibility: visible; opacity: 1; }
}

#login-error.show {
  visibility: visible !important;
  animation: access-denied-flash 0.3s ease 2;
}

@keyframes access-granted {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 0; }
}

#login-screen.granted {
  animation: access-granted 0.5s ease-out forwards;
}

/* =============================================
   WORK PAGE SECTION HEADERS
   ============================================= */

.section-block {
  margin-top: 10px;
  margin-bottom: 4px;
}

.section-top {
  color: var(--green-dim);
  white-space: pre;
  line-height: 1;
  text-shadow:
    0 0 6px rgba(51, 255, 51, 0.3),
    0 0 12px rgba(51, 255, 51, 0.1);
}

.section-title {
  color: var(--green);
  white-space: pre;
  letter-spacing: 3px;
  padding: 6px 0;
  text-shadow:
    0 0 8px var(--green-glow),
    0 0 15px rgba(51, 255, 51, 0.2);
  font-size: 18px;
}

.section-bottom {
  color: var(--green-dim);
  white-space: pre;
  line-height: 1;
  text-shadow:
    0 0 6px rgba(51, 255, 51, 0.3),
    0 0 12px rgba(51, 255, 51, 0.1);
}

/* Directors link — bolder than name-link */
.directors-link {
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--green-dark);
}

.directors-link:hover {
  text-decoration-color: var(--green);
}

/* Director names in modal */
.director-name {
  font-size: 20px;
  letter-spacing: 2px;
  padding: 3px 0;
  color: var(--green);
  text-shadow:
    0 0 4px rgba(51, 255, 51, 0.3),
    0 0 8px rgba(51, 255, 51, 0.1);
}

/* Award badge inline */
.proj-award {
  color: #88ff88;
  text-shadow:
    0 0 6px var(--green-glow),
    0 0 12px rgba(51, 255, 51, 0.2);
}

/* =============================================
   DIM MENU ITEM (secondary nav)
   ============================================= */

.selectable.menu-dim {
  color: var(--green-dim);
  opacity: 0.55;
  text-shadow: 0 0 3px rgba(51, 255, 51, 0.2);
}

.selectable.menu-dim:hover,
.selectable.menu-dim.cursor-active {
  color: var(--green);
  opacity: 1;
  text-shadow:
    0 0 8px var(--green-glow),
    0 0 18px rgba(51, 255, 51, 0.3);
}

/* =============================================
   OBSESSIONS — full-page tile grid
   ============================================= */

.obsessions-wrap {
  margin: 20px 0;
}

.obs-header {
  display: none; /* page has its own header now */
}

.obs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.obs-tile {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px;
  border: 1px solid transparent;
  transition: border-color 0.18s, transform 0.18s;
  white-space: normal;
}

.obs-tile:hover,
.obs-tile.cursor-active {
  border-color: var(--green-dark);
  transform: translateY(-1px);
  background: transparent;
}

.obs-tile.cursor-active::before {
  content: '' !important;
}

.obs-tile.active {
  border-color: var(--green-dim);
  box-shadow: 0 0 14px rgba(51, 255, 51, 0.12);
}

.obs-tile-imgwrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--green-dim);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.4);
}

.obs-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.6) brightness(0.9) contrast(1.05);
  transition: filter 0.2s;
}

.obs-tile:hover .obs-tile-img,
.obs-tile.active .obs-tile-img {
  filter: saturate(1) brightness(1.05) contrast(1);
}

/* Static flash overlay on tile */
.obs-tile-static {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.2) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(51, 255, 51, 0.15) 0 1px, transparent 1px 3px),
    #0a0a0a;
  mix-blend-mode: screen;
}

@keyframes obs-tile-flash {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  40%  { opacity: 0.85; }
  70%  { opacity: 0.5; }
  100% { opacity: 0; }
}

.obs-tile-imgwrap.flashing .obs-tile-static {
  animation: obs-tile-flash 0.26s steps(8, end) forwards;
}

.obs-tile-label {
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--green-dim);
  text-shadow: 0 0 4px rgba(51, 255, 51, 0.2);
  margin-top: 4px;
}

.obs-tile:hover .obs-tile-label,
.obs-tile.active .obs-tile-label {
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
}

/* Caption line beneath the grid */
.obs-caption {
  min-height: 40px;
  padding: 14px 0 14px 18px;
  border-left: 2px solid var(--green-dark);
  color: #88ff88;
  font-size: 19px;
  line-height: 1.5;
  text-shadow: 0 0 6px var(--green-glow);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.obs-caption.visible {
  opacity: 1;
}

/* Big-preview modal on hover — center-screen */
.obs-big-preview {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.obs-big-preview.visible {
  opacity: 1;
}

.obs-big-preview img {
  max-width: 72vw;
  max-height: 82vh;
  border: 1px solid var(--green-dim);
  box-shadow:
    0 0 40px rgba(51, 255, 51, 0.2),
    0 0 120px rgba(51, 255, 51, 0.08);
  filter: saturate(0.9) brightness(1.05);
}

@media (max-width: 700px) {
  .obs-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 14px;
  }
  .obs-tile-label {
    font-size: 14px;
    letter-spacing: 1px;
  }
  .obs-caption {
    font-size: 15px;
    padding: 10px 0 10px 14px;
  }
}

/* =============================================
   CLIO AWARD BADGE
   ============================================= */

/* Top row — meta on left, Clio badge on right */
.modal-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.modal-meta {
  flex: 1;
  min-width: 0;
}

.clio-badge {
  flex-shrink: 0;
  width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--green-dark);
  background: rgba(51, 255, 51, 0.02);
  box-shadow:
    0 0 12px rgba(51, 255, 51, 0.04),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.clio-badge:hover {
  border-color: var(--green-dim);
  box-shadow:
    0 0 20px rgba(51, 255, 51, 0.15),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.clio-tier {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 0 6px rgba(51, 255, 51, 0.25));
}

.clio-logo {
  height: 14px;
  width: auto;
  filter: brightness(0) invert(1) sepia(1) saturate(8) hue-rotate(70deg) brightness(1.1);
  opacity: 0.85;
}

.clio-link {
  color: #66ff66;
  font-size: 14px;
  text-align: center;
  text-shadow: 0 0 6px var(--green-glow);
  letter-spacing: 0.5px;
}

.clio-badge:hover .clio-link {
  color: #99ff99;
  text-shadow: 0 0 10px var(--green-glow);
}

/* Bio paragraphs — reflow naturally */
.bio-paragraph {
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.7;
}

/* Category headers in work page */
.cat-header {
  color: var(--green-dim);
  white-space: pre;
  letter-spacing: 2px;
  text-shadow: 0 0 4px rgba(51, 255, 51, 0.2);
  margin-top: 4px;
}

/* =============================================
   CLICKABLE BACK BUTTON
   ============================================= */

.clickable-back {
  cursor: pointer;
  transition: color 0.15s, text-shadow 0.15s;
}

.clickable-back:hover {
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
}

/* =============================================
   INLINE PORTRAIT — 80s MOVIE LOAD
   ============================================= */

.about-with-portrait {
  position: relative;
}

.about-text-col {
  min-width: 0;
}

/* Portrait floats up near the logo area — absolute top-right of #content */
.about-portrait-col {
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--green-dim);
  box-shadow:
    0 0 12px rgba(51, 255, 51, 0.1),
    0 0 30px rgba(51, 255, 51, 0.04),
    inset 0 0 20px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

/* Leader line SVG spans the entire #content */
.leader-line-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 4;
}

.about-portrait-col img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
}

/* CRT circular scan-in */
@keyframes portrait-interlace {
  0% {
    clip-path: circle(0% at 50% 50%);
    opacity: 0.4;
    filter: brightness(2) contrast(0.5) saturate(0);
  }
  40% {
    clip-path: circle(35% at 50% 50%);
    opacity: 0.7;
    filter: brightness(1.4) contrast(0.8) saturate(0.3);
  }
  70% {
    clip-path: circle(60% at 50% 50%);
    opacity: 0.9;
    filter: brightness(1.1) contrast(0.95) saturate(0.7);
  }
  100% {
    clip-path: circle(75% at 50% 50%);
    opacity: 1;
    filter: brightness(1) contrast(1) saturate(1);
  }
}

.about-portrait-col img.interlace-in {
  animation: portrait-interlace 0.8s ease-out forwards;
}

/* =============================================
   MOBILE — FULL SITE CLEANUP
   ============================================= */

@media (max-width: 700px) {

  body {
    padding: 6px;
  }

  .crt {
    border-radius: 12px;
  }

  /* Tighter padding */
  #terminal {
    padding: 16px 14px;
  }

  #login-screen {
    padding: 20px 16px;
  }

  /* Scale down ASCII header so it doesn't overflow */
  .ascii-header {
    font-size: 8px;
    margin-bottom: 14px;
    line-height: 1.15;
  }

  /* Collapse whitespace so years don't float to own line */
  .selectable {
    white-space: normal;
    font-size: 16px;
    padding: 6px 0;
  }

  /* Section box-draw borders: hide, they overflow */
  .section-top,
  .section-bottom {
    display: none;
  }

  /* Lines */
  .line {
    font-size: 16px;
  }

  /* Separator */
  .separator {
    overflow: hidden;
  }

  /* Bio text: flow as inline on mobile so it reflows as paragraph */
  .about-text-col .line {
    display: inline;
    white-space: normal;
  }

  /* Portrait: smaller, floats top-right of content */
  .about-portrait-col {
    width: 90px;
    height: 90px;
  }

  /* Hide leader line SVG on mobile — too tight */
  .leader-line-svg {
    display: none;
  }

  /* Modal: full width, tighter */
  .modal-frame {
    width: 96vw;
    max-height: 92vh;
  }

  .modal-body {
    padding: 12px;
  }

  .modal-titlebar {
    padding: 6px 10px;
  }

  .modal-titlebar .title {
    font-size: 14px;
    letter-spacing: 0;
  }

  .modal-titlebar .close-hint {
    font-size: 14px;
  }

  .modal-statusbar {
    padding: 4px 10px;
    font-size: 13px;
  }

  /* Carousel */
  .carousel-viewport {
    min-height: 140px;
  }

  .carousel-viewport img {
    max-height: 40vh;
  }

  .carousel-arrow {
    font-size: 20px;
    padding: 6px;
  }

  /* Video */
  .video-container {
    margin: 8px 0;
  }

  /* Prompt line */
  #prompt-line {
    font-size: 16px;
    margin-top: 10px;
  }

  /* Director names tighter */
  .director-name {
    font-size: 16px;
    letter-spacing: 1px;
  }

  /* Title treatment in modal */
  .modal-body img[style*="max-width:70%"] {
    max-width: 90% !important;
  }

  /* Scanlines: much subtler on mobile (no hover to dismiss) */
  .scanlines {
    background: repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 2px,
      rgba(0, 0, 0, 0.06) 2px,
      rgba(0, 0, 0, 0.06) 4px
    );
  }

  /* Top row: collapse on mobile */
  .modal-top {
    flex-direction: row;
    gap: 10px;
  }
  .clio-badge {
    width: 96px;
    padding: 6px;
    gap: 4px;
  }
  .clio-tier {
    height: 44px;
  }
  .clio-logo {
    height: 11px;
  }
  .clio-link {
    font-size: 12px;
  }

  /* Login */
  #login-header {
    font-size: 7px;
  }

  #password-input {
    width: 140px;
    font-size: 16px;
  }
}
