/* ============================================
   Wolfgang Linz — Developer Portfolio
   Terminal / 3D Design System
   ============================================ */

:root {
  --bg-deep: #05080f;
  --bg-base: #0a0f1a;
  --bg-elevated: rgba(13, 20, 33, 0.82);
  --bg-terminal: rgba(7, 11, 19, 0.92);
  --surface: rgba(0, 255, 156, 0.04);
  --text-primary: #e6edf3;
  --text-secondary: #b3c0cf;
  --text-muted: #7b8a9d;
  --accent: #00ff9c;
  --accent-dim: #00c97b;
  --accent-glow: rgba(0, 255, 156, 0.18);
  --cyan: #00d1ff;
  --cyan-glow: rgba(0, 209, 255, 0.18);
  --purple: #b48cff;
  --orange: #ffb454;
  --red: #ff5c57;
  --yellow: #f3f99d;
  --border: rgba(0, 255, 156, 0.1);
  --border-soft: rgba(230, 237, 243, 0.08);
  --border-hover: rgba(0, 255, 156, 0.4);
  --radius: 8px;
  --radius-lg: 12px;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1200px;
}

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

html {
  scroll-padding-top: 76px;
  color-scheme: dark;
}

body {
  font-family: var(--font-mono);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 255, 156, 0.06), transparent),
    var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #05080f;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #1d2a3a;
  border-radius: 5px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

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

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

kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--border-soft);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.prompt {
  color: var(--accent);
  font-weight: 600;
}

.status-ok {
  color: var(--accent);
}

/* ============================================
   Boot Screen
   ============================================ */

.boot {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.boot.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-inner {
  width: min(520px, 86vw);
}

.boot-log {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--accent);
  white-space: pre-wrap;
  min-height: 150px;
  text-shadow: 0 0 8px var(--accent-glow);
}

.boot-log .dim {
  color: var(--text-muted);
}

.boot-bar {
  margin-top: 16px;
  height: 4px;
  background: rgba(0, 255, 156, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.boot-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transition: width 0.2s ease;
}

/* ============================================
   3D Canvas, Matrix, Scanlines
   ============================================ */

#bg3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: block;
}

#matrix {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9000;
  pointer-events: none;
  display: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9500;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 3px,
    transparent 4px
  );
  opacity: 0.5;
  mix-blend-mode: overlay;
}

/* Subtle background grid behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(0, 255, 156, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 156, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 30%, black 30%, transparent 80%);
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 0;
  transition: background var(--transition), border-color var(--transition), padding var(--transition);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  padding: 10px 0;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  text-shadow: 0 0 16px var(--accent-glow);
}

.logo-bracket { color: var(--text-muted); font-weight: 400; }
.logo-slash { color: var(--accent); }

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

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.tab-icon {
  font-size: 7px;
  color: var(--text-muted);
  opacity: 0.4;
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--border);
}

.nav-links a:hover .tab-icon {
  color: var(--accent);
  opacity: 1;
  text-shadow: 0 0 8px var(--accent);
}

.palette-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  margin-left: 10px;
  transition: border-color var(--transition);
}

.palette-btn:hover {
  border-color: var(--border-hover);
}

.palette-btn kbd {
  border: none;
  background: none;
  padding: 0 2px;
  font-size: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   Hero
   ============================================ */

.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 110px 24px 60px;
}

.hero-content {
  max-width: var(--max-width);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
  max-width: 580px;
}

.hero-greeting {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-weight: 500;
}

.hero-name {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -3px;
  margin-bottom: 18px;
  color: var(--text-primary);
  position: relative;
  text-shadow: 0 0 40px rgba(0, 255, 156, 0.15);
}

/* Glitch effect */
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--cyan);
  animation: glitch-a 6s infinite steps(1);
}

.glitch::after {
  color: var(--red);
  animation: glitch-b 6s infinite steps(1);
}

@keyframes glitch-a {
  0%, 93%, 100% { opacity: 0; transform: none; clip-path: none; }
  94% { opacity: 0.8; transform: translate(-4px, 1px); clip-path: inset(15% 0 60% 0); }
  95% { opacity: 0.8; transform: translate(3px, -1px); clip-path: inset(60% 0 10% 0); }
  96% { opacity: 0; }
}

@keyframes glitch-b {
  0%, 93%, 100% { opacity: 0; transform: none; clip-path: none; }
  94% { opacity: 0.8; transform: translate(4px, -1px); clip-path: inset(50% 0 25% 0); }
  95% { opacity: 0.8; transform: translate(-3px, 2px); clip-path: inset(5% 0 75% 0); }
  96% { opacity: 0; }
}

.hero-role {
  font-size: clamp(15px, 2.2vw, 20px);
  color: var(--accent);
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  min-height: 32px;
  text-shadow: 0 0 12px var(--accent-glow);
}

.hero-role-prefix {
  color: var(--text-muted);
  margin-right: 10px;
  text-shadow: none;
}

.typing-cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
  margin-left: 2px;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero terminal window */
.hero-terminal {
  flex-shrink: 0;
  width: min(440px, 100%);
  perspective: 1000px;
}

/* ============================================
   Terminal / Code Windows
   ============================================ */

.term-window,
.code-window,
.contact-form {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 255, 156, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border-soft);
}

.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.term-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.term-body {
  padding: 18px 20px 22px;
  font-size: 13px;
  line-height: 2;
  min-height: 330px;
}

.term-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.term-line .prompt {
  margin-right: 8px;
}

.term-out {
  color: var(--text-secondary);
}

.term-avatar-line {
  padding: 8px 0;
}

.term-avatar {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-hover);
  box-shadow: 0 0 24px var(--accent-glow);
  filter: saturate(0.9) contrast(1.05);
}

/* Code window (about) */
.code-body {
  padding: 20px 22px 24px;
  font-size: 13.5px;
  line-height: 2;
  overflow-x: auto;
}

.code-body .ln {
  display: inline-block;
  width: 28px;
  color: #324157;
  user-select: none;
}

.code-body .kw { color: var(--purple); }
.code-body .var { color: var(--cyan); }
.code-body .op { color: var(--red); }
.code-body .key { color: #8ddbff; }
.code-body .str { color: var(--accent); }
.code-body .num { color: var(--orange); }
.code-body .bool { color: var(--orange); font-style: italic; }

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #04130c;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover {
  background: #5cffbe;
  box-shadow: 0 0 40px rgba(0, 255, 156, 0.35);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-soft);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--accent);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: bounce-arrow 2s ease-in-out infinite;
}

.scroll-text {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   Sections
   ============================================ */

.section {
  padding: 110px 0;
  position: relative;
}

.section-alt {
  background: rgba(10, 15, 26, 0.66);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-title {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 56px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  align-self: center;
  background: linear-gradient(90deg, var(--border), transparent);
  max-width: 300px;
}

.title-comment {
  color: #324157;
  font-weight: 400;
}

.section-number {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* ============================================
   About
   ============================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 56px;
}

.about-text p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 18px;
}

.about-text strong {
  color: var(--accent);
  font-weight: 600;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

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

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 30px var(--accent-glow);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number, .stat-suffix {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  display: inline;
  text-shadow: 0 0 18px var(--accent-glow);
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ============================================
   Skills
   ============================================ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: border-color var(--transition), box-shadow var(--transition);
  transform-style: preserve-3d;
}

.skill-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 36px var(--accent-glow);
}

.skill-path {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.skill-path::before {
  content: '$ cd ';
  color: #324157;
}

.skill-icon {
  width: 54px;
  height: 54px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 18px;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.skill-card h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition);
}

.tag:hover {
  color: var(--accent);
  border-color: var(--border-hover);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* ============================================
   Projects
   ============================================ */

.project-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-prompt {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 8px;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 5px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  color: var(--accent);
  border-color: var(--border-hover);
}

.filter-btn.active {
  background: var(--accent);
  color: #04130c;
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 0 16px var(--accent-glow);
}

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

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  transform-style: preserve-3d;
}

.project-shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  background:
    linear-gradient(rgba(0, 255, 156, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 156, 0.03) 1px, transparent 1px),
    var(--bg-deep);
  background-size: 24px 24px, 24px 24px, auto;
  position: relative;
}

.project-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
  filter: saturate(0.92);
}

/* — Loading state: scan beam + terminal fetch line — */

.project-shot.loading img {
  opacity: 0;
}

.project-shot.loaded img {
  animation: shot-in 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes shot-in {
  from { opacity: 0; filter: saturate(0.92) brightness(1.6) blur(6px); }
  to { opacity: 1; filter: saturate(0.92) brightness(1) blur(0); }
}

.project-shot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 255, 156, 0.07) 35%,
    rgba(0, 255, 156, 0.16) 50%,
    rgba(0, 255, 156, 0.07) 65%,
    transparent 100%);
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.project-shot.loading::before {
  opacity: 1;
  animation: shot-scan 1.4s ease-in-out infinite;
}

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

.project-shot::after {
  content: '$ fetch preview.jpg';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
  letter-spacing: 0.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-shot.loading::after {
  opacity: 1;
  animation: shot-dots 1.2s steps(1) infinite;
}

@keyframes shot-dots {
  0% { content: '$ fetch preview.jpg'; }
  25% { content: '$ fetch preview.jpg .'; }
  50% { content: '$ fetch preview.jpg ..'; }
  75% { content: '$ fetch preview.jpg ...'; }
}

.project-shot.failed img {
  display: none;
}

.project-shot.failed::after {
  content: '✗ preview unavailable';
  color: var(--red);
  text-shadow: none;
  opacity: 0.8;
}

.project-card:hover .project-shot img {
  transform: scale(1.045);
  filter: saturate(1.05);
}

.project-shot-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #324157;
  font-size: 13px;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(230, 237, 243, 0.02) 14px 28px),
    var(--bg-deep);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
}

.project-domain {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
}

.project-domain .status-ok {
  font-size: 8px;
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-glow);
}

.project-card.hidden {
  display: none;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.project-link-icon {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.project-card:hover .project-link-icon {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.project-card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  transition: color var(--transition);
}

.project-card:hover h3 {
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent-glow);
}

.project-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-sm {
  font-size: 12px;
  color: var(--cyan);
  font-weight: 500;
  opacity: 0.85;
}

/* ============================================
   Contact
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-cmd {
  font-size: 14px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.contact-text > p:not(.contact-cmd) {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.015);
}

.contact-link-arrow {
  margin-left: auto;
  opacity: 0;
  transform: translateX(-6px);
  transition: all var(--transition);
  color: var(--accent);
}

.contact-link:hover {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.contact-link:hover .contact-link-arrow {
  opacity: 1;
  transform: translateX(0);
}

.contact-form-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  background: rgba(5, 8, 15, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 13px 15px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  caret-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #3d4d61;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   Footer & Status Bar
   ============================================ */

.footer {
  border-top: 1px solid var(--border-soft);
  background: rgba(5, 8, 15, 0.8);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 36px 0;
}

.footer-logo {
  font-size: 17px;
  font-weight: 800;
}

.footer-text {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-coffee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition), text-shadow var(--transition);
}

.footer-coffee:hover {
  color: var(--yellow);
  text-shadow: 0 0 12px rgba(243, 249, 157, 0.4);
}

.statusbar {
  border-top: 1px solid var(--border-soft);
  background: rgba(0, 255, 156, 0.03);
}

.statusbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 7px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.status-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-spacer {
  flex: 1;
}

/* ============================================
   Command Palette
   ============================================ */

.palette {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 16vh;
}

.palette[hidden] {
  display: none;
}

.palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 9, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.palette-box {
  position: relative;
  width: min(560px, 92vw);
  background: var(--bg-terminal);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 50px var(--accent-glow);
  overflow: hidden;
  animation: palette-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes palette-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.palette-input-row input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 15px;
  caret-color: var(--accent);
}

.palette-list {
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.palette-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
}

.palette-list li .pi-icon {
  color: var(--text-muted);
  font-size: 12px;
  width: 18px;
  text-align: center;
}

.palette-list li .pi-hint {
  margin-left: auto;
  font-size: 11px;
  color: #3d4d61;
}

.palette-list li.selected,
.palette-list li:hover {
  background: var(--surface);
  color: var(--accent);
}

.palette-list li.selected .pi-icon {
  color: var(--accent);
}

/* ============================================
   Scroll Reveal
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-role { justify-content: center; }
  .hero-description { text-align: center; }
  .hero-cta { justify-content: center; }

  .hero { padding-bottom: 110px; }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(5, 8, 15, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 24px;
    gap: 6px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    font-size: 15px;
    padding: 12px 14px;
  }

  .palette-btn { display: none; }

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

  .section { padding: 76px 0; }
  .section-title { margin-bottom: 40px; }

  .hero { padding: 90px 20px 100px; }

  .term-body { min-height: 0; }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .status-hide-sm { display: none; }

  .scanlines { display: none; }
}

@media (max-width: 400px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn { justify-content: center; }

  .about-stats { grid-template-columns: 1fr; }

  .project-filters { justify-content: center; }

  .filter-prompt { width: 100%; text-align: center; margin: 0; }
}

/* ============================================
   Reduced Motion
   ============================================ */

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .glitch::before,
  .glitch::after {
    display: none;
  }
}
