/* ─── Design Tokens ──────────────────────────────────────────────────── */
:root {
  --bg: #010205;
  --grid-line: rgba(34, 74, 69, 0.18);
  --glow-1: rgba(0, 255, 163, 0.28);
  --glow-2: rgba(0, 158, 253, 0.22);
  --glow-3: rgba(255, 92, 155, 0.18);
  --screen: #040a12;
  --panel: rgba(6, 14, 26, 0.97);
  --panel-alt: rgba(10, 22, 40, 0.94);
  --text: #e8fff5;
  --muted: #9ed8c9;
  --accent: #70ffb7;
  --accent-alt: #56dfff;
  --hot: #ff7eb8;
  --border: rgba(112, 255, 183, 0.3);
  --radius: 20px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(112, 255, 183, 0.08);
  --accent-glow: rgba(112, 255, 183, 0.18);
  --accent-alt-glow: rgba(86, 223, 255, 0.18);
  --hot-glow: rgba(255, 126, 184, 0.18);

  /* section counter */
  counter-reset: section-counter;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-alt), var(--hot));
  border-radius: 10px;
}

body {
  margin: 0;
  font-family: 'IBM Plex Mono', 'Inter', monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.85;
  /* Increased from 1.75 */
}

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

a {
  color: inherit;
}

a:not(.btn) {
  color: var(--accent-alt);
  text-decoration: none;
}

a:not(.btn):hover,
a:not(.btn):focus-visible {
  text-decoration: underline;
}

/* ─── Background ─────────────────────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 100px 100px;
  opacity: 0.35;
  /* Softened from 0.55 */
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, var(--glow-1), transparent 38%),
    radial-gradient(circle at 82% 5%, var(--glow-2), transparent 38%),
    radial-gradient(circle at 55% 85%, var(--glow-3), transparent 48%);
  filter: blur(60px);
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

/* ─── Scroll Progress ────────────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: calc(var(--scroll-pct, 0) * 1%);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt), var(--hot));
  z-index: 999;
  transition: width 80ms linear;
  box-shadow: 0 0 10px var(--accent);
}

/* ─── Skip Link ──────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: #03130c;
  border-radius: 999px;
  z-index: 1000;
}

/* ─── Wrapper & Frame ────────────────────────────────────────────────── */
.terminal-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-bits {
  position: absolute;
  inset: 5% 8%;
  pointer-events: none;
  z-index: 0;
}

.floating-bits span {
  position: absolute;
  display: block;
  width: 2px;
  height: 14px;
  background: linear-gradient(var(--accent), transparent);
  opacity: 0.2;
  /* Reduced from 0.3 */
  animation: bitFloat 20s linear infinite;
  /* Slowed from 14s */
  animation-delay: calc(var(--i) * -1.5s);
  border-radius: 999px;
  left: calc(var(--i) * 7%);
  top: calc(var(--i) * 4%);
}

.terminal-frame {
  width: 100%;
  max-width: 1200px;
  background: linear-gradient(150deg, rgba(8, 15, 29, 0.97), rgba(5, 16, 28, 0.97));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(112, 255, 183, 0.18);
  box-shadow:
    0 50px 140px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  position: relative;
  overflow: hidden;
  animation: frameIn 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.terminal-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(112, 255, 183, 0.08);
  /* Reduced baseline opacity */
  pointer-events: none;
  animation: borderPulse 10s ease-in-out infinite;
  /* Slowed down */
}

/* ─── Topbar / Nav ───────────────────────────────────────────────────── */
.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(120deg, rgba(8, 20, 36, 0.98), rgba(7, 14, 30, 0.96));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.window-controls {
  display: flex;
  gap: 0.4rem;
}

.window-controls .dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  display: inline-flex;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.35);
  cursor: default;
  transition: filter 180ms ease;
}

.window-controls:hover .dot.red {
  filter: brightness(1.3);
}

.window-controls:hover .dot.yellow {
  filter: brightness(1.2);
}

.window-controls:hover .dot.green {
  filter: brightness(1.25);
}

.dot.red {
  background: #ff5f68;
}

.dot.yellow {
  background: #f5d266;
}

.dot.green {
  background: #4ce486;
}

.terminal-title {
  margin: 0;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-size: 0.9rem;
}

.terminal-status {
  font-size: 0.82rem;
  color: var(--accent-alt);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.terminal-status::before {
  content: '';
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: blink 1.8s steps(2) infinite;
}

/* ─── Terminal Screen ────────────────────────────────────────────────── */
.terminal-screen {
  position: relative;
  background: var(--screen);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

/* ─── Status Feed ────────────────────────────────────────────────────── */
.status-feed {
  margin: 1rem 0;
  display: grid;
  gap: 0.4rem;
}

.status-line {
  display: grid;
  grid-template-columns: auto 96px 1fr;
  gap: 0.75rem;
  align-items: center;
  background: rgba(5, 14, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: border-color 200ms ease;
}

.status-line:hover {
  border-color: rgba(112, 255, 183, 0.2);
}

.status-label {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.status-pill {
  justify-self: center;
  padding: 0.18rem 0.65rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: #02180f;
  background: linear-gradient(120deg, var(--accent), var(--accent-alt));
  animation: pulseStatus 3.5s ease-in-out infinite;
  font-weight: 600;
}

.status-pill.alt {
  background: linear-gradient(120deg, var(--hot), var(--accent-alt));
  color: #060104;
}

.status-note {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ─── Scanline ─────────────────────────────────────────────────────── */
.scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 3px;
  opacity: 0.05;
  /* Reduced from 0.12 */
  animation: scan 12s linear infinite;
  /* Slowed down */
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ─── Terminal Lines ─────────────────────────────────────────────────── */
.terminal-line {
  font-size: 0.93rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.cursor {
  width: 0.6rem;
  height: 0.95rem;
  background: var(--accent-alt);
  display: inline-block;
  animation: blink 1s steps(2) infinite;
  border-radius: 1px;
}

/* ─── Nav ────────────────────────────────────────────────────────────── */
.terminal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  background: rgba(4, 12, 22, 0.98);
  text-transform: lowercase;
  position: relative;
  z-index: 1;
}

.terminal-nav a {
  color: var(--muted);
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
  font-size: 0.88rem;
}

.terminal-nav a:hover,
.terminal-nav a:focus-visible {
  border-color: var(--accent-alt);
  color: var(--accent-alt);
  background: rgba(86, 223, 255, 0.06);
  transform: translateY(-1px);
  text-decoration: none;
}

.terminal-nav a.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(112, 255, 183, 0.08);
}

/* ─── Main Layout ──────────────────────────────────────────────────── */
main {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  /* Increased from 1.75rem for distinct sections */
}

.section {
  margin: 0;
}

/* ─── Terminal Blocks (Sections) ───────────────────────────────────── */
.terminal-block {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-card);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  counter-increment: section-counter;
  transition: box-shadow 300ms ease;
}

.terminal-block:hover {
  box-shadow: var(--shadow-hover);
}

/* Section number badge */
.terminal-block::before {
  content: counter(section-counter, decimal-leading-zero);
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  font-size: 3rem;
  /* Slightly smaller to be less distracting */
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: rgba(112, 255, 183, 0.03);
  /* Faded more */
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.terminal-block::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(112, 255, 183, 0.07);
  pointer-events: none;
}

.terminal-block p,
.terminal-block li {
  max-width: 72ch;
}

/* ─── Prompt Line ────────────────────────────────────────────────────── */
.prompt-line {
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--accent-alt);
  margin: 0 0 1.25rem;
  position: relative;
  padding-left: 1.4rem;
}

.prompt-line::before {
  content: '➜';
  position: absolute;
  left: 0;
  color: var(--hot);
}

/* ─── Typography ─────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: 'Space Grotesk', 'IBM Plex Mono', sans-serif;
  margin: 0 0 0.85rem;
}

h1 {
  font-size: clamp(1.85rem, 4.5vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.25;
  font-weight: 600;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ─── Glitch ─────────────────────────────────────────────────────────── */
.glitch-text {
  position: relative;
  display: inline-flex;
  color: var(--text);
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  opacity: 0.35;
}

.glitch-text::before {
  color: var(--accent-alt);
  transform: translate(1.5px, -1px);
  animation: glitch 3s infinite linear alternate-reverse;
}

.glitch-text::after {
  color: var(--hot);
  transform: translate(-1.5px, 1px);
  animation: glitch 3.4s infinite linear alternate;
}

/* ─── Text Styles ────────────────────────────────────────────────────── */
p {
  margin: 0 0 1rem;
  color: var(--text);
}

/* Scannable Lists (Clean Lists) */
.clean-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.clean-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.clean-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1.5;
}

.clean-list li strong {
  color: var(--text);
  font-weight: 600;
}

/* Specific component list overrides */
.lead-intro {
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}

.about-list li {
  font-size: 1rem;
  padding-left: 1.5rem;
}

.about-list li::before {
  font-size: 1.2rem;
}

.project-summary {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.73rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.lead {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.8;
}

.type-line {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-alt);
  margin-top: -0.35rem;
  margin-bottom: 1rem;
  min-height: 1.2rem;
}

/* ─── Hero ───────────────────────────────────────────────────────────── */
.hero-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1.4fr 1fr;
  /* Better split for readability */
  align-items: center;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Availability Badge */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(112, 255, 183, 0.3);
  background: rgba(112, 255, 183, 0.06);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.availability-badge::before {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 2.2s steps(2) infinite;
  flex-shrink: 0;
}

.hero-tags {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-tags li {
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.83rem;
  border-left: 2px solid var(--accent);
  transition: background 200ms ease, border-color 200ms ease;
}

.hero-tags li:nth-child(2) {
  border-left-color: var(--accent-alt);
}

.hero-tags li:nth-child(3) {
  border-left-color: var(--hot);
}

.hero-tags li:hover {
  background: rgba(112, 255, 183, 0.05);
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  font-size: 0.83rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: box-shadow 250ms ease, transform 250ms ease, border-color 200ms ease, color 200ms ease, background 200ms ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none !important;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-alt));
  color: #021108;
  border-color: transparent;
  animation: btnGlow 3.5s ease-in-out infinite;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--accent-alt);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
  outline: none;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(112, 255, 183, 0.4);
}

/* ─── Hero Panel ─────────────────────────────────────────────────────── */
.hero-panel {
  display: grid;
  gap: 1.1rem;
}

.signal-card,
.stat-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--panel-alt);
  padding: 1.5rem;
  animation: float 9s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.signal-card::before,
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  border-radius: 16px 16px 0 0;
}

.signal-card ul {
  margin: 1rem 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.85;
}

.signal-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
  margin-top: 0.25rem;
}

.stat-card {
  animation-delay: 2.2s;
}

.stat-card::before {
  background: linear-gradient(90deg, var(--hot), var(--accent-alt));
}

.stat-card p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--muted);
  font-size: 0.68rem;
}

.stat-card strong {
  display: block;
  font-size: 1.55rem;
  margin: 0.5rem 0;
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
}

.stat-card span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ─── About ──────────────────────────────────────────────────────────── */
.section-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.about-panel {
  border-radius: 14px;
  border: 1px dashed rgba(112, 255, 183, 0.2);
  padding: 1.5rem;
  background: rgba(7, 19, 34, 0.9);
}

.about-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-panel ul li {
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.7;
}

.about-panel ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85rem;
}

/* ─── Section Heading ────────────────────────────────────────────────── */
.section-heading {
  margin-bottom: 1.6rem;
}

/* ─── Cards (Expertise / Tech Stack) ────────────────────────────────── */
.card-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 21, 34, 0.9);
  padding: 1.5rem;
  min-height: 190px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 260ms ease, border-color 260ms ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.card h3 {
  transform: translateZ(30px);
}

.card .clean-list {
  transform: translateZ(20px);
}

/* Glow top border via pseudo */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms ease;
  border-radius: 14px 14px 0 0;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(112, 255, 183, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity 280ms ease;
}

.card:hover {
  transform: translateY(-7px) scale(1.01);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 30px var(--accent-glow);
  border-color: rgba(112, 255, 183, 0.2);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover::after {
  opacity: 1;
}

.card h3 {
  position: relative;
  z-index: 1;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.card p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

/* ─── Tech Pills (in cards) ──────────────────────────────────────────── */
.tech-pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
  white-space: nowrap;
}

.tech-pill:hover {
  border-color: rgba(112, 255, 183, 0.3);
  color: var(--accent);
  background: rgba(112, 255, 183, 0.05);
}

/* ─── Projects Grid ──────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.project-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(6, 18, 28, 0.94);
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 270ms ease, border-color 270ms ease;
  /* equal-height flex column so footer pins to bottom */
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card h3,
.project-card .project-meta {
  transform: translateZ(30px);
}

.project-card ul,
.project-card .project-summary {
  transform: translateZ(20px);
}

/* Push everything from the first hr downward to the card bottom */
.project-card hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin: 0;
  flex-shrink: 0;
}

.project-card hr:first-of-type {
  margin-top: auto;
}

/* Top accent bar colour per project */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.project-card[data-project="rylee"]::before {
  background: linear-gradient(90deg, var(--accent), #00e5a0);
}

.project-card[data-project="gostation"]::before {
  background: linear-gradient(90deg, var(--accent-alt), #0099ff);
}

.project-card[data-project="scm"]::before {
  background: linear-gradient(90deg, var(--hot), #c04ef0);
}

/* Glow on hover */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(86, 223, 255, 0.07), transparent 55%);
  opacity: 0;
  transition: opacity 270ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), 0 0 35px rgba(86, 223, 255, 0.1);
  border-color: rgba(86, 223, 255, 0.2);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card ul {
  margin: 1rem 0 1.3rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
}

.project-card ul li {
  padding-left: 1.3rem;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.65;
}

.project-card ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent-alt);
  font-size: 1.1rem;
  line-height: 1.4;
}

.project-meta {
  position: relative;
  z-index: 1;
  margin-bottom: 0.75rem;
}

.project-type {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.3rem !important;
}

.project-card h3 {
  position: relative;
  z-index: 1;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.project-card>p {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.tech-line {
  color: var(--accent-alt);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
  letter-spacing: 0.04em;
  padding-top: 0.85rem;
  margin-top: 0;
  margin-bottom: 0;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.42rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  z-index: 1;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.project-link span {
  font-size: 1rem;
  transition: transform 200ms ease;
  display: inline-block;
}

.project-link:hover,
.project-link:focus-visible {
  color: var(--accent-alt);
  border-color: var(--accent-alt);
  background: rgba(86, 223, 255, 0.06);
  transform: translateY(-1px);
  text-decoration: none;
}

.project-link:hover span {
  transform: translate(2px, -2px);
}

/* Per-project link accent on hover */
.project-card[data-project="rylee"] .project-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(112, 255, 183, 0.06);
}

.project-card[data-project="scm"] .project-link:hover {
  color: var(--hot);
  border-color: var(--hot);
  background: rgba(255, 126, 184, 0.06);
}

/* ─── Additional Projects ────────────────────────────────────────────── */
.additional-projects {
  background: rgba(4, 10, 18, 0.95);
}

.pill-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .pill-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .pill-grid {
    grid-template-columns: 1fr;
  }
}

.pill {
  padding: 1.3rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 23, 36, 0.85);
  transition: transform 230ms ease, border-color 220ms ease, box-shadow 230ms ease;
  position: relative;
  overflow: hidden;
}

.pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(112, 255, 183, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity 230ms ease;
}

.pill:hover {
  transform: translateY(-4px);
  border-color: rgba(86, 223, 255, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-alt-glow);
}

.pill:hover::before {
  opacity: 1;
}

.pill h3 {
  font-size: 0.98rem;
  color: var(--accent-alt);
  margin-bottom: 0.4rem;
  position: relative;
  z-index: 1;
}

.pill p {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ─── Experience Timeline ────────────────────────────────────────────── */
.timeline {
  border-left: 2px solid transparent;
  background-image: linear-gradient(var(--bg), var(--bg)), linear-gradient(180deg, var(--accent), var(--accent-alt), var(--hot));
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  border-left: 2px solid;
  border-image: linear-gradient(180deg, var(--accent), var(--accent-alt), var(--hot)) 1;
  padding-left: 1.75rem;
  display: grid;
  gap: 1.5rem;
}

.timeline-item {
  position: relative;
  padding: 1.4rem 1.4rem 1.4rem 1.65rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(5, 15, 24, 0.92);
  transition: box-shadow 230ms ease, border-color 230ms ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.timeline-item .timeline-meta {
  transform: translateZ(30px);
}

.timeline-item ul {
  transform: translateZ(20px);
}

.timeline-item::before {
  content: '';
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--accent);
  left: -2.38rem;
  top: 1.55rem;
  box-shadow: 0 0 0 3px rgba(112, 255, 183, 0.15), 0 0 15px rgba(112, 255, 183, 0.7);
  animation: dotPulse 2.8s ease-in-out infinite;
}

.timeline-item:nth-child(2)::before {
  background: var(--accent-alt);
  box-shadow: 0 0 0 3px rgba(86, 223, 255, 0.15), 0 0 15px rgba(86, 223, 255, 0.6);
}

.timeline-item:nth-child(3)::before {
  background: var(--hot);
  box-shadow: 0 0 0 3px rgba(255, 126, 184, 0.15), 0 0 15px rgba(255, 126, 184, 0.6);
}

.timeline-item:hover {
  transform: translateY(-5px) translateX(3px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 25px var(--accent-glow);
  border-color: rgba(112, 255, 183, 0.18);
}

.timeline-meta {
  margin-bottom: 0.75rem;
}

.timeline-meta h3 {
  margin-bottom: 0.2rem;
  font-size: 1.05rem;
  color: var(--text);
}

.timeline-meta p {
  color: var(--muted);
  margin-bottom: 0.1rem;
  font-size: 0.88rem;
}

.timeline-item ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.timeline-item ul li {
  padding-left: 1.3rem;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.65;
}

.timeline-item ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.82rem;
  top: 0.05em;
}

/* ─── Contact ────────────────────────────────────────────────────────── */
.contact-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 18, 32, 0.94);
  padding: 2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt), var(--hot));
}

.contact-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1.4rem;
}

.contact-grid a {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease, transform 200ms ease;
  font-size: 0.9rem;
}

.contact-grid a::after {
  content: '→';
  font-size: 0.9rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.contact-grid a:hover {
  border-color: var(--accent-alt);
  color: var(--accent-alt);
  background: rgba(86, 223, 255, 0.04);
  transform: translateY(-2px);
  text-decoration: none;
}

.contact-grid a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Keyboard Hints ─────────────────────────────────────────────────── */
.keyboard-hints {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.83rem;
}

.keyboard-hints kbd {
  margin-right: 0.3rem;
}

kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.14rem 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  font-family: 'IBM Plex Mono', monospace;
}

/* ─── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 1.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.83rem;
  padding-bottom: 0.5rem;
  opacity: 0.8;
}

/* ─── Reveal Animations ──────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 580ms cubic-bezier(0.16, 1, 0.3, 1), transform 580ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* staggered children */
[data-reveal]:nth-child(2) {
  transition-delay: 80ms;
}

[data-reveal]:nth-child(3) {
  transition-delay: 160ms;
}

[data-reveal]:nth-child(4) {
  transition-delay: 240ms;
}

/* ─── Performance hints ──────────────────────────────────────────────── */
.glitch-text,
.type-line,
.status-pill,
.signal-card,
.stat-card,
.project-card,
.card,
.timeline-item,
.pill,
.contact-card {
  will-change: transform, opacity;
}

/* ─── Keyframes ──────────────────────────────────────────────────────── */
@keyframes frameIn {
  from {
    opacity: 0;
    transform: scale(0.975) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  50.01%,
  100% {
    opacity: 0;
  }
}

@keyframes scan {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}

@keyframes borderPulse {

  0%,
  100% {
    opacity: 0.25;
  }

  50% {
    opacity: 0.65;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes glitch {
  0% {
    clip-path: inset(0 0 0 0);
  }

  20% {
    clip-path: inset(8% 0 28% 0);
    transform: translate(2px, -1px);
  }

  40% {
    clip-path: inset(38% 0 8% 0);
    transform: translate(-2px, 1px);
  }

  60% {
    clip-path: inset(23% 0 38% 0);
    transform: translate(1px, -1px);
  }

  80% {
    clip-path: inset(18% 0 13% 0);
    transform: translate(-1px, 1px);
  }

  100% {
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0);
  }
}

@keyframes bitFloat {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }

  10% {
    opacity: 0.35;
  }

  50% {
    opacity: 0.12;
  }

  100% {
    transform: translateY(-240px) scale(1.5);
    opacity: 0;
  }
}

@keyframes pulseStatus {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(112, 255, 183, 0.3);
  }

  50% {
    box-shadow: 0 0 20px rgba(86, 223, 255, 0.55);
  }
}

@keyframes btnGlow {

  0%,
  100% {
    box-shadow: 0 0 14px rgba(112, 255, 183, 0.2);
  }

  50% {
    box-shadow: 0 0 28px rgba(112, 255, 183, 0.45), 0 0 10px rgba(86, 223, 255, 0.3);
  }
}

@keyframes dotPulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(112, 255, 183, 0.15), 0 0 15px rgba(112, 255, 183, 0.7);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(112, 255, 183, 0.08), 0 0 22px rgba(112, 255, 183, 0.5);
  }
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .terminal-wrapper {
    padding: 0.75rem 0.75rem 2rem;
  }

  .terminal-screen {
    padding: 1rem;
  }

  .terminal-block {
    padding: 1.4rem;
  }

  .terminal-block::before {
    font-size: 2.5rem;
    top: 1rem;
    right: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline {
    border-left: none;
    padding-left: 0;
    border-image: none;
  }

  .timeline-item::before {
    display: none;
  }

  .terminal-nav {
    gap: 0.35rem;
  }

  .terminal-nav a {
    font-size: 0.8rem;
    padding: 0.28rem 0.65rem;
  }

  .status-line {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .status-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {

  .projects-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

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

/* ─── Reduced Motion ─────────────────────────────────────────────────── */
@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;
  }
}

/* ─── UI & Interactive Utilities ──────────────────────────────────────── */

/* Stagger List Animation */
.stagger-item {
  opacity: 0;
  transform: translateY(15px);
  will-change: transform, opacity;
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}