/* ================================================================
   STYLES V2 -- Dark Tech-Minimal Theme
   Terminal aesthetic, cyberpunk light, performante.
   ================================================================ */

/* ================================================================
   RESET & VARIABLES
   ================================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:              #050508;
  --bg-card:         rgba(15, 15, 20, 0.65);
  --bg-card-hover:   rgba(20, 20, 28, 0.8);
  --bg-dark:         #0a0a0f;
  --bg-dark-alt:     #111118;

  --accent:          #c2410c;
  --accent-hover:    #ea580c;
  --accent-soft:     rgba(194, 65, 12, 0.12);
  --accent-blue:     #3b82f6;
  --accent-cyan:     #2563eb;
  --accent-brown:    #78350f;
  --accent-warm:     #d97706;

  --text:            #f1f5f9;
  --text-secondary:  #94a3b8;
  --text-muted:      #71717a;
  --text-on-dark:    #f8fafc;

  --border:          rgba(255, 255, 255, 0.06);
  --border-glow:     rgba(194, 65, 12, 0.25);
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:       0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:       0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow:     0 0 30px rgba(194, 65, 12, 0.12);
  --radius:          12px;
  --radius-sm:       8px;

  --transition-fast: all 0.15s ease;
  --transition-base: all 0.25s ease;
  --transition-slow: all 0.35s ease;
}

html {
  height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* ================================================================
   TYPOGRAPHY
   ================================================================ */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

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

.accent-link {
  color: var(--accent);
  border-bottom: 1px solid rgba(194, 65, 12, 0.25);
  transition: var(--transition-fast);
}

.accent-link:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

/* ================================================================
   HEADER & NAV
   ================================================================ */
#site-header {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 0.875rem 5%;
  background: var(--bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 2000;
  transition: var(--transition-base);
}

.main-nav {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  list-style: none;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.main-nav a {
  color: var(--text-muted);
  transition: var(--transition-fast);
  position: relative;
  padding: 0.25rem 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.main-nav a:hover,
.active-link {
  color: var(--text-on-dark);
}

.main-nav a:hover::after,
.active-link::after {
  width: 100%;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-dark-alt);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  min-width: 200px;
  display: none;
  flex-direction: column;
  padding: 0.5rem 0;
  z-index: 3000;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.dropdown-content a {
  display: block;
  padding: 0.5rem 1.25rem;
  text-align: right;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--text-muted);
}

.dropdown-content a:hover,
.dropdown-content a:focus {
  background: rgba(194, 65, 12, 0.08);
  color: var(--accent);
  outline: none;
}

.dropdown-content a::after {
  display: none;
}

/* ================================================================
   LAYOUT
   ================================================================ */
.main-content {
  flex: 1 0 auto;
}

.subpage-main {
  padding-top: 2rem;
}

/* ================================================================
   HOMEPAGE -- HERO
   ================================================================ */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6rem 5% 4rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(194, 65, 12, 0.05), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(37, 99, 235, 0.04), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 1rem 0;
  line-height: 1.7;
  max-width: 520px;
}

.hero-meta {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

.meta-tag {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

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

.hero-buttons {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: center;
  width: 100%;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1rem auto 0;
  max-width: 1200px;
  width: 100%;
}

.skills-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stats-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(59,130,246,0.2);
}

.dashboard-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.flex-row {
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.dark-panel {
  background: #0a0a0c;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.text-cyan {
  color: var(--accent-cyan);
}

.text-center {
  text-align: center;
}

.stat-highlight {
  font-size: 2rem;
  margin: 0.5rem 0;
  color: var(--text);
}

.image-frame {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid var(--border);
  text-align: center;
}

.image-frame img {
  width: 100%;
  border-radius: 12px;
}

.image-caption {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.repo-link {
  display: inline-block;
  margin-top: 1rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-card,
.skill-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: block;
  color: inherit;
}

.project-card ul,
.skill-card ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

.project-card li,
.skill-card li {
  margin-bottom: 0.5rem;
}

.project-card li::before,
.skill-card li::before {
  content: none;
}

.project-card strong {
  color: var(--accent-cyan);
}

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

.project-icon,
.skill-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-block;
}

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

.project-tag {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

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

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

.project-card h3,
.project-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

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

/* ================================================================
   SECTION LABELS & DIVIDER
   ================================================================ */
.section-label {
  font-size: 0.675rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-divider {
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 3rem auto;
}

/* ================================================================
   HOMEPAGE -- EXPERTISE
   ================================================================ */
.expertise-section {
  padding: 3rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.expertise-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  transition: var(--transition-base);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.expertise-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
  border-left: 3px solid var(--accent);
}

.expertise-card .card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.expertise-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.expertise-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

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

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.825rem;
  letter-spacing: 0.01em;
  transition: var(--transition-base);
  cursor: pointer;
  position: relative;
}

.btn-primary {
  background: var(--accent);
  border: none;
  color: white;
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.25);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.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: var(--bg-card);
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  flex-shrink: 0;
  padding: 1.25rem 5%;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  letter-spacing: 0.03em;
}

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

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

/* ================================================================
   SUBPAGE -- HERO
   ================================================================ */
.page-hero {
  padding: 3rem 5% 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  display: inline-block;
}

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

.page-hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 750px;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.meta-pill {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

.meta-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ================================================================
   CONTENT PANELS
   ================================================================ */
.content-panel {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 5%;
}

.content-panel h2 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.content-panel h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
}

.content-panel p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.content-panel ul {
  list-style: none;
  margin: 1rem 0;
}

.content-panel li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.925rem;
}

.content-panel li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1rem;
}

code {
  background: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.825rem;
  color: var(--accent);
  border: 1px solid var(--border);
}

/* ================================================================
   FEATURE & SPEC CARDS (subpages)
   ================================================================ */
.feature-grid, .spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 5%;
}

.feature-card, .spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  transition: var(--transition-base);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover, .spec-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-left: 3px solid var(--accent);
}

.feature-card h3,
.spec-card h3,
.skill-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card p, .spec-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ================================================================
   BLOG GRID
   ================================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

/* ================================================================
   CANVAS BACKGROUND (Matrix rain)
   ================================================================ */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.15;
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

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

/* ================================================================
   ARTICLE / BLOG CONTENT STYLES
   ================================================================ */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 5%;
}

.article-header {
  margin-bottom: 3rem;
}

.article-category {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  display: inline-block;
}

.article-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text) 40%, var(--text-secondary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 2.5rem 0 1.25rem;
  letter-spacing: -0.02em;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 1rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul {
  list-style: none;
  margin: 1.5rem 0;
}

.article-content li {
  padding: 0.75rem 0 0.75rem 1.75rem;
  position: relative;
  color: var(--text-secondary);
}

.article-content li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-weight: 600;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

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

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

.info-box {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  border-left: 3px solid var(--accent-blue);
}

.info-box-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

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

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

.related-posts {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.related-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.related-posts .btn-secondary {
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
}

/* ================================================================
   UTILITY / LAYOUT COMPONENTS
   ================================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tech-tag {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.tech-tag:hover {
  border-color: var(--accent);
}

.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding: 0 0 1.5rem 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-bar .progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  transition: width 0.6s ease;
}

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-base);
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-card);
}

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

.share-section {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.image-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin: 1.5rem 0;
}

.image-card img {
  width: 100%;
  height: auto;
  display: block;
}

.image-card .image-caption {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.training-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.training-table th,
.training-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.training-table th {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
}

.training-table td {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.training-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ================================================================
   TERMINAL WIDGET
   ================================================================ */
.hero-terminal {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  transition: var(--transition-base);
}

.hero-terminal:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

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

.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

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

.t-title {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.775rem;
  line-height: 1.8;
  min-height: 220px;
}

.terminal-body p {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

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

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

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

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

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

/* ================================================================
   TERMINAL CARD (reusable, non-hero context)
   ================================================================ */
.terminal-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  transition: var(--transition-base);
  max-width: 800px;
  margin: 0 auto;
}

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

/* ================================================================
   TRAINING GENERATOR
   ================================================================ */
.tg-step {
  padding: 0.5rem 0;
}

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

.tg-option {
  background: var(--bg-dark-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.775rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tg-option:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}

.tg-option.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 12px rgba(194, 65, 12, 0.15);
}

.tg-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
  display: block;
  transition: var(--transition-fast);
}

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

.tg-summary {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-dark-alt);
  display: inline-block;
}

.tg-generate {
  display: block;
  width: 100%;
  margin: 1rem 0;
  padding: 0.85rem;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.25);
}

.tg-generate:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.3);
}

.tg-reset {
  background: var(--bg-dark-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  box-shadow: none;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.tg-reset:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-dark-alt);
  box-shadow: none;
}

.tg-plan-table {
  margin: 0.75rem 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
}

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

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

.tg-plan-sep {
  color: var(--text-muted);
  font-size: 0.6rem;
  opacity: 0.4;
  padding: 0.15rem 0;
}

.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.65rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-col-zone {
  font-weight: 600;
}

.tg-rest {
  color: var(--text-muted);
  font-style: italic;
}

.tg-zone-1 { color: #6366f1; }
.tg-zone-2 { color: #22c55e; }
.tg-zone-3 { color: #eab308; }
.tg-zone-4 { color: #f97316; }
.tg-zone-5 { color: #ef4444; }

.tg-legend {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
}

.tg-legend strong {
  color: var(--text-secondary);
}

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

/* Navigation slider */
.nav-slider {
  padding: 2rem 5% 1rem;
  max-width: 1200px;
  margin: 2rem auto 0;
}

.nav-slider-inner {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.nav-slider-item {
  flex: 0 0 180px;
  scroll-snap-align: start;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: var(--transition-base);
}

.nav-slider-item.active {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.nav-slider-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  white-space: nowrap;
}

.nav-slider-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-slider-links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 0.2s;
}

.nav-slider-links a:hover {
  color: var(--accent);
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-slider-item {
    flex: 0 0 150px;
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .nav-slider {
    padding: 1.5rem 4% 0.5rem;
  }
  .nav-slider-item {
    flex: 0 0 130px;
    padding: 0.75rem;
  }
  .nav-slider-item h4 {
    font-size: 0.8rem;
  }
  .nav-slider-links a {
    font-size: 0.7rem;
  }
}

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

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

.blog-grid .post-tags {
  font-size: 0.72rem;
  color: var(--accent);
}

.blog-cta {
  margin-top: 1.5rem;
  text-align: center;
}

/* ================================================================
   SLIDESHOW 2.0 — Tech-minimal cross-fade
   ================================================================ */
.slideshow-container {
  position: relative;
  margin: 2rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg);
}

.slideshow-container.paused::after {
  content: '\u23F8';
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.6;
  z-index: 5;
  pointer-events: none;
}

.slideshow-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}

.slide-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.slide-img.active {
  opacity: 1;
  pointer-events: auto;
}

/* Arrow controls */
.slide-btn {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, background 0.25s, border-color 0.25s, transform 0.25s;
  transform: translateY(-50%) scale(0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.slideshow-container:hover .slide-btn,
.slide-btn:focus-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.slide-btn:hover {
  background: rgba(0, 0, 0, 0.75);
  border-color: var(--accent);
}

.slide-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.slide-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.slide-prev { left: 0.75rem; }
.slide-next { right: 0.75rem; }

/* Dots indicator */
.slide-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
  position: relative;
}

.slide-dot.active {
  border-color: var(--accent);
  background: var(--accent);
  transform: scale(1.25);
}

.slide-dot:hover {
  border-color: var(--accent-hover);
  background: var(--accent-soft);
}

.slide-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.embed-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.embed-container iframe {
  width: 100% !important;
  height: auto !important;
  min-height: 180px;
  border: none;
  background: var(--bg);
  aspect-ratio: 16 / 9;
}

.content-panel img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 1.25rem 0;
  box-shadow: var(--shadow-sm);
}

video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 1.25rem 0;
  box-shadow: var(--shadow-sm);
}

#gallery {
  width: 100%;
  max-width: 100%;
}

iframe[src*="strava.com"] {
  max-width: 100%;
  width: 100% !important;
  height: auto !important;
  min-height: 180px;
}

/* ================================================================
   PROJECT SLIDER (homepage carousel)
   ================================================================ */
.project-slider {
  margin: 2rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

.project-slider .slideshow-frame {
  aspect-ratio: 21 / 9;
  min-height: 320px;
}

.project-slider .slide-btn {
  opacity: 0.7;
}

.project-slider:hover .slide-btn,
.project-slider .slide-btn:focus-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

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

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

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

.project-slide-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.project-slide-content h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

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

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

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

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

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

.project-slide-link .arrow {
  transition: transform 0.25s;
}

.project-slide-link:hover .arrow {
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .project-slider .slideshow-frame {
    aspect-ratio: 4 / 3;
    min-height: 280px;
  }
  .project-slide-overlay {
    padding: 1.5rem;
  }
  .project-slide-icon {
    font-size: 2.5rem;
  }
  .project-slide-content p {
    font-size: 0.85rem;
  }
}

/* ================================================================
   SCROLL REVEAL
   ================================================================ */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ================================================================
   BACKGROUND CANVAS
   ================================================================ */
#bg-canvas, #particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ================================================================
   RESPONSIVE -- MEDIA QUERIES
   ================================================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero {
    padding-top: 4rem;
    min-height: auto;
  }

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

  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-grid, .spec-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .main-nav {
    gap: 1.25rem;
    font-size: 0.675rem;
  }
}

@media (max-width: 600px) {
  #site-header {
    padding: 0.625rem 5%;
  }

  .main-nav {
    gap: 0.875rem;
    font-size: 0.6rem;
    justify-content: center;
  }

  .hero {
    padding: 3rem 5% 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    text-align: center;
  }

  .page-hero {
    padding: 2rem 5% 1.5rem;
  }

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

  .content-panel {
    padding: 1.5rem 5%;
  }

  .slideshow-image {
    max-height: 250px;
    object-fit: cover;
  }

  .embed-container iframe {
    min-height: 140px;
  }
}

/* ================================================================
   GLITCH EFFECT (hover on cards/buttons)
   ================================================================ */
@keyframes glitch {
  0%   { transform: translate(0); }
  20%  { transform: translate(-2px, 1px); }
  40%  { transform: translate(2px, -1px); }
  60%  { transform: translate(-1px, -1px); }
  80%  { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}
.glitch-effect {
  animation: glitch 0.2s ease;
}

/* ================================================================
   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(-50%, -50%);
  transition: opacity 0.15s;
}
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0.4;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, opacity 0.2s, border-color 0.2s;
}
#cursor-ring.cursor-hover {
  width: 48px;
  height: 48px;
  opacity: 0.7;
  border-color: var(--accent-hover);
}

/* ================================================================
   PRELOADER
   ================================================================ */
.preloader-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  animation: preloader-pulse 1s ease-in-out infinite;
}
.preloader-dot:nth-child(2) { animation-delay: 0.15s; }
.preloader-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes preloader-pulse {
  0%, 100% { transform: scale(0.6); opacity: 0.4; }
  50%      { transform: scale(1);   opacity: 1; }
}
