/* =====================================================================
   Christopher Renshaw — Portfolio
   Monochrome dark · single amber accent · senior/tech-strong
   ===================================================================== */

:root {
  /* Surfaces */
  --bg-0: #070708;
  --bg-1: #0c0c0e;
  --bg-2: #111114;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hi: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.06);
  --border-hi: rgba(255, 255, 255, 0.12);

  /* Ink */
  --text: #e6e6e9;
  --text-dim: #8a8a92;
  --text-mute: #545459;

  /* A single, restrained accent — warm champagne */
  --accent: #c9a46a;
  --accent-dim: #8a7349;
  --accent-glow: rgba(201, 164, 106, 0.14);

  /* Terminal tokens */
  --term-bg: #09090b;
  --term-ink: #c7c7cd;
  --term-mute: #54545b;
  --term-hi: #f1f1f3;
  --term-i: #8a8a92;
  --term-w: #c9a46a;
  --term-ok: #a7c1a0;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;

  --sidebar-w: 300px;

  --ease: cubic-bezier(.2,.8,.2,1);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }

::selection { background: var(--accent); color: #0a0a0a; }

/* -------- Background -------- */
.bg-layer {
  position: fixed; inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255,255,255,.022), transparent 60%),
    linear-gradient(180deg, #060606 0%, #080809 50%, #060606 100%);
  overflow: hidden;
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 70%);
}
.bg-orb { display: none; }

/* -------- Layout -------- */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  padding: 28px 22px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10,10,12,.9) 0%, rgba(10,10,12,.75) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 20;
  display: flex;
  transition: transform .4s var(--ease);
}
.sidebar__inner {
  display: flex; flex-direction: column; gap: 28px;
  width: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.08) transparent;
}
.sidebar__inner::-webkit-scrollbar { width: 6px; }
.sidebar__inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 3px; }

.main {
  margin-left: var(--sidebar-w);
  padding: 0 clamp(24px, 6vw, 96px);
}

/* -------- Sidebar content -------- */
.profile { text-align: center; }
.profile__avatar {
  position: relative;
  width: 150px; height: 150px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--bg-1);
  box-shadow: 0 10px 40px -12px rgba(0,0,0,.6);
}
.profile__avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 30% 35%;
  background: var(--bg-1);
  border: 1px solid rgba(255,255,255,.1);
}

.profile__name { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.profile__title { color: var(--text-dim); font-size: 14px; margin-top: 4px; }
.profile__sub   { color: var(--text-mute); font-size: 12px; font-family: var(--font-mono); margin-top: 6px; letter-spacing: .02em; }
.profile__loc   {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* -------- Nav -------- */
.nav ul { display: flex; flex-direction: column; gap: 2px; }
.nav__link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__icon { flex-shrink: 0; color: var(--text-mute); transition: color .25s var(--ease); }
.nav__link:hover .nav__icon { color: var(--text-dim); }
.nav__link.is-active {
  color: var(--text);
  background: rgba(255,255,255,.04);
  border-color: var(--border-hi);
  padding: 11px 13px;
}
.nav__link.is-active .nav__icon { color: var(--accent); }

/* -------- Buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  border: 1px solid transparent;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--text);
  color: #050506;
}
.btn--primary:hover { background: #fff; }

.btn--ghost {
  background: rgba(255,255,255,.05);
  color: var(--text);
  border-color: var(--border-hi);
}
.btn--ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }

.btn--outline {
  border-color: var(--border-hi);
  color: var(--text);
  background: transparent;
}
.btn--outline:hover { border-color: var(--text); background: var(--surface); }

/* -------- Sidebar actions -------- */
.sidebar__actions { margin-top: auto; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.sidebar__actions .btn { width: 100%; }
.socials { display: flex; gap: 6px; justify-content: center; }
.socials a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.socials a:hover { color: var(--text); border-color: var(--border-hi); background: var(--surface); }

/* -------- Sections -------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) 0 clamp(60px, 10vh, 120px);
  scroll-margin-top: 40px;
}
.section--hero { padding-top: clamp(60px, 10vh, 110px); }
.section__header { max-width: 760px; margin-bottom: 48px; }
.section__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section__title { font-size: clamp(30px, 4.2vw, 44px); margin-bottom: 18px; }
.section__lede  { color: var(--text-dim); font-size: 16px; }

/* -------- Hero -------- */
.hero__title {
  font-size: clamp(36px, 5.4vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 18px 0 24px;
  color: var(--text);
}
.hero__title .accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}
.hero__lede {
  font-size: clamp(16px, 1.2vw, 18px);
  color: var(--text-dim);
  max-width: 760px;
}
.hero__lede strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; gap: 12px; margin: 32px 0 0; flex-wrap: wrap; }

.hero-aside {
  margin: 56px 0 14px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-mute);
  border-left: 2px solid var(--border-hi);
  background: rgba(255,255,255,.015);
  border-radius: 0 8px 8px 0;
  letter-spacing: .01em;
}
.hero-aside code {
  color: var(--text-dim);
  background: rgba(255,255,255,.04);
  padding: 1px 6px;
  border-radius: 4px;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  letter-spacing: .04em;
}
.eyebrow__pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 0 rgba(255,255,255,.4);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.4); }
  70%  { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* -------- Terminal / logcat panel -------- */
.term {
  margin: 56px 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #0a0a0c;
  overflow: hidden;
  box-shadow: 0 12px 40px -18px rgba(0,0,0,.7);
}
.term__head {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: #0e0e11;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-mute);
  letter-spacing: .01em;
}
.term__dots { display: inline-flex; gap: 6px; }
.term__dots i {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.term__cmd {
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.term__host { color: var(--text-mute); white-space: nowrap; }

.term__body {
  margin: 0;
  padding: 14px 18px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: #b6b6bd;
  overflow-x: auto;
  white-space: pre;
  tab-size: 4;
}
.term__body .divider { color: var(--text-mute); font-style: italic; }
.term__body .date { color: #54545b; }
.term__body .tm   { color: #8a8a92; }
.term__body .pid, .term__body .tid { color: #54545b; }
.term__body .lv {
  display: inline-block;
  width: 1ch;
  text-align: center;
  font-weight: 700;
}
.term__body .lv-v { color: #6c6c74; }
.term__body .lv-d { color: #7b8b9a; }
.term__body .lv-i { color: #8ba278; }
.term__body .lv-w { color: #c9a46a; }
.term__body .lv-e { color: #b06b5a; }
.term__body .tg   { color: #d4d4d8; font-weight: 500; }
.term__body .n    { color: #d4d4d8; }
.term__body .h    { color: var(--accent); font-weight: 600; }
.term__body .prompt { color: var(--text-dim); }
.term__body .caret {
  display: inline-block;
  color: var(--text);
  animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* -------- Devices grid -------- */
.devices { margin-top: 56px; }
.devices__title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.devices__sub {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 680px;
  margin-bottom: 22px;
}
.devices__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.dev {
  padding: 18px 20px 16px;
  background: var(--bg-0);
  display: flex; flex-direction: column; gap: 6px;
  transition: background .25s var(--ease);
}
.dev:hover { background: #0c0c0e; }
.dev__proto {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.dev h4 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.dev p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}
.dev__ctx {
  margin-top: 6px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-mute);
  letter-spacing: .02em;
}

/* -------- Code card -------- */
.code-card {
  margin-top: 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--term-bg);
}
.code-card__head {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: #0c0c0f;
  border-bottom: 1px solid var(--border);
}
.code-card__dots { display: flex; gap: 6px; }
.code-card__dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.14);
}

.code-tabs { display: flex; gap: 4px; margin-left: 6px; }
.code-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  background: transparent;
  border: 1px solid transparent;
  padding: 5px 12px;
  border-radius: 6px;
  letter-spacing: .02em;
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.code-tab:hover { color: var(--text-dim); background: rgba(255,255,255,.03); }
.code-tab.is-active {
  color: var(--text);
  background: rgba(255,255,255,.05);
  border-color: var(--border-hi);
}
.code-card__file {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
}

.code-pane {
  display: none;
  margin: 0;
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: #cdcdd3;
  background: var(--term-bg);
  overflow-x: auto;
  white-space: pre;
  tab-size: 4;
}
.code-pane.is-active { display: block; }
.code-pane code { font: inherit; color: inherit; }

/* Restrained syntax highlighting — nearly monochrome, one amber */
.t-k { color: var(--text); font-weight: 500; }  /* keyword  */
.t-f { color: #cdcdd3; }                         /* function */
.t-t { color: var(--accent); }                   /* type     */
.t-c { color: var(--text-mute); font-style: italic; } /* comment */
.t-s { color: var(--text-dim); }                 /* string   */

/* -------- Stack Overflow authority card -------- */
.so-card {
  margin-top: 56px;
  padding: 28px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 22px;
}
.so-card__top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.so-card__mark { width: 36px; height: 42px; flex-shrink: 0; opacity: .85; }
.so-card__mark path:first-child { fill: var(--accent) !important; }
.so-card__mark path:last-child  { fill: var(--text-dim) !important; }
.so-card__handle {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: .02em;
}
.so-card__handle span { color: var(--text-mute); font-weight: 400; }
.so-card__headline { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; color: var(--text); }
.so-card__link {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 14px;
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.so-card__link:hover { border-color: var(--text); background: var(--surface); }

.so-card__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 18px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.so-card__stats div { text-align: left; }
.so-card__stats dt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 6px;
}
.so-card__stats dd {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.so-card__stats dd span { color: var(--accent); font-weight: 500; }

.so-card__tags {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-mute);
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  letter-spacing: .02em;
}
.so-card__tags span {
  padding: 3px 9px;
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 5px;
}

/* -------- Career strip -------- */
.strip { border-top: 1px solid var(--border); }
.strip__row {
  display: grid;
  grid-template-columns: 120px minmax(220px, 280px) 1fr auto;
  column-gap: 32px;
  align-items: baseline;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
}
.strip__year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: .04em;
  white-space: nowrap;
}
.strip__role { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.strip__co { color: var(--text-dim); font-size: 14.5px; }
.strip__tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  padding: 3px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  align-self: center;
}

/* -------- Cases -------- */
.cases { display: flex; flex-direction: column; gap: 48px; }

.case {
  padding: 0;
  border: 1px solid var(--border);
  background: var(--bg-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.case__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 26px 28px 22px;
  border-bottom: 1px solid var(--border);
}
.case__id { display: flex; align-items: center; gap: 16px; }
.case__num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-mute);
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  letter-spacing: .02em;
}
.case__title {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.case__client { color: var(--text-dim); font-size: 13.5px; margin-top: 4px; }

.case__specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  font-size: 13px;
  min-width: 340px;
}
.case__specs > div { display: flex; flex-direction: column; gap: 2px; }
.case__specs dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .14em;
}
.case__specs dd {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

.case__body {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 1.2fr;
  gap: 32px;
  padding: 26px 28px;
}

.case__media { min-width: 0; }

.case__narrative { display: flex; flex-direction: column; gap: 20px; }
.case__col p:not(.case__kicker) {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.65;
}
.case__col--result p:not(.case__kicker) { color: var(--text); }
.case__kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.case__col--result .case__kicker { color: var(--accent); }

.metric {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0 2px;
  border-bottom: 1px solid rgba(201,164,106,.4);
}

.case__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.01);
}

.case__video {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 10px;
  overflow: hidden;
}
.case__video a { display: block; position: absolute; inset: 0; }
.case__video .yt-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: .9;
  transition: opacity .2s var(--ease);
}
.case__video:hover .yt-play { opacity: 1; }

/* -------- Chips (shared) -------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chips li {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 6px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  line-height: 1;
}

/* -------- Case links -------- */
.case__links { display: flex; flex-wrap: wrap; gap: 16px; }
.case__links a {
  color: var(--text);
  font-weight: 500;
  font-size: 13.5px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border-hi);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.case__links a:hover { color: var(--accent); border-color: var(--accent); }

/* -------- Slider -------- */
.slider {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-0);
  aspect-ratio: 16/10;
  max-width: 100%;
  margin: 0 auto;
}
.slider__track {
  display: flex;
  height: 100%;
  margin: 0; padding: 0;
  list-style: none;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}
.slider__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}
.slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
  z-index: 2;
}
.slider__btn:hover { background: rgba(0,0,0,.85); border-color: rgba(255,255,255,.25); }
.slider__btn--prev { left: 10px; }
.slider__btn--next { right: 10px; }
.slider__dots {
  position: absolute;
  left: 50%; bottom: 12px;
  transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 2;
}
.slider__dot {
  width: 7px; height: 7px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  transition: background .2s var(--ease), width .2s var(--ease);
}
.slider__dot.is-active { background: #fff; width: 22px; border-radius: 4px; }

/* -------- Contact -------- */
.section--contact { padding-bottom: 0; }
.contact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 80px;
}
.contact__card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-1);
  transition: border-color .25s var(--ease);
}
.contact__card:not(.contact__card--static):hover { border-color: var(--border-hi); }
.contact__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.contact__value { font-size: 17px; font-weight: 600; color: var(--text); }

/* -------- Footer -------- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text-dim);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.footer__top:hover { color: var(--text); border-color: var(--border-hi); }

/* -------- Mobile nav toggle -------- */
.nav-toggle {
  display: none;
  position: fixed;
  top: 18px; right: 18px;
  width: 44px; height: 44px;
  background: rgba(10,10,12,.85);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 30;
  padding: 0;
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* -------- Reveal on scroll -------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in  { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------- Responsive -------- */
@media (max-width: 1100px) {
  .case__body { grid-template-columns: 1fr; }
  .case__head { flex-direction: column; align-items: stretch; }
  .case__specs { min-width: 0; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --sidebar-w: 280px; }
  .nav-toggle { display: inline-flex; }

  .sidebar {
    transform: translateX(-110%);
    width: min(320px, 85vw);
    box-shadow: 30px 0 80px -20px rgba(0,0,0,.6);
  }
  .sidebar.is-open { transform: translateX(0); }

  .main { margin-left: 0; padding: 0 20px; }
  .section { padding: clamp(80px, 14vh, 120px) 0 80px; }

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

  .strip__row {
    grid-template-columns: 110px 1fr;
    grid-template-areas:
      "year role"
      "year co"
      "year tag";
    gap: 6px 16px;
    padding: 16px 4px;
  }
  .strip__year { grid-area: year; align-self: start; padding-top: 2px; }
  .strip__role { grid-area: role; }
  .strip__co   { grid-area: co;   font-size: 14px; }
  .strip__tag  { grid-area: tag;  justify-self: start; }

  .so-card__stats { grid-template-columns: 1fr 1fr; }
  .so-card__link  { margin-left: 0; }

  .term__cmd { font-size: 11px; }
  .term__host { display: none; }
}

@media (max-width: 520px) {
  .case__head, .case__body, .case__foot { padding-left: 18px; padding-right: 18px; }
  .case__specs { grid-template-columns: 1fr; }
  .devices__grid { grid-template-columns: 1fr; }
  .code-pane, .term__body { padding: 14px 16px; font-size: 11.5px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
}

/* =====================================================================
   Blog / Notes post styles
   ===================================================================== */
.post-shell {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 48px) 120px;
  min-height: 100vh;
}
.post-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.post-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  transition: color .2s var(--ease);
}
.post-back:hover { color: var(--text); }
.post-crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.post-crumb--link { transition: color .2s var(--ease); }
.post-crumb--link:hover { color: var(--text); }

.post-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.post-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 18px;
  color: var(--text);
}
.post-title code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255,255,255,.05);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-weight: 600;
}
.post-title .accent { color: var(--accent); font-style: italic; font-weight: 500; }
.post-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-mute);
  letter-spacing: .04em;
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.post-lede {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 40px;
}
.post-lede code { color: var(--text); background: rgba(255,255,255,.05); padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: .9em; }

.post h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
}
.post h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 10px;
}
.post p {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 18px;
}
.post p strong { color: var(--text); font-weight: 600; }
.post p em { color: var(--text); font-style: italic; }
.post code {
  font-family: var(--font-mono);
  font-size: .92em;
  color: var(--text);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  padding: 1px 7px;
  border-radius: 5px;
}
.post-ul, .post-ol {
  margin: 0 0 22px 24px;
  padding: 0;
  color: var(--text-dim);
}
.post-ul { list-style: disc; }
.post-ol { list-style: decimal; }
.post-ul li, .post-ol li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 10px;
  padding-left: 6px;
}
.post-ul li strong, .post-ol li strong { color: var(--text); font-weight: 600; }
.post-ul li code, .post-ol li code { font-size: .88em; }

.post .code-pane {
  margin: 28px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: hidden;
}
.post .code-pane code {
  white-space: pre-wrap;
  word-break: break-word;
}

.post-foot {
  margin-top: 72px;
  padding: 28px 0 0;
  border-top: 1px solid var(--border);
}
.post-foot__bio { font-size: 14.5px; color: var(--text-dim); margin-bottom: 18px; }
.post-foot__bio strong { color: var(--text); }
.post-foot__cta { display: flex; gap: 22px; flex-wrap: wrap; }
.post-foot__cta a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border-hi);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.post-foot__cta a:hover { color: var(--accent); border-color: var(--accent); }

.post-related {
  margin-top: 64px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-1);
}
.post-related ul { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.post-related li a {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: color .2s var(--ease);
}
.post-related li a:hover { color: var(--accent); }

/* Notes index */
.notes-index__header { margin-bottom: 48px; }
.notes-index__header h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 18px;
}
.notes-index__header h1 .accent { color: var(--accent); font-style: italic; font-weight: 500; }
.notes-index__header .post-lede { margin-bottom: 0; }

.post-list { display: flex; flex-direction: column; gap: 18px; }
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-1);
  transition: border-color .25s var(--ease);
}
.post-card:hover { border-color: var(--border-hi); }
.post-card > a {
  display: block;
  padding: 26px 28px;
  color: inherit;
}
.post-card h2 {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.25;
}
.post-card p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.post-card__cta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: .02em;
}
.post-card .post-meta { margin-bottom: 14px; font-size: 11.5px; }

.notes-foot {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14.5px;
}
.notes-foot p { margin-bottom: 6px; }
.notes-foot strong { color: var(--text); }
.notes-foot a {
  color: var(--text);
  border-bottom: 1px solid var(--border-hi);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.notes-foot a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 520px) {
  .post-shell { padding: 24px 18px 100px; }
  .post-card > a { padding: 20px; }
  .post h2 { margin-top: 36px; }
}
