:root {
  --bg: #06070d;
  --bg-surface: #0c0f17;
  --bg-card: rgba(14, 18, 28, 0.72);
  --bg-card-hover: rgba(20, 26, 42, 0.88);
  --bg-panel: rgba(10, 14, 24, 0.85);

  --cyan: #22d3ee;
  --cyan-bright: #38bdf8;
  --cyan-glow: rgba(34, 211, 238, 0.28);

  --purple: #8b5cf6;
  --purple-bright: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.28);

  --gold: #f59e0b;
  --gold-bright: #fbbf24;
  --gold-glow: rgba(245, 158, 11, 0.22);

  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.3);
  --red: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(34, 211, 238, 0.35);
  --border-purple: rgba(168, 85, 247, 0.35);

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--cyan);
  color: #000;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 20px;
}

/* Canvas & Background Effects */
#bg-canvas-3d {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 85%);
}

.radial-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: -2;
  opacity: 0.45;
}
.glow-top {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
  background: radial-gradient(circle, var(--purple-glow), transparent 70%);
}
.glow-bottom {
  width: 700px;
  height: 700px;
  bottom: -250px;
  left: -200px;
  background: radial-gradient(circle, var(--cyan-glow), transparent 70%);
}

/* Typography Utilities */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

p {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: var(--font-mono);
}

.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple-bright) 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Focus styles */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 7, 13, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.brand:hover .brand-mark {
  transform: rotate(30deg) scale(1.08);
  color: var(--purple-bright);
}
.brand-name {
  display: flex;
  flex-direction: column;
}
.brand-name strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--text-main);
  line-height: 1.1;
}
.brand-name small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--cyan);
  letter-spacing: 0.15em;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--green);
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse-ring 2s infinite ease-in-out;
}
@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
  padding: 0.25rem 0;
}
.nav-links a:hover {
  color: var(--text-main);
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width 0.2s ease;
}
.nav-links a:hover::after {
  width: 100%;
}
.nav-links a.nav-cta {
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(34, 211, 238, 0.05);
}
.nav-links a.nav-cta:hover {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
}
.nav-links a.nav-cta::after { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.social-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  position: relative;
  transition: var(--transition);
}
.social-icon-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}
.social-icon-btn.discord-btn:hover {
  color: #5865f2;
  border-color: #5865f2;
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.4);
}
.social-icon-btn.github-btn:hover {
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}
.btn-tooltip {
  position: absolute;
  top: 115%;
  right: 0;
  background: #1e293b;
  color: #fff;
  font-size: 0.72rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.social-icon-btn:hover .btn-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-main);
  transition: var(--transition);
}

.scroll-progress-bar {
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple-bright), var(--gold));
  width: 0%;
  transition: width 0.1s linear;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}
.btn-discord {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.35);
}
.btn-discord:hover {
  background: #4752c4;
  box-shadow: 0 6px 24px rgba(88, 101, 242, 0.5);
  transform: translateY(-2px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}
.btn-full {
  width: 100%;
}

/* Sections Global */
.section {
  max-width: 1300px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  position: relative;
}

.section-heading {
  margin-bottom: 3.5rem;
  max-width: 820px;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.18em;
  margin-bottom: 0.8rem;
}
.section-heading h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-heading p {
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  align-items: center;
  gap: 3.5rem;
  padding-top: 4.5rem;
  padding-bottom: 5.5rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.pulse-badge {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--purple-bright);
}
.pulse-core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 8px var(--purple-bright);
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.18rem;
  line-height: 1.75;
  color: #cbd5e1;
  margin-bottom: 2rem;
}

.doctrine-box {
  background: rgba(15, 23, 42, 0.6);
  border-left: 3px solid var(--cyan);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 2.2rem;
  backdrop-filter: blur(10px);
}
.doctrine-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.15em;
  margin-bottom: 0.35rem;
}
.doctrine-quote {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #e2e8f0;
  font-style: italic;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.stat-card {
  display: flex;
  flex-direction: column;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
  line-height: 1.35;
}

/* Hero 3D Telemetry Aside Panel */
.hero-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  transition: transform 0.15s ease-out;
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), transparent 40%, rgba(168, 85, 247, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.panel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.panel-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-main);
  flex-grow: 1;
}
.panel-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.panel-interactive-graphic {
  width: 100%;
  height: 220px;
  background: radial-gradient(circle, rgba(14, 20, 36, 0.9) 0%, rgba(6, 7, 13, 0.9) 80%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.orbit-visual {
  width: 180px;
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(34, 211, 238, 0.25);
  animation: spin 30s linear infinite;
}
.ring-1 { width: 100%; height: 100%; }
.ring-2 {
  width: 70%;
  height: 70%;
  border-color: rgba(168, 85, 247, 0.3);
  animation: spin-rev 22s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes spin-rev { 100% { transform: rotate(-360deg); } }

.orbit-center {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #38bdf8 0%, #1e40af 100%);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.center-star {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
  letter-spacing: 0.08em;
}

.orbit-node {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.orbit-node:hover {
  transform: scale(1.15);
}
.node-saori { top: 10px; right: 15px; color: var(--purple-bright); border-color: rgba(168, 85, 247, 0.5); }
.node-drakes { bottom: 15px; left: 10px; color: var(--gold); border-color: rgba(245, 158, 11, 0.5); }
.node-campus { top: 30px; left: -5px; color: var(--cyan); border-color: rgba(34, 211, 238, 0.5); }
.node-docker { bottom: 25px; right: 5px; color: #38bdf8; border-color: rgba(56, 189, 248, 0.5); }

.panel-stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.row-label {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.row-val {
  font-weight: 500;
  color: var(--text-main);
}
.row-val.highlight { color: var(--cyan); }
.row-val.status-green { color: var(--green); }
.row-val.status-purple { color: var(--purple-bright); }

.panel-footer {
  text-align: right;
}
.panel-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  transition: var(--transition);
}
.panel-link:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--cyan);
}

/* Ticker */
.ticker {
  background: rgba(14, 18, 28, 0.6);
  border-block: 1px solid var(--border);
  padding: 0.9rem 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.ticker-track {
  display: inline-block;
  animation: marquee 35s linear infinite;
}
.ticker-track span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  padding: 0 1rem;
}
.ticker-track b {
  color: var(--cyan);
  padding: 0 0.5rem;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 4 Layers Grid */
.layers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.layer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  backdrop-filter: blur(16px);
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.layer-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(34, 211, 238, 0.1);
}
.layer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.layer-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cyan);
}
.layer-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.layer-card h3 {
  font-size: 1.45rem;
  margin-bottom: 0.85rem;
}
.layer-card p {
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.layer-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.25rem;
}
.layer-features li {
  font-size: 0.88rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 1.35rem;
}
.layer-features li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: bold;
}

/* Projects Section */
.services-grid,
.experience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.service-card,
.experience-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.service-card:hover,
.experience-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.4);
}
.service-card > span {
  display: block;
  color: var(--cyan);
  font: 700 0.75rem var(--font-mono);
  margin-bottom: 1rem;
}
.service-card h3,
.experience-card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.65rem;
}
.service-card p,
.experience-card p,
.privacy-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.filter-btn.active {
  background: rgba(34, 211, 238, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.project-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 16px rgba(34, 211, 238, 0.08);
}
.project-card.hidden {
  display: none;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.category-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}
.badge-ai { background: rgba(168, 85, 247, 0.15); color: var(--purple-bright); border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-gaming { background: rgba(245, 158, 11, 0.15); color: var(--gold-bright); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-infra { background: rgba(34, 211, 238, 0.15); color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.3); }
.badge-education { background: rgba(16, 185, 129, 0.15); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.3); }

.status-pill-small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}
.project-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}
.tags-cloud span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.card-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}
.card-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  transition: var(--transition);
  display: inline-block;
}
.card-link:hover {
  color: #fff;
  transform: translateX(4px);
}
.card-status-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Terminal Section */
.terminal-container {
  background: #090c15;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(34, 211, 238, 0.1);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-bar {
  background: #0e1320;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.terminal-dots {
  display: flex;
  gap: 7px;
}
.terminal-dots .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.terminal-status {
  font-size: 0.7rem;
  color: var(--green);
}

.terminal-body {
  padding: 1.5rem;
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.6;
}
.term-line {
  display: flex;
  flex-direction: column;
  word-break: break-word;
}
.term-line.system-greet {
  color: var(--cyan);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
}
.term-line.command-echo {
  flex-direction: row;
  gap: 0.5rem;
  color: #fff;
}
.prompt {
  color: var(--purple-bright);
  font-weight: 700;
}
.cmd-text {
  color: #fff;
}
.term-success {
  color: var(--green);
}

.terminal-shortcuts {
  background: rgba(14, 19, 32, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.shortcuts-label {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.term-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}
.term-btn:hover {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--cyan);
  color: #fff;
}

.terminal-input-bar {
  background: #0b0f1a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.terminal-input-bar input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  outline: none;
}
.term-send-btn {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}
.term-send-btn:hover {
  background: var(--cyan);
  color: #000;
}

/* Stack Matrix */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.stack-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(16px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stack-category-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.cat-icon {
  font-size: 1.5rem;
}
.category-header h3 {
  font-size: 1.25rem;
}

.tech-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
.tech-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}
.tech-pill:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.tech-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-bottom: 0.4rem;
}
.tech-dot.java { background: #f59e0b; }
.tech-dot.python { background: #38bdf8; }
.tech-dot.ts { background: #3178c6; }
.tech-dot.rust { background: #dea584; }
.tech-dot.php { background: #8892bf; }
.tech-dot.shell { background: #4ade80; }
.tech-dot.linux { background: #facc15; }
.tech-dot.docker { background: #0ea5e9; }
.tech-dot.lvm { background: #a855f7; }
.tech-dot.cloudflare { background: #f97316; }
.tech-dot.tailscale { background: #64748b; }
.tech-dot.systemd { background: #e11d48; }
.tech-dot.sqlite { background: #003b57; }
.tech-dot.postgres { background: #336791; }
.tech-dot.redis { background: #dc2626; }
.tech-dot.gdrive { background: #22c55e; }
.tech-dot.git { background: #f05032; }
.tech-dot.data { background: #8b5cf6; }
.tech-dot.agy { background: #22d3ee; }
.tech-dot.claude { background: #d97706; }
.tech-dot.codex { background: #10b981; }
.tech-dot.mineflayer { background: #84cc16; }
.tech-dot.eleven { background: #ec4899; }
.tech-dot.discord { background: #5865f2; }

.tech-pill strong {
  font-size: 0.88rem;
  color: var(--text-main);
}
.tech-pill small {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

/* Philosophy Doctrine Track */
.doctrine-track {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  align-items: center;
}
.track-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.1rem;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  position: relative;
  transition: var(--transition);
}
.track-step:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}
.track-step h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.track-step p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.track-arrow {
  display: none;
}

/* Contact Section */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.discord-card-featured {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.15) 0%, rgba(30, 27, 75, 0.4) 100%);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.15);
}
.dc-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.dc-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: #5865f2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.5);
}
.dc-title h4 {
  font-size: 1.15rem;
  color: #fff;
}
.dc-title span {
  font-size: 0.78rem;
  color: #cbd5e1;
}
.discord-card-featured p {
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  color: #e2e8f0;
}

.direct-channels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.channel-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.copy-email-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
}
.email-address {
  font-size: 0.85rem;
  color: var(--cyan);
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-copy {
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-copy:hover {
  background: var(--cyan);
  color: #000;
}
.btn-copy.copied {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.tag-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}
.tag-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.form-header {
  margin-bottom: 1.75rem;
}
.form-header h3 {
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}
.form-header p {
  font-size: 0.88rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}
.form-group label .req {
  color: var(--red);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: rgba(10, 14, 24, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  transition: var(--transition);
  font-family: var(--font-body);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
  background: rgba(15, 23, 42, 0.95);
  outline: none;
}
.form-group select option {
  background: #0f172a;
  color: #fff;
}
.form-row {
  display: flex;
  gap: 1rem;
}
.form-group.half {
  flex: 1;
}

.form-status-msg {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 1rem;
  text-align: center;
}
.form-status-msg.error { color: var(--red); }
.form-status-msg.success { color: var(--green); }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(6, 7, 13, 0.95);
  padding: 4rem 1.5rem 2.5rem;
  position: relative;
  z-index: 10;
}
.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.footer-brand {
  max-width: 480px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  display: block;
  margin-bottom: 0.5rem;
}
.footer-brand p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.back-to-top {
  color: var(--cyan);
  font-family: var(--font-mono);
  transition: var(--transition);
}
.back-to-top:hover {
  color: #fff;
  transform: translateY(-2px);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-panel {
    max-width: 580px;
  }
  .doctrine-track {
    grid-template-columns: repeat(3, 1fr);
  }
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .experience-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0.75rem 1rem;
  }
  .status-pill {
    display: none;
  }
  .nav-links {
    position: fixed;
    top: 61px;
    left: 0;
    right: 0;
    background: rgba(6, 7, 13, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    transform: translateY(-120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
  }
  .nav-links.open {
    transform: translateY(0);
  }
  .menu-toggle {
    display: flex;
  }
  .hero {
    padding-top: 2rem;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .layers-grid {
    grid-template-columns: 1fr;
  }
  .stack-grid {
    grid-template-columns: 1fr;
  }
  .tech-pills {
    grid-template-columns: 1fr;
  }
  .doctrine-track {
    grid-template-columns: 1fr;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .services-grid,
  .experience-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track {
    animation: none;
  }
  .orbit-ring {
    animation: none;
  }
}

/* Cookie & Privacy Banner */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  width: calc(100% - 48px);
  background: rgba(14, 11, 28, 0.95);
  border: 1px solid rgba(0, 245, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 245, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
.cookie-text {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.45;
}
.cookie-text strong {
  color: var(--text-bright);
}
.cookie-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.cookie-btn {
  background: linear-gradient(135deg, var(--cyan), #0099ff);
  color: #07050f;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.cookie-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.cookie-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cyan);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* Privacy Modal */
.privacy-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.privacy-modal.active {
  opacity: 1;
  pointer-events: auto;
}
.privacy-modal-card {
  background: #0d0a1a;
  border: 1px solid rgba(123, 44, 191, 0.4);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 30px rgba(123, 44, 191, 0.2);
}
.privacy-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}
.privacy-modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.privacy-modal-close:hover {
  color: var(--cyan);
}
.privacy-modal-content {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-dim);
}
.privacy-modal-content h3 {
  color: #fff;
  margin: 1.2rem 0 0.5rem;
  font-size: 1.1rem;
}
.privacy-modal-content p {
  margin-bottom: 0.75rem;
}
