/* Palette: cool cable-sheath greys, switch-faceplate slate, link LEDs */
:root {
  --paper: #eef1f3;
  --surface: #ffffff;
  --ink: #1b2430;
  --muted: #586473;
  --rule: #c9d1d8;
  --accent: #1f5fbf;      /* Cat6 blue: links and tags */
  --plate: #2b3a4a;       /* faceplate */
  --plate-edge: #3d5064;
  --jack: #17212c;        /* port recess */
  --led-up: #2fbf71;
  --led-busy: #e0a100;
  --led-off: #4a5a6b;
  --print: #c7d3df;       /* silkscreen text on the faceplate */

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141b23;
    --surface: #1b242e;
    --ink: #e4e9ee;
    --muted: #9aa7b4;
    --rule: #2e3b48;
    --accent: #7fb0ff;
    --plate: #222f3c;
    --plate-edge: #34465a;
    --jack: #0f161d;
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.5rem; } }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 0.75rem; z-index: 2; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero */
.hero { padding: 3.5rem 0 2.5rem; }
.name {
  font: 700 clamp(3.5rem, 14vw, 6.5rem)/0.9 var(--display);
  letter-spacing: -0.01em;
  margin: 0;
}
.role {
  font: 500 1.5rem/1.2 var(--display);
  color: var(--muted);
  margin: 0.5rem 0 1.25rem;
}
.intro { max-width: 36rem; margin: 0 0 2rem; }

/* The faceplate: one port per win, certification and lab */
.faceplate {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  background: var(--plate);
  border: 1px solid var(--plate-edge);
  border-radius: 6px;
  padding: 1rem 1.25rem 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.port-group { display: flex; flex-direction: column; gap: 0.4rem; }
.ports { display: flex; gap: 6px; }
.port {
  position: relative;
  display: block;
  width: 30px;
  height: 26px;
  background: var(--jack);
  border-radius: 2px;
  /* RJ45 notch at the bottom */
  clip-path: polygon(0 0, 100% 0, 100% 78%, 70% 78%, 70% 100%, 30% 100%, 30% 78%, 0 78%);
  transition: transform 120ms ease;
}
.port::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--led-off);
}
.port.is-up::after { background: var(--led-up); box-shadow: 0 0 6px var(--led-up); }
.port.is-busy::after { background: var(--led-busy); box-shadow: 0 0 6px var(--led-busy); }
.port:hover, .port:focus-visible { transform: translateY(-2px); }
.port:focus-visible { outline: 2px solid var(--print); outline-offset: 2px; }

.group-label {
  font: 600 0.95rem/1 var(--display);
  letter-spacing: 0.02em;
  color: var(--print);
  text-decoration: none;
}
.group-label:hover { text-decoration: underline; }

/* One moment of motion: the link lights come up in order on load */
@media (prefers-reduced-motion: no-preference) {
  .port::after { animation: link-up 260ms ease-out both; animation-delay: calc(300ms + var(--i) * 70ms); }
  @keyframes link-up {
    from { background: var(--led-off); box-shadow: none; }
  }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}
.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--led-off);
  margin-right: 0.4rem;
  flex: none;
}
.led.is-up { background: var(--led-up); }
.led.is-busy { background: var(--led-busy); }

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  font-weight: 500;
}

/* Sections */
.section { padding: 2.5rem 0; border-top: 2px solid var(--ink); }
.section h2 {
  font: 700 2.25rem/1 var(--display);
  margin: 0 0 1.5rem;
}
h3 { font: 600 1.375rem/1.2 var(--display); margin: 0; }
h3 a { color: inherit; }

.context { color: var(--muted); font-size: 0.9375rem; margin: 0.2rem 0 0; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0.9rem 0 0; }
.tags li {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 0.05rem 0.45rem;
}

/* Wins */
.wins { list-style: none; padding: 0; margin: 0; }
.win { padding: 1.5rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 1rem; }
.win:first-child { padding-top: 0; }
.win .result {
  margin: 0.75rem 0 0;
  padding-left: 0.85rem;
  border-left: 3px solid var(--led-up);
  font-weight: 500;
}
details { margin-top: 0.75rem; }
summary { cursor: pointer; color: var(--accent); font-weight: 500; font-size: 0.9375rem; }
dl { margin: 0.6rem 0 0; }
dt { font-weight: 600; font-size: 0.9375rem; }
dd { margin: 0 0 0.6rem; }

/* Certifications */
.certs { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.cert { display: flex; gap: 0.75rem; align-items: baseline; scroll-margin-top: 1rem; }
.cert .led { position: relative; top: -0.15rem; }

/* Labs */
.labs { list-style: none; padding: 0; margin: 0; }
.lab { padding: 1.5rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 1rem; }
.lab:first-child { padding-top: 0; }
.lab-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; }
.status { display: inline-flex; align-items: center; font-size: 0.875rem; color: var(--muted); }
.lab p { margin: 0.5rem 0 0; }
.lesson { color: var(--muted); }
.lesson strong { color: var(--ink); font-weight: 600; }

/* Skills */
.skills { display: grid; gap: 0.25rem 1.5rem; margin: 0; }
.skills dt { font: 600 1.125rem/1.3 var(--display); margin-top: 0.6rem; }
.skills dd { margin: 0; }
@media (min-width: 40rem) {
  .skills { grid-template-columns: 12rem 1fr; }
  .skills dt { margin-top: 0; }
}

.foot { padding: 2rem 1rem 3rem; color: var(--muted); font-size: 0.875rem; border-top: 1px solid var(--rule); }
