/* ===========================================================
   Design tokens
   Palette pulls from Albert's own benchmark charts: a warm
   "AMD-red" and a cool "Intel-blue" run through the whole site
   as the two accent colors, the way they run through his graphs.
   =========================================================== */
:root {
  --bg:        #0a0a0d;
  --bg-panel:  #111117;
  --bg-raise:  #16161d;
  --line:      rgba(255,255,255,0.09);
  --line-soft: rgba(255,255,255,0.05);
  --text:      #ece9e2;
  --text-dim:  #8b8b95;
  --text-faint:#55555f;
  --accent-a:  #ff5e3a; /* amd-red */
  --accent-b:  #3aa9ff; /* intel-blue */

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(255,94,58,0.06), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(58,169,255,0.06), transparent 40%);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a, button { font-family: inherit; }

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

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

code {
  font-family: var(--mono);
  background: var(--bg-raise);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85em;
  color: var(--accent-b);
}

/* ===========================================================
   Header / nav
   =========================================================== */
.site-header {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 22px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(10,10,13,0.85);
  backdrop-filter: blur(10px);
  z-index: 50;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }

.brand-mark {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #0a0a0d;
  border-radius: 8px;
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--mono); font-weight: 600; font-size: 15px; }
.brand-role { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent-a);
}
.tab-index {
  font-size: 10px;
  color: var(--text-faint);
}
.tab.active .tab-index { color: var(--accent-b); }
.tab-count {
  font-size: 10px;
  color: var(--text-faint);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
}

/* ===========================================================
   Hero
   =========================================================== */
.hero {
  padding: clamp(48px, 8vw, 96px) clamp(20px, 4vw, 56px) clamp(28px, 5vw, 48px);
}
.hero h1 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 54px);
  line-height: 1.25;
  margin: 0;
  max-width: 20ch;
  letter-spacing: -0.01em;
}
.cursor {
  color: var(--accent-a);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ===========================================================
   Panels
   =========================================================== */
.panels {
  padding: 0 clamp(20px, 4vw, 56px) 80px;
}

.panel {
  display: none;
  border-top: 1px solid var(--line);
  padding-top: 32px;
  animation: rise 0.4s ease both;
}
.panel.active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-copy { max-width: 760px; margin-bottom: 40px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-b);
  margin: 0 0 10px;
}

.panel-copy h2 {
  font-family: var(--mono);
  font-size: clamp(24px, 3vw, 34px);
  margin: 0 0 16px;
}

.panel-desc { color: var(--text-dim); font-size: 15.5px; line-height: 1.75; }
.panel-desc p { margin: 0 0 14px; }
.panel-desc strong { color: var(--text); }
.panel-desc a { color: var(--accent-b); }
.panel-desc ul { padding-left: 20px; }

/* ===========================================================
   Gallery
   =========================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px;
}

.gallery-item {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-panel);
  cursor: zoom-in;
  animation: rise 0.5s ease both;
  animation-delay: var(--d, 0ms);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.4s ease;
  filter: saturate(0.96);
}
.gallery-item:hover img { transform: scale(1.045); filter: saturate(1.05); }

.gallery-item figcaption {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text);
  background: rgba(0,0,0,0.55);
  padding: 3px 7px;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.gallery-item:hover figcaption { opacity: 1; transform: translateY(0); }

.gallery-empty, .gallery-empty ~ .gallery-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 40px 24px;
  text-align: center;
  color: var(--text-dim);
}
.gallery-empty p:first-child {
  font-family: var(--mono);
  color: var(--text);
  margin: 0 0 8px;
}
.gallery-empty p:last-child { margin: 0; font-size: 14px; max-width: 46ch; margin-inline: auto; }

/* ===========================================================
   Lightbox
   =========================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6,6,8,0.92);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 100;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(90vw, 1100px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.lightbox-caption {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 16px;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

/* ===========================================================
   Footer
   =========================================================== */
.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px) 32px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}
.footer-dim { color: var(--text-faint); }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .tabs {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 3;
  }
  .tabs.open { display: flex; }
  .tab { border-bottom: 1px solid var(--line-soft); width: 100%; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
