/* ============================================================
   Brightening — brightening.ca
   16-bit retro direction. Static. No JavaScript. No external deps.
   ============================================================ */

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

/* ── Design tokens ── */
:root {
  /* Backgrounds */
  --bg:          #0a0a14;
  --surface:     #10102a;
  --surface-hi:  #181838;

  /* Borders */
  --border:      #252550;
  --border-hi:   #3c3c90;

  /* Text */
  --fg:          #e8e0c8;
  --fg-muted:    #7878a0;
  --fg-dim:      #4a4a70;

  /* Accent: gold */
  --accent:      #f5c518;
  --accent-dim:  rgba(245, 197, 24, 0.10);
  --accent-dark: #b8920f;

  /* Secondary: cyan */
  --cyan:        #22d0f0;
  --cyan-dim:    rgba(34, 208, 240, 0.08);
  --cyan-dark:   #0f8fa8;

  /* Status colours */
  --green:       #38e07a;
  --green-dim:   rgba(56, 224, 122, 0.10);
  --amber:       #f5c518;
  --amber-dim:   rgba(245, 197, 24, 0.10);
  --slate:       #6888c8;
  --slate-dim:   rgba(104, 136, 200, 0.10);

  /* Links */
  --link:        #22d0f0;
  --link-hover:  #88eeff;

  /* Typography */
  --font-sans:   system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono:   ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;

  --max-w:       1040px;
}

/* ── Base ── */
html {
  font-size: 17px;
  line-height: 1.65;
  scroll-behavior: smooth;
}

/* Dot-grid background — pure CSS, no image */
body {
  background-color: var(--bg);
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #000;
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  z-index: 100;
}
.skip-link:focus {
  top: 0;
}

/* ── Links ── */
a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--link-hover);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Layout wrapper ── */
main,
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Section labels — retro left-bar style ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
  margin-bottom: 1.75rem;
  line-height: 1.2;
}

/* ══════════════════════════════════
   Hero
══════════════════════════════════ */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  border-bottom: 2px solid var(--border);
}

/* Top gradient stripe — like a console header bar */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--cyan) 60%,
    transparent 100%
  );
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Site wordmark — reads like a system label */
.site-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--fg);
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

/* Blinking cursor — CSS-only retro touch */
.cursor {
  display: inline-block;
  color: var(--accent);
  font-weight: 400;
  margin-left: 3px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  max-width: 52ch;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

/* ── Buttons — 16-bit menu style ── */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  border: 2px solid;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}
.btn:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent-dark);
}
.btn-primary:hover {
  background: #ffd84a;
  color: #000;
}

.btn-secondary {
  background: transparent;
  color: var(--cyan);
  border-color: var(--cyan);
}
.btn-secondary:hover {
  background: var(--cyan-dim);
  color: var(--link-hover);
  border-color: var(--link-hover);
}

/* ══════════════════════════════════
   Principles
══════════════════════════════════ */
.principles {
  padding: 3.5rem 0;
  border-bottom: 2px solid var(--border);
}

.principles-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 52ch;
}

.principles-list li {
  font-size: 0.95rem;
  color: var(--fg-muted);
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.5;
}

/* Retro cursor marker */
.principles-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ══════════════════════════════════
   Projects
══════════════════════════════════ */
.projects {
  padding: 3.5rem 0;
  border-bottom: 2px solid var(--border);
}

.project-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  counter-reset: card-counter;
}

/* Pixel-border card — 16-bit window style */
.project-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.05),
    4px 4px 0 rgba(0, 0, 0, 0.45);
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
  counter-increment: card-counter;
}

.project-card:hover {
  background: var(--surface-hi);
  border-color: var(--accent);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.06),
    4px 4px 0 rgba(0, 0, 0, 0.45),
    0 0 16px rgba(245, 197, 24, 0.08);
}

.card-body {
  margin-bottom: 1.25rem;
}

/* CSS counter slot label — no JS, no HTML counter needed */
.card-body::before {
  content: "SLOT " counter(card-counter, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--fg-dim);
  margin-bottom: 0.65rem;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
}

/* HUD-style status badge */
.card-status {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border: 1px solid;
  border-radius: 0;
  white-space: nowrap;
  margin-top: 0.15rem;
}

.status-live {
  color: var(--green);
  border-color: rgba(56, 224, 122, 0.35);
  background: var(--green-dim);
}

.status-wip {
  color: var(--amber);
  border-color: rgba(245, 197, 24, 0.35);
  background: var(--amber-dim);
}

.status-exp {
  color: var(--slate);
  border-color: rgba(104, 136, 200, 0.35);
  background: var(--slate-dim);
}

.card-desc {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

.card-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Retro mini-button links */
.card-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.28rem 0.65rem;
  border: 1px solid;
  border-radius: 0;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-link-live {
  color: var(--accent);
  border-color: rgba(245, 197, 24, 0.35);
  background: var(--accent-dim);
}
.card-link-live:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.card-link-chrome {
  color: var(--cyan);
  border-color: rgba(34, 208, 240, 0.35);
  background: var(--cyan-dim);
}
.card-link-chrome:hover {
  background: var(--cyan);
  color: #000;
  border-color: var(--cyan);
}

.card-link-gh {
  color: var(--fg-muted);
  border-color: var(--border);
  background: transparent;
}
.card-link-gh:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}

/* ══════════════════════════════════
   Exploring
══════════════════════════════════ */
.exploring {
  padding: 3.5rem 0;
  border-bottom: 2px solid var(--border);
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Bracketed tags — retro inventory item style */
.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  line-height: 1.4;
}

.tag::before {
  content: "[";
  color: var(--accent);
  margin-right: 0.1em;
}

.tag::after {
  content: "]";
  color: var(--accent);
  margin-left: 0.1em;
}

/* ══════════════════════════════════
   Footer
══════════════════════════════════ */
footer {
  padding: 2rem 0 2.5rem;
  border-top: 2px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.footer-links a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ══════════════════════════════════
   Responsive
══════════════════════════════════ */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .project-card,
  .card-link {
    transition: none;
  }
  .btn:hover {
    transform: none;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
  }
  .cursor {
    animation: none;
  }
}
