/* ===================================================================
   PORTFOLIO - SAMSON DOSSA
   Technologies: Vanilla CSS3 (Variables, Grid, Flexbox, Keyframes)
   Design: Midnight Navy Modern Dark & Clean Light Theme
   =================================================================== */

/* -------------------------------------------------------------------
   1. CSS VARIABLES (DESIGN SYSTEM & THEMES)
   ------------------------------------------------------------------- */
:root {
  /* Dark Theme Palette (Default) */
  --bg-main: #0a0f1d;
  --bg-surface: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.82);
  --bg-input: #090d16;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;
  --border-glow: rgba(56, 189, 248, 0.35);

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

  /* Accent Colors */
  --accent-cyan: #38bdf8;
  --accent-blue: #2563eb;
  --accent-violet: #8b5cf6;
  --accent-purple: #a855f7;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #38bdf8 0%, #8b5cf6 100%);
  --grad-accent: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
  --grad-glow: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 70%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.25);
  --shadow-violet-glow: 0 0 25px rgba(139, 92, 246, 0.3);

  /* Layout & Geometry */
  --header-height: 80px;
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-input: #f1f5f9;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-focus: #0284c7;
  --border-glow: rgba(2, 132, 199, 0.25);

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

  --accent-cyan: #0284c7;
  --accent-blue: #1d4ed8;
  --accent-violet: #7c3aed;
  --accent-purple: #9333ea;

  --grad-primary: linear-gradient(135deg, #0284c7 0%, #7c3aed 100%);
  --grad-accent: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  --grad-glow: radial-gradient(circle, rgba(2, 132, 199, 0.1) 0%, rgba(124, 58, 237, 0.04) 50%, transparent 70%);

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.15);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

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

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

/* Focus Visible Accessibility */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

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

/* Section Shared */
.section {
  padding: 6.5rem 0;
  position: relative;
}

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

.section-subtitle {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

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

.section-line {
  width: 60px;
  height: 4px;
  background: var(--grad-primary);
  margin: 1.25rem auto 0 auto;
  border-radius: var(--radius-full);
}

/* Text Gradient Utility */
.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Background Ambient Orbs */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: #38bdf8;
  top: -150px;
  left: -150px;
}

.bg-glow-2 {
  width: 550px;
  height: 550px;
  background: #8b5cf6;
  top: 40%;
  right: -200px;
}

.bg-glow-3 {
  width: 450px;
  height: 450px;
  background: #2563eb;
  bottom: -100px;
  left: 20%;
}

/* -------------------------------------------------------------------
   3. BUTTONS & BADGES
   ------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  user-select: none;
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

/* Primary Button */
.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.5);
  color: #ffffff;
}

/* Secondary Button */
.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Primary Outline Button */
.btn-primary-outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 1.5px solid var(--accent-cyan);
}

.btn-primary-outline:hover {
  background: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

/* Ghost Button */
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
  color: var(--accent-cyan);
  transform: translateY(-3px);
}

/* -------------------------------------------------------------------
   4. HEADER & NAVBAR
   ------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
  height: 70px;
}

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

/* Logo */
.logo {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-bracket {
  color: var(--accent-cyan);
  font-weight: 700;
}

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

.logo-dot {
  color: var(--accent-purple);
}

.logo-dev {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav Menu */
.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

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

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

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

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  position: relative;
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: rotate(15deg);
}

/* Theme icons switch */
.sun-icon {
  display: block;
}
.moon-icon {
  display: none;
}

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

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  z-index: 1001;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

/* Mobile Hamburger Active State */
.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}
.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* -------------------------------------------------------------------
   5. HERO SECTION
   ------------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
  position: relative;
}

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

/* Status Badge */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 1.5rem;
}

.status-pulse {
  width: 10px;
  height: 10px;
  background-color: var(--accent-green);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseBeacon 2s infinite ease-in-out;
}

@keyframes pulseBeacon {
  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);
  }
}

.status-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-green);
}

/* Hero Title */
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

/* Typewriter Subtitle */
.hero-subtitle {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 2.2rem;
}

.typewriter-prefix {
  margin-right: 0.4rem;
}

.typewriter-text {
  color: var(--accent-cyan);
  font-weight: 700;
}

.typewriter-cursor {
  color: var(--accent-cyan);
  animation: blinkCursor 0.8s infinite;
  font-weight: 300;
}

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

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

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

/* Hero Buttons */
.hero-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* Hero Socials */
.hero-socials {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.socials-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.social-links-list {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.social-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(56, 189, 248, 0.2);
}

/* Hero Visual (Profile Photo & Badges) */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.photo-frame-wrapper {
  position: relative;
  width: 320px;
  height: 400px;
  max-width: 100%;
}

.photo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  background: var(--grad-primary);
  border-radius: var(--radius-lg);
  filter: blur(25px);
  opacity: 0.45;
  z-index: 0;
  animation: glowPulse 5s infinite alternate ease-in-out;
}

@keyframes glowPulse {
  0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.35; }
  100% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.55; }
}

.photo-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
  background-color: var(--bg-surface);
  z-index: 1;
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform var(--transition-smooth);
}

.photo-frame-wrapper:hover .photo-img {
  transform: scale(1.04);
}

/* Floating Badges */
.floating-badge {
  position: absolute;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 2;
  animation: floatBadge 4s infinite ease-in-out;
}

.badge-icon {
  font-size: 1.3rem;
}

.badge-info {
  display: flex;
  flex-direction: column;
}

.badge-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.badge-sub {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

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

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

.badge-location {
  bottom: 25px;
  right: -20px;
  animation-delay: 1s;
  padding: 0.4rem 0.8rem;
}

.badge-location .badge-title {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

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

/* Scroll Down Button */
.scroll-down-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin: 3rem auto 0 auto;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  z-index: 1;
}

.scroll-down-btn:hover {
  color: var(--accent-cyan);
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--accent-cyan);
  border-radius: var(--radius-full);
  animation: scrollWheel 1.6s infinite ease-in-out;
}

@keyframes scrollWheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* -------------------------------------------------------------------
   6. ABOUT SECTION
   ------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.about-heading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.about-text {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.about-text strong {
  color: var(--accent-cyan);
}

/* Key Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

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

.metric-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

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

/* Timeline */
.timeline-main-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

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

.timeline-container {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border-subtle);
}

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

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

.timeline-dot {
  position: absolute;
  left: calc(-2rem - 6px);
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 3px solid var(--bg-main);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.timeline-content {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: all var(--transition-fast);
}

.timeline-content:hover {
  border-color: var(--border-focus);
  transform: translateX(4px);
}

.timeline-date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-violet);
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* -------------------------------------------------------------------
   7. SKILLS SECTION
   ------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.skills-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.skills-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.skills-card-title svg {
  color: var(--accent-cyan);
}

/* Skill Progress Bars */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.skill-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.skill-name-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-icon {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.html-icon { color: #f97316; }
.css-icon { color: #38bdf8; }
.js-icon { color: #eab308; }

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

.skill-badge-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.skill-percentage {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-cyan);
}

.progress-bar-bg {
  width: 100%;
  height: 9px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--skill-color, #8b5cf6));
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--skill-color, #38bdf8);
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.tool-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  transition: all var(--transition-fast);
}

.tool-item:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.tool-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.tool-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.tool-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* -------------------------------------------------------------------
   8. PROJECTS SECTION
   ------------------------------------------------------------------- */
.projects-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.filter-btn {
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

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

.filter-btn.active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
}

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

.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Filter Hide State */
.project-card.hide {
  display: none;
}

/* Project Image */
.project-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
}

/* Project Content */
.project-content {
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

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

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

/* -------------------------------------------------------------------
   9. CONTACT SECTION & FORM
   ------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info-title,
.contact-form-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.contact-info-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

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

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

.contact-card.link-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.contact-card.link-card:hover .contact-card-icon {
  background: var(--accent-cyan);
  color: #ffffff;
}

.contact-card-details {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

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

.form-label .required {
  color: #ef4444;
}

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

.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  padding-right: 2.8rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-textarea {
  padding-right: 1rem;
  resize: vertical;
  min-height: 120px;
}

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

.input-icon {
  position: absolute;
  right: 1rem;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1.1rem;
}

/* Error States */
.form-group.has-error .form-input,
.form-group.has-error .form-textarea {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.form-group.has-error .form-input:focus,
.form-group.has-error .form-textarea:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.error-message {
  font-size: 0.8rem;
  color: #ef4444;
  font-weight: 500;
  display: none;
  margin-top: 0.2rem;
}

.form-group.has-error .error-message {
  display: block;
}

/* Submit Button & Spinner */
.btn-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.btn-submit.loading .btn-text,
.btn-submit.loading .btn-icon-send {
  display: none;
}

.btn-submit.loading .btn-spinner {
  display: block;
}

.form-notice {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.25rem;
}

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

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3.5rem;
  margin-bottom: 3.5rem;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 360px;
  line-height: 1.6;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* -------------------------------------------------------------------
   11. BACK TO TOP BUTTON
   ------------------------------------------------------------------- */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--grad-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
  z-index: 990;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.6);
}

/* -------------------------------------------------------------------
   12. TOAST NOTIFICATION BANNER
   ------------------------------------------------------------------- */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translate(-50%, 100px);
  background: var(--bg-surface);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 35px -5px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 2000;
  max-width: 90%;
  width: 440px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.toast-notification.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast-icon {
  color: var(--accent-green);
  flex-shrink: 0;
}

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.toast-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.toast-close {
  font-size: 1.4rem;
  color: var(--text-muted);
  line-height: 1;
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--text-primary);
}

/* -------------------------------------------------------------------
   13. MODALS
   ------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.92);
  transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

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

.modal-close:hover {
  background: #ef4444;
  color: #ffffff;
}

.modal-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-details {
  padding: 2rem;
}

.modal-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.modal-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.modal-features {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.modal-features h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.modal-features ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-features li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.25rem;
}

.modal-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
}

.modal-features code {
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.82rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

/* -------------------------------------------------------------------
   14. SCROLL REVEAL ANIMATIONS
   ------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------------
   15. RESPONSIVE MEDIA QUERIES
   ------------------------------------------------------------------- */
/* Tablets and small laptops (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

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

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

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

  .photo-frame-wrapper {
    width: 280px;
    height: 350px;
  }

  .about-grid,
  .skills-grid,
  .projects-grid,
  .contact-grid,
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .section {
    padding: 4.5rem 0;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 78%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    padding: 6rem 2rem 2rem 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: right var(--transition-normal);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .nav-link {
    font-size: 1.15rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .metrics-grid,
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .floating-badge {
    padding: 0.4rem 0.75rem;
  }

  .badge-top {
    right: -10px;
    top: -15px;
  }

  .badge-bottom {
    left: -10px;
    bottom: -15px;
  }

  .badge-location {
    right: -10px;
  }

  .contact-form-wrapper {
    padding: 1.75rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.1rem;
  }

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

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

  .photo-frame-wrapper {
    width: 250px;
    height: 310px;
  }

  .project-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .project-footer .btn {
    width: 100%;
  }

  .toast-notification {
    width: 92%;
    padding: 0.85rem 1rem;
  }
}
