/* ================================================================
   FINANCE.CSS — Slate & Amber Professional Portfolio
   Francesco Castaldi — Personal Brand Studio
   Palette: Slate, Amber, Sky
   Stile: Editorial Professional · Bento Grid · Mature Glassmorphism
   Goal: Credibility & Distinction
   ================================================================ */

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* ── Backgrounds ── */
  --bg-primary:       #0B0F15;
  --bg-secondary:     #111820;
  --bg-card:          rgba(17, 24, 32, 0.72);
  --bg-card-solid:    #141C26;
  --bg-card-hover:    rgba(24, 33, 44, 0.88);
  --bg-elevated:      #1A2430;
  --bg-dark:          #070A0E;
  --bg-glass:         rgba(11, 15, 21, 0.78);

  /* ── Primary Accent: Amber ── */
  --accent:           #D97706;
  --accent-hover:     #F59E0B;
  --accent-soft:      rgba(217, 119, 6, 0.10);
  --accent-glow:      rgba(217, 119, 6, 0.15);
  --accent-border:    rgba(217, 119, 6, 0.20);

  /* ── Secondary Accent: Sky ── */
  --accent-sky:       #0EA5E9;
  --accent-sky-hover: #38BDF8;
  --accent-sky-soft:  rgba(14, 165, 233, 0.08);
  --accent-sky-glow:  rgba(14, 165, 233, 0.12);
  --accent-sky-border: rgba(14, 165, 233, 0.20);

  /* ── Functional Colors ── */
  --green:            #10B981;
  --green-soft:       rgba(16, 185, 129, 0.10);
  --red:              #EF4444;
  --red-soft:         rgba(239, 68, 68, 0.10);
  --amber-warn:       #F59E0B;
  --amber-soft:       rgba(245, 158, 11, 0.10);

  /* ── Text ── */
  --text:             #F1F5F9;
  --text-secondary:   #94A3B8;
  --text-muted:       #64748B;
  --text-dim:         #475569;

  /* ── Borders ── */
  --border:           rgba(255, 255, 255, 0.06);
  --border-light:     rgba(255, 255, 255, 0.10);
  --border-accent:    rgba(217, 119, 6, 0.20);

  /* ── Shadows ── */
  --shadow-sm:        0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md:        0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg:        0 10px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow:      0 0 30px rgba(217, 119, 6, 0.05);

  /* ── Border Radius ── */
  --radius-sm:        6px;
  --radius:           12px;
  --radius-lg:        20px;
  --radius-xl:        28px;

  /* ── Typography ── */
  --font-serif:       'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-sans:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:        'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* ── Transitions ── */
  --transition-fast:  opacity 0.12s ease, color 0.12s ease, background-color 0.12s ease;
  --transition-base:  opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:  opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Spacing Scale (4px base) ── */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  height: 100%;
  background: var(--bg-primary);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Background Canvas (fixed, no document flow) ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ── Ambient Background Gradient ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(217, 119, 6, 0.03) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(14, 165, 233, 0.03) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(11, 15, 21, 0.5) 0%, transparent 80%);
  pointer-events: none;
  z-index: -1;
  animation: ambientShift 25s ease-in-out infinite alternate;
}

@keyframes ambientShift {
  0%   { background:
    radial-gradient(ellipse at 20% 30%, rgba(217, 119, 6, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(14, 165, 233, 0.03) 0%, transparent 55%); }
  50%  { background:
    radial-gradient(ellipse at 50% 20%, rgba(14, 165, 233, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(217, 119, 6, 0.03) 0%, transparent 55%); }
  100% { background:
    radial-gradient(ellipse at 70% 40%, rgba(217, 119, 6, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 30% 60%, rgba(14, 165, 233, 0.03) 0%, transparent 55%); }
}

/* ── Subtle Grid Overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 119, 6, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: -1;
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(2.8rem, 7vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.01em; }
h5 { font-size: 0.95rem; font-family: var(--font-sans); font-weight: 600; }
h6 { font-size: 0.85rem; font-family: var(--font-sans); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

p { margin-bottom: 1em; color: var(--text-secondary); }

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

.accent-link {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: var(--transition-fast);
}
.accent-link:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-elevated);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  color: var(--accent);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT CONTAINERS
   ═══════════════════════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.container-wide {
  max-width: 1400px;
}

.main-content {
  flex: 1 0 auto;
}

.subpage-main {
  padding-top: var(--space-8);
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION — Persistent Top Bar
   ═══════════════════════════════════════════════════════════════ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

#site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 5%;
  gap: var(--space-4);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.header-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-sky));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.header-brand-text {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-sans);
  line-height: 1.2;
}

.header-brand-sub {
  font-size: 0.55rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.header-nav a {
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  position: relative;
}

.header-nav a:hover,
.header-nav a.active-link {
  color: var(--text);
  background: var(--accent-soft);
}

.header-nav .nav-cta {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.4rem 1rem;
  margin-left: var(--space-2);
}

.header-nav .nav-cta:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ── Dropdown ── */
.header-nav .dropdown {
  position: relative;
}

.header-nav .dropdown-content {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  background: var(--bg-card-solid);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  min-width: 200px;
  display: none;
  flex-direction: column;
  padding: 0.35rem 0;
  z-index: 3000;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.header-nav .dropdown:hover .dropdown-content,
.header-nav .dropdown.open .dropdown-content {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.header-nav .dropdown-content a {
  display: block;
  padding: 0.45rem 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  border-radius: 0;
  background: transparent;
}

.header-nav .dropdown-content a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ── Mobile Nav Toggle ── */
.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 2100;
}

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

/* ═══════════════════════════════════════════════════════════════
   HERO — Editorial
   ═══════════════════════════════════════════════════════════════ */
.hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) 5% var(--space-8);
  position: relative;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-12);
  align-items: center;
  width: 100%;
}

.hero-text {
  position: relative;
}

.hero-eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  display: inline-block;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.hero-title .hero-title-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: var(--space-6);
}

.hero-meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.hero-tag {
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--border);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: 999px;
  transition: var(--transition-base);
}

.hero-tag:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
}

.hero-buttons {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-6);
}

/* ── Hero Terminal Card (retained as secondary element) ── */
.hero-terminal {
  background: var(--bg-card);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  overflow: hidden;
  transition: var(--transition-base);
}

.hero-terminal:hover {
  border-color: rgba(217, 119, 6, 0.3);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(217, 119, 6, 0.06);
}

.terminal-header {
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.t-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.t-dot.red { background: var(--red); }
.t-dot.yellow { background: var(--amber-warn); }
.t-dot.green { background: var(--green); }

.t-title {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.6rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.9;
  min-height: 180px;
}

.t-prompt {
  color: var(--accent);
  margin-right: 0.4rem;
  font-weight: 600;
}

.t-cmd { color: var(--text); }

.t-output {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

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

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.80rem;
  letter-spacing: 0.02em;
  transition: var(--transition-base);
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #B45309);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(217, 119, 6, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.7rem;
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════ */
.section {
  padding: var(--space-12) 5%;
  width: 100%;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.60rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-2);
  display: inline-block;
  font-family: var(--font-mono);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: var(--space-8);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-title .title-ampersand {
  color: var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
}

.section-divider {
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-border), rgba(14, 165, 233, 0.15), transparent);
  margin: var(--space-8) auto;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS — Bento / Editorial
   ═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-glow), var(--shadow-sm);
}

.card-solid {
  background: var(--bg-card-solid);
}

.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
}

/* ── Project Card ── */
.project-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 1.5rem);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  display: block;
  color: inherit;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-sky), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.project-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-glow), var(--shadow-md);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
}

.project-card h3,
.project-card h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

.project-tag {
  font-size: 0.60rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.project-tag.sky {
  color: var(--accent-sky);
  background: var(--accent-sky-soft);
}

.project-arrow {
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.project-card:hover .project-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ── Bento Grid ── */
.bento-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 2fr 1fr;
  margin: 0 auto;
}

.bento-wide {
  grid-column: 1 / -1;
}

.bento-tall {
  grid-row: span 2;
}

.bento-small {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-small {
    grid-template-columns: 1fr;
  }
}

/* ── Expertise / Skill Card ── */
.expertise-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.expertise-card:hover {
  border-color: var(--accent-sky-border);
  box-shadow: var(--accent-sky-glow) 0 0 24px;
  transform: translateY(-2px);
}

.expertise-icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: var(--space-1);
}

.expertise-card h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.expertise-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.stat-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  text-align: center;
  transition: var(--transition-base);
}

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

.stat-value {
  font-size: 2rem;
  font-weight: 400;
  font-family: var(--font-serif);
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
}

/* ═══════════════════════════════════════════════════════════════
   BLOG GRID
   ═══════════════════════════════════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.blog-grid .project-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.blog-grid .post-date {
  margin-top: auto;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  display: block;
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.blog-cta {
  margin-top: var(--space-6);
  text-align: center;
}

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

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

/* ═══════════════════════════════════════════════════════════════
   SUBPAGE & ARTICLE
   ═══════════════════════════════════════════════════════════════ */
.page-hero {
  padding: var(--space-10) 5% var(--space-6);
  width: 100%;
}

.page-eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-3);
  display: inline-block;
  font-family: var(--font-mono);
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-3);
  color: var(--text);
}

.page-hero p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: var(--space-5);
  line-height: 1.7;
}

.meta-pill {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: rgba(17, 24, 32, 0.5);
  border-radius: 999px;
  transition: var(--transition-base);
}

.meta-pill:hover {
  border-color: var(--accent-sky-border);
  color: var(--accent-sky);
  background: var(--accent-sky-soft);
}

/* ── Article Container ── */
.article-container {
  font-size: clamp(1rem, 0.5rem + 0.75vw, 1.1rem);
  width: 100%;
  padding: var(--space-8) 5% var(--space-16);
  line-height: 1.8;
}

.article-header {
  margin-bottom: var(--space-10);
}

.article-category {
  font-size: 0.60rem;
  font-weight: 600;
  color: var(--accent-sky);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-3);
  display: inline-block;
  font-family: var(--font-mono);
}

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-4);
  color: var(--text);
}

.article-meta {
  display: flex;
  gap: var(--space-5);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ── Reading Content ── */
.article-content,
.readable {
  color: #C8D0DC;
}

.article-content p,
.readable p {
  margin-bottom: 1.35em;
  line-height: 1.8;
}

.article-content h2,
.readable h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 0.7rem + 1.2vw, 1.7rem);
  font-weight: 400;
  margin: 2.2em 0 0.7em;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.article-content h3,
.readable h3 {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 0.5rem + 0.85vw, 1.2rem);
  font-weight: 600;
  margin: 1.8em 0 0.5em;
  color: var(--text);
  line-height: 1.3;
}

.article-content ul,
.readable ul {
  list-style: none;
  margin: 1.5em 0;
  padding: 0;
}

.article-content li,
.readable li {
  padding-left: 1.5em;
  position: relative;
  margin-bottom: 0.4em;
  line-height: 1.8;
}

.article-content li::before,
.readable li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.article-content strong,
.readable strong {
  color: var(--text);
  font-weight: 600;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.9em;
}

.article-content th,
.article-content td {
  padding: 0.7em 1em;
  border: 1px solid var(--border);
  text-align: left;
}

.article-content th {
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 600;
}

.article-content td {
  color: inherit;
}

.article-content img,
.readable img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
  margin: 2em auto;
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   INFO BOX
   ═══════════════════════════════════════════════════════════════ */
.info-box {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
  margin: var(--space-6) 0;
  border-left: 3px solid var(--accent);
}

.info-box-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════════
   TERMINAL CARD (Training Generator)
   ═══════════════════════════════════════════════════════════════ */
.terminal-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-base);
  max-width: 800px;
  margin: 0 auto;
}

.terminal-card:hover {
  border-color: rgba(217, 119, 6, 0.3);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}

/* ── TG Styles ── */
.tg-step { padding: 0.4rem 0; }

.tg-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.tg-option {
  background: rgba(20, 28, 38, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  backdrop-filter: blur(4px);
}

.tg-option:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.08);
}

.tg-option.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 16px rgba(217, 119, 6, 0.12);
}

.tg-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  cursor: pointer;
  padding: 0.25rem 0;
  display: block;
  transition: var(--transition-fast);
}

.tg-back:hover { color: var(--accent); }

.tg-summary {
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0.5rem 0;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(20, 28, 38, 0.5);
  display: inline-block;
  backdrop-filter: blur(4px);
}

.tg-generate {
  display: block;
  width: 100%;
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--accent), #B45309);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.80rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.2);
}

.tg-generate:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.3);
}

.tg-reset {
  background: rgba(20, 28, 38, 0.6);
  border: 1px solid var(--border);
  color: var(--text-muted);
  box-shadow: none;
  font-size: 0.72rem;
  margin-top: 0.4rem;
  backdrop-filter: blur(4px);
}

.tg-reset:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tg-plan-table {
  margin: 0.75rem 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.tg-plan-row {
  display: grid;
  grid-template-columns: 80px 80px 65px 45px 1fr;
  gap: 0.25rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.tg-plan-header {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.tg-col-day { color: var(--text); }
.tg-col-type { color: var(--text-secondary); }
.tg-col-dur { color: var(--text-secondary); }
.tg-col-note { color: var(--text-muted); font-size: 0.62rem; }
.tg-rest { color: var(--text-muted); font-style: italic; }

.tg-zone-1 { color: #6366f1; }
.tg-zone-2 { color: var(--green); }
.tg-zone-3 { color: var(--amber-warn); }
.tg-zone-4 { color: var(--accent); }
.tg-zone-5 { color: var(--red); }

@media (max-width: 600px) {
  .tg-plan-row {
    grid-template-columns: 65px 65px 50px 35px 1fr;
    font-size: 0.58rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SLIDESHOW / PROJECT SLIDER
   ═══════════════════════════════════════════════════════════════ */
.project-slider {
  margin: var(--space-8) 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-primary);
  position: relative;
}

.project-slider .slideshow-frame {
  aspect-ratio: 21 / 9;
  min-height: 300px;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.project-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  padding: 2.5rem 3.5rem;
  background: linear-gradient(135deg, rgba(11,15,21,0.92) 30%, rgba(11,15,21,0.35) 70%, transparent);
  pointer-events: none;
}

.project-slide-overlay > * { pointer-events: auto; }

.project-slide-content { max-width: 600px; }

.project-slide-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
  filter: drop-shadow(0 0 8px rgba(217, 119, 6, 0.2));
}

.project-slide-content h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.project-slide-content p {
  font-size: 0.90rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.85rem;
  max-width: 500px;
}

.project-slide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.project-slide-tags span {
  font-size: 0.60rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.project-slide-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.80rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 2px;
  transition: var(--transition-base);
}

.project-slide-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  gap: 0.6rem;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
  flex-shrink: 0;
  padding: var(--space-5) 5%;
  border-top: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-links {
  display: flex;
  gap: var(--space-5);
  align-items: center;
}

.footer a {
  color: var(--text-dim);
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   GLASS CARD UTILITY
   ═══════════════════════════════════════════════════════════════ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.flex-between {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-sky { color: var(--accent-sky); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: var(--space-6);
  transition: var(--transition-fast);
}

.back-link:hover {
  color: var(--accent);
  gap: 0.6rem;
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCEMENTS OVERRIDES
   ═══════════════════════════════════════════════════════════════ */
.enh-back-top {
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
}
.enh-back-top:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.enh-toc { border-left: 3px solid var(--accent) !important; }
.enh-toc-title { color: var(--accent) !important; }
.enh-toc-list a:hover { color: var(--accent) !important; }
.enh-toc-current a { color: var(--accent) !important; }
.enh-share-btn:hover { border-color: var(--accent) !important; color: var(--accent) !important; }
.enh-related-card:hover { border-color: var(--accent) !important; }
.enh-highlight-box { border-left-color: var(--accent) !important; }
.progress-fill { background: linear-gradient(90deg, var(--accent), var(--accent-sky)) !important; }

/* ═══════════════════════════════════════════════════════════════
   SITE PRELOADER
   ═══════════════════════════════════════════════════════════════ */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  z-index: 10000;
  transition: opacity 0.5s;
}

.preloader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: preloaderBounce 1.2s ease-in-out infinite;
}

.preloader-dot:nth-child(2) { animation-delay: 0.15s; background: var(--accent-sky); }
.preloader-dot:nth-child(3) { animation-delay: 0.3s; background: var(--accent); }

@keyframes preloaderBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOM CURSOR
   ═══════════════════════════════════════════════════════════════ */
#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 99999;
  transform: translate(0, 0);
  transition: none;
}

#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  pointer-events: none;
  z-index: 99998;
  transform: translate(0, 0);
  transition: width 0.2s, height 0.2s, border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cursor-ring.cursor-hover {
  width: 48px;
  height: 48px;
  border-color: var(--accent-sky);
  background: rgba(14, 165, 233, 0.05);
}

/* ═══════════════════════════════════════════════════════════════
   CTA BANNER
   ═══════════════════════════════════════════════════════════════ */
.cta-banner {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.08), rgba(14, 165, 233, 0.05));
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  text-align: center;
  margin: var(--space-8) auto;
  max-width: 800px;
}

.cta-banner h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 400;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.cta-banner p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 500px;
  margin: 0 auto var(--space-5);
}

/* ═══════════════════════════════════════════════════════════════
   DATA TABLE
   ═══════════════════════════════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
}

.data-table th {
  text-align: left;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.data-table td {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.table-wrap { overflow-x: auto; }

/* ═══════════════════════════════════════════════════════════════
   SKILL PROGRESS BARS
   ═══════════════════════════════════════════════════════════════ */
.skill-bar {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.5rem 0;
}

.skill-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.skill-bar-value {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.skill-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-sky));
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.skill-bar-fill.animate { width: var(--pct, 80%); }

/* ═══════════════════════════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb-sep {
  color: var(--text-dim);
  font-size: 0.6rem;
}

.breadcrumb-current {
  color: var(--accent);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   TECH COMPONENTS (selected)
   ═══════════════════════════════════════════════════════════════ */

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.online, .status-badge.success { background: rgba(16,185,129,0.12); color: #34d399; }
.status-badge.online::before, .status-badge.success::before { background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,0.5); }
.status-badge.warning { background: rgba(245,158,11,0.12); color: #fbbf24; }
.status-badge.warning::before { background: #fbbf24; box-shadow: 0 0 6px rgba(251,191,36,0.5); }
.status-badge.error { background: rgba(239,68,68,0.12); color: #f87171; }
.status-badge.error::before { background: #f87171; box-shadow: 0 0 6px rgba(248,113,113,0.5); }
.status-badge.info { background: rgba(14,165,233,0.12); color: #38bdf8; }
.status-badge.info::before { background: #38bdf8; box-shadow: 0 0 6px rgba(56,189,248,0.5); }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text);
  font-size: 0.8rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  max-width: 360px;
}

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

.toast-icon { font-size: 1rem; flex-shrink: 0; }

.toast.info { border-left: 3px solid var(--accent-sky); }
.toast.success { border-left: 3px solid var(--green); }
.toast.warning { border-left: 3px solid var(--amber-warn); }
.toast.error { border-left: 3px solid var(--red); }

/* FAB */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #B45309);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  z-index: 8000;
}

.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(217, 119, 6, 0.4);
}

.glass-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: all 0.25s;
}

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

/* Tag list */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  transition: all 0.15s;
}

.tag-item:hover {
  background: rgba(217, 119, 6, 0.18);
  transform: translateY(-1px);
}

.tag-item.sky {
  background: var(--accent-sky-soft);
  color: var(--accent-sky);
  border-color: var(--accent-sky-border);
}

/* Text gradient utility */
.text-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-sky));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Floating action button override for enh-back-top */
.enh-back-top {
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
}

/* ═══════════════════════════════════════════════════════════════
   SUBPAGE PANELS & MISSING GRID CLASSES
   ═══════════════════════════════════════════════════════════════ */
.content-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-8) 5%;
  width: 100%;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.skill-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  transition: var(--transition-base);
}

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

.skill-card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.skill-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

.skill-card ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.skill-card ul li {
  padding-left: 1.2em;
  position: relative;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.skill-card ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.skill-icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.stat-highlight {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--accent);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

@media (max-width: 600px) {
  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
}

/* Slideshow container (used by JS) */
.slideshow-container {
  margin: var(--space-6) 0;
}

/* Embed container */
.embed-container {
  margin: var(--space-4) 0;
}

.embed-container iframe {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Social buttons */
.social-btn {
  display: inline-flex !important;
  align-items: center;
  gap: var(--space-2);
  padding: 0.6rem 1.2rem !important;
}

.social-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Timeline component (used by love page) */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 700px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  transition: var(--transition-base);
}

.timeline-item:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-glow);
}

.timeline-dot {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR (deprecated — kept for backward compat with subpages)
   ═══════════════════════════════════════════════════════════════ */
#sidebar {
  display: none;
}

body.has-sidebar {
  padding-left: 0;
}

/* ═══════════════════════════════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════════════════════════════ */
.error-container {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: 6rem;
  font-family: var(--font-serif);
  color: var(--accent);
  text-shadow: 0 0 30px rgba(217, 119, 6, 0.3);
  margin-bottom: 1rem;
  animation: errorPulse 3s ease-in-out infinite;
}

@keyframes errorPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(217, 119, 6, 0.2); }
  50% { text-shadow: 0 0 40px rgba(217, 119, 6, 0.4); }
}

.error-message {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.error-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }

  .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-meta {
    justify-content: center;
  }

  .hero-buttons {
    justify-content: center;
  }

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

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

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card-solid);
    border-bottom: 1px solid var(--border-light);
    flex-direction: column;
    padding: var(--space-3);
    gap: var(--space-1);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
  }

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

  .header-nav .dropdown-content {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: var(--space-4);
    display: none;
    opacity: 1;
    transform: none;
  }

  .header-nav .dropdown.open .dropdown-content {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .project-slider .slideshow-frame {
    aspect-ratio: 4 / 3;
    min-height: 260px;
  }

  .project-slide-overlay {
    padding: var(--space-5);
  }
}

@media (max-width: 600px) {
  .section {
    padding: var(--space-8) 5%;
  }

  .hero {
    padding: var(--space-10) 5% var(--space-8);
    min-height: auto;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .page-hero {
    padding: var(--space-6) 5% var(--space-4);
  }

  .article-container {
    padding: var(--space-6) 5% var(--space-10);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

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

  .cta-banner {
    padding: var(--space-6);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
  }
}

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

  body::before {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ── Print Styles ── */
@media print {
  #site-header,
  .footer,
  .fab,
  #preloader,
  #cursor-dot,
  #cursor-ring,
  .noise-overlay {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
