/* ==========================================================================
   PATRICIO SALINAS - PERSONAL PORTFOLIO DESIGN SYSTEM
   Ultra-modern, glassmorphic, responsive CSS with Dark/Light Mode
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Dark Mode Default Theme (Neutral Obsidian Slate) */
  --bg-body: #07090e;
  --bg-surface: rgba(15, 20, 31, 0.75);
  --bg-surface-elevated: rgba(22, 30, 47, 0.85);
  --bg-glass: rgba(18, 24, 38, 0.65);
  --bg-glass-card: rgba(14, 19, 32, 0.6);
  --bg-input: rgba(10, 14, 23, 0.8);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(34, 197, 94, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #07090e;

  /* Accent & Gradients: Forest Green as refined primary brand accent */
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --primary-glow: rgba(34, 197, 94, 0.25);
  --secondary: #06b6d4;
  --secondary-glow: rgba(6, 182, 212, 0.2);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-cyan: #38bdf8;

  --gradient-primary: linear-gradient(135deg, #15803d 0%, #22c55e 50%, #4ade80 100%);
  --gradient-secondary: linear-gradient(135deg, #059669 0%, #38bdf8 100%);
  --gradient-glow: radial-gradient(circle, rgba(34, 197, 94, 0.12) 0%, rgba(6, 182, 212, 0.04) 50%, transparent 70%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(34, 197, 94, 0.15);

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

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-surface-elevated: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-glass-card: rgba(255, 255, 255, 0.75);
  --bg-input: #ffffff;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-glass: rgba(0, 0, 0, 0.1);
  --border-focus: rgba(21, 128, 61, 0.6);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;

  --primary: #15803d;
  --primary-hover: #166534;
  --primary-glow: rgba(21, 128, 61, 0.18);
  --secondary: #0284c7;

  --gradient-glow: radial-gradient(circle, rgba(21, 128, 61, 0.12) 0%, rgba(6, 182, 212, 0.04) 50%, transparent 70%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 25px rgba(21, 128, 61, 0.12);
}

/* --------------------------------------------------------------------------
   2. Reset & Global Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  font-size: 16px;
}

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

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

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --------------------------------------------------------------------------
   3. Ambient Background & Cursor Glow
   -------------------------------------------------------------------------- */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  animation: floatAmbient 18s ease-in-out infinite alternate;
}

.glow-1 {
  width: 500px;
  height: 500px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.1), transparent 70%);
}

.glow-2 {
  width: 450px;
  height: 450px;
  top: 40%;
  right: -150px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.06), transparent 70%);
  animation-delay: -6s;
}

.glow-3 {
  width: 500px;
  height: 500px;
  bottom: 5%;
  left: 20%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.02), transparent 70%);
  animation-delay: -12s;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-20px, 50px) scale(0.95); }
}

.cursor-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.07), transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 0.3s ease;
  opacity: 0;
}

/* --------------------------------------------------------------------------
   4. Layout & Containers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

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

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

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

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

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Glass Card Core */
.glass-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* --------------------------------------------------------------------------
   5. Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
  color: #ffffff;
}

.btn-glass {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--border-glass);
  background: transparent;
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}
.btn-icon:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Status Pulsing Dot */
.badge-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

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

/* --------------------------------------------------------------------------
   6. Navigation
   -------------------------------------------------------------------------- */
.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  transition: all var(--transition-fast);
}

.navbar {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--bg-surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.navbar-scrolled .navbar {
  box-shadow: var(--shadow-md);
  border-color: rgba(34, 197, 94, 0.25);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  box-shadow: 0 2px 8px var(--primary-glow);
}

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

.brand-name .highlight {
  color: var(--primary);
}

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

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

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

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

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

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

.theme-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}
.theme-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(15deg);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px;
}

.hamburger-btn .bar {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(6, 13, 9, 0.96);
  backdrop-filter: blur(20px);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform var(--transition-smooth);
}

.mobile-drawer.open {
  transform: translateY(0);
}

.mobile-drawer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 80%;
  max-width: 320px;
}

.mobile-link {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}
.mobile-link:hover {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   7. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding-top: 10rem;
  padding-bottom: 6rem;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

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

.hero-description strong {
  color: var(--text-primary);
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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

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

/* Hero Visual / Engineering Terminal Card */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-terminal-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.terminal-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: var(--bg-surface-elevated);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), var(--shadow-glow);
  font-family: var(--font-mono);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.terminal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(34, 197, 94, 0.25);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-glass);
}

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

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

.terminal-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.terminal-body {
  padding: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.terminal-line {
  margin-bottom: 0.6rem;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.terminal-prompt {
  color: var(--primary);
  font-weight: 700;
  user-select: none;
}

.terminal-cmd {
  color: var(--text-primary);
  font-weight: 600;
}

.terminal-output {
  color: var(--accent-emerald);
  margin-bottom: 0.9rem;
  padding-left: 0.85rem;
  border-left: 2px solid rgba(16, 185, 129, 0.35);
  font-size: 0.85rem;
}

.terminal-json {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0;
  overflow-x: auto;
}

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

.json-key { color: var(--accent-cyan); }
.json-str { color: #a7f3d0; }

/* Floating Tech Pills */
.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 3;
  animation: floatPill 6s ease-in-out infinite alternate;
}

.badge-top-right {
  top: 10%;
  right: -25px;
  animation-delay: 0s;
}

.badge-bottom-left {
  bottom: 12%;
  left: -25px;
  animation-delay: -2s;
}

.badge-bottom-right {
  bottom: -15px;
  right: 15px;
  animation-delay: -4s;
}

.badge-top-left {
  top: -15px;
  left: 20px;
  animation-delay: -1s;
}

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

.tech-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-python { background-color: #38bdf8; }
.dot-sql { background-color: #f59e0b; }
.dot-js { background-color: #eab308; }
.dot-cad { background-color: #10b981; }

/* --------------------------------------------------------------------------
   8. About Section
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.about-card {
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
}

.about-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.about-card:nth-child(1) .about-icon {
  background: rgba(34, 197, 94, 0.12);
  color: var(--primary);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.about-card:nth-child(2) .about-icon {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.about-card:nth-child(3) .about-icon {
  background: rgba(6, 182, 212, 0.12);
  color: var(--secondary);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.about-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

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

.about-detail-banner {
  padding: 2.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: linear-gradient(135deg, rgba(22, 30, 47, 0.8), rgba(15, 20, 31, 0.8));
}

.detail-banner-content {
  max-width: 600px;
}

.tag-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
}

.detail-banner-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.detail-banner-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.detail-banner-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.feature-badge svg {
  color: var(--accent-emerald);
}

/* --------------------------------------------------------------------------
   9. Experience Timeline
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.4) 0%, var(--border-subtle) 60%, transparent 100%);
  opacity: 0.5;
}

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

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 24px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-body);
  border: 2px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.dot-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.timeline-card {
  padding: 2rem 2.25rem;
}

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

.timeline-brand-group {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.timeline-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.timeline-brand-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.timeline-brand-icon-wrapper img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.timeline-role {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timeline-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-eng {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.25);
}

.badge-acad {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
}

.timeline-date {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.timeline-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.highlight-item {
  display: flex;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.highlight-item strong {
  color: var(--text-primary);
}

.highlight-icon {
  font-size: 1.1rem;
  line-height: 1;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   10. Projects Section & Filtering
   -------------------------------------------------------------------------- */
.project-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

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

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-brand-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-sapi {
  background: #0d3a1f;
}
.brand-sapi .project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}
.project-card:hover .brand-sapi .project-img {
  transform: scale(1.05);
}

.brand-newresults {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 1.5rem;
}
.brand-newresults .logo-card-frame {
  background: #ffffff;
  padding: 1rem 1.75rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
}
.project-card:hover .brand-newresults .logo-card-frame {
  transform: scale(1.06);
}
.brand-newresults img {
  max-width: 250px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-atx {
  background: linear-gradient(135deg, #17120e 0%, #261d17 100%);
  padding: 1.5rem;
}
.brand-atx .logo-card-frame {
  background: #ffffff;
  padding: 0.85rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(234, 88, 12, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
}
.project-card:hover .brand-atx .logo-card-frame {
  transform: scale(1.08);
}
.brand-atx img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.brand-evo {
  background: #ffffff;
  padding: 1rem;
}
.brand-evo img {
  width: 100%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
  transition: transform var(--transition-normal);
}
.project-card:hover .brand-evo img {
  transform: scale(1.05);
}

.project-category-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(6, 13, 9, 0.85);
  backdrop-filter: blur(10px);
  color: var(--primary);
  border: 1px solid var(--border-glass);
}

.badge-web {
  color: var(--secondary);
}

.badge-mobile {
  color: var(--accent-amber);
}

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

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

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

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.project-tech-list span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .project-tech-list span {
  background: rgba(0, 0, 0, 0.05);
}

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

/* --------------------------------------------------------------------------
   11. Skills Section
   -------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.skill-category {
  padding: 2.25rem;
}

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

.skill-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-code { background: var(--primary-glow); color: var(--primary); }
.icon-server { background: rgba(6, 182, 212, 0.15); color: var(--secondary); }
.icon-db { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.icon-eng { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }

.skill-cat-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skill-pill {
  padding: 0.5rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.skill-pill:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  background: var(--primary-glow);
}

/* --------------------------------------------------------------------------
   12. Contact Section & Form
   -------------------------------------------------------------------------- */
.contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3.5rem;
  gap: 3.5rem;
}

.contact-info .section-title {
  text-align: left;
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

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

/* Contact Profile Block & Photo Slot */
.contact-profile-block {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-top: 1rem;
}

.contact-photo-slot {
  flex-shrink: 0;
  width: 160px;
  height: 205px;
  border-radius: 18px;
  border: 2px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.contact-photo-slot:hover {
  border-color: var(--primary);
  background: rgba(34, 197, 94, 0.06);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.photo-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
}

.photo-placeholder-content svg {
  color: var(--primary);
  opacity: 0.65;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.contact-photo-slot:hover .photo-placeholder-content svg {
  transform: scale(1.1);
  opacity: 1;
}

.slot-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.slot-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.contact-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

@media (max-width: 640px) {
  .contact-profile-block {
    flex-direction: column;
    align-items: center;
  }
  .contact-photo-slot {
    width: 140px;
    height: 175px;
  }
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex-grow: 1;
}

.contact-method-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.method-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.method-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.method-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.method-value:hover {
  color: var(--primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

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

.form-group input,
.form-group textarea {
  padding: 0.8rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group textarea {
  resize: vertical;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  position: relative;
  z-index: 2;
  background: var(--bg-surface);
}

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

.footer-brand {
  font-weight: 800;
  font-size: 1.1rem;
  display: block;
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

/* --------------------------------------------------------------------------
   14. Project Deep Dive Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 6, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 2.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(34, 197, 94, 0.2);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-normal);
}

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

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}

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

.modal-hero-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
  border: 1px solid var(--border-glass);
}

.modal-hero-brand {
  width: 100%;
  min-height: 200px;
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-glass);
  overflow: hidden;
  position: relative;
}

.modal-hero-brand.modal-sapi {
  background: #0d3a1f;
}
.modal-hero-brand.modal-sapi img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}

.modal-hero-brand.modal-newresults {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 2.5rem;
}
.modal-hero-brand.modal-newresults .logo-card-frame {
  background: #ffffff;
  padding: 1.25rem 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}
.modal-hero-brand.modal-newresults img {
  max-width: 280px;
  width: 100%;
  height: auto;
}

.modal-hero-brand.modal-atx {
  background: linear-gradient(135deg, #17120e 0%, #261d17 100%);
  padding: 2rem;
}
.modal-hero-brand.modal-atx .logo-card-frame {
  background: #ffffff;
  padding: 1rem;
  border-radius: 24px;
  box-shadow: 0 12px 36px rgba(234, 88, 12, 0.3);
}
.modal-hero-brand.modal-atx img {
  width: 110px;
  height: 110px;
}

.modal-hero-brand.modal-evo {
  background: #ffffff;
  padding: 2rem;
}
.modal-hero-brand.modal-evo img {
  max-width: 320px;
  width: 100%;
  height: auto;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.modal-section {
  margin-bottom: 1.75rem;
}

.modal-section h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.modal-section p, .modal-section li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.modal-section ul {
  padding-left: 1.25rem;
}

.modal-section li {
  margin-bottom: 0.4rem;
}

/* Architecture Flowchart Diagram inside Modal */
.arch-diagram {
  background: var(--bg-body);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.25rem 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

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

.arch-step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.arch-arrow {
  text-align: center;
  color: var(--primary);
  font-size: 1rem;
  margin: -0.25rem 0;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   15. Toast Notification System
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateX(100px);
  opacity: 0;
  animation: slideInToast 0.3s forwards ease;
}

.toast-success {
  border-color: var(--accent-emerald);
}

.toast-icon {
  font-size: 1.1rem;
}

@keyframes slideInToast {
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutToast {
  to { transform: translateX(100px); opacity: 0; }
}

/* --------------------------------------------------------------------------
   16. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-badge {
    margin: 0 auto 1.5rem auto;
  }

  .hero-description {
    margin: 0 auto 2rem auto;
  }

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

  .hero-stats {
    justify-content: center;
  }

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

  .about-detail-banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }

  .detail-banner-features {
    width: 100%;
  }

  .contact-box {
    grid-template-columns: 1fr;
    padding: 2.25rem;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn {
    display: none;
  }

  .hamburger-btn {
    display: flex;
  }

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

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

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

  .timeline::before {
    left: 10px;
  }

  .timeline-dot {
    left: 1px;
  }

  .timeline-item {
    padding-left: 35px;
  }

  .timeline-card {
    padding: 1.5rem;
  }

  .modal-container {
    padding: 1.5rem;
  }

  .modal-hero-img {
    height: 180px;
  }
}
