@charset "UTF-8";

:root {
  /* Colors */
  --color-bg-deep: #080C08;
  --color-surface-mid: #141F14;
  --color-accent-neon: #55EF7C;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #A0A0A0;
  --color-border-subtle: #2A3A2A;
  --color-overlay-dark: #000000CC;
  --color-glow-neon: #55EF7C;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --line-height-h1: 1.14;
  --line-height-h2: 1.2;
  --line-height-h3: 1.29;
  --line-height-h4: 1.4;
  --line-height-body: 1.5;
  --line-height-small: 1.43;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-s: 0.5rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Corner radii */
  --radius-card: 4px;
  --radius-btn: 2px;
  --radius-input: 2px;
  --radius-modal: 0px;

  /* Shadows */
  --shadow-glow: 0 0 8px 2px var(--color-glow-neon);
  --shadow-glow-focus: 0 0 0 2px var(--color-accent-neon);

  /* Layout */
  --container-max: 75rem;
  --container-padding: 1.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--color-bg-deep);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ---------- Document typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-primary);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, calc(2rem + 1.5 * ((100vw - 320px) / 1120)), 3.5rem);
  line-height: var(--line-height-h1);
  margin-block-end: var(--space-xl);
}

h2 {
  font-size: clamp(1.5rem, calc(1.5rem + 1 * ((100vw - 320px) / 1120)), 2.5rem);
  line-height: var(--line-height-h2);
  margin-block-end: var(--space-l);
}

h3 {
  font-size: clamp(1.25rem, calc(1.25rem + 0.5 * ((100vw - 320px) / 1120)), 1.75rem);
  line-height: var(--line-height-h3);
  margin-block-end: var(--space-l);
}

h4 {
  font-size: clamp(1rem, calc(1rem + 0.25 * ((100vw - 320px) / 1120)), 1.25rem);
  line-height: var(--line-height-h4);
  margin-block-end: var(--space-m);
}

p {
  margin-block-end: var(--space-m);
  line-height: var(--line-height-body);
  /* no width/max-width/centering applies here */
}

small,
.small {
  font-size: 0.875rem;
  line-height: var(--line-height-small);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-accent-neon);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  text-shadow: 0 0 8px var(--color-glow-neon);
}

blockquote {
  margin-block-end: var(--space-m);
  padding-inline-start: var(--space-m);
  border-inline-start: 2px solid var(--color-accent-neon);
  color: var(--color-text-secondary);
  font-style: italic;
}

ul, ol {
  margin-block-end: var(--space-m);
  padding-inline-start: 1.25rem;
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin: 0;
}

/* ---------- Last-child spacing clear ---------- */
h1:last-child,
h2:last-child,
h3:last-child,
h4:last-child,
p:last-child,
ul:last-child,
ol:last-child,
blockquote:last-child {
  margin-block-end: 0;
}

/* ---------- Forms ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-input);
  color: var(--color-text-primary);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--line-height-body);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-accent-neon);
  box-shadow: var(--shadow-glow-focus);
}

textarea {
  resize: vertical;
  min-height: 6rem;
}

::placeholder {
  color: var(--color-text-secondary);
  opacity: 1;
}

select {
  appearance: auto;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent-neon);
  color: var(--color-bg-deep);
  border: none;
  border-radius: var(--radius-btn);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: none;
  min-height: 44px;
  min-width: 44px;
}

button:hover {
  box-shadow: var(--shadow-glow);
}

button:active {
  transform: scale(0.98);
}

button:focus-visible {
  outline: 2px solid var(--color-accent-neon);
  outline-offset: 2px;
}

/* ---------- Focus defaults ---------- */
:focus-visible {
  outline: 2px solid var(--color-accent-neon);
  outline-offset: 2px;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

@media (min-width: 768px) {
  :root {
    --container-padding: 2rem;
  }
}

/* ---------- Reusable primitives ---------- */

/* Flex utilities */
.flex {
  display: flex;
  gap: var(--flex-gap, var(--space-m));
}

.flex > * {
  min-width: 0;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* Stack - vertical rhythm with gap */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-space, var(--space-m));
}

.stack > * {
  margin: 0;
}

/* Terminal label */
.terminal {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent-neon);
}

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}