/* ========================================
   EMERGENT-STYLE CV WEBSITE V2 - MOBILE FIX
   Nicodemus Reno Anjasmoro
   ======================================== */

/* --- 1. CSS VARIABLES --- */
:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Colors - Dark Theme */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  
  --accent: #00f3ff;
  --accent-dim: rgba(0, 243, 255, 0.1);
  --accent-glow: rgba(0, 243, 255, 0.3);
  
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  
  --gradient-text: linear-gradient(135deg, #00f3ff 0%, #7c3aed 100%);
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: blur(20px);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 243, 255, 0.15);
  
  /* Spacing */
  --nav-height: 72px;
  --section-padding: 120px;
  --container-width: 1200px;
  
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-base: 0.4s var(--ease-out);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.02);
  --bg-card-hover: rgba(0, 0, 0, 0.04);
  
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #888888;
  
  --accent: #0066ff;
  --accent-dim: rgba(0, 102, 255, 0.1);
  --accent-glow: rgba(0, 102, 255, 0.2);
  
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  
  --gradient-text: linear-gradient(135deg, #0066ff 0%, #7c3aed 100%);
  
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(0, 102, 255, 0.1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition-base), color var(--transition-base);
}

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

ul { list-style: none; }
img, svg { display: block; max-width: 100%; }

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

/* --- 3. GRID BACKGROUND OVERLAY --- */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

[data-theme="light"] .grid-overlay {
  background-image: 
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}

/* --- 4. NAVIGATION --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: transparent;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(245, 245, 245, 0.85);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo-dot {
  color: var(--accent);
  font-size: 1.5rem;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  letter-spacing: 0.02em;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition-fast);
}

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

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.4rem;
  border-radius: 8px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
}

#theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* --- 5. HERO SECTION --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#space-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 2rem;
  padding-bottom: 6rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Gradient Text Effect */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 3rem;
  line-height: 1.7;
  font-weight: 300;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

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

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.3rem;
}

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

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Hero Buttons - Uniform Glass Style */
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Both buttons now share this glass style */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  min-width: 200px;
}

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

/* Button Icon Animation */
.btn-primary svg, .btn-secondary svg {
  transition: transform var(--transition-fast);
}
.btn-primary:hover svg, .btn-secondary:hover svg {
  transform: translateX(4px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: 14px;
  width: 100%;
  justify-content: center;
}

/* Scroll Indicator - Below Buttons */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}

.scroll-indicator span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.7;
}

.scroll-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* --- 6. SECTIONS --- */
.section {
  padding: var(--section-padding) 0;
  position: relative;
  z-index: 1;
}

.section-header {
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 1rem;
  max-width: 600px;
}

/* Glass Panel Base */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  transition: all var(--transition-base);
}

.glass-panel:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* --- 7. SUMMARY SECTION --- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.card-icon-wrapper {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 12px;
  margin: 0 auto 1rem;
  color: var(--accent);
}

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

.summary-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.summary-text-card {
  padding: 2.5rem;
}

.summary-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* --- 8. SKILLS SECTION --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.skill-card {
  padding: 1.5rem;
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.skill-icon {
  font-size: 1.5rem;
}

.skill-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  opacity: 0.8;
}

.skill-content ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-content li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-content li::before {
  content: '›';
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
}

.code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Tech Stack */
.tech-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tech-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-tag {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

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

/* --- 9. TIMELINE --- */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-marker {
  position: absolute;
  left: -3rem;
  top: 0.5rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  z-index: 1;
}

.timeline-card {
  padding: 2rem;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.timeline-type {
  padding: 0.2rem 0.6rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 1rem;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}

.timeline-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* --- 10. EDUCATION & CERTIFICATIONS --- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.edu-card {
  padding: 2.5rem;
  text-align: center;
}

.edu-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.edu-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.edu-school {
  color: var(--accent);
  font-weight: 500;
  display: block;
  margin-bottom: 0.3rem;
}

.edu-year {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.edu-gpa {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.cert-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem 1.5rem;
}

.cert-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  min-width: 40px;
}

.cert-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.cert-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Organizations */
.organizations {
  padding: 2.5rem;
}

.organizations h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.org-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.org-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.org-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.org-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.org-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- 11. PROJECTS SHOWCASE --- */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.showcase-card {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

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

.showcase-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  padding: 0.3rem 0.8rem;
  background: var(--accent);
  color: #000;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.showcase-visual {
  height: 180px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 120px;
  height: 80px;
}

.grid-block {
  background: var(--bg-card);
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.grid-block.accent {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.showcase-card:hover .grid-block {
  transform: scale(1.05);
}

.showcase-content {
  padding: 1.5rem;
}

.showcase-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

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

.showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.3rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

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

/* --- 12. CONTACT SECTION --- */
.contact-section {
  padding: var(--section-padding) 0;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  padding: 3rem;
}

.contact-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 1rem 0;
  letter-spacing: -0.02em;
}

.contact-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  padding: 0.5rem 0;
}

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

.contact-link svg {
  flex-shrink: 0;
  color: var(--accent);
}

.contact-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

/* --- 13. FOOTER --- */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- 14. ANIMATIONS --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 15. MOBILE RESPONSIVE - FIXED --- */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .edu-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
  }
  
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform var(--transition-base);
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .menu-toggle {
    display: block;
  }
  
  /* Hero Mobile Fix */
  .hero-content {
    padding: 0 1.5rem;
    padding-bottom: 8rem;
  }
  
  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }
  
  .hero-tagline {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }
  
  .stat-divider {
    width: 40px;
    height: 1px;
  }
  
  /* Buttons stay side-by-side on mobile */
  .hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .btn-primary, .btn-secondary {
    flex: 1;
    min-width: auto;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }
  
  /* Scroll indicator below buttons */
  .scroll-indicator {
    bottom: 1.5rem;
    opacity: 0.6;
  }
  
  .scroll-indicator span {
    font-size: 0.65rem;
  }
  
  .scroll-line {
    height: 25px;
  }
  
  /* Other mobile fixes */
  .summary-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .timeline {
    padding-left: 2rem;
  }
  
  .timeline-marker {
    left: -2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.2rem;
  }
  
  .hero-content {
    padding: 0 1.2rem;
    padding-bottom: 7rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero-tagline {
    font-size: 0.95rem;
  }
  
  /* Buttons full width on very small screens */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  
  /* Scroll indicator still below */
  .scroll-indicator {
    bottom: 1.2rem;
  }
}

/* --- 16. ACCESSIBILITY --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-line {
    animation: none;
  }
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- 17. PRINT STYLES --- */
@media print {
  .navbar, .video-background, .scroll-indicator, .grid-overlay {
    display: none;
  }
  
  .hero {
    min-height: auto;
    padding: 3rem 0;
  }
  
  .glass-panel {
    background: #fff !important;
    border: 1px solid #ccc;
    box-shadow: none;
    backdrop-filter: none;
    break-inside: avoid;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  .section {
    padding: 2rem 0;
  }
}

/* Visitor Counter Styling */
.visitor-counter {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  opacity: 0.85;
  transition: color var(--transition-fast);
}

.visitor-counter:hover {
  color: var(--accent);
  opacity: 1;
}

#visitor-count {
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent);
  min-width: 2.5rem;
  display: inline-block;
}
// Visitor Counter Logic
async function loadVisitorCount() {
  const countEl = document.getElementById('visitor-count');
  if (!countEl) return;

  try {
    // Menggunakan CountAPI (free, reliable untuk static site)
    const response = await fetch('https://api.countapi.xyz/hit/nicodram-github-io/cv-visits');
    if (!response.ok) throw new Error('API limit reached');
    
    const data = await response.json();
    countEl.textContent = data.value.toLocaleString();
  } catch (error) {
    // Fallback jika API error/rate limit
    countEl.textContent = '500+';
    console.log('Visitor counter fallback activated');
  }
}

// Jalankan setelah DOM ready
if (document.readyState === 'loading') {
  document.addEventListener('DOMContentLoaded', loadVisitorCount);
} else {
  loadVisitorCount();
}
