/* =====================================================
   Avi Dube Portfolio — Aerospace Command Center Theme
   ===================================================== */

/* --- Custom Properties --- */
:root {
  /* Backgrounds — matte charcoal/slate, not pure black */
  --bg:           #131929;
  --bg-2:         #19213a;
  --bg-3:         #1e2847;

  /* Blueprint cyan / electric accent */
  --accent:       #0ea5e9;
  --accent-dim:   rgba(14, 165, 233, 0.08);
  --accent-glow:  rgba(14, 165, 233, 0.22);
  --border:       rgba(14, 165, 233, 0.12);
  --border-hover: rgba(14, 165, 233, 0.45);

  /* Typography — stark white headings, metallic silver body */
  --white:        #f0f6ff;
  --text:         #c8d4e8;
  --silver:       #8892a4;
  --dim:          #3d4a63;

  /* Basketball orange — keep the nod */
  --orange:       #fb923c;
  --orange-dim:   rgba(251, 146, 60, 0.08);
  --orange-glow:  rgba(251, 146, 60, 0.22);

  /* Sizing */
  --nav-height:   64px;
  --radius:       4px;     /* near-sharp — schematic precision */
  --radius-sm:    2px;

  /* Precision easing — decelerates like a stabilising control system */
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:     cubic-bezier(0.0, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #38bdf8; }

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

/* --- Precision Scrollbar --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
  letter-spacing: -0.015em;
}

/* Blueprint gradient — used sparingly, only hero title */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #38bdf8 60%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

code, pre { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 0.18em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.84em;
  color: var(--accent);
}

pre {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
pre code { background: none; border: none; padding: 0; font-size: 0.875rem; color: var(--text); }

/* =====================================================
   NAVBAR
   ===================================================== */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(19, 25, 41, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.navbar.scrolled {
  background: rgba(19, 25, 41, 0.97);
  border-bottom-color: var(--border-hover);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.02em;
}
.nav-logo:hover { color: var(--white); }

.logo-bracket { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 0.125rem; list-style: none; }

.nav-link {
  font-family: 'JetBrains Mono', monospace;
  color: var(--silver);
  font-size: 0.78rem;
  font-weight: 400;
  padding: 0.45rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.nav-link::before { content: '/ '; color: var(--dim); }
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--silver);
  border-radius: 1px;
  transition: transform 0.28s var(--ease), opacity 0.28s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0f1e;
  font-weight: 600;
}
.btn-primary:hover {
  background: #38bdf8;
  color: #0a0f1e;
  box-shadow: 0 0 24px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  transform: translateY(-2px);
}

/* =====================================================
   HERO
   ===================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--nav-height) 1.5rem 5rem;
}

/* Dual-resolution schematic scanning grid */
.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(14, 165, 233, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.025) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px;
  animation: grid-scan 20s linear infinite;
}

@keyframes grid-scan {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 64px 64px, 64px 64px, 16px 16px, 16px 16px; }
}

/* Subtle targeting glow — like a sensor sweep */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.hero-glow-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
  top: 5%; right: -5%;
}
.hero-glow-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.06) 0%, transparent 70%);
  bottom: 15%; left: 5%;
}

/* Basketball court arc — barely visible nod to the game */
.basketball-court {
  position: absolute;
  width: 520px; height: 520px;
  border: 1px solid rgba(251, 146, 60, 0.05);
  border-radius: 50%;
  bottom: -260px; right: 8%;
  pointer-events: none;
  z-index: 0;
}
.basketball-court::after {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border: 1px solid rgba(251, 146, 60, 0.035);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* Drone patrol — flies between waypoints (18s loop, visits each at 0s / 6s / 12s) */
.drone-patrol {
  position: absolute;
  width: 44px; height: 44px;
  color: var(--accent);
  transform: translate(-50%, -50%);
  animation: drone-patrol 18s linear infinite;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.drone-svg { width: 44px; height: 44px; display: block; }

/* Rotor blade spin — opposite diagonals counter-rotate (accurate to real quads) */
.rotor-blade     { animation: rotor-cw  0.3s linear infinite; }
.rotor-blade-ccw { animation: rotor-ccw 0.3s linear infinite; }

/*
  Waypoint positions (matching .waypoint-N CSS below):
    WP1: top 18%, right 13%  →  top 18%, left 87%
    WP2: bottom 26%, left 14% →  top 74%, left 14%
    WP3: top 52%, right 24%  →  top 52%, left 76%
  Per-keyframe ease-in-out: drone decelerates into each stop, accelerates out.
*/
@keyframes drone-patrol {
  0% {
    top: 18%; left: 87%;
    animation-timing-function: ease-in-out;
  }
  33.33% {
    top: 74%; left: 14%;
    animation-timing-function: ease-in-out;
  }
  66.66% {
    top: 52%; left: 76%;
    animation-timing-function: ease-in-out;
  }
  100% { top: 18%; left: 87%; }
}

@keyframes rotor-cw  { to { stroke-dashoffset:  22; } }
@keyframes rotor-ccw { to { stroke-dashoffset: -22; } }

/* Waypoint arrival pulses — dot brightens + ring expands on drone arrival */
.waypoint {
  position: absolute;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: wp-dot 18s ease-out infinite;
}
.waypoint::before,
.waypoint::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  animation: wp-ring 18s ease-out infinite;
  opacity: 0;
}

/* WP1 — visited at 0s */
.waypoint-1              { top: 18%; right: 13%;  animation-delay: 0s; }
.waypoint-1::before      { animation-delay: 0s; }
.waypoint-1::after       { animation-delay: 0.6s; }

/* WP2 — visited at 6s */
.waypoint-2              { bottom: 26%; left: 14%; animation-delay: 6s; }
.waypoint-2::before      { animation-delay: 6s; }
.waypoint-2::after       { animation-delay: 6.6s; }

/* WP3 — visited at 12s */
.waypoint-3              { top: 52%; right: 24%; animation-delay: 12s; }
.waypoint-3::before      { animation-delay: 12s; }
.waypoint-3::after       { animation-delay: 12.6s; }

/* Dot flare on arrival — bright glow for ~2s, then settles to dim */
@keyframes wp-dot {
  0%   { opacity: 0.25; box-shadow: none; }
  2%   { opacity: 1;    box-shadow: 0 0 8px var(--accent), 0 0 18px var(--accent-glow); }
  14%  { opacity: 0.45; box-shadow: none; }
  100% { opacity: 0.25; }
}

/* Ring expands and fades from the dot on arrival */
@keyframes wp-ring {
  0%   { transform: scale(1); opacity: 0; }
  2%   { transform: scale(1); opacity: 0.7; }
  14%  { transform: scale(8); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

/* HUD-style badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--accent-dim);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.875rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
  animation: ping 2.4s ease-in-out infinite;
}

@keyframes ping {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 6px var(--accent); }
  50%       { opacity: 0.4; transform: scale(0.7); box-shadow: 0 0 2px var(--accent); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
  line-height: 1.08;
}

.hero-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  color: var(--accent);
  margin-bottom: 1.125rem;
  letter-spacing: 0.06em;
}

.hero-description {
  font-size: 1rem;
  color: var(--silver);
  max-width: 560px;
  margin: 0 auto 2.25rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Telemetry stats display */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.stat { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.stat-divider {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

/* Interest chips */
.hero-interests {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.25rem;
}

.interest-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--dim);
  transition: all 0.2s var(--ease);
  letter-spacing: 0.04em;
}
.interest-chip:hover { border-color: var(--border-hover); color: var(--silver); }

.interest-chip--orange {
  background: var(--orange-dim);
  border-color: rgba(251, 146, 60, 0.25);
  color: var(--orange);
}
.interest-chip--orange:hover {
  background: rgba(251, 146, 60, 0.15);
  border-color: var(--orange);
  box-shadow: 0 0 10px var(--orange-glow);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  animation: scroll-pulse 3s ease-in-out infinite;
}
.hero-scroll::after {
  content: '';
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, var(--border), transparent);
  animation: scroll-line 3s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.9; }
}
@keyframes scroll-line {
  0%, 100% { transform: scaleY(0.6); transform-origin: top; }
  50%       { transform: scaleY(1); }
}

/* =====================================================
   FEATURES / EXPLORE SECTION
   ===================================================== */

.features {
  padding: 6rem 0;
  background: linear-gradient(to bottom, var(--bg), var(--bg-2));
}

.section-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Telemetry-style section header */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}
.section-header::after {
  content: '40.4444°N  79.9608°W';   /* Pittsburgh, CMU */
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--dim);
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.section-header .telem-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-hover), var(--border), transparent);
}

.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-hover);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: 0.08em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;  /* schematic tile gap */
  background: var(--border);  /* gap becomes border */
  border: 1px solid var(--border);
}

/* Schematic feature cards — tile layout */
.feature-card {
  background: var(--bg-2);
  padding: 0;
  transition: background 0.25s var(--ease);
  color: var(--text);
  display: flex;
  flex-direction: column;
  position: relative;
}
.feature-card:hover {
  background: var(--bg-3);
  color: var(--text);
}

/* Corner tick marks — CAD schematic style */
.feature-card::before, .feature-card::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--border-hover);
  border-style: solid;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), border-color 0.25s var(--ease);
  z-index: 2;
  pointer-events: none;
}
.feature-card::before { top: 0; left: 0; border-width: 1px 0 0 1px; }
.feature-card::after  { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.feature-card:hover::before,
.feature-card:hover::after {
  width: 18px; height: 18px;
  border-color: var(--accent);
}

.feature-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
}
.feature-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s var(--ease), filter 0.3s var(--ease);
  filter: brightness(0.85);
}
.feature-card:hover .feature-img { transform: scale(1.04); filter: brightness(1); }

.feature-body { padding: 1.625rem; flex: 1; display: flex; flex-direction: column; }

.feature-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--white); }

.feature-excerpt { color: var(--silver); font-size: 0.85rem; line-height: 1.7; flex: 1; margin-bottom: 1.125rem; }

.feature-cta {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: gap 0.25s var(--ease), color 0.2s var(--ease);
}
.feature-card:hover .feature-cta { gap: 0.7rem; color: #38bdf8; }

/* =====================================================
   PAGE WRAPPER
   ===================================================== */

.page-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 3.5rem) 1.5rem 7rem;
}

.page-header {
  margin-bottom: 3rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

/* Schematic corner on page header */
.page-header::before {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 40px; height: 4px;
  background: var(--accent);
}

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
}

/* =====================================================
   PROSE — Markdown content
   ===================================================== */

.prose { color: var(--text); }

.prose h1, .prose h2 { margin-top: 2.5rem; margin-bottom: 0.875rem; }
.prose h2 {
  font-size: 1.4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  color: var(--white);
}
.prose h3 { font-size: 1.1rem; color: var(--accent); margin-top: 1.75rem; margin-bottom: 0.5rem; }
.prose h4 { font-size: 0.95rem; color: var(--silver); margin-top: 1.25rem; margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: 'JetBrains Mono', monospace; }

.prose p { margin-bottom: 1.1rem; line-height: 1.82; color: var(--text); }

.prose ul, .prose ol { margin: 0.875rem 0 0.875rem 1.5rem; }
.prose li { margin-bottom: 0.4rem; line-height: 1.7; }
.prose li::marker { color: var(--accent); }

.prose strong { color: var(--white); font-weight: 600; }

.prose a {
  color: var(--accent);
  border-bottom: 1px solid rgba(14, 165, 233, 0.25);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.prose a:hover { color: #38bdf8; border-bottom-color: #38bdf8; }

.prose img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.75rem 0;
  max-width: 100%;
}

.prose blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  margin: 1.75rem 0;
  color: var(--silver);
  font-style: italic;
}

.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.875rem; }
.prose th {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 0.6rem 0.875rem;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.prose td { border: 1px solid var(--border); padding: 0.6rem 0.875rem; color: var(--text); }
.prose tr:hover td { background: var(--accent-dim); }

/* =====================================================
   SINGLE PAGE — Portfolio / Post detail
   ===================================================== */

.single-wrapper {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 3rem) 1.5rem 7rem;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  align-items: start;
}

.single-header-img {
  width: 100%; height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 2.5rem;
  grid-column: 1 / -1;
  filter: brightness(0.9);
}

.single-content { min-width: 0; }

.single-meta {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}

.meta-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--silver);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 0.22rem 0.625rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
}

.single-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
  line-height: 1.12;
  color: var(--white);
}

/* Sidebar — schematic panel */
.single-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
  display: flex; flex-direction: column; gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sidebar-card {
  background: var(--bg-2);
  padding: 1rem 1.125rem;
  transition: background 0.2s var(--ease);
}
.sidebar-card:hover { background: var(--bg-3); }

.sidebar-card-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.sidebar-card-value { font-size: 0.85rem; color: var(--silver); line-height: 1.5; }

/* TOC */
.toc {
  background: var(--bg-2);
  padding: 1rem 1.125rem;
}
.toc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 0.25rem; border-left: 1px solid var(--border); padding-left: 0.625rem; }
.toc-list a { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--silver); display: block; padding: 0.2rem 0; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); border-bottom: none; }
.toc-list a:hover { color: var(--accent); }

/* =====================================================
   COLLECTION — Portfolio grid / Posts
   ===================================================== */

.collection-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 3rem) 1.5rem 7rem;
}

/* Schematic portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.portfolio-card {
  background: var(--bg-2);
  transition: background 0.25s var(--ease);
  display: flex; flex-direction: column;
  color: var(--text);
  position: relative;
}
.portfolio-card:hover {
  background: var(--bg-3);
  color: var(--text);
}

/* CAD corner ticks */
.portfolio-card::before, .portfolio-card::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--border-hover);
  border-style: solid;
  z-index: 2; pointer-events: none;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), border-color 0.25s var(--ease);
}
.portfolio-card::before { top: 0; left: 0; border-width: 1px 0 0 1px; }
.portfolio-card::after  { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.portfolio-card:hover::before,
.portfolio-card:hover::after {
  width: 20px; height: 20px;
  border-color: var(--accent);
}

.portfolio-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-3);
  flex-shrink: 0;
  display: block;
}
.portfolio-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s var(--ease), filter 0.3s var(--ease);
  filter: brightness(0.8) saturate(0.9);
}
.portfolio-card:hover .portfolio-card-img img { transform: scale(1.04); filter: brightness(1) saturate(1); }

.no-image {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--dim); font-size: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.portfolio-card-body { padding: 1.25rem 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.portfolio-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--white); }
.portfolio-card-excerpt { font-size: 0.84rem; color: var(--silver); line-height: 1.65; flex: 1; margin-bottom: 1.125rem; }

.portfolio-card-footer { display: flex; align-items: center; justify-content: space-between; }

.portfolio-card-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--dim);
  letter-spacing: 0.06em;
}

.portfolio-card-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.35rem;
  letter-spacing: 0.04em;
  transition: gap 0.25s var(--ease), color 0.2s var(--ease);
}
.portfolio-card:hover .portfolio-card-link { gap: 0.65rem; color: #38bdf8; }

/* =====================================================
   GALLERY & VIDEO
   ===================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  margin: 1.75rem 0;
  background: var(--border);
  border: 1px solid var(--border);
}
.gallery-grid.full { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.gallery-item { overflow: hidden; transition: opacity 0.2s var(--ease); }
.gallery-item:hover { opacity: 0.85; }
.gallery-item img { width: 100%; height: 160px; object-fit: cover; filter: brightness(0.85); transition: filter 0.3s var(--ease); }
.gallery-item:hover img { filter: brightness(1); }

.video-embed {
  margin: 1.75rem 0;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
  background: var(--bg-3);
}
.video-embed iframe { width: 100%; height: 100%; border: none; display: block; }

/* =====================================================
   ABOUT PAGE
   ===================================================== */

.about-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.about-sidebar { display: flex; flex-direction: column; align-items: center; text-align: center; }

.about-avatar {
  width: 160px; height: 160px;
  border-radius: var(--radius);
  object-fit: cover;
  margin-bottom: 1.25rem;
  border: 1px solid var(--accent);
  filter: brightness(0.9) saturate(0.85);
  transition: filter 0.3s var(--ease), border-color 0.3s var(--ease);
}
.about-avatar:hover { filter: brightness(1) saturate(1); border-color: #38bdf8; }

.about-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.about-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 1.375rem;
  letter-spacing: 0.06em;
}

.about-socials { display: flex; flex-direction: column; gap: 1px; width: 100%; background: var(--border); border: 1px solid var(--border); }

.about-social-link {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--silver);
  letter-spacing: 0.04em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.about-social-link:hover {
  background: var(--bg-3);
  color: var(--accent);
}

/* =====================================================
   CONTACT FORM
   ===================================================== */

.contact-form {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 2rem;
  margin-top: 2rem;
  position: relative;
}
/* Corner ticks on contact form */
.contact-form::before, .contact-form::after {
  content: ''; position: absolute;
  width: 12px; height: 12px;
  border-color: var(--accent); border-style: solid;
  pointer-events: none;
}
.contact-form::before { top: 0; left: 0; border-width: 1px 0 0 1px; }
.contact-form::after  { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.contact-form-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.125rem; }

.form-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--silver);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  color: var(--white);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  outline: none;
  appearance: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--dim); }
.form-textarea { height: 130px; resize: vertical; }

/* =====================================================
   RESUME PAGE
   ===================================================== */

.resume-actions { display: flex; align-items: center; gap: 0.875rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

.resume-download {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  transition: all 0.25s var(--ease);
}
.resume-download:hover {
  background: var(--accent);
  color: #0a0f1e;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.resume-note { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--dim); letter-spacing: 0.04em; }

.resume-embed-container { border: 1px solid var(--border); background: var(--bg-2); }
.resume-embed { width: 100%; height: 85vh; border: none; display: block; }

/* =====================================================
   POSTS LIST
   ===================================================== */

.posts-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); }

.post-card {
  background: var(--bg-2);
  padding: 1.5rem;
  transition: background 0.2s var(--ease);
  display: block; color: var(--text);
  position: relative;
}
.post-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--border-hover);
  transition: background 0.2s var(--ease), width 0.2s var(--ease);
}
.post-card:hover { background: var(--bg-3); color: var(--text); }
.post-card:hover::before { background: var(--accent); width: 3px; }

.post-card-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--dim);
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
}
.post-card-title { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 0.5rem; }
.post-card:hover .post-card-title { color: var(--accent); }
.post-card-excerpt { font-size: 0.85rem; color: var(--silver); line-height: 1.65; }

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 2rem; flex-wrap: wrap;
  padding-bottom: 2rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--dim);
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

.footer-links { display: flex; gap: 1px; flex-wrap: wrap; background: var(--border); border: 1px solid var(--border); }

.footer-social {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--silver);
  padding: 0.4rem 0.875rem;
  background: var(--bg-3);
  letter-spacing: 0.04em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.footer-social:hover { background: var(--accent-dim); color: var(--accent); }

.footer-bottom { text-align: center; }
.footer-bottom p { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--dim); letter-spacing: 0.06em; }

/* =====================================================
   SCROLL REVEAL
   ===================================================== */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }

/* =====================================================
   404
   ===================================================== */

.error-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 2rem;
}
.error-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 7rem; font-weight: 700;
  color: var(--accent); line-height: 1;
  text-shadow: 0 0 40px var(--accent-glow);
}
.error-msg { font-size: 1.1rem; color: var(--silver); margin-bottom: 2rem; }

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 900px) {
  .single-wrapper { grid-template-columns: 1fr; }
  .single-sidebar { position: static; flex-direction: row; flex-wrap: wrap; background: none; border: none; gap: 0.75rem; }
  .sidebar-card { border: 1px solid var(--border); flex: 1; min-width: 140px; }
  .single-header-img { height: 220px; }
  .about-layout { grid-template-columns: 1fr; }
  .about-sidebar { flex-direction: row; flex-wrap: wrap; gap: 1.5rem; text-align: left; align-items: flex-start; }
  .about-avatar { width: 100px; height: 100px; }
  .form-row { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height); left: 0; right: 0;
    background: rgba(19, 25, 41, 0.99);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; padding: 0.625rem 0.875rem; }

  .portfolio-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 260px; justify-content: center; }
  .hero-stats { gap: 1.5rem; }
  .stat-number { font-size: 1.625rem; }
  .section-header::after { display: none; }
}

@media (max-width: 480px) {
  .hero-stats { flex-direction: column; gap: 1rem; }
  .stat-divider { display: none; }
  .basketball-court { display: none; }
}
