/* DV8FTC site styles — shared chrome (base, navbar, footer, buttons, error pages). */

/* Fonts */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.2bf3d951bf9d.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono[wght].bfbce7ca8008.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* Light Mode — clean terminal, high contrast */
:root {
  --background: #fafafa;
  --foreground: #171717;
  --card: #f5f5f5;
  --card-foreground: #171717;
  --popover: #f5f5f5;
  --popover-foreground: #171717;
  --primary: #03A062;
  --primary-foreground: #ffffff;
  --secondary: #f0f0f0;
  --secondary-foreground: #171717;
  --muted: #f0f0f0;
  --muted-foreground: #737373;
  --accent: #e8f5ef;
  --accent-foreground: #028a53;
  --destructive: #dc2626;
  --border: #e5e5e5;
  --input: #e5e5e5;
  --ring: #03A062;
  --terminal-glow: rgba(3, 160, 98, 0.15);
  --chart-1: #03A062;
  --chart-2: #04c477;
  --chart-3: #028a53;
  --chart-4: #06d6a0;
  --chart-5: #015c3b;
  --radius: 0.5rem;
  --grid-line: rgba(0, 0, 0, 0.04);
}

/* Dark Mode — full terminal feel */
.dark {
  --background: #0a0a0a;
  --foreground: #e5e5e5;
  --card: #141414;
  --card-foreground: #e5e5e5;
  --popover: #141414;
  --popover-foreground: #e5e5e5;
  --primary: #03A062;
  --primary-foreground: #0a0a0a;
  --secondary: #1a1a1a;
  --secondary-foreground: #e5e5e5;
  --muted: #1a1a1a;
  --muted-foreground: #737373;
  --accent: #1a2e23;
  --accent-foreground: #04c477;
  --destructive: #dc2626;
  --border: #262626;
  --input: #262626;
  --ring: #03A062;
  --terminal-glow: rgba(3, 160, 98, 0.4);
  --chart-1: #03A062;
  --chart-2: #04c477;
  --chart-3: #028a53;
  --chart-4: #06d6a0;
  --chart-5: #015c3b;
  --grid-line: rgba(255, 255, 255, 0.035);
}

@media (prefers-color-scheme: dark) {
  html:not(.light):not(.dark) {
    --background: #0a0a0a;
    --foreground: #e5e5e5;
    --card: #141414;
    --card-foreground: #e5e5e5;
    --popover: #141414;
    --popover-foreground: #e5e5e5;
    --primary: #03A062;
    --primary-foreground: #0a0a0a;
    --secondary: #1a1a1a;
    --secondary-foreground: #e5e5e5;
    --muted: #1a1a1a;
    --muted-foreground: #737373;
    --accent: #1a2e23;
    --accent-foreground: #04c477;
    --destructive: #dc2626;
    --border: #262626;
    --input: #262626;
    --ring: #03A062;
    --terminal-glow: rgba(3, 160, 98, 0.4);
    --chart-1: #03A062;
    --chart-2: #04c477;
    --chart-3: #028a53;
    --chart-4: #06d6a0;
    --chart-5: #015c3b;
    --grid-line: rgba(255, 255, 255, 0.035);
  }
}

/* Base reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  border-color: var(--border);
}
body {
  background-color: var(--background);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 96px 96px;
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; padding: 0; cursor: pointer; }
img { max-width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
section[id] { scroll-margin-top: 5rem; }

.container {
  max-width: 64rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px) {
  .container { padding-inline: 1.5rem; }
}

/* Section header */
.section {
  padding-block: 5rem;
}
.section-header { margin-bottom: 2.5rem; }
.section-eyebrow {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--primary);
}
@media (min-width: 640px) {
  .section-title { font-size: 1.875rem; line-height: 2.25rem; }
}
.section-rule {
  position: relative;
  margin-top: 1rem;
  border-bottom: 1px solid var(--border);
}
.section-tick {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  width: 3.5rem;
  background-color: var(--primary);
}
.status-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* Utilities */
.mono { font-family: var(--font-mono); }
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted-foreground); }
.text-destructive { color: var(--destructive); }
.text-glow { text-shadow: 0 0 10px var(--terminal-glow), 0 0 20px var(--terminal-glow); }
.glow-border { box-shadow: 0 0 5px var(--terminal-glow), inset 0 0 5px var(--terminal-glow); }
.terminal-prompt::before {
  content: "> ";
  color: var(--primary);
  font-family: var(--font-mono);
}
.scanlines { position: relative; }
.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 50;
}
.cursor-blink { animation: blink 1s step-end infinite; }

/* Icon sizing (h-N → rem) */
.icon-3 { width: 0.75rem; height: 0.75rem; }
.icon-4 { width: 1rem; height: 1rem; }
.icon-5 { width: 1.25rem; height: 1.25rem; }
.icon-16 { width: 4rem; height: 4rem; }

/* Keyframes */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Site layout */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background-color: color-mix(in srgb, var(--background) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.navbar-inner {
  margin-inline: auto;
  display: flex;
  height: 4rem;
  max-width: 64rem;
  align-items: center;
  justify-content: space-between;
  padding-inline: 1rem;
}
@media (min-width: 640px) {
  .navbar-inner { padding-inline: 1.5rem; }
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  transition: color 0.15s;
}
.navbar-brand:hover { text-shadow: 0 0 10px var(--terminal-glow), 0 0 20px var(--terminal-glow); }

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 768px) {
  .nav-desktop { display: flex; }
}
.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) * 0.8);
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--foreground); }
.nav-ext {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-ext:hover {
  color: var(--primary);
  background-color: color-mix(in srgb, var(--primary) 5%, transparent);
}
.nav-divider {
  margin-inline: 0.25rem;
  height: 1rem;
  width: 1px;
  background-color: var(--border);
}
.nav-actions {
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Mobile nav (<details>-driven) */
.nav-mobile-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .nav-mobile-controls { display: none; }
}
.nav-mobile { position: static; }
.nav-mobile summary {
  list-style: none;
  padding: 0.5rem;
  color: var(--muted-foreground);
  transition: color 0.15s;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary:hover { color: var(--primary); }
.nav-mobile .nav-close-icon { display: none; }
.nav-mobile[open] .nav-menu-icon { display: none; }
.nav-mobile[open] .nav-close-icon { display: block; }
.nav-drawer {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-color: color-mix(in srgb, var(--background) 95%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-drawer .nav-link { padding-block: 0.625rem; }
.nav-drawer-ext {
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Theme toggle */
.theme-toggle-form { display: inline-flex; }
.theme-toggle {
  height: 2.25rem;
  width: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) * 0.8);
  color: var(--muted-foreground);
  transition: color 0.15s, background-color 0.15s;
}
.theme-toggle:hover {
  color: var(--primary);
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background-color: var(--background);
}
.footer-inner {
  margin-inline: auto;
  max-width: 64rem;
  padding: 2rem 1rem;
}
@media (min-width: 640px) {
  .footer-inner { padding-inline: 1.5rem; }
}
.footer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 640px) {
  .footer-row { flex-direction: row; }
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}
.social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.social-link {
  padding: 0.5rem;
  color: var(--muted-foreground);
  border-radius: calc(var(--radius) * 0.8);
  transition: color 0.15s, background-color 0.15s;
  display: inline-flex;
  align-items: center;
}
.social-link:hover {
  color: var(--primary);
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
}
.footer-copy {
  margin-top: 1rem;
  text-align: left;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--muted-foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: calc(var(--radius) * 0.8);
  font-weight: 500;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.btn-primary {
  height: 2.5rem;
  padding-inline: 1.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover { background-color: color-mix(in srgb, var(--primary) 90%, transparent); }
.btn-outline {
  height: 2.5rem;
  padding-inline: 1.5rem;
  border: 1px solid var(--input);
  background-color: var(--background);
  color: var(--foreground);
}
.btn-outline:hover { background-color: var(--accent); color: var(--accent-foreground); }

/* Error pages (404 / 500) */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.error-page-inner {
  margin-inline: auto;
  max-width: 42rem;
  padding-inline: 1rem;
  text-align: center;
}
@media (min-width: 640px) {
  .error-page-inner { padding-inline: 1.5rem; }
}
.error-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  padding: 2rem;
}
@media (min-width: 640px) {
  .error-card { padding: 3rem; }
}
.error-log-label {
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}
.error-icon { margin-inline: auto; margin-bottom: 1.5rem; }
.error-code {
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
@media (min-width: 640px) {
  .error-code { font-size: 3rem; line-height: 1; }
}
.error-title {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}
@media (min-width: 640px) {
  .error-title { font-size: 1.5rem; line-height: 2rem; }
}
.error-text {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  line-height: 1.625;
}
.error-cmd { font-size: 0.875rem; line-height: 1.25rem; }
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.error-exit {
  margin-top: 2rem;
  font-size: 0.75rem;
  line-height: 1rem;
  color: color-mix(in srgb, var(--muted-foreground) 50%, transparent);
}
.text-primary-dim { color: color-mix(in srgb, var(--primary) 50%, transparent); }
