/* ==========================================================================
   FAKHRI RIZAL - CYBERSECURITY & BACKEND DEVELOPER PORTFOLIO
   High-performance, secure, responsive, zero-dependency static styling.
   ========================================================================== */

:root {
  --bg-primary: #070b14;
  --bg-secondary: #0d1424;
  --bg-tertiary: #131d33;
  --bg-card: #0d1424;
  --bg-card-hover: #131d33;
  --border-color: rgba(56, 189, 248, 0.15);
  --border-highlight: rgba(56, 189, 248, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-purple: #818cf8;
  --accent-amber: #f59e0b;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  
  --container-max: 1200px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px -5px rgba(56, 189, 248, 0.3);
}

/* Light Mode Overrides (Optional / Toggleable) */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: rgba(15, 23, 42, 0.1);
  --border-highlight: rgba(14, 165, 233, 0.4);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.15);
  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.15);
  --accent-purple: #6366f1;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px -5px rgba(2, 132, 199, 0.2);
}

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Interactive Cyber Canvas Background */
.cyber-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .cyber-canvas {
    display: none !important;
  }
}

main, section, .site-footer {
  position: relative;
  z-index: 1;
}

/* Cyber Matrix Background Grid */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(16, 185, 129, 0.06) 0%, transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: -1;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

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

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  color: var(--text-main);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-family: var(--font-sans);
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

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

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width var(--transition-normal);
  box-shadow: 0 0 8px var(--accent-cyan);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Toggle Button */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.25rem;
  cursor: pointer;
  user-select: none;
  transition: border-color var(--transition-fast);
}

.lang-switch:hover {
  border-color: var(--accent-cyan);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--accent-cyan);
  color: #070b14;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.btn-theme {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

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

.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  width: 2.5rem;
  height: 2.5rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.hamburger:hover {
  background: var(--bg-tertiary);
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

.hamburger.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--accent-cyan);
}

.hamburger.open .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--accent-cyan);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.2;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #0891b2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-highlight);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.badge-cyan {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.badge-purple {
  background: rgba(129, 140, 248, 0.1);
  border-color: rgba(129, 140, 248, 0.3);
  color: var(--accent-purple);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 8rem 0 5rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--accent-emerald);
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  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: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-title .gradient-text {
  color: var(--accent-cyan);
  display: block;
}

.hero-tagline {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent-cyan);
  font-family: var(--font-sans);
  margin-bottom: 1.25rem;
}

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

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-socials {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.social-link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  background: var(--bg-tertiary);
}

/* Hero Terminal / Profile Card */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald), transparent);
}

.card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

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

.profile-avatar-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--accent-cyan);
  background: linear-gradient(135deg, #0f172a, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.avatar-icon {
  width: 48px;
  height: 48px;
  color: var(--accent-cyan);
}

.avatar-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.avatar-info p {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.avatar-info .location-text {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.terminal-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terminal-key {
  color: var(--text-dim);
}

.terminal-val {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
}

.terminal-val.highlight {
  color: var(--accent-emerald);
}

/* ==========================================================================
   METRICS & STATS
   ========================================================================== */
.stats-banner {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

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

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--font-sans);
  color: var(--accent-cyan);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   SECTION COMMON STYLES
   ========================================================================== */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-header {
  margin-bottom: 3.5rem;
  text-align: center;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 650px;
  margin: 0.75rem auto 0;
}

/* ==========================================================================
   FEATURED PROJECT: SAWIT (FLAGSHIP)
   ========================================================================== */
.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-cyan);
}

.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.featured-title-wrap h3 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.featured-subtitle {
  font-family: var(--font-sans);
  color: var(--accent-cyan);
  font-size: 0.9rem;
}

.award-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.featured-summary {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.feature-bullet {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.feature-bullet svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent-emerald);
  margin-top: 0.2rem;
}

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

.tech-tag {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

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

/* SAWIT Case Study Breakdown */
.case-study-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.case-study-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.case-study-heading {
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Project Action Buttons (Repo & Demo) */
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.btn-proj-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-proj-action:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
}

/* Sembunyikan otomatis jika URL kosong, "#", atau tidak diset */
.btn-proj-action:not([href]),
.btn-proj-action[href=""],
.btn-proj-action[href="#"] {
  display: none !important;
}

/* Architecture visual diagram box */
.arch-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.arch-header {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arch-layers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.arch-layer {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.arch-layer-title {
  font-size: 0.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.arch-layer-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  color: var(--text-main);
}

/* Project Cards Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-card);
}

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

.project-folder-icon {
  width: 36px;
  height: 36px;
  color: var(--accent-cyan);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

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

.project-placeholder-card {
  border: 2px dashed var(--border-color);
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  cursor: default;
}

.placeholder-icon {
  width: 44px;
  height: 44px;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.placeholder-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.placeholder-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  max-width: 280px;
}

/* ==========================================================================
   EXPERIENCE & EDUCATION TIMELINE
   ========================================================================== */
.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.timeline-column-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
}

.timeline-column-title svg {
  color: var(--accent-cyan);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding-left: 1.5rem;
}

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

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 5px;
  left: -1.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.timeline-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin-bottom: 0.35rem;
}

.timeline-role {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.timeline-institution {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timeline-body {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.timeline-body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

.timeline-body li {
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   SKILLS & COMPETENCIES
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

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

.skill-category-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

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

.skill-cat-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-cyan);
}

.skill-cat-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.skill-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skill-name-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 500;
}

.skill-level-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-level-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* ==========================================================================
   CERTIFICATIONS & AWARDS
   ========================================================================== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: all var(--transition-normal);
}

.cert-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-3px);
}

.cert-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.cert-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

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

/* Certification Meta Information */
.cert-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cert-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cert-meta-label {
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
}

.cert-meta-val {
  color: var(--text-main);
}

.cert-verify-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--accent-cyan);
  margin-top: 0.3rem;
  transition: color var(--transition-fast);
}

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

/* Sembunyikan field sertifikat yang kosong otomatis */
.cert-meta-item:empty,
.cert-meta-val:empty,
.cert-verify-link:not([href]),
.cert-verify-link[href=""],
.cert-verify-link[href="#"] {
  display: none !important;
}

/* ==========================================================================
   CONTACT & CHAT DISPATCH SECTION
   ========================================================================== */
.contact-section {
  padding: 6rem 0 8rem;
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: flex-start;
}

.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card-direct {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all var(--transition-fast);
}

.contact-card-direct:hover {
  border-color: var(--accent-cyan);
  transform: translateX(4px);
}

.contact-direct-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-wa {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.icon-email {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
}

.icon-linkedin {
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: var(--accent-purple);
}

.contact-direct-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

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

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: auto;
  transition: all var(--transition-fast);
}

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

/* Contact Form Container */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
}

.form-header {
  margin-bottom: 1.5rem;
}

.form-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.form-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
}

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

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  background: var(--bg-tertiary);
}

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

/* Form Action Buttons (Dual Channel: WA & Email) */
.form-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-status-alert {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: none;
}

.form-status-alert.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-emerald);
}

.form-status-alert.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* ==========================================================================
   FLOATING WHATSAPP CHAT WIDGET
   ========================================================================== */
.floating-wa-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
}

.floating-wa-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.floating-wa-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6);
}

.wa-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.5);
  animation: wa-ring 2s infinite;
  z-index: -1;
}

@keyframes wa-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.wa-popup {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 310px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: none;
  animation: fadeIn 0.3s ease;
}

.wa-popup.open {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wa-popup-header {
  background: linear-gradient(135deg, #065f46, #047857);
  color: #ffffff;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wa-popup-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.wa-popup-header p {
  font-size: 0.75rem;
  opacity: 0.9;
}

.wa-popup-body {
  padding: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.wa-popup-body p {
  background: var(--bg-tertiary);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

.wa-popup-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #10b981;
  color: #ffffff;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background var(--transition-fast);
}

.wa-popup-btn:hover {
  background: #059669;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-note {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-dim);
}

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

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

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

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS (HP, iPhone, iPad, Tablet)
   ========================================================================== */

/* iOS Safe Area & Notched Screen Adaptations */
@supports (padding-top: env(safe-area-inset-top)) {
  .site-header {
    padding-top: env(safe-area-inset-top);
  }
  
  .floating-wa-container {
    bottom: max(1.25rem, calc(1.25rem + env(safe-area-inset-bottom)));
    right: max(1.25rem, calc(1.25rem + env(safe-area-inset-right)));
  }

  .site-footer {
    padding-bottom: max(3rem, calc(2.5rem + env(safe-area-inset-bottom)));
  }
}

/* Tablet & Smaller Laptops (Max 1024px) */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

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

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

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

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

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

/* Tablets (Portrait) & Large Smartphones (Max 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }

  .site-header {
    height: 4.25rem;
  }

  .nav-wrapper {
    height: 4.25rem;
  }

  .hamburger {
    display: flex;
  }

  /* Frosted Glass Mobile Navigation Drawer */
  .nav-menu {
    position: fixed;
    top: 4.25rem;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 4.25rem);
    overflow-y: auto;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 1.25rem 2rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-highlight);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(-160%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
  }

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

  .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
  }

  .nav-link:hover,
  .nav-link.active {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.25);
    color: var(--accent-cyan);
  }

  .nav-link::after {
    display: none;
  }

  /* Section Spacing on Mobile */
  .section {
    padding: 4.5rem 0;
  }

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

  .section-title {
    font-size: clamp(1.6rem, 5.5vw, 2.1rem);
  }

  /* Hero Section Mobile */
  .hero-section {
    padding: 6rem 0 3.5rem;
    min-height: auto;
  }

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

  .hero-description {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .hero-socials {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .hero-card {
    padding: 1.25rem;
  }

  /* Stats on Mobile */
  .stats-banner {
    padding: 1.75rem 0;
  }

  .stat-number {
    font-size: 1.85rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  /* Featured Project (SAWIT) */
  .featured-card {
    padding: 1.5rem 1.25rem;
  }

  .featured-title-wrap h3 {
    font-size: 1.45rem;
  }

  .featured-subtitle {
    font-size: 0.82rem;
  }

  .award-ribbon {
    width: 100%;
    justify-content: center;
  }

  .arch-box {
    padding: 1rem;
  }

  /* Projects & Skills Grid */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

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

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

  /* Contact Form & Actions (Crucial iOS Safari input zoom fix) */
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
    padding: 0.8rem 0.9rem;
  }

  .form-actions-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .contact-form-card {
    padding: 1.5rem 1.25rem;
  }

  .contact-card-direct {
    padding: 1.15rem;
  }

  /* Floating WhatsApp Widget Mobile */
  .wa-popup {
    width: calc(100vw - 2.5rem);
    max-width: 320px;
    right: 0;
    bottom: 68px;
  }

  /* Footer */
  .site-footer {
    padding: 2.5rem 0;
  }

  .footer-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

/* Compact Smartphones (Max 480px, e.g. iPhone SE, Standard iPhones, Galaxy) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .brand-subtitle {
    display: none;
  }

  .profile-avatar-container {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .avatar-info .location-text {
    justify-content: center;
  }

  .terminal-meta-list {
    font-size: 0.78rem;
    padding: 0.85rem;
  }

  .terminal-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .terminal-val {
    text-align: left;
  }

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

  .stat-item {
    padding: 0.75rem 0.25rem;
  }

  .stat-number {
    font-size: 1.55rem;
  }

  .tech-tags {
    gap: 0.35rem;
  }

  .tech-tag {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  .timeline-list {
    padding-left: 1rem;
  }

  .timeline-item::before {
    left: -1.35rem;
    width: 12px;
    height: 12px;
  }

  .contact-card-direct {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .copy-btn {
    margin-left: 0;
  }
}
