/* ============================================
   PORTFOLIO - MODERN DARK THEME
   ============================================ */

/* ---------- CSS CUSTOM PROPERTIES ---------- */
:root {
  /* Colors - Dark Theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a24;
  --bg-card: rgba(26, 26, 36, 0.8);
  --bg-card-hover: rgba(36, 36, 50, 0.9);
  
  /* Text Colors */
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;
  
  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --accent-glow: rgba(99, 102, 241, 0.4);
  
  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* Border & Effects */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing */
  --section-padding: 6rem;
  --container-max: 1200px;
  --nav-height: 70px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background: var(--accent-primary);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

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

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

/* Lists */
ul, ol {
  list-style: none;
}

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

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

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-sm), 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 30px var(--accent-glow);
}

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

.btn-outline:hover {
  background: var(--glass-bg);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--accent-primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ---------- NAVIGATION ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-base);
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: var(--shadow-md);
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-bracket {
  color: var(--accent-primary);
}

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

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

.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

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

.nav-link.active {
  color: var(--accent-primary);
}

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

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }
  
  .nav-menu.active {
    opacity: 1;
    visibility: visible;
  }
  
  .nav-link {
    font-size: 1.25rem;
    padding: 1rem 2rem;
  }
  
  .nav-actions .btn {
    display: none;
  }
  
  .nav-toggle {
    display: block;
  }
}

/* ---------- HERO SECTION ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: radial-gradient(
    ellipse at center,
    rgba(99, 102, 241, 0.15) 0%,
    rgba(139, 92, 246, 0.08) 30%,
    transparent 70%
  );
  filter: blur(60px);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  max-width: 600px;
}

.hero-greeting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.greeting-wave {
  display: inline-block;
  animation: wave 2.5s infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.title-prefix {
  color: var(--text-secondary);
}

.title-highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

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

.hero-stats {
  display: flex;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

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

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-primary);
}

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

/* Hero Visual - Code Card */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

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

.card-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.card-dots span:nth-child(1) { background: #ff5f57; }
.card-dots span:nth-child(2) { background: #ffbd2e; }
.card-dots span:nth-child(3) { background: #28ca42; }

.card-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-code {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  overflow-x: auto;
}

.card-code code {
  color: var(--text-secondary);
}

.code-keyword { color: #c678dd; }
.code-variable { color: #e5c07b; }
.code-property { color: #61afef; }
.code-string { color: #98c379; }
.code-method { color: #61afef; }
.code-boolean { color: #d19a66; }

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 28px;
  height: 28px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* Mobile Hero */
@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text {
    max-width: 100%;
  }
  
  .hero-title {
    justify-content: center;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-visual {
    order: -1;
  }
  
  .hero-card {
    max-width: 350px;
  }
}

/* ---------- SECTION STYLES ---------- */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

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

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-tag svg {
  width: 16px;
  height: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ---------- ABOUT SECTION ---------- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
}

.image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
}

.image-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.5;
}

.image-decoration {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  right: -1.5rem;
  bottom: -1.5rem;
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.3;
}

.about-text {
  max-width: 550px;
}

.about-heading {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.about-bio {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

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

.info-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
}

.about-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .about-image {
    max-width: 280px;
    margin: 0 auto;
  }
  
  .about-text {
    max-width: 100%;
  }
  
  .about-info {
    justify-content: center;
  }
  
  .about-cta {
    justify-content: center;
  }
}

/* ---------- SKILLS SECTION ---------- */
.skills {
  background: var(--bg-secondary);
}

.skills-grid {
  columns: 2;
  column-gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .skills-grid {
    columns: 1;
    max-width: 400px;
  }
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  break-inside: avoid; /* Prevent card from breaking across columns */
  transition: all var(--transition-base);
}

.skill-category:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-4px);
}

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

.category-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  color: white;
}

.category-icon svg {
  width: 24px;
  height: 24px;
}

.category-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

.skill-tag svg {
  width: 14px;
  height: 14px;
}

/* ---------- PROJECTS SECTION ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

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

.project-image {
  aspect-ratio: 16/10;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.project-image svg {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

.project-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-links {
  display: flex;
  gap: 0.5rem;
}

.project-link {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.project-link:hover {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

.project-link svg {
  width: 18px;
  height: 18px;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  /* Hidden by default, reveal on hover */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.3s ease, margin 0.3s ease;
}

/* Reveal description when hovering over the project card */
.project-card:hover .project-description {
  max-height: 120px; /* Fixed height with scroll */
  opacity: 1;
  margin-top: 0.75rem;
  overflow-y: scroll; /* Force scrollbar to always show */
  padding-right: 0.5rem; /* Space for scrollbar */
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-tertiary);
}

/* Custom scrollbar for project descriptions - WebKit (Chrome, Safari, Edge) */
.project-card:hover .project-description::-webkit-scrollbar {
  width: 8px;
  display: block;
}

.project-card:hover .project-description::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}

.project-card:hover .project-description::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: var(--radius-full);
  min-height: 30px;
}

.project-card:hover .project-description::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

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

.tech-tag {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-tertiary);
  background: rgba(6, 182, 212, 0.1);
  border-radius: var(--radius-sm);
}

.projects-cta {
  text-align: center;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- EXPERIENCE SECTION ---------- */
.experience {
  background: var(--bg-secondary);
}

.timeline-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .timeline-sections {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .timeline-sections {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.timeline-section {
  position: relative;
}

.timeline-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.timeline-section-title svg {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}

.timeline {
  position: relative;
}

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

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

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

.timeline-marker {
  position: absolute;
  left: -6px;
  top: 0;
  width: 14px;
  height: 14px;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
}

.timeline-item.current .timeline-marker {
  background: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition-base);
}

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

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

.timeline-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0; /* Allow text to shrink */
}

.timeline-period {
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  white-space: nowrap; /* Prevent date from wrapping */
  flex-shrink: 0; /* Don't shrink the date */
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.timeline-field {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.timeline-description {
  list-style: none;
  /* Hidden by default, reveal on hover */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.3s ease, margin 0.3s ease;
}

/* Reveal description when hovering over the timeline content */
.timeline-content:hover .timeline-description {
  max-height: 150px; /* Fixed height with scroll */
  opacity: 1;
  margin-top: 0.75rem;
  overflow-y: scroll; /* Force scrollbar to always show */
  padding-right: 0.5rem; /* Space for scrollbar */
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-tertiary);
}

/* Custom scrollbar for timeline descriptions - WebKit (Chrome, Safari, Edge) */
.timeline-content:hover .timeline-description::-webkit-scrollbar {
  width: 8px;
  display: block;
}

.timeline-content:hover .timeline-description::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}

.timeline-content:hover .timeline-description::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: var(--radius-full);
  min-height: 30px;
}

.timeline-content:hover .timeline-description::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

.timeline-description li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.timeline-description li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
}

/* ========== INTERACTIVE CARD INDICATORS ========== */

/* Highlight title on hover to indicate interactivity */
.project-title,
.timeline-role {
  transition: color var(--transition-fast);
}

.project-card:hover .project-title,
.timeline-content:hover .timeline-role {
  color: var(--accent-primary);
}

/* Add expand icon indicator */
.project-title::after,
.timeline-role::after {
  content: ' ⤢';
  font-size: 0.7em;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.project-card:hover .project-title::after,
.timeline-content:hover .timeline-role::after {
  opacity: 0.7;
}

.timeline-type {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  color: var(--accent-tertiary);
  background: rgba(6, 182, 212, 0.1);
  border-radius: var(--radius-full);
  margin-top: 1rem;
}

.timeline-type svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 768px) {
  .timeline::before {
    left: 6px;
  }
  
  .timeline-marker {
    left: 0;
  }
}

/* ---------- CONTACT SECTION ---------- */
.contact-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

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

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

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

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

.contact-method:hover {
  border-color: var(--accent-primary);
  transform: translateX(8px);
}

.method-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--accent-primary);
}

.method-icon svg {
  width: 20px;
  height: 20px;
}

.method-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.method-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.method-value {
  color: var(--text-primary);
  font-weight: 500;
}

.method-arrow {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.contact-method:hover .method-arrow {
  color: var(--accent-primary);
  transform: translate(4px, -4px);
}

.contact-card {
  background: var(--accent-gradient);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card-decoration {
  position: absolute;
  top: 1rem;
  right: 1rem;
  opacity: 0.3;
}

.card-decoration svg {
  width: 40px;
  height: 40px;
}

.contact-card h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.contact-card p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.contact-card .btn {
  background: white;
  color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.contact-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .contact-card {
    order: -1;
  }
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
}

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

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}

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

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

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

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

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

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

.footer-social a:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

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

.footer-credit {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.heart-icon {
  width: 14px;
  height: 14px;
  color: #ef4444;
  animation: heartbeat 1.5s infinite;
}

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

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- ANIMATIONS ---------- */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.6s ease forwards;
}

.animate-fade-left {
  opacity: 0;
  transform: translateX(30px);
  animation: fadeLeft 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- MODAL OVERLAY ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

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

/* Blurred backdrop */
.modal-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 60px var(--accent-glow);
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-slow);
}

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

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

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

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-content {
  padding: 2.5rem;
  max-height: 85vh;
  overflow-y: auto;
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-tertiary);
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

/* Modal Header */
.modal-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-tertiary);
  background: rgba(6, 182, 212, 0.1);
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.modal-tag svg {
  width: 14px;
  height: 14px;
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.modal-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.modal-meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-primary);
}

.modal-meta-item.current {
  color: var(--success);
}

.modal-meta-item.current svg {
  color: var(--success);
}

/* Modal Body */
.modal-body {
  margin-bottom: 1.5rem;
}

.modal-description {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.modal-description p {
  margin-bottom: 1rem;
}

.modal-description p:last-child {
  margin-bottom: 0;
}

.modal-list {
  list-style: none;
  margin: 1rem 0;
}

.modal-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

/* Modal Technologies/Skills */
.modal-tech-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.modal-tech-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

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

.modal-tech-tag {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-tertiary);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-tech-tag:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-tertiary);
}

/* Modal Footer with Links */
.modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
  flex: 1;
  min-width: 140px;
}

/* Modal Image */
.modal-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-image svg {
  width: 60px;
  height: 60px;
  opacity: 0.4;
}

/* Add clickable cursor to cards */
.project-card,
.timeline-content {
  cursor: pointer;
}

/* Add subtle click indicator */
.project-card::after,
.timeline-content::after {
  content: 'Click to expand';
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.project-card {
  position: relative;
}

.timeline-content {
  position: relative;
}

.project-card:hover::after,
.timeline-content:hover::after {
  opacity: 0.6;
}

/* Disable body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Modal responsive */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 1rem;
  }
  
  .modal-container {
    max-height: 90vh;
  }
  
  .modal-content {
    padding: 1.5rem;
    padding-top: 3.5rem;
  }
  
  .modal-title {
    font-size: 1.4rem;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
}

/* ---------- RESPONSIVE ADJUSTMENTS ---------- */
@media (max-width: 480px) {
  :root {
    --section-padding: 4rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-card {
    display: none;
  }
  
  .btn {
    width: 100%;
  }
  
  .hero-cta {
    flex-direction: column;
  }
}

