/* ==========================================================================
   kirill.work.gd — Design Engineering & Motion Stylesheet
   Standards: Emil Kowalski motion, Mobile-Native, Apple Dark, Beautiful Shadows
   ========================================================================== */

/* --- 1. Variables & Design Tokens --- */
:root {
  /* Color Palette: OLED Dark + Cyber Accents */
  --bg-primary: #07090e;
  --bg-surface: #0c1017;
  --bg-card: rgba(16, 21, 31, 0.75);
  --bg-card-hover: rgba(22, 28, 42, 0.9);
  --bg-glass: rgba(12, 16, 25, 0.65);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(16, 185, 129, 0.4);

  /* Accents */
  --accent-emerald: #10b981;
  --accent-emerald-dim: rgba(16, 185, 129, 0.12);
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);

  --accent-cyan: #38bdf8;
  --accent-cyan-dim: rgba(56, 189, 248, 0.12);
  --accent-cyan-glow: rgba(56, 189, 248, 0.35);

  --accent-purple: #a855f7;
  --accent-purple-dim: rgba(168, 85, 247, 0.12);

  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.12);

  --accent-red: #f43f5e;

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #07090e;

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Motion & Easing Tokens (Emil Kowalski standards) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-smooth: 400ms;

  /* Shadows (Multi-layered physical depth) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-subtle);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border-subtle);
  --shadow-card-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--border-hover);
  --shadow-glow: 0 0 35px -5px var(--accent-emerald-glow);

  /* Layout */
  --max-w-container: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
}

/* --- 2. CSS Reset & Mobile Polish --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Mobile Polish: eliminate 300ms tap delay & gray flash */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  position: relative;
}

main, section {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

::selection {
  background: var(--accent-emerald);
  color: var(--text-inverse);
}

/* Accessible Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--accent-emerald);
  color: var(--text-inverse);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 1000;
  transition: transform var(--duration-fast) var(--ease-out);
}
.skip-link:focus {
  top: 20px;
  outline: 2px solid #ffffff;
}

/* Focus Visibility Standards */
:focus-visible {
  outline: 2px solid var(--accent-emerald);
  outline-offset: 3px;
}

/* --- 3. Background Canvas & Noise --- */
.ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 0;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

/* Container Utility */
.container {
  width: 100%;
  max-width: var(--max-w-container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* Typography Utilities */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 10%, #34d399 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-emerald { color: var(--accent-emerald); }
.text-cyan { color: var(--accent-cyan); }
.text-purple { color: var(--accent-purple); }
.text-amber { color: var(--accent-amber); }
.text-red { color: var(--accent-red); }
.text-subtle { color: var(--text-muted); }

/* --- 4. Navigation Bar --- */
.nav-container {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.nav-bar {
  width: 100%;
  max-width: 980px;
  height: 58px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  pointer-events: auto;
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.nav-bar:hover {
  border-color: var(--border-hover);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 0 12px var(--accent-emerald-glow);
}

.brand-name {
  letter-spacing: -0.02em;
}

.accent-dot {
  color: var(--accent-emerald);
}

.nav-links-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: absolute;
  top: 70px;
  left: 16px;
  right: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 20px;
  pointer-events: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: opacity var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
}

.mobile-drawer.open {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mobile-drawer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
}

.mobile-drawer-footer {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.mobile-social-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  text-decoration: none;
}

/* --- 5. Buttons & Touch Feedback --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--duration-fast) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  user-select: none;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
  }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    transform: translateY(-2px);
  }
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
  }
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 600;
}

.btn-accent {
  background: var(--accent-emerald);
  color: var(--text-inverse);
  box-shadow: 0 0 16px var(--accent-emerald-glow);
}

@media (hover: hover) and (pointer: fine) {
  .btn-accent:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 0 20px var(--accent-emerald-glow);
  }
}

/* Touch Active (Press Feedback - 150ms Emil Kowalski rule) */
.touch-feedback:active {
  transform: scale(0.97) !important;
}

/* --- 6. Hero Section --- */
.hero-section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 130px;
  padding-bottom: 70px;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

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

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: var(--radius-full);
  filter: blur(120px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.18;
  max-width: 100vw;
}

.hero-glow-1 {
  top: 10%;
  left: 20%;
  background: var(--accent-emerald);
}

.hero-glow-2 {
  top: 25%;
  right: 20%;
  background: var(--accent-cyan);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.badge-icon {
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.3rem, 5.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  max-width: 900px;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 720px;
  margin-bottom: 36px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 60px;
}

/* Live Telemetry HUD */
.telemetry-hud {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.hud-item {
  padding: 22px 18px;
  text-align: left;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .hud-item:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
  }
}

.hud-value {
  font-size: 2.1rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 8px;
}

.hud-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.hud-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* --- 7. Sections Standard Header --- */
.section-padding {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-emerald);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Category Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
  }
}

.filter-btn.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* --- 8. Projects Grid & 3D Tilt Cards --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              opacity var(--duration-normal) var(--ease-out);
  will-change: transform;
}

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

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card-hover);
  }
}

/* Card Glare effect following cursor */
.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08), transparent 80%);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

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

.project-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-emerald { background: var(--accent-emerald-dim); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-cyan { background: var(--accent-cyan-dim); color: var(--accent-cyan); border: 1px solid rgba(56, 189, 248, 0.2); }
.badge-purple { background: var(--accent-purple-dim); color: var(--accent-purple); border: 1px solid rgba(168, 85, 247, 0.2); }
.badge-amber { background: var(--accent-amber-dim); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-subtle { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: 1px solid var(--border-subtle); }

.project-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.project-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bg-emerald-dim { background: var(--accent-emerald-dim); }
.bg-cyan-dim { background: var(--accent-cyan-dim); }
.bg-purple-dim { background: var(--accent-purple-dim); }
.bg-amber-dim { background: var(--accent-amber-dim); }

.project-name {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.project-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.project-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-highlights {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.tech-chip {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .project-link:hover {
    color: var(--accent-emerald);
  }
}

.project-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* --- 9. Skills Pillars & Anti-Slop Discipline --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.skill-pillar {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.pillar-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.pillar-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pillar-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.pillar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pillar-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  position: relative;
  padding-left: 18px;
}

.pillar-list li::before {
  content: "•";
  color: var(--accent-emerald);
  position: absolute;
  left: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.pillar-list li strong {
  color: var(--text-primary);
}

/* Anti-Slop Banner */
.anti-slop-card {
  padding: 32px;
  background: linear-gradient(180deg, rgba(16, 21, 31, 0.85) 0%, rgba(10, 14, 22, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.anti-slop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.anti-slop-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.anti-slop-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
}

.anti-slop-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.anti-slop-list li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 20px;
  position: relative;
}

.slop-bad li::before {
  content: "✕";
  color: var(--accent-red);
  position: absolute;
  left: 0;
  font-weight: 700;
}

.slop-good li::before {
  content: "✓";
  color: var(--accent-emerald);
  position: absolute;
  left: 0;
  font-weight: 700;
}

/* --- 10. Interactive Terminal Deck --- */
.terminal-window {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0d14;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(16, 185, 129, 0.05);
  overflow: hidden;
}

.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-btn-clear {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
}

.terminal-btn-clear:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.terminal-body {
  padding: 24px;
  min-height: 280px;
  max-height: 440px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
}

.term-welcome {
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.term-highlight {
  color: var(--accent-emerald);
  font-weight: 700;
}

.term-line {
  margin-bottom: 8px;
}

.term-prompt {
  color: var(--accent-emerald);
  font-weight: 700;
  user-select: none;
  white-space: nowrap;
}

.term-command-echo {
  color: var(--text-primary);
  margin-left: 8px;
}

.term-output-block {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.term-output-block pre {
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.term-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  /* Mobile Polish: font-size >= 16px to prevent iOS auto-zoom */
  font-size: 16px;
}

.terminal-quick-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chips-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.term-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .term-chip:hover {
    background: var(--accent-cyan-dim);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
  }
}

/* --- 11. Timeline Section --- */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 36px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 9px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-emerald) 0%, rgba(255, 255, 255, 0.06) 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-dot {
  position: absolute;
  left: -36px;
  top: 16px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  border: 3px solid var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald-glow);
}

.timeline-date {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 6px;
}

.timeline-content {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.timeline-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- 12. Contact & Call To Action --- */
.contact-card {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 48px;
  background: linear-gradient(135deg, rgba(16, 21, 31, 0.9) 0%, rgba(10, 14, 22, 0.95) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  text-align: center;
}

.contact-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: var(--accent-emerald);
  filter: blur(140px);
  opacity: 0.15;
  pointer-events: none;
}

.contact-header {
  margin-bottom: 40px;
}

.contact-title {
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.contact-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.contact-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  text-align: left;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .contact-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: translateY(-2px);
  }
}

.contact-btn-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  flex-shrink: 0;
}

.contact-btn-tg .contact-btn-icon {
  background: var(--accent-emerald-dim);
  color: var(--accent-emerald);
}

.contact-btn-text {
  flex-grow: 1;
}

.contact-btn-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.contact-btn-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.contact-arrow {
  color: var(--text-muted);
  transition: transform var(--duration-fast) var(--ease-out);
}

.contact-btn:hover .contact-arrow {
  transform: translate(2px, -2px);
  color: var(--text-primary);
}

/* --- 13. Footer --- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

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

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.footer-brand {
  font-weight: 700;
  color: var(--text-primary);
}

.footer-divider {
  color: var(--text-muted);
}

.footer-copy {
  color: var(--text-muted);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .back-to-top:hover {
    color: var(--text-primary);
  }
}

/* --- 14. Toast Notification (ask-sonner style) --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: transform var(--duration-normal) var(--ease-out), opacity var(--duration-normal) var(--ease-out);
}

.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast-icon {
  color: var(--accent-emerald);
}

/* --- 15. Responsive Breakpoints & Mobile Polish --- */
@media (max-width: 1024px) {
  .telemetry-hud {
    grid-template-columns: repeat(2, 1fr);
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .nav-container {
    top: 12px;
    padding: 0 12px;
  }

  .nav-bar {
    height: 52px;
    padding: 0 14px;
    max-width: 100%;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .brand-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .nav-links-desktop {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-section {
    padding-top: 96px;
    padding-bottom: 40px;
    width: 100%;
    overflow: hidden;
  }

  .hero-glow {
    width: 240px;
    height: 240px;
    filter: blur(60px);
  }

  .hero-glow-1 {
    left: -40px;
    top: 5%;
  }

  .hero-glow-2 {
    right: -40px;
    top: 20%;
  }

  .hero-badge {
    max-width: 100%;
    font-size: 0.78rem;
    padding: 6px 12px;
    text-align: center;
  }

  .hero-title {
    font-size: 2.1rem;
    line-height: 1.15;
    word-break: break-word;
    margin-bottom: 18px;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.55;
    margin-bottom: 28px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-bottom: 40px;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .telemetry-hud {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  .hud-item {
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .section-padding {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 30px;
    padding: 0 4px;
  }

  .section-title {
    font-size: 1.75rem;
    word-break: break-word;
  }

  .section-desc {
    font-size: 0.95rem;
  }

  .filter-bar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
  }

  .project-card {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
  }

  .project-header {
    gap: 12px;
  }

  .project-icon-box {
    width: 40px;
    height: 40px;
  }

  .project-name {
    font-size: 1.25rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
  }

  .skill-pillar {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
  }

  .anti-slop-card {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
  }

  .anti-slop-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .terminal-window {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-lg);
    box-sizing: border-box;
  }

  .terminal-body {
    padding: 16px 12px;
    font-size: 0.85rem;
    max-height: 380px;
  }

  .prompt-full {
    display: none;
  }

  .prompt-short {
    display: inline;
  }

  .timeline {
    width: 100%;
    padding-left: 24px;
    box-sizing: border-box;
  }

  .timeline::before {
    left: 4px;
  }

  .timeline-dot {
    left: -24px;
    width: 16px;
    height: 16px;
    top: 20px;
  }

  .timeline-content {
    padding: 18px 14px;
    width: 100%;
    box-sizing: border-box;
  }

  .contact-card {
    padding: 32px 16px;
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
  }

  .contact-title {
    font-size: 1.75rem;
    word-break: break-word;
  }

  .contact-buttons-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  .contact-btn {
    padding: 14px 16px;
    width: 100%;
    box-sizing: border-box;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .btn-sm .btn-text {
    display: none;
  }

  .btn-sm {
    padding: 7px 10px;
  }

  .hero-title {
    font-size: 1.85rem;
  }
}

/* --- 16. Accessibility & Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ambient-canvas {
    display: none;
  }
}
