/* ==========================================================================
   kylecarroll.com
   Design language: anodized instrument panel. Silkscreen labels, machined
   bays, one magenta course line. Everything else stays quiet.
   ========================================================================== */

:root {
  /* panel */
  --p-000: #0d1012;   /* behind the panel */
  --p-100: #14181b;   /* panel face */
  --p-200: #1a1f23;   /* bay face, top */
  --p-300: #15191c;   /* bay face, bottom */
  --line:  rgba(255, 255, 255, 0.085);
  --line-2: rgba(255, 255, 255, 0.16);

  /* silkscreen */
  --silk:   #e8ecee;
  --silk-2: #aeb9bf;
  --silk-3: #78858c;

  /* annunciators */
  --mag:   #ff2d8a;   /* the magenta line */
  --grn:   #3ed97a;
  --amb:   #ffb020;
  --cyn:   #45c3e0;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --cond: "Saira Condensed", "Archivo Narrow", Impact, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gut: clamp(20px, 4vw, 40px);
  --max: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--p-000);
  /* faint machined grid — barely there, but the panel needs it */
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.014) 0 1px, transparent 1px 34px);
  color: var(--silk);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--mag); color: #0d1012; }

:focus-visible {
  outline: 2px solid var(--mag);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px; top: 12px; z-index: 100;
  background: var(--mag); color: #0d1012;
  padding: 8px 14px;
  font: 500 12px/1 var(--mono);
}

/* --------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 16, 18, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand__plate {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  font: 500 11px/1 var(--mono);
  letter-spacing: .06em;
  color: var(--silk-2);
  background: linear-gradient(180deg, #1c2126, #14181b);
}

.brand:hover .brand__plate { border-color: var(--mag); color: var(--mag); }

.brand__name {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
}

.nav a {
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--silk-3);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}

.nav a:hover,
.nav a[aria-current] { color: var(--silk); border-bottom-color: var(--mag); }

/* ----------------------------------------------------------------- labels */

.label {
  font: 500 11px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--silk-3);
}

.label--tick { display: inline-flex; align-items: center; gap: 9px; }
.label--tick::before {
  content: "";
  width: 16px; height: 1px;
  background: var(--mag);
}

/* ------------------------------------------------------------------- hero */

.hero { padding: clamp(56px, 11vw, 108px) 0 clamp(40px, 7vw, 66px); }

.hero h1 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(52px, 13vw, 128px);
  line-height: .86;
  letter-spacing: -.005em;
  text-transform: uppercase;
  margin: 22px 0 0;
}

.hero h1 span { display: block; }

.hero__rule {
  height: 1px;
  background: var(--mag);
  margin: 26px 0 24px;
  width: 100%;
  transform-origin: left;
  animation: draw 1.1s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero p {
  max-width: 60ch;
  font-size: clamp(16px, 1.6vw, 18.5px);
  color: var(--silk-2);
  margin: 0;
}

.hero__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* ------------------------------------------------------------ panel button */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #1c2126, #15191c);
  color: var(--silk-2);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .18s, border-color .18s, transform .18s, background .18s;
}

.btn:hover { color: var(--silk); border-color: var(--mag); transform: translateY(-1px); }

.btn--go {
  background: var(--mag);
  border-color: var(--mag);
  color: #10070c;
  font-weight: 600;
}
.btn--go:hover { background: #ff4f9c; border-color: #ff4f9c; color: #10070c; }

.btn--tbd {
  opacity: .42;
  cursor: not-allowed;
  pointer-events: none;
}

/* --------------------------------------------------------------- sections */

.section { padding: clamp(40px, 7vw, 76px) 0; }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 28px;
}

.section__head h2 {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0;
}

.section__head .count { margin-left: auto; }

/* ------------------------------------------------------------------- bays */

.bays {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(298px, 1fr));
  gap: 16px;
}

.bay {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  background:
    /* four corner fasteners */
    radial-gradient(circle at 9px 9px, rgba(255,255,255,.16) 0 1.4px, transparent 1.6px),
    radial-gradient(circle at calc(100% - 9px) 9px, rgba(255,255,255,.16) 0 1.4px, transparent 1.6px),
    radial-gradient(circle at 9px calc(100% - 9px), rgba(255,255,255,.16) 0 1.4px, transparent 1.6px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), rgba(255,255,255,.16) 0 1.4px, transparent 1.6px),
    linear-gradient(180deg, var(--p-200), var(--p-300));
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.bay:hover,
.bay:focus-within {
  transform: translateY(-3px);
  border-color: rgba(255, 45, 138, .55);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

.bay__top { display: flex; align-items: center; gap: 10px; }

.bay__cat { flex: 1; }

.bay h3 {
  font-family: var(--cond);
  font-weight: 600;
  font-size: clamp(25px, 3vw, 30px);
  line-height: 1.02;
  letter-spacing: .012em;
  text-transform: uppercase;
  margin: 0;
}

.bay h3 a { text-decoration: none; }

/* the whole bay is the target */
.bay h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.bay p {
  margin: 0;
  font-size: 14.6px;
  line-height: 1.6;
  color: var(--silk-2);
}

.bay__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tags li {
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--silk-3);
  border: 1px solid var(--line);
  padding: 5px 7px;
}

.bay__go {
  margin-left: auto;
  font: 500 11px/1 var(--mono);
  letter-spacing: .16em;
  color: var(--silk-3);
  transition: color .2s, transform .2s;
}

.bay:hover .bay__go { color: var(--mag); transform: translateX(3px); }

/* ------------------------------------------------------------------- LEDs */

.led {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--silk-3);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: box-shadow .25s;
}
.led--live { background: var(--grn); box-shadow: 0 0 7px rgba(62, 217, 122, .55); }
.led--beta { background: var(--amb); box-shadow: 0 0 7px rgba(255, 176, 32, .5); }
.led--work { background: var(--cyn); box-shadow: 0 0 7px rgba(69, 195, 224, .5); }
.led--open { background: var(--mag); box-shadow: 0 0 7px rgba(255, 45, 138, .5); }

.bay:hover .led--live { box-shadow: 0 0 13px rgba(62, 217, 122, .9); }
.bay:hover .led--beta { box-shadow: 0 0 13px rgba(255, 176, 32, .9); }
.bay:hover .led--work { box-shadow: 0 0 13px rgba(69, 195, 224, .9); }
.bay:hover .led--open { box-shadow: 0 0 13px rgba(255, 45, 138, .9); }

.status {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silk-2);
}

/* ------------------------------------------------------------------ about */

.split {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(20px, 5vw, 56px);
}

.split p {
  margin: 0 0 18px;
  max-width: 62ch;
  color: var(--silk-2);
  font-size: 16.5px;
}

.split p:last-child { margin-bottom: 0; }

.split strong { color: var(--silk); font-weight: 500; }

/* ----------------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--line);
  margin-top: clamp(40px, 8vw, 90px);
  padding: 26px 0 44px;
}

.foot__in {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
}

.foot a {
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silk-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.foot a:hover { color: var(--mag); border-bottom-color: var(--mag); }

.foot .label { margin-left: auto; }

/* =============================================================== project ==
   Individual project pages
   ========================================================================= */

.doc { padding: clamp(34px, 6vw, 62px) 0 0; }

.back {
  font: 500 11px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--silk-3);
  text-decoration: none;
}
.back:hover { color: var(--mag); }

.doc__head { padding: 22px 0 30px; border-bottom: 1px solid var(--line); }

.doc__head h1 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(42px, 8vw, 82px);
  line-height: .92;
  letter-spacing: -.004em;
  text-transform: uppercase;
  margin: 16px 0 14px;
}

.doc__head p {
  margin: 0;
  max-width: 58ch;
  font-size: clamp(16px, 1.7vw, 18.5px);
  color: var(--silk-2);
}

.doc__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: clamp(28px, 5vw, 60px);
  padding: 40px 0 0;
  align-items: start;
}

.prose h2 {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: 40px 0 14px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.prose h2::before {
  content: "";
  width: 14px; height: 1px;
  background: var(--mag);
  flex: none;
}

.prose h2:first-child { margin-top: 0; }

.prose p {
  margin: 0 0 17px;
  color: var(--silk-2);
  font-size: 16.5px;
  line-height: 1.72;
  max-width: 66ch;
}

.prose strong { color: var(--silk); font-weight: 500; }

.prose ul {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  max-width: 66ch;
}

.prose ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
  color: var(--silk-2);
  font-size: 16px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: 8px; height: 1px;
  background: var(--silk-3);
}

.prose a:not(.btn) { color: var(--silk); text-decoration-color: var(--mag); text-underline-offset: 3px; }
.prose a:not(.btn):hover { color: var(--mag); }

/* screenshot bays */

.shots { display: grid; gap: 14px; margin: 24px 0 8px; }
.shots--two { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.shot {
  aspect-ratio: 16 / 10;
  border: 1px dashed var(--line-2);
  background: linear-gradient(180deg, #171c20, #131719);
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
}

.shot span {
  font: 400 11px/1.6 var(--mono);
  letter-spacing: .08em;
  color: var(--silk-3);
  word-break: break-all;
}

/* spec plate */

.plate {
  position: sticky;
  top: 82px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--p-200), var(--p-300));
  padding: 18px 18px 16px;
}

.plate__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.spec { display: flex; flex-direction: column; }

.spec div {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.spec dt {
  flex: none;
  width: 84px;
  font: 500 10.5px/1.5 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--silk-3);
}

.spec dd {
  margin: 0;
  font: 400 12.5px/1.5 var(--mono);
  color: var(--silk);
  text-align: right;
  margin-left: auto;
}

.plate__links { display: grid; gap: 8px; padding-top: 16px; }
.plate__links .btn { justify-content: space-between; }

.plate__note {
  margin: 14px 0 0;
  font: 400 11px/1.5 var(--mono);
  color: var(--silk-3);
}

/* next / prev */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  margin-top: clamp(40px, 7vw, 72px);
  padding-top: 20px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 860px) {
  .doc__grid { grid-template-columns: minmax(0, 1fr); }
  .plate { position: static; }
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .nav { gap: 14px; }
  .nav a { font-size: 10.5px; letter-spacing: .1em; }
  .brand__name { display: none; }
  .spec dt { width: 76px; }
}

/* --------------------------------------------------------------- reveal */

.rise { opacity: 0; transform: translateY(14px); }
.rise.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s cubic-bezier(.16,1,.3,1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .rise { opacity: 1; transform: none; }
}
