/* ==========================================================================
   Design System & Theme Variables
   Color Palette: Deep Obsidian Teal & Radiant Emerald / Sage Accent
   ========================================================================== */

:root {
  /* Dark Theme (Default) */
  --bg-primary: #091312;
  --bg-secondary: #0e1c1a;
  --bg-tertiary: #132724;
  --bg-card: rgba(15, 31, 29, 0.75);
  --bg-card-hover: rgba(22, 44, 41, 0.85);
  --bg-glass: rgba(14, 28, 26, 0.6);
  --bg-chip: rgba(20, 184, 166, 0.12);

  /* Primary Accent - Neuron Teal / Emerald */
  --accent-primary: #10b981;
  --accent-secondary: #14b8a6;
  --accent-glow: #2dd4bf;
  --accent-dark: #0f766e;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #06b6d4 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(20, 184, 166, 0.05));

  /* Text & Neutral Colors */
  --text-primary: #f0fdf9;
  --text-secondary: #99f6e4;
  --text-muted: #85a39e;
  --text-dim: #537570;

  /* Borders & Shadows */
  --border-subtle: rgba(45, 212, 191, 0.12);
  --border-focus: rgba(45, 212, 191, 0.4);
  --border-active: #14b8a6;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 25px rgba(20, 184, 166, 0.35);

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

  /* Transitions & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Mode */
[data-theme="light"] {
  --bg-primary: #f0f5f3;
  --bg-secondary: #e5ede9;
  --bg-tertiary: #d8e5df;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.8);
  --bg-chip: rgba(13, 148, 136, 0.1);

  --accent-primary: #0d9488;
  --accent-secondary: #059669;
  --accent-glow: #14b8a6;
  --accent-dark: #042f2c;
  --accent-gradient: linear-gradient(135deg, #0d9488 0%, #059669 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(5, 150, 105, 0.05));

  --text-primary: #0f2420;
  --text-secondary: #134e48;
  --text-muted: #4a6863;
  --text-dim: #7a9c96;

  --border-subtle: rgba(13, 148, 136, 0.18);
  --border-focus: rgba(13, 148, 136, 0.5);
  --border-active: #0d9488;
  --shadow-sm: 0 2px 8px rgba(15, 36, 32, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 36, 32, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 36, 32, 0.12);
  --shadow-glow: 0 0 20px rgba(13, 148, 136, 0.2);
}

/* ==========================================================================
   Base & Reset Styles
   ========================================================================== */

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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
}

/* Background Animated Canvas */
#constellation-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

.ambient-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  transition: transform 0.2s ease-out;
}

.ambient-glow-1 { top: -100px; left: -100px; }
.ambient-glow-2 { bottom: 10%; right: -150px; }

/* Container & Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

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

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

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Section Header Component */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  color: var(--accent-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-title {
  font-size: 2.35rem;
  margin-bottom: 16px;
}

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 18px 0;
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #091312;
  box-shadow: var(--shadow-glow);
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-glow);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-normal);
  border-radius: 2px;
}

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

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

/* Theme Switch Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-secondary);
  color: var(--accent-glow);
  transform: translateY(-1px);
}

/* Mobile Nav Toggle */
.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-primary);
  background: var(--accent-gradient);
  color: #061e1b;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
  color: #041412;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-secondary);
  color: var(--accent-glow);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

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

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 60px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-glow);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.35rem;
  color: var(--accent-secondary);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 580px;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.social-link:hover {
  color: var(--accent-glow);
  border-color: var(--accent-secondary);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* Terminal & Live Platform Widget */
.hero-visual {
  position: relative;
}

.devops-terminal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  position: relative;
}

.terminal-header {
  background: rgba(10, 22, 20, 0.9);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

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

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
}

.terminal-line {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.t-prompt {
  color: var(--accent-primary);
  font-weight: 700;
}

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

.t-output {
  color: var(--text-muted);
  padding-left: 14px;
}

.t-success {
  color: #10b981;
}

.t-highlight {
  color: #38bdf8;
}

.cluster-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
}

.cluster-metric-box {
  background: rgba(20, 184, 166, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.metric-box-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-box-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-glow);
  margin-top: 4px;
}

/* ==========================================================================
   Quick Stats Ribbon
   ========================================================================== */

.stats-ribbon {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  backdrop-filter: blur(12px);
  margin-top: -30px;
  margin-bottom: 60px;
  box-shadow: var(--shadow-md);
}

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

.stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-glow);
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-number {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   About Section & Highlights
   ========================================================================== */

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

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.about-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

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

.about-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-glow);
  font-size: 1.35rem;
  margin-bottom: 20px;
}

.about-card-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.about-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ==========================================================================
   Experience Section (Interactive Timeline)
   ========================================================================== */

.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 30px;
}

.timeline-line {
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary), rgba(20, 184, 166, 0.1));
}

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

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -37px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
  transition: all var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
  background: var(--accent-primary);
  transform: scale(1.2);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.timeline-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

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

.timeline-company {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-badge-period {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  color: var(--accent-glow);
}

.timeline-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

.timeline-achievements {
  list-style: none;
  margin-bottom: 22px;
}

.timeline-achievements li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.timeline-achievements li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

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

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.tech-tag:hover {
  background: var(--bg-chip);
  border-color: var(--accent-secondary);
  color: var(--accent-glow);
}

/* ==========================================================================
   Skills Matrix Section
   ========================================================================== */

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

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: all var(--transition-normal);
}

.skill-category-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.skill-cat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-chip);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-glow);
}

.skill-items-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-item {
  width: 100%;
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.skill-name {
  color: var(--text-primary);
}

.skill-level-text {
  font-family: var(--font-mono);
  color: var(--accent-glow);
  font-size: 0.8rem;
}

.skill-bar-bg {
  width: 100%;
  height: 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

[data-theme="light"] .skill-bar-bg {
  background: rgba(0, 0, 0, 0.08);
}

.skill-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* ==========================================================================
   Certifications Section
   ========================================================================== */

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

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.cert-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-secondary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.cert-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-glow);
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.cert-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.cert-issuer {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cert-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
}

.cert-year {
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.cert-verify-link {
  color: var(--accent-glow);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.cert-verify-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Projects Section (Portofolio)
   ========================================================================== */

.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent-primary);
  background: var(--accent-gradient);
  color: #061e1b;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.project-banner {
  height: 180px;
  background: linear-gradient(135deg, #0f2924 0%, #091514 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.project-banner-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(20, 184, 166, 0.2) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.6;
}

.project-banner-icon {
  font-size: 3.5rem;
  color: var(--accent-glow);
  z-index: 1;
  filter: drop-shadow(0 0 15px rgba(20, 184, 166, 0.5));
}

.project-content {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-category-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-secondary);
  font-weight: 700;
  margin-bottom: 8px;
}

.project-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.project-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
  flex-grow: 1;
}

.project-impact-box {
  background: rgba(20, 184, 166, 0.07);
  border-left: 3px solid var(--accent-primary);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

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

.project-links {
  display: flex;
  gap: 12px;
}

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

.project-action-link:hover {
  color: var(--accent-glow);
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  position: relative;
}

.quote-icon {
  font-size: 2.2rem;
  color: var(--accent-glow);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 12px;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #061e1b;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.author-role {
  font-size: 0.8rem;
  color: var(--text-dim);
}

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

.contact-card-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}

.contact-info-title {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.contact-info-text {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.channel-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-glow);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.channel-title {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.channel-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

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

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

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

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   Modal Component (CV Preview & Project Details)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 12, 11, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-normal);
  position: relative;
}

.modal-backdrop.open .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.modal-title {
  font-size: 1.25rem;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--accent-glow);
}

.modal-body {
  padding: 32px;
}

/* Printable CV Sheet in Modal */
.cv-paper {
  background: #ffffff;
  color: #1e293b;
  padding: 40px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 0.92rem;
  line-height: 1.6;
}

.cv-paper h1, .cv-paper h2, .cv-paper h3 {
  color: #0f172a;
}

.cv-header {
  border-bottom: 2px solid #0d9488;
  padding-bottom: 18px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.cv-name {
  font-size: 2rem;
  font-weight: 800;
  color: #042f2c !important;
}

.cv-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0d9488;
}

.cv-contacts {
  font-size: 0.85rem;
  color: #64748b;
  text-align: right;
}

.cv-section {
  margin-bottom: 24px;
}

.cv-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0d9488;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
  margin-bottom: 14px;
}

.cv-item {
  margin-bottom: 16px;
}

.cv-item-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
}

.cv-item-sub {
  font-weight: 600;
  color: #475569;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.cv-item-list {
  padding-left: 20px;
  font-size: 0.88rem;
  color: #334155;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--accent-secondary);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Print Styles (ATS & CV PDF Export)
   ========================================================================== */

@media print {
  body * {
    visibility: hidden;
  }

  .cv-paper, .cv-paper * {
    visibility: visible;
  }

  .cv-paper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20mm;
    box-shadow: none;
  }

  .modal-header, .site-header, .site-footer, #constellation-canvas, .ambient-glow {
    display: none !important;
  }
}

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

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

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

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

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

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

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 30px;
    gap: 20px;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .mobile-toggle-btn {
    display: block;
  }

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

  .hero-subtitle {
    font-size: 1.15rem;
  }

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

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

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

  .contact-card-wrapper {
    padding: 28px 20px;
  }
}

/* Terminal Cursor Animation */
.cursor-blink {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
