/* ============================================================
   aidanwilliams.xyz — "homelab status board"
   Palette
   --bg      #0C1220  deep blue-slate
   --panel   #121A2B  raised surface
   --line    #223049  hairline / grid
   --ink     #E8EEF7  primary text
   --muted   #8CA0B8  secondary text
   --amber   #F0B441  accent (rack LED amber)
   --green   #46D97E  status: online / complete
   Type: Chakra Petch (display) / IBM Plex Sans (body) / IBM Plex Mono (labels)
   ============================================================ */

:root {
  --bg: #0C1220;
  --panel: #121A2B;
  --panel-2: #16203400;
  --line: #223049;
  --ink: #E8EEF7;
  --muted: #8CA0B8;
  --amber: #F0B441;
  --green: #46D97E;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Chakra Petch", var(--sans);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

.mono { font-family: var(--mono); }

/* Faint engineering grid over the whole page */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(140, 160, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 160, 184, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- Top bar ---------- */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 24px 0;
}

.brand {
  font-family: var(--mono);
  font-size: 0.95rem;
  text-decoration: none;
}

.brand .prompt { color: var(--green); }
.brand .brand-path { color: var(--muted); }

.topnav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.topnav a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--amber);
  border-color: var(--line);
}

/* ---------- Layout ---------- */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

/* ---------- Hero ---------- */
.hero { padding: 84px 0 56px; }

.hero-kicker {
  color: var(--amber);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.hero-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.hero-name .accent { color: var(--amber); }

.hero-role {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 1rem;
  margin: 14px 0 18px;
}

.hero-copy {
  max-width: 640px;
  color: var(--muted);
  margin-bottom: 40px;
}

/* Status board — the signature element */
.status-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.status-row {
  display: grid;
  grid-template-columns: 22px minmax(140px, 220px) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.status-row:last-child { border-bottom: none; }

.status-name { font-family: var(--mono); font-weight: 500; }
.status-detail { color: var(--muted); font-size: 0.85rem; }

.status-state {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.ok   { color: var(--green); }
.warn { color: var(--amber); }
.dim  { color: var(--muted); }

/* LEDs */
.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  justify-self: center;
  flex: 0 0 auto;
}

.led-green {
  background: var(--green);
  box-shadow: 0 0 8px rgba(70, 217, 126, 0.7);
  animation: blink 2.6s ease-in-out infinite;
}

.led-amber {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(240, 180, 65, 0.7);
  animation: blink 1.6s ease-in-out infinite;
}

.led-dim {
  background: var(--line);
}

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

/* ---------- Sections ---------- */
.section { padding: 56px 0 8px; }

.section-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  margin-bottom: 28px;
}

.section-title .path {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--amber);
  background: rgba(240, 180, 65, 0.08);
  border: 1px solid rgba(240, 180, 65, 0.25);
  border-radius: 4px;
  padding: 3px 10px;
}

/* ---------- Grids and panels ---------- */
.grid {
  display: grid;
  gap: 16px;
}

.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

/* Hero spec strip (quick stats) */
.hero-interests { margin-top: -28px; }

.spec-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.spec {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 18px;
  min-width: 140px;
}

.spec dt {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.spec dd {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.panel:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.panel-tag {
  color: var(--amber);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.panel h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.panel h3 a {
  color: var(--ink);
  text-decoration: none;
}

.panel h3 a:hover { color: var(--amber); }

.panel p { color: var(--muted); font-size: 0.92rem; }

.tags {
  margin-top: 14px;
  color: var(--amber);
  font-size: 0.78rem;
}

/* ---------- Certifications ---------- */
.cert-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.cert-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease;
}

.cert-row:last-child { border-bottom: none; }

a.cert-row:hover { background: rgba(240, 180, 65, 0.05); }

.cert-name { font-weight: 500; }

.cert-state {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

/* ---------- Links ---------- */
.linkbtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.linkbtn:hover {
  border-color: var(--amber);
  transform: translateX(3px);
}

.linkbtn .arrow {
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.linkbtn:hover .arrow {
  transform: translateX(4px);
  color: var(--amber);
}

.badge-frame {
  padding: 0;
  overflow: hidden;
  min-height: 100px;
}

.badge-frame:hover { transform: none; border-color: var(--line); }

.badge-frame iframe {
  border: none;
  width: 100%;
  height: 100px;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 24px 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

.footer p:first-child { font-size: 0.85rem; margin-bottom: 12px; }

.made-in {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.made-sub {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.made-main {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  /* Red, white & blue (V1 colors + white in the middle) */
  background: linear-gradient(90deg, #6ecbff, #ffffff 50%, #ff7b92);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Scroll reveal (JS adds .visible) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .led-green, .led-amber { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .panel, .linkbtn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid.four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }

  .status-row {
    grid-template-columns: 22px 1fr auto;
  }

  .status-detail { display: none; }
}

@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero { padding: 56px 0 40px; }
  .wrap { padding: 0 18px 32px; }
  .status-row, .cert-row { padding: 13px 14px; }
  .spec-strip { gap: 8px; }
  .spec { flex: 1 1 0; min-width: 0; padding: 10px 12px; }
  .spec dt { letter-spacing: 0.08em; }
}
