
:root {
  --bg: #050505;
  --surface: #0b0b0b;
  --text: #f5f5f5;
  --muted: #777777;
  --accent: #ffffff;
  --line: rgba(255, 255, 255, 0.18);
  --grid: rgba(255, 255, 255, 0.035);

  --menu-width: 340px;
  --header-height: 64px;
}

/* RESET */

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

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  overflow: hidden;

  background: var(--bg);
  color: var(--text);

  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
}

a {
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 5px;
}

/* P5.JS CANVAS */

canvas {
  position: fixed;
  inset: 0;
  z-index: 0;

  display: block;
  width: 100%;
  height: 100%;

  pointer-events: auto;
}

/* HEADER */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;

  height: var(--header-height);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 0 28px;

  background: rgba(5, 5, 5, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-label,
.header-status {
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-status {
  color: var(--muted);
  text-align: right;
}

/* HAMBURGER */

.hamburger {
  width: 42px;
  height: 42px;
  flex-shrink: 0;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;

  padding: 8px;
  border: 1px solid transparent;

  transition: border-color 160ms ease;
}

.hamburger:hover {
  border-color: var(--line);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;

  background: var(--text);

  transition:
    width 180ms ease,
    transform 180ms ease;
}

.hamburger span:nth-child(2) {
  width: 15px;
}

.hamburger:hover span:nth-child(2) {
  width: 24px;
}

/* HAMBURGER TO X */

.menu-open .hamburger span:first-child {
  transform: translateY(4.5px) rotate(45deg);
}

.menu-open .hamburger span:nth-child(2) {
  width: 24px;
  transform: translateY(-4.5px) rotate(-45deg);
}

/* MAIN CONTENT */

#content-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;

  padding:
    calc(var(--header-height) + 30px)
    clamp(24px, 7vw, 100px)
    72px;

  color: var(--text);
  text-align: left;

  pointer-events: none;
  user-select: none;

  background: linear-gradient(
    90deg,
    rgba(5, 5, 5, 0.86) 0%,
    rgba(5, 5, 5, 0.52) 48%,
    rgba(5, 5, 5, 0.08) 100%
  );

  isolation: isolate;
}

/* TECHNICAL GRID */

#content-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);

  background-size: 64px 64px;
  pointer-events: none;
}

/* EYEBROW */

.eyebrow {
  margin-bottom: 24px;

  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* HEADLINE */

#content-overlay h1 {
  max-width: 1100px;
  margin-bottom: 30px;

  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(3.2rem, 9vw, 9rem);
  font-weight: 900;
  line-height: 0.84;
  letter-spacing: -0.075em;
  text-transform: uppercase;

  overflow-wrap: anywhere;
  text-wrap: balance;
}

#content-overlay h1 span {
  color: var(--muted);
}

/* CONTACT LINE */

#content-overlay p {
  display: flex;
  align-items: center;
  gap: 12px;

  max-width: 480px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);

  color: #a3a3a3;
  font-family: "Courier New", monospace;
  font-size: clamp(0.68rem, 0.9vw, 0.8rem);
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-indicator {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: var(--accent);
}

/* MENU BACKDROP */

#menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;

  background: rgba(0, 0, 0, 0.72);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.menu-open #menu-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* LEFT-SIDE NAVIGATION */

#side-menu {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;

  width: min(var(--menu-width), 88vw);
  height: 100vh;
  height: 100dvh;

  display: flex;
  flex-direction: column;

  padding: calc(var(--header-height) + 28px) 28px 28px;

  background: var(--surface);
  border-right: 1px solid var(--text);

  transform: translateX(-100%);
  visibility: hidden;

  transition:
    transform 240ms ease,
    visibility 240ms ease;
}

.menu-open #side-menu {
  transform: translateX(0);
  visibility: visible;
}

/* MENU HEADER */

.menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);

  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

#menu-close {
  width: 34px;
  height: 34px;

  color: var(--muted);
  font-size: 25px;
  line-height: 1;

  transition: color 160ms ease;
}

#menu-close:hover {
  color: var(--text);
}

/* MENU DESCRIPTION */

.menu-description {
  margin-top: 24px;

  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: 0.1em;
}

.menu-description span {
  color: var(--muted);
  font-size: 9px;
}

/* MENU LINKS */

.menu-links {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
}

.menu-links a {
  display: flex;
  align-items: center;
  gap: 16px;

  padding: 20px 0;
  border-bottom: 1px solid var(--line);

  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  transition:
    color 160ms ease,
    padding-left 160ms ease;
}

.menu-links a span {
  color: var(--text);
  font-size: 10px;
}

.menu-links a:hover,
.menu-links a[aria-current="page"] {
  padding-left: 8px;
  color: var(--text);
}

/* MENU FOOTER */

.menu-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);

  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
  line-height: 2;
  letter-spacing: 0.06em;
}

/* BOTTOM STATUS BAR */

.statusbar {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;

  min-height: 38px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 10px 28px;

  border-top: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.85);

  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;

  pointer-events: none;
}

/* SELECTION */

::selection {
  color: var(--bg);
  background: var(--text);
}

/* SQUARE SCROLLBAR */

::-webkit-scrollbar {
  width: 5px;
}

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

::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 0;
}

/* MOBILE */

@media (max-width: 600px) {
  :root {
    --header-height: 60px;
    --menu-width: 340px;
  }

  .topbar {
    padding: 0 16px;
  }

  .header-label,
  .header-status {
    font-size: 9px;
  }

  #content-overlay {
    padding: 76px 24px 56px;

    background: linear-gradient(
      90deg,
      rgba(5, 5, 5, 0.9),
      rgba(5, 5, 5, 0.58)
    );
  }

  #content-overlay::before {
    background-size: 36px 36px;
  }

  #content-overlay h1 {
    margin-bottom: 22px;
    font-size: clamp(2.8rem, 13vw, 5.2rem);
    line-height: 0.86;
    letter-spacing: -0.065em;
  }

  #content-overlay p {
    max-width: 100%;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    overflow-wrap: anywhere;
  }

  #side-menu {
    padding-right: 22px;
    padding-left: 22px;
  }

  .statusbar {
    padding: 10px 16px;
    font-size: 8px;
  }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* GREEN HIGHLIGHT EFFECT */

/* Green accent for the active hamburger */
.hamburger:hover,
.hamburger:focus-visible {
  border-color: var(--success, #c7ffc2);
}

.hamburger:hover span,
.hamburger:focus-visible span {
  background: var(--success, #c7ffc2);
}

/* Green hamburger-to-X animation when menu is open */
.menu-open .hamburger span:first-child,
.menu-open .hamburger span:nth-child(2) {
  background: var(--success, #c7ffc2);
}

/* Green highlight for the close button */
#menu-close:hover,
#menu-close:focus-visible {
  color: var(--success, #c7ffc2);
}

/* Green navigation link hover and active states */
.menu-links a:hover,
.menu-links a:focus-visible,
.menu-links a[aria-current="page"] {
  color: var(--success, #c7ffc2);
}

.menu-links a:hover span,
.menu-links a:focus-visible span,
.menu-links a[aria-current="page"] span {
  color: var(--success, #c7ffc2);
}

/* Green accent line for the active navigation link */
.menu-links a[aria-current="page"] {
  border-left: 2px solid var(--success, #c7ffc2);
  padding-left: 8px;
}

/* Green status indicator */
.status-indicator {
  background: var(--success, #c7ffc2);
  box-shadow: 0 0 8px rgba(199, 255, 194, 0.45);
}

/* Green text-selection highlight */
::selection {
  color: var(--bg);
  background: var(--success, #c7ffc2);
}
