/* ==========================================================================
   MODERN 3D PORTFOLIO - MAIN STYLESHEET
   Aesthetic: Cyber-Glass Luxury & Futuristic Dark Mode
   ========================================================================== */

/* --- ROOT VARIABLES & THEMES --- */
:root {
  /* Default Theme: Cyber Violet */
  --accent-primary: #8b5cf6;
  --accent-secondary: #06b6d4;
  --accent-tertiary: #ec4899;
  --accent-glow: rgba(139, 92, 246, 0.45);
  --accent-rgb: 139, 92, 246;

  /* Neutrals & Dark Canvas */
  --bg-deep: #07080c;
  --bg-surface: #0e111a;
  --bg-card: rgba(18, 22, 34, 0.65);
  --bg-card-hover: rgba(26, 32, 50, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-glow: rgba(139, 92, 246, 0.35);

  /* Typography Colors */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  /* Font Families */
  --font-display: 'Syne', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Elevation & Shadows */
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 30px var(--accent-glow);
}

/* Theme Accents */
body[data-theme="cyan"] {
  --accent-primary: #06b6d4;
  --accent-secondary: #3b82f6;
  --accent-tertiary: #10b981;
  --accent-glow: rgba(6, 182, 212, 0.45);
  --accent-rgb: 6, 182, 212;
  --border-glass-glow: rgba(6, 182, 212, 0.35);
}

body[data-theme="emerald"] {
  --accent-primary: #10b981;
  --accent-secondary: #06b6d4;
  --accent-tertiary: #84cc16;
  --accent-glow: rgba(16, 185, 129, 0.45);
  --accent-rgb: 16, 185, 129;
  --border-glass-glow: rgba(16, 185, 129, 0.35);
}

body[data-theme="rose"] {
  --accent-primary: #f59e0b;
  --accent-secondary: #ef4444;
  --accent-tertiary: #ec4899;
  --accent-glow: rgba(245, 158, 11, 0.45);
  --accent-rgb: 245, 158, 11;
  --border-glass-glow: rgba(245, 158, 11, 0.35);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

::selection {
  background: var(--accent-primary);
  color: #fff;
}

/* Links & Typography */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- 3D CANVAS & BACKGROUND LAYERS --- */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: auto; /* Allow users to click and drag to interact with 3D canvas */
}

#webgl-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Ambient Subtle Glows in Background */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.18;
  transition: background var(--transition-smooth);
}

.glow-1 {
  top: -15%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-primary), transparent 70%);
}

.glow-2 {
  top: 40%;
  left: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
}

.glow-3 {
  bottom: -20%;
  right: 15%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, var(--accent-primary), transparent 70%);
}

/* --- CUSTOM CURSOR --- */
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 0 12px var(--accent-primary);
}

.cursor-outline {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent-primary);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.3s, background-color 0.2s;
  background: rgba(var(--accent-rgb), 0.04);
}

.cursor-hover {
  width: 60px;
  height: 60px;
  border-color: var(--accent-secondary);
  background: rgba(var(--accent-rgb), 0.15);
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-outline {
    display: none;
  }
}

/* --- GRADIENTS & UTILITIES --- */
.text-accent {
  color: var(--accent-primary);
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 10%, var(--accent-primary) 60%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-success {
  color: #10b981 !important;
}

/* --- BUTTONS --- */
.btn-primary, .btn-secondary, .btn-outline, .btn-primary-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  transition: all var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  padding: 0.9rem 1.8rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  box-shadow: 0 10px 25px -5px var(--accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 35px -5px var(--accent-glow);
}

.btn-primary-sm {
  padding: 0.6rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  font-size: 0.85rem;
  border-radius: 99px;
  box-shadow: 0 4px 15px -3px var(--accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -3px var(--accent-glow);
}

.btn-secondary {
  padding: 0.9rem 1.7rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glass-glow);
  transform: translateY(-3px);
  color: #fff;
}

.btn-outline {
  padding: 0.9rem 1.7rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
}

.btn-outline:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  z-index: -1;
}

.btn-glow:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all var(--transition-smooth);
}

.navbar.scrolled {
  padding: 0.75rem 0;
  background: rgba(7, 8, 12, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(14, 17, 26, 0.65);
  padding: 0.4rem 0.6rem;
  border-radius: 99px;
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(14px);
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 99px;
  transition: all var(--transition-fast);
}

.nav-item i {
  font-size: 0.85rem;
  opacity: 0.7;
}

.nav-item:hover, .nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(6, 182, 212, 0.15));
  border: 1px solid var(--border-glass-glow);
}

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

/* Theme Dropdown */
.theme-dropdown {
  position: relative;
}

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  transition: all var(--transition-fast);
}

.theme-btn:hover {
  border-color: var(--border-glass-glow);
  transform: scale(1.05);
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.theme-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: rgba(14, 17, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 0.6rem;
  min-width: 170px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 100;
}

.theme-dropdown.open .theme-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all var(--transition-fast);
  text-align: left;
}

.theme-option span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.theme-option.violet span { background: #8b5cf6; }
.theme-option.cyan span { background: #06b6d4; }
.theme-option.emerald span { background: #10b981; }
.theme-option.rose span { background: #f59e0b; }

.theme-option:hover, .theme-option.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.theme-option.active {
  border-left: 2px solid var(--accent-primary);
}

/* Audio Toggle */
.audio-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.audio-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--border-glass-glow);
  transform: scale(1.05);
}

.audio-toggle-btn.muted {
  opacity: 0.45;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 1.1rem;
  align-items: center;
  justify-content: center;
}

/* --- MAIN SECTIONS GENERAL --- */
main {
  position: relative;
  z-index: 10;
}

.section {
  padding: 6.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid var(--border-glass-glow);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

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

/* --- 3D TILT CARDS BASE --- */
.card-tilt {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2rem;
  transition: transform 0.15s ease-out, border-color var(--transition-fast), box-shadow var(--transition-fast);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}

.card-tilt:hover {
  border-color: var(--border-glass-glow);
  box-shadow: var(--shadow-card), 0 0 30px rgba(var(--accent-rgb), 0.15);
}

/* --- HERO SECTION --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 6rem;
  padding-bottom: 3rem;
}

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

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #34d399;
  margin-bottom: 1.75rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseStatus 2s infinite ease-in-out;
}

@keyframes pulseStatus {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  min-height: 2rem;
}

.typing-text {
  color: var(--accent-primary);
  font-weight: 600;
}

.typing-cursor {
  color: var(--accent-secondary);
  animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

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

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.hero-metrics {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-glass);
}

.metric-card {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

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

.hero-interactive-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.interactive-tag {
  background: rgba(14, 17, 26, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass-glow);
  padding: 0.6rem 1.25rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  animation: floatBadge 4s ease-in-out infinite;
}

.hero-3d-hint {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
}

.scroll-indicator a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  transition: color var(--transition-fast);
}

.scroll-indicator a:hover {
  color: var(--accent-primary);
}

.mouse-icon {
  width: 22px;
  height: 36px;
  border: 2px solid var(--border-glass-glow);
  border-radius: 12px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 7px;
  background: var(--accent-primary);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouseWheel 2s infinite ease-in-out;
}

@keyframes mouseWheel {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 14px); opacity: 0; }
}

.scroll-text {
  font-size: 0.7rem;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* --- ABOUT SECTION --- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 2.5rem;
  align-items: stretch;
}

.about-card-3d {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
}

.avatar-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed var(--accent-primary);
}

.ring-1 {
  width: 100%;
  height: 100%;
  animation: rotateClockwise 20s linear infinite;
}

.ring-2 {
  width: 115%;
  height: 115%;
  border-color: var(--accent-secondary);
  border-style: dotted;
  animation: rotateCounter 15s linear infinite;
}

@keyframes rotateClockwise {
  to { transform: rotate(360deg); }
}

@keyframes rotateCounter {
  to { transform: rotate(-360deg); }
}

.avatar-inner {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.25), rgba(6, 182, 212, 0.25));
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px var(--accent-glow);
}

.avatar-icon {
  font-size: 3rem;
  color: #fff;
}

.card-name {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.card-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-family: var(--font-mono);
}

.card-info-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-glass);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.info-label {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.card-social-links {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

/* Terminal Box */
.terminal-box {
  background: rgba(10, 12, 18, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.75rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

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

.terminal-buttons {
  display: flex;
  gap: 0.4rem;
}

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

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

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

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.8;
}

.prompt-text {
  color: var(--accent-secondary);
  font-weight: 600;
}

.terminal-desc {
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.pillar-card {
  padding: 1.5rem;
  background: rgba(18, 22, 34, 0.5);
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid var(--border-glass-glow);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.pillar-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.pillar-card p {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* --- SKILLS SECTION --- */
.skill-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.skill-tab-btn {
  padding: 0.65rem 1.4rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.skill-tab-btn:hover, .skill-tab-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-2px);
}

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

.skill-card {
  padding: 1.6rem;
  background: var(--bg-card);
  transition: transform 0.2s, opacity 0.3s, border-color 0.2s;
}

.skill-card.hidden {
  display: none;
}

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

.skill-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.skill-meta h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.skill-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-top: 0.2rem;
}

.skill-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  min-height: 2.5rem;
}

.skill-meter {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 99px;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.meter-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* --- 3D LAB SECTION --- */
.lab-dashboard {
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid var(--border-glass-glow);
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

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

.control-box label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.85rem;
}

.control-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.lab-btn {
  padding: 0.6rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.lab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.lab-btn.active {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(6, 182, 212, 0.2));
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-glow);
}

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

.slider-header span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-secondary);
  font-weight: 600;
}

.custom-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  outline: none;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-primary);
  transition: transform 0.1s;
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.lab-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
}

.lab-tip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.lab-tip i {
  color: var(--accent-secondary);
  font-size: 1.1rem;
}

/* --- PROJECTS SECTION --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.project-thumb-wrapper {
  position: relative;
  height: 220px;
  background: #090b12;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-glass);
}

.project-badge-type {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.3rem 0.75rem;
  background: rgba(14, 18, 28, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #fff;
  z-index: 5;
}

.project-thumb-glow {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.glow-cyan { background: #06b6d4; }
.glow-violet { background: #8b5cf6; }
.glow-emerald { background: #10b981; }
.glow-amber { background: #f59e0b; }

.project-preview-mockup {
  width: 82%;
  height: 80%;
  background: rgba(18, 24, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
  transition: transform var(--transition-smooth);
}

.project-card:hover .project-preview-mockup {
  transform: translateY(-4px) scale(1.02);
}

.mockup-screen-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border-bottom: 1px solid var(--border-glass);
}

.mock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.mock-url {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-left: 0.4rem;
}

.mockup-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Simulated visuals for mockups */
.preview-aetheria .visual-holo-sphere {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, #06b6d4, #8b5cf6);
  box-shadow: 0 0 25px #06b6d4;
  animation: pulseScale 3s infinite alternate ease-in-out;
}

@keyframes pulseScale {
  0% { transform: scale(0.9); }
  100% { transform: scale(1.1); }
}

.preview-fintech .visual-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 60px;
}

.preview-fintech .visual-bars span {
  width: 14px;
  background: linear-gradient(180deg, #8b5cf6, rgba(139, 92, 246, 0.2));
  border-radius: 3px;
  animation: barAnim 2s infinite alternate ease-in-out;
}

@keyframes barAnim {
  0% { transform: scaleY(0.7); }
  100% { transform: scaleY(1.1); }
}

.preview-ai .visual-neural-nodes {
  display: flex;
  gap: 15px;
}

.visual-neural-nodes .node {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 15px #10b981;
  position: relative;
}

.preview-saas .visual-canvas-layer {
  display: flex;
  gap: 10px;
}

.visual-canvas-layer .layer-item {
  width: 60px;
  height: 45px;
  border: 1px dashed #f59e0b;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.1);
}

.project-body {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.ptag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  color: var(--text-muted);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #fff;
}

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

.project-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-proj-detail {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  background: rgba(var(--accent-rgb), 0.15);
  border: 1px solid var(--border-glass-glow);
  color: #fff;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-proj-detail:hover {
  background: var(--accent-primary);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.proj-action-link {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.proj-action-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* --- TIMELINE SECTION --- */
.timeline-container {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 60px;
}

.timeline-dot {
  position: absolute;
  left: 12px;
  top: 24px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
  z-index: 2;
}

.timeline-content {
  padding: 1.75rem 2rem;
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-secondary);
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.timeline-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #fff;
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --- TESTIMONIALS --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testi-stars {
  color: #f59e0b;
  font-size: 0.85rem;
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.testi-quote {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1.75rem;
  flex: 1;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-glass);
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.15);
  border: 1px solid var(--border-glass-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.1rem;
}

.author-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.author-info span {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* --- CONTACT SECTION --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
}

.contact-info-card h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

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

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.contact-method-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
}

.c-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.c-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.c-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.btn-copy-email {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-copy-email:hover {
  background: var(--accent-primary);
  color: #fff;
}

.social-large-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.social-pill:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* Contact Form */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-group label .req {
  color: var(--accent-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  pointer-events: none;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  background: rgba(10, 13, 20, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  color: #fff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  outline: none;
}

.textarea-wrapper {
  align-items: flex-start;
}

.textarea-wrapper .input-icon {
  top: 1rem;
}

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

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-glow);
  background: rgba(10, 13, 20, 0.9);
}

.input-wrapper select option {
  background: #0f121d;
  color: #fff;
}

.btn-submit-form {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
}

/* --- FOOTER --- */
.footer {
  border-top: 1px solid var(--border-glass);
  background: rgba(7, 8, 12, 0.9);
  padding: 2.5rem 0;
  position: relative;
  z-index: 10;
}

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

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

.copyright-text {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.btn-back-to-top {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-back-to-top:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--accent-glow);
}

/* --- MODAL WINDOW --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass-glow);
  border-radius: 24px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
  transform: translateY(20px) scale(0.96);
  transition: all var(--transition-smooth);
}

.modal-overlay.active .modal-window {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  background: var(--accent-primary);
  transform: rotate(90deg);
}

.modal-content {
  padding: 2.5rem;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.4rem;
  background: rgba(14, 18, 28, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-glow);
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: slideToast 0.4s var(--transition-bounce) forwards;
}

.toast i {
  color: var(--accent-primary);
  font-size: 1.1rem;
}

@keyframes slideToast {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .lab-controls-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 75px;
    left: 1.5rem;
    right: 1.5rem;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(10, 13, 20, 0.97);
    border: 1px solid var(--border-glass-glow);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-15px);
    transition: all var(--transition-smooth);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-toggle {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-role, .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-metrics {
    justify-content: center;
    gap: 1.5rem;
  }

  .hero-interactive-badge {
    align-items: center;
  }

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

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

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

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 2rem;
  }

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

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.3rem;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
}



/* ==========================================================
   RESPONSIVE ANDROID / MOBILE IMPROVEMENTS
   Tambahan di akhir file agar tidak mengganggu desain desktop.
   ========================================================== */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

.container,
.nav-container,
.hero-grid,
.about-grid,
.skills-grid,
.projects-grid,
.contact-grid,
.lab-dashboard,
.footer-content {
  min-width: 0;
}

p,
h1,
h2,
h3,
h4,
span,
a,
button,
label {
  overflow-wrap: anywhere;
}

img,
canvas,
video,
iframe {
  max-width: 100%;
}

button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}

#canvas-container {
  width: 100%;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

@media (max-width: 768px) {
  .container {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .navbar {
    padding: 0.75rem 0;
  }

  .navbar.scrolled {
    padding: 0.55rem 0;
  }

  .nav-container {
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 0.6rem;
  }

  .brand-logo {
    font-size: 1.05rem;
    gap: 0.45rem;
    min-width: 0;
  }

  .logo-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .nav-actions {
    gap: 0.45rem;
    flex-shrink: 0;
  }

  .nav-actions .btn-primary-sm {
    display: none;
  }

  .theme-btn,
  .audio-toggle-btn {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
  }

  .mobile-toggle {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

  .nav-links {
    top: 68px;
    left: 1rem;
    right: 1rem;
    max-height: calc(100dvh - 85px);
    overflow-y: auto;
    gap: 0.35rem;
    align-items: stretch;
  }

  .nav-item {
    width: 100%;
    justify-content: flex-start;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }

  .hero-section {
    min-height: auto;
    min-height: 100svh;
    padding-top: 7.5rem;
    padding-bottom: 5rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .hero-content {
    width: 100%;
    min-width: 0;
  }

  .badge-status {
    max-width: 100%;
    justify-content: center;
    white-space: normal;
    border-radius: 14px;
    font-size: 0.76rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 1.2rem;
  }

  .hero-title {
    font-size: clamp(2rem, 7.2vw, 3rem);
    line-height: 1.16;
    letter-spacing: -0.8px;
    margin-bottom: 1.1rem;
  }

  .hero-title br {
    display: none;
  }

  .hero-role {
    font-size: clamp(0.95rem, 3.8vw, 1.2rem);
    line-height: 1.7;
    overflow-wrap: anywhere;
  }

  .hero-description {
    font-size: 0.96rem;
    line-height: 1.8;
    margin-bottom: 1.6rem;
  }

  .hero-cta-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
    margin-bottom: 2rem;
  }

  .hero-cta-group > a {
    width: 100%;
    min-height: 46px;
    padding: 0.8rem 1rem;
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    padding-top: 1.3rem;
  }

  .metric-card {
    min-width: 0;
    text-align: center;
  }

  .metric-num {
    font-size: clamp(1.35rem, 5vw, 1.8rem);
  }

  .metric-label {
    font-size: 0.68rem;
    line-height: 1.4;
  }

  .hero-interactive-badge {
    align-items: center;
    text-align: center;
  }

  .interactive-tag {
    max-width: 100%;
    justify-content: center;
    white-space: normal;
    font-size: 0.75rem;
    padding: 0.55rem 0.8rem;
  }

  .hero-3d-hint {
    font-size: 0.65rem;
  }

  .scroll-indicator {
    display: none;
  }

  .section {
    padding: 4rem 0;
  }

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

  .section-tag {
    max-width: 100%;
    white-space: normal;
    justify-content: center;
    font-size: 0.66rem;
    letter-spacing: 0.5px;
  }

  .section-title {
    font-size: clamp(1.65rem, 6vw, 2.2rem);
    line-height: 1.25;
    letter-spacing: -0.5px;
  }

  .section-subtitle {
    font-size: 0.92rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .about-card-3d,
  .card-tilt {
    padding: 1.35rem;
    border-radius: 16px;
  }

  .about-card-3d {
    padding: 2rem 1.2rem;
  }

  .info-row {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .info-val {
    text-align: right;
    max-width: 60%;
  }

  .terminal-title {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.72rem;
  }

  .terminal-body,
  .terminal-desc {
    font-size: 0.88rem;
    line-height: 1.75;
  }

  .pillars-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .skill-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .skill-tab-btn {
    max-width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.78rem;
  }

  .skills-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .skill-card {
    min-width: 0;
    padding: 1.2rem;
  }

  .skill-header {
    gap: 0.75rem;
  }

  .skill-meta h4 {
    font-size: 0.98rem;
  }

  .lab-dashboard {
    padding: 1rem;
  }

  .lab-controls-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .control-box {
    min-width: 0;
  }

  .control-btn-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .lab-btn {
    min-width: 0;
    min-height: 42px;
    padding: 0.65rem 0.55rem;
    font-size: 0.76rem;
    white-space: normal;
  }

  .slider-header {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .custom-slider {
    width: 100%;
    max-width: 100%;
  }

  .lab-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .lab-tip {
    align-items: flex-start;
    line-height: 1.6;
    font-size: 0.82rem;
  }

  .lab-footer .btn-secondary {
    width: 100%;
  }

  .projects-grid,
  .testimonials-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .project-card {
    min-width: 0;
  }

  .project-thumb-wrapper {
    height: 190px;
  }

  .mock-url {
    max-width: 70%;
    overflow-wrap: anywhere;
    font-size: 0.65rem;
  }

  .project-body {
    padding: 1.2rem;
  }

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

  .project-links {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .btn-proj-detail {
    max-width: 100%;
    white-space: normal;
  }

  .contact-form,
  .contact-info {
    min-width: 0;
    padding: 1.2rem;
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
  }

  input,
  textarea,
  select {
    max-width: 100%;
    font-size: 16px;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
  }

  .footer-links,
  .footer-social {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Dialog/modal tidak melewati lebar layar ponsel */
  .modal-content,
  .project-modal-content,
  .toast,
  .custom-modal {
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .nav-container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .brand-logo {
    font-size: 0.95rem;
  }

  .nav-actions {
    gap: 0.35rem;
  }

  .audio-toggle-btn {
    display: none;
  }

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

  .hero-metrics {
    gap: 0.4rem;
  }

  .metric-label {
    font-size: 0.62rem;
  }

  .section {
    padding: 3.4rem 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .card-tilt {
    padding: 1.1rem;
  }

  .about-card-3d {
    padding: 1.7rem 1rem;
  }

  .control-btn-group {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-thumb-wrapper {
    height: 165px;
  }
}

/* Ponsel: kurangi efek berat dan hindari gangguan sentuhan */
@media (pointer: coarse) {
  .card-tilt {
    transform: none !important;
  }

  .card-tilt:hover {
    transform: none !important;
  }

  #canvas-container {
    pointer-events: none;
  }

  .btn-primary:hover,
  .btn-primary-sm:hover,
  .btn-secondary:hover,
  .btn-outline:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* FIX NAVIGASI ANDROID: drawer dari kiri dan tombol menu selalu terlihat */
@media (max-width: 768px) {
  .navbar {
    z-index: 10000;
  }

  .nav-container {
    position: relative;
    gap: 0.5rem;
  }

  .brand-logo {
    min-width: 0;
    flex: 1 1 auto;
  }

  .logo-text {
    white-space: nowrap;
  }

  .nav-actions {
    position: relative;
    z-index: 10002;
    display: flex;
    align-items: center;
  }

  .mobile-toggle {
    display: inline-flex !important;
    position: relative;
    z-index: 10003;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer;
    touch-action: manipulation;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }

  .nav-links {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    width: min(82vw, 300px) !important;
    max-width: 300px;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start;
    gap: 0.45rem !important;
    padding: 90px 18px 24px !important;
    margin: 0 !important;
    border-radius: 0 20px 20px 0 !important;
    overflow-x: hidden;
    overflow-y: auto !important;
    background: rgba(10, 13, 20, 0.98) !important;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45) !important;
    opacity: 1 !important;
    visibility: visible;
    pointer-events: none !important;
    transform: translateX(-105%) !important;
    transition: transform 0.28s ease !important;
    z-index: 10001;
  }

  .nav-links.open {
    pointer-events: auto !important;
    transform: translateX(0) !important;
  }

  .nav-links .nav-item {
    display: flex !important;
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    justify-content: flex-start;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 380px) {
  .nav-container { padding-left: 0.65rem; padding-right: 0.65rem; }
  .brand-logo { gap: 0.4rem; }
  .brand-logo .logo-text { font-size: 0.85rem; }
  .nav-actions { gap: 0.3rem; }
  .theme-btn, .mobile-toggle { width: 36px; height: 36px; flex-basis: 36px; }
}

/* ==========================================================
   RESPONSIVE UNIVERSAL: HP, TABLET, LAPTOP, DESKTOP & MONITOR BESAR
   Ditambahkan di bagian paling akhir agar mempertahankan desain utama.
   ========================================================== */

:root {
  --page-gutter: clamp(0.85rem, 3.5vw, 2rem);
}

html {
  width: 100%;
  scroll-padding-top: 5rem;
}

body {
  width: 100%;
  min-width: 320px;
}

.container,
.nav-container {
  width: 100%;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.container {
  max-width: 1240px;
}

.nav-container {
  max-width: 1300px;
}

.hero-grid,
.about-grid,
.skills-grid,
.projects-grid,
.contact-grid,
.pillars-grid,
.lab-controls-grid,
.form-row,
.footer-content {
  min-width: 0;
}

.hero-title,
.section-title {
  overflow-wrap: anywhere;
  hyphens: auto;
}

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

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
}

.hero-grid > *,
.about-grid > *,
.projects-grid > *,
.contact-grid > *,
.skills-grid > *,
.pillars-grid > *,
.lab-controls-grid > *,
.form-row > * {
  min-width: 0;
  max-width: 100%;
}

input,
textarea,
select,
.form-control,
button,
.btn-primary,
.btn-primary-sm,
.btn-secondary,
.btn-outline {
  max-width: 100%;
}

pre,
code,
.table-responsive,
.overflow-auto {
  max-width: 100%;
}

pre,
.table-responsive,
.overflow-auto {
  overflow-x: auto;
}

/* Tablet, laptop kecil, dan perangkat layar sentuh dengan lebar terbatas */
@media (max-width: 960px) {
  .mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 10003;
    visibility: visible !important;
    opacity: 1 !important;
    touch-action: manipulation;
  }

  .nav-container {
    gap: 0.65rem;
  }

  .brand-logo {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(0.95rem, 2.3vw, 1.25rem);
  }

  .logo-text {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .nav-actions {
    flex: 0 0 auto;
    gap: clamp(0.3rem, 1.2vw, 0.75rem);
    position: relative;
    z-index: 10002;
  }

  .nav-links {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(82vw, 320px) !important;
    max-width: calc(100vw - 48px);
    height: 100vh;
    height: 100dvh;
    margin: 0 !important;
    padding: 88px 18px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start;
    gap: 0.45rem !important;
    overflow-x: hidden;
    overflow-y: auto !important;
    border-radius: 0 18px 18px 0 !important;
    background: rgba(10, 13, 20, 0.98) !important;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45) !important;
    opacity: 1 !important;
    visibility: visible;
    pointer-events: none !important;
    transform: translateX(-105%) !important;
    transition: transform 0.28s ease !important;
    z-index: 10001;
  }

  .nav-links.open {
    pointer-events: auto !important;
    transform: translateX(0) !important;
  }

  .nav-links .nav-item {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 46px;
    padding: 0.75rem 1rem;
    box-sizing: border-box;
    border-radius: 12px;
    white-space: normal;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .hero-grid > * {
    width: 100%;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

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

  .projects-grid,
  .pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .lab-controls-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding-top: clamp(3.5rem, 8vw, 5rem);
    padding-bottom: clamp(3.5rem, 8vw, 5rem);
  }

  .section-header {
    margin-bottom: clamp(2rem, 5vw, 3rem);
  }
}

/* HP dan tablet kecil */
@media (max-width: 600px) {
  .container,
  .nav-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-title {
    font-size: clamp(1.9rem, 8vw, 2.7rem);
    line-height: 1.12;
    letter-spacing: -0.8px;
  }

  .hero-role {
    font-size: clamp(0.95rem, 4vw, 1.2rem);
    overflow-wrap: anywhere;
  }

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

  .hero-cta-group {
    flex-wrap: wrap;
    gap: 0.7rem;
  }

  .hero-cta-group > a,
  .hero-cta-group > button {
    max-width: 100%;
  }

  .hero-metrics {
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
  }

  .skills-grid,
  .projects-grid,
  .pillars-grid,
  .contact-grid,
  .about-grid,
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .skill-card,
  .card-tilt,
  .about-card-3d {
    padding: 1.2rem;
  }

  .project-thumb-wrapper {
    height: clamp(160px, 48vw, 220px);
  }

  .section-title {
    font-size: clamp(1.55rem, 6.5vw, 2rem);
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-header {
    padding: 1rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .contact-info-card h3 {
    font-size: 1.5rem;
  }

  .theme-dropdown,
  .theme-btn {
    max-width: 100%;
  }
}

/* HP layar sangat kecil */
@media (max-width: 380px) {
  .container,
  .nav-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .brand-logo {
    gap: 0.35rem;
    font-size: 0.85rem;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }

  .nav-actions {
    gap: 0.25rem;
  }

  .theme-btn,
  .mobile-toggle {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

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

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

  .hero-cta-group > a,
  .hero-cta-group > button {
    width: 100%;
    justify-content: center;
  }
}

/* Desktop lebar dan monitor besar */
@media (min-width: 1440px) {
  .container,
  .nav-container {
    max-width: 1360px;
  }

  .section {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

@media (min-width: 1920px) {
  html {
    font-size: 17px;
  }

  .container,
  .nav-container {
    max-width: 1480px;
  }
}
