/* === Reset === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Custom Properties === */
:root {
  --bg: #0a0a0a;
  --text: #e0e0e0;
  --text-secondary: #666666;
  --accent: #ffffff;
  --font: 'Inter', sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 11px;
  --fs-base: 11px;
  --fs-lg: 1.5rem;
  --fs-xl: 2.5rem;
  --fs-2xl: 4rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --max-width: 1200px;
}

/* === Fonts === */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* === Base === */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.15em;
  word-spacing: 0.5em;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
}

main {
  flex: 1;
  width: 100%;
  padding: var(--space-lg) var(--space-md);
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.1;
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 0.5px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: #ffffff;
  opacity: 1;
  border-bottom-color: currentColor;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Film Grain === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px;
  opacity: 0.08;
}

/* === Hero Header / Navigation === */
#nav {
  position: relative;
  z-index: 100;
  background: linear-gradient(to right, var(--bg) 40%, rgba(10,10,10,0.85) 55%, rgba(10,10,10,0.5) 70%, rgba(10,10,10,0.2) 85%, transparent 100%);
}

.hero-header {
  padding: var(--space-sm) var(--space-md);
  position: relative;
}

/* === Hero Video === */
.hero-video-wrap {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

/* === Index Feature Image === */
.index-feature {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
}

.feature-img {
  max-width: 480px;
  width: 100%;
  border-radius: 2px;
  opacity: 0.9;
  filter: contrast(1.05);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.feature-img:hover {
  opacity: 1;
  filter: contrast(1.1) brightness(1.05);
}

.hero-name {
  display: block;
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: clamp(60px, 19.5vw, 220px);
  font-weight: 900;
  line-height: 0.85;
  overflow: hidden;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: transparent;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E") repeat 0 0 / 180px,
    #1a1a1a;
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-name:hover {
  background: #ffffff;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 1;
}

.hero-nav {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  padding-left: 3vw;
}

.hero-nav a,
.nav-overlay-links a {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.nav-dot {
  color: var(--text);
  opacity: 0.8;
  font-size: var(--fs-xs);
}

.hero-nav a:hover,
.nav-overlay-links a:hover {
  color: #ffffff;
  opacity: 1;
}

.hero-nav a.active,
.nav-overlay-links a.active {
  color: var(--accent);
}

/* === Hamburger Toggle === */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Mobile Overlay === */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.nav-overlay-links a {
  font-size: var(--fs-lg);
}

/* === Home === */
.home {
  min-height: 0;
}


/* === Card Grid === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.card {
  padding: var(--space-md);
  border-bottom: 1px solid #1a1a1a;
}

.card h3 {
  font-size: var(--fs-base);
  margin-bottom: var(--space-xs);
}

.card p {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-sm);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  word-spacing: normal;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tags span {
  font-size: var(--fs-xs);
  color: var(--accent);
  opacity: 0.7;
}

.tags span + span::before {
  content: '\00B7';
  margin-right: var(--space-xs);
  opacity: 0.8;
}

/* === Page Intro === */
.page-intro {
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  max-width: 600px;
}

/* === Gallery === */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.gallery-item {
  overflow: hidden;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

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

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--text);
  font-size: var(--fs-xl);
  cursor: pointer;
  padding: var(--space-sm);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close { top: var(--space-sm); right: var(--space-sm); }
.lightbox-prev { left: var(--space-sm); }
.lightbox-next { right: var(--space-sm); }

/* === Music === */
.music-list {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.music-item h3 {
  font-size: var(--fs-base);
  margin-bottom: var(--space-xs);
}

.music-item p {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-sm);
}

.music-item iframe {
  width: 400px;
  max-width: 100%;
  border: none;
}

.embed-placeholder {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  padding: var(--space-md);
  border: 1px dashed #333;
  text-align: center;
}

/* === Spotify Input === */
.spotify-input-wrap {
  margin-bottom: var(--space-md);
}

.spotify-url-input {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ccc;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 20px 16px;
  outline: none;
  transition: border-color 0.2s;
  text-transform: none;
}

.spotify-url-input:focus {
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.spotify-url-input::placeholder {
  color: #555;
  text-transform: uppercase;
}

#user-playlist {
  margin-bottom: var(--space-md);
  max-width: 400px;
}

#user-playlist iframe {
  border: none;
}

/* === Music Light Effects === */
/* Let the light effects show through the header on the music page */
.music-page #nav {
  background: none;
}

.music-circle {
  position: fixed;
  top: calc(50% + 70px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: none;
  background: none;
  pointer-events: none;
  z-index: 3;
}

#gl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
}

#fluid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#arc-controls {
  position: fixed;
  top: calc(50% + 70px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  height: 440px;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}

.arc-center-buttons {
  position: fixed;
  top: calc(50% + 70px);
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  z-index: 11;
}

.gl-auto-btn,
.gl-off-btn,
.gl-mic-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: #999;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  padding: 10px 24px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gl-auto-btn:hover,
.gl-off-btn:hover,
.gl-mic-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}

.gl-auto-btn:active,
.gl-off-btn:active,
.gl-mic-btn:active {
  transform: scale(0.95);
}

.gl-auto-btn.active {
  color: #fff;
  background: rgba(232, 160, 32, 0.15);
  border-color: rgba(232, 160, 32, 0.5);
  box-shadow: 0 0 20px rgba(232, 160, 32, 0.15);
}

.gl-mic-btn.active {
  color: #fff;
  background: rgba(220, 50, 50, 0.15);
  border-color: rgba(220, 50, 50, 0.5);
  box-shadow: 0 0 20px rgba(220, 50, 50, 0.15);
}


#bass-beams {
  display: none;
  pointer-events: none;
}

/* === Room Flash Images === */
.room-flash-img {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.08s ease-in;
  display: flex;
  align-items: center;
  justify-content: center;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(circle 220px at 50% 50%, transparent 100%, black 100%);
  mask-image: radial-gradient(circle 220px at 50% 50%, transparent 100%, black 100%);
}

.room-flash-img img {
  filter: grayscale(1) contrast(4) brightness(1.5);
  opacity: 1;
}


.room-flash-img.flash {
  opacity: 1;
  transition: opacity 0.05s ease-in;
}


/* === Text Pages === */
.text-page .text-content {
  max-width: 600px;
  margin-top: var(--space-md);
}

.text-page .text-content p {
  margin-bottom: var(--space-sm);
  line-height: 1.8;
}

.contact-links {
  list-style: none;
  margin-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* === Contact Form === */
.contact-form {
  margin-top: var(--space-md);
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.contact-form label {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  letter-spacing: 0.15em;
}

/* Both fields sit in the same flex column at width 100%, so they always
   share the form's width no matter how their intrinsic sizes differ. */
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  /* Same stack as h1/h2/h3 — those inherit --font from body. */
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 400;
  letter-spacing: 0.15em;
  word-spacing: 0.5em;
  line-height: 1.6;
  padding: 14px 16px;
  outline: none;
  text-transform: none;
  transition: border-color 0.2s;
}

/* Chrome paints its own pale background over autofilled inputs; the long
   inset shadow is the only way to keep the field transparent. */
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--accent);
}

/* Honeypot field — off-screen rather than display:none, which bots skip. */
.contact-form .field-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-submit {
  align-self: flex-start;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 28px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.contact-submit:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-submit:disabled {
  opacity: 0.4;
  cursor: default;
}

.form-status {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  min-height: 1.2em;
}

.form-status.success {
  color: var(--accent);
}

.form-status.error {
  color: #ff6b6b;
}

.contact-or {
  margin-top: var(--space-lg);
}

/* === Electric Border === */
/* Vanilla port of the React Bits component; see js/electric-border.js.
   The upstream CSS used oklch(from …) relative colors — swapped for the
   plain custom property and color-mix, which need no relative-color support. */
.electric-border {
  --electric-border-color: #ffffff;
  --electric-border-thickness: 1px;
  position: relative;
  border-radius: inherit;
  overflow: visible;
  isolation: isolate;
}

.eb-canvas-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

.eb-canvas {
  display: block;
  opacity: 0.45;
}

.eb-content {
  position: relative;
  border-radius: inherit;
  z-index: 1;
}

.eb-layers {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

.eb-glow-1,
.eb-glow-2,
.eb-background-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-sizing: border-box;
}

/* Toned well down from the upstream values — the site is monochrome and a
   full-strength glow swamped everything else on the page. */
.eb-glow-1 {
  border: var(--electric-border-thickness) solid
    color-mix(in oklab, var(--electric-border-color) 22%, transparent);
  filter: blur(1px);
}

.eb-glow-2 {
  border: var(--electric-border-thickness) solid
    color-mix(in oklab, var(--electric-border-color) 30%, transparent);
  filter: blur(3px);
}

.eb-background-glow {
  z-index: -1;
  transform: scale(1.06);
  filter: blur(24px);
  opacity: 0.08;
  background: linear-gradient(
    -30deg,
    var(--electric-border-color),
    transparent,
    var(--electric-border-color)
  );
}

/* The glow layers sit exactly where the field's own border was — keep one
   or the other, never both. */
.eb-content > input,
.eb-content > textarea {
  border-color: transparent;
}

.eb-content > input:focus,
.eb-content > textarea:focus {
  border-color: transparent;
}

/* The field's own focus ring is gone with its border, so the glow has to
   carry the focus indicator instead. */
.electric-border:focus-within .eb-glow-1 {
  border-color: color-mix(in oklab, var(--electric-border-color) 55%, transparent);
}

.electric-border:focus-within .eb-background-glow {
  opacity: 0.18;
}

@media (prefers-reduced-motion: reduce) {
  .eb-canvas {
    opacity: 0.3;
  }
}

.social-icons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.social-icons a {
  display: inline-flex;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.social-icons a:hover,
.social-icons a:focus-visible {
  color: var(--accent);
}

.social-icons svg {
  display: block;
}

/* === Pinterest Section === */
.pinterest-section {
  margin-top: var(--space-lg);
}

.pinterest-section h2 {
  margin-bottom: var(--space-md);
}

.pinterest-boards {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.pin-masonry {
  columns: 4;
  column-gap: 8px;
}

.pin-masonry img {
  width: 100%;
  display: block;
  margin-bottom: 8px;
  border-radius: 3px;
  transition: opacity 0.3s;
  cursor: pointer;
}

.pin-masonry img:hover {
  opacity: 0.8;
}

.pin-view-more {
  display: inline-block;
  margin-top: var(--space-md);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  border-bottom: 0.5px solid var(--text-secondary);
  transition: color 0.2s;
}

.pin-view-more:hover {
  color: var(--accent);
}


/* === Guide Pages === */
.guide-page {
  max-width: 1100px;
}

.guide-subtitle {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-top: var(--space-xs);
}

.guide-links {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.guide-links a {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  border-bottom: 0.5px solid var(--text-secondary);
}

.guide-links a:hover {
  color: var(--accent);
}

.guide-content {
  max-width: 100%;
  margin-top: var(--space-md);
}

.guide-section {
  margin-bottom: var(--space-xl);
}

.guide-section h2 {
  font-size: var(--fs-base);
  margin-bottom: var(--space-sm);
  padding-bottom: 4px;
  border-bottom: 0.5px solid var(--text-secondary);
}

.guide-section > p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.8;
}

/* Guide image layouts */
.guide-img-single {
  max-width: 500px;
}

.guide-img-full {
  width: 100%;
}

.guide-img-single img,
.guide-img-full img {
  width: 100%;
  display: block;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
}

.guide-img-row {
  display: flex;
  gap: 12px;
}

.guide-img-row .guide-fig {
  flex: 1;
  min-width: 0;
}

.guide-img-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.guide-img-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.guide-fig img {
  width: 100%;
  display: block;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
}

.guide-fig figcaption {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-top: 6px;
  text-align: center;
}

/* === GUI Mockup Components === */
.gui-steps {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
}

.gui-step {
  line-height: 2;
  color: var(--text);
}

.gui-step-num {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background: rgba(255,140,0,0.15);
  border-radius: 3px;
  font-size: var(--fs-xs);
  color: #ff8c00;
  margin-right: 6px;
  font-weight: 700;
}

.gui-hl {
  color: #f0c040;
}

.gui-window {
  background: #1e2a38;
  border: 1px solid #3a4a5a;
  border-radius: 6px;
  overflow: hidden;
  font-size: 12px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  word-spacing: 0;
  max-width: 800px;
}

.gui-titlebar {
  background: #1a2430;
  color: #8899aa;
  padding: 6px 12px;
  font-size: 11px;
  border-bottom: 1px solid #2a3a4a;
}

.gui-body {
  display: flex;
}

.gui-sidebar {
  display: flex;
  flex-direction: column;
  width: 160px;
  padding: 8px 0;
  border-right: 1px solid #2a3a4a;
  flex-shrink: 0;
}

.gui-sidebar span {
  padding: 5px 16px;
  color: #6699cc;
  cursor: default;
  font-size: 12px;
}

.gui-sidebar span.gui-active {
  background: #2a4a6a;
  color: #88ccff;
}

.gui-content {
  flex: 1;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gui-group {
  border: 1px solid #2a3a4a;
  border-radius: 0;
}

.gui-group-title {
  background: #2a5090;
  color: #ffffff;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.gui-group-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gui-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c0d0e0;
  font-size: 12px;
}

.gui-row.gui-indent {
  padding-left: 20px;
  color: #708090;
}

.gui-label {
  min-width: 180px;
  color: #c0d0e0;
}

.gui-value {
  color: #e0e8f0;
}

.gui-select {
  background: #2a3a4a;
  padding: 3px 8px;
  border: 1px solid #3a4a5a;
  border-radius: 2px;
  min-width: 200px;
}

.gui-input {
  background: #2a3a4a;
  padding: 3px 8px;
  border: 1px solid #3a4a5a;
  border-radius: 2px;
  min-width: 40px;
  display: inline-block;
  text-align: center;
}

.gui-check {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #4a5a6a;
  border-radius: 2px;
  background: #1a2430;
  vertical-align: middle;
  position: relative;
}

.gui-check.gui-checked::after {
  content: '\2713';
  position: absolute;
  top: -2px;
  left: 1px;
  font-size: 12px;
  color: #88ccff;
}

.gui-link {
  color: #5599cc;
  font-size: 11px;
}

.gui-btn {
  background: #2a3a4a;
  border: 1px solid #3a4a5a;
  border-radius: 3px;
  padding: 4px 20px;
  color: #c0d0e0;
  text-align: center;
  font-size: 12px;
}

.gui-btn-ok {
  background: #2a5090;
  border-color: #3a60a0;
  color: #ffffff;
}

.gui-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

/* GUI Menu Components */
.gui-window-sm {
  max-width: 360px;
}

.gui-menubar {
  display: flex;
  background: #2a3a4a;
  border-bottom: 1px solid #3a4a5a;
}

.gui-menu-item {
  padding: 5px 14px;
  color: #c0d0e0;
  font-size: 12px;
  cursor: default;
}

.gui-menubar .gui-active {
  background: #3a6090;
  color: #ffffff;
}

.gui-dropdown {
  padding: 4px 0;
  background: #1e2a38;
}

.gui-menu-row {
  padding: 4px 30px 4px 30px;
  color: #c0d0e0;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: default;
  position: relative;
}

.gui-menu-row.gui-menu-selected {
  background: #d4920a;
  color: #000;
}

.gui-menu-check {
  position: absolute;
  left: 10px;
  font-size: 13px;
}

.gui-shortcut {
  color: #708090;
  font-size: 11px;
  margin-left: 30px;
}

.gui-menu-selected .gui-shortcut {
  color: #333;
}

.gui-submenu {
  color: #708090;
  font-size: 14px;
  margin-left: 30px;
}

.gui-menu-sep {
  height: 1px;
  background: #2a3a4a;
  margin: 4px 8px;
}

/* GUI Table & extras */
.gui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #c0d0e0;
}

.gui-table th {
  text-align: left;
  padding: 4px 10px;
  border-bottom: 1px solid #3a4a5a;
  color: #8899aa;
  font-weight: 400;
}

.gui-table td {
  padding: 2px 10px;
}

.gui-table-header td {
  color: #88bbdd;
  padding-top: 8px;
  font-weight: 600;
}

.gui-indent-cell {
  padding-left: 30px !important;
  color: #8899aa;
}

.gui-no-gap {
  gap: 0;
}

.gui-info {
  color: #607080;
  font-size: 11px;
  text-align: center;
  padding: 10px;
  margin-top: 8px;
  border-top: 1px solid #2a3a4a;
}

.gui-btn-blue {
  background: #2a5090;
  border-color: #3a60a0;
  color: #ffffff;
}

.gui-indent-step {
  padding-left: 28px;
}

/* GUI Cantabile Main Window */
.gui-cantabile {
  background: #1a2a38;
  border: 1px solid #3a4a5a;
  border-radius: 6px;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  word-spacing: 0;
  font-size: 12px;
}

.gui-cantabile-title {
  background: #101820;
  color: #8899aa;
  padding: 6px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gui-cantabile-icon {
  color: #4488cc;
  font-size: 14px;
}

.gui-cantabile-winbtns {
  margin-left: auto;
  display: flex;
  gap: 16px;
  color: #6678;
}

.gui-cantabile-body {
  display: flex;
}

/* Port Activity panel */
.gui-port-activity {
  width: 200px;
  background: #0e1820;
  padding: 8px;
  border-right: 1px solid #2a3a4a;
  flex-shrink: 0;
}

.gui-port-activity-title {
  color: #8899aa;
  font-size: 11px;
  margin-bottom: 6px;
}

.gui-port-meter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 10px;
  color: #8899aa;
}

.gui-port-meter > span {
  min-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gui-meter {
  flex: 1;
  height: 8px;
  background: #0a1018;
  border-radius: 1px;
  overflow: hidden;
}

.gui-meter-fill {
  height: 100%;
  background: linear-gradient(to right, #1a6030, #30a050);
  border-radius: 1px;
}

.gui-meter-fill.gui-meter-hot {
  background: linear-gradient(to right, #802020, #cc3030);
}

/* Routing diagram */
.gui-routing {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gui-routing-header {
  background: #152030;
  padding: 4px 8px;
  border-bottom: 1px solid #2a3a4a;
}

.gui-routing-tab {
  background: #2050a0;
  color: #fff;
  padding: 3px 12px;
  border-radius: 3px 3px 0 0;
  font-size: 11px;
}

.gui-routing-canvas {
  background: #182838;
  flex: 1;
  padding: 20px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 300px;
}

.gui-routing-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gui-routing-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}

.gui-routing-col-title {
  color: #607080;
  font-size: 10px;
  margin-bottom: 4px;
}

.gui-port-block {
  padding: 5px 12px;
  font-size: 11px;
  border-radius: 3px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gui-port-in {
  background: #204060;
  color: #88ccee;
}

.gui-port-out {
  background: #204060;
  color: #88ccee;
}

.gui-dot-orange { color: #d08020; font-size: 8px; }
.gui-dot-green { color: #30a050; font-size: 8px; }

/* Plugin node */
.gui-plugin-node {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.gui-plugin-ports-in {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: #c0d0e0;
}

.gui-plugin-ports-in span,
.gui-plugin-ports-out span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gui-plugin-box {
  background: #c0c0c0;
  color: #222;
  padding: 8px 20px;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid #999;
}

.gui-plugin-icons {
  font-size: 10px;
  color: #555;
  margin-top: 2px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.gui-plugin-ports-out {
  font-size: 11px;
  color: #c0d0e0;
}

/* Context menu in routing */
.gui-context-menu {
  position: absolute;
  bottom: 30px;
  right: 30%;
  background: #1e2a38;
  border: 1px solid #3a4a5a;
  border-radius: 4px;
  padding: 4px 0;
  z-index: 10;
  min-width: 240px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

/* Load info & status bar */
.gui-load-info {
  background: #0e1820;
  padding: 8px 12px;
  border-top: 1px solid #2a3a4a;
}

.gui-load-title {
  color: #8899aa;
  font-size: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #1a2a3a;
  padding-bottom: 2px;
}

.gui-load-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #6688aa;
  padding: 1px 0;
}

.gui-status-bar {
  background: #0a1018;
  padding: 3px 12px;
  font-size: 10px;
  color: #556677;
  display: flex;
  gap: 20px;
  border-top: 1px solid #1a2a3a;
}

.gui-folder-list {
  background: #152030;
  border: 1px solid #2a3a4a;
  border-radius: 2px;
  padding: 4px 8px;
}

.gui-folder-row {
  padding: 3px 4px;
  color: #c0d0e0;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gui-btn-group {
  display: flex;
  gap: 4px;
}

/* === CV Page === */
.cv-page {
  max-width: 794px;
  margin: 0 auto;
  font-family: 'JetBrains Mono', monospace;
}

.cv-page .cv-subtitle {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-top: var(--space-xs);
  letter-spacing: 0.3em;
}

.cv-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* === CV RTE === */
.cv-rte-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 2px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 6px 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.cv-rte-bar.hidden {
  transform: translateX(-50%) translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.cv-rte-bar button {
  background: none;
  border: 1px solid transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.15s, border-color 0.15s;
}

.cv-rte-bar button:hover {
  background: #2a2a2a;
  border-color: #444;
}

.cv-rte-bar button.active {
  background: #333;
  border-color: #555;
  color: #fff;
}

.cv-rte-bar select {
  background: #1a1a1a;
  border: 1px solid #333;
  color: var(--text);
  font-family: var(--font);
  font-size: 11px;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cv-rte-bar select:hover {
  background: #2a2a2a;
  border-color: #444;
}

.cv-rte-bar .rte-sep {
  width: 1px;
  height: 18px;
  background: #333;
  margin: 0 6px;
}

.cv-rte-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  background: #1a1a1a;
  border: 1px solid #333;
  color: var(--text);
  font-family: var(--font);
  font-size: 11px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: background 0.15s, border-color 0.15s;
}

.cv-rte-toggle:hover {
  background: #2a2a2a;
  border-color: #555;
}

.cv-rte-toggle.editing {
  border-color: #e74c3c;
  color: #e74c3c;
}

[contenteditable="true"] {
  outline: 1px dashed rgba(255,255,255,0.15);
  outline-offset: 4px;
  border-radius: 2px;
  min-height: 1em;
}

[contenteditable="true"]:focus {
  outline-color: rgba(255,255,255,0.35);
}

.cv-section {
  margin-bottom: var(--space-md);
}

.cv-section h3 {
  font-size: var(--fs-sm);
  color: var(--accent);
  margin-bottom: var(--space-sm);
  padding-bottom: 4px;
  border-bottom: 0.5px solid var(--text-secondary);
}

.cv-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.8;
}

.cv-list a {
  color: var(--text);
  border-bottom: 0.5px solid var(--text-secondary);
}

.cv-edu {
  margin-bottom: var(--space-sm);
}

.cv-edu-title {
  color: var(--text);
}

.cv-edu-place {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
}

.cv-main p {
  line-height: 1.8;
  margin-bottom: var(--space-sm);
}

.cv-job {
  margin-bottom: var(--space-md);
}

.cv-job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.cv-job-header h4 {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--accent);
}

.cv-date {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  white-space: nowrap;
  margin-left: var(--space-sm);
}

.cv-initiative {
  font-style: italic;
  color: var(--text-secondary);
}

.cv-bullets {
  list-style: none;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.8;
}

.cv-bullets li::before {
  content: none;
}

/* === Gradual Blur === */
.gradual-blur {
  pointer-events: none;
  isolation: isolate;
}

.gradual-blur-parent {
  overflow: hidden;
}

.gradual-blur-inner {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Fallback where backdrop-filter is unsupported: a plain fade instead. */
@supports not (backdrop-filter: blur(1px)) {
  .gradual-blur-inner > div {
    background: linear-gradient(to bottom, transparent, rgba(10, 10, 10, 0.6));
    opacity: 0.5;
  }
}

/* === Responsive === */
@media (max-width: 768px) {
  h1 { font-size: var(--fs-xl); }
  h2 { font-size: var(--fs-lg); }
  main { padding: var(--space-md) var(--space-sm); }
  .hero-nav { gap: var(--space-md); flex-wrap: wrap; }
  .hero-nav { display: none; }
  .nav-toggle { display: flex; }
  .cv-layout { grid-template-columns: 1fr; gap: var(--space-md); }
  .cv-job-header { flex-direction: column; gap: 2px; }
  .pin-masonry { columns: 2; }
  .guide-img-row { flex-direction: column; }
  .guide-img-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-img-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
