/* ==========================================
   PORTFOLIO WEBSITE - CSS DESIGN SYSTEM
   ========================================== */

/* -------------------- CSS VARIABLES -------------------- */
:root {
  /* Colors */
  --color-primary: #1a1d3a;
  --color-primary-light: #252850;
  --color-secondary: #f8f9fc;
  --color-accent: #3b5bdb;
  --color-accent-hover: #2f4ab8;
  --color-white: #ffffff;
  --color-text-dark: #2d3748;
  --color-text-muted: #718096;
  --color-text-light: #a0aec0;
  --color-border: #e2e8f0;
  --color-success: #38a169;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
  --font-size-4xl: 40px;
  --font-size-5xl: 56px;
  --line-height: 1.6;
  --line-height-tight: 1.2;

  /* Layout */
  --sidebar-width: 280px;
  --content-max-width: 1200px;
  --top-nav-height: 80px;
  --border-radius-sm: 6px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-smooth: 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Colors */
[data-theme="dark"] {
  --color-primary: #0f1219;
  --color-primary-light: #1a1f2e;
  --color-secondary: #0d1117;
  --color-accent: #5c7cfa;
  --color-accent-hover: #4263eb;
  --color-white: #161b22;
  --color-text-dark: #ffffff;
  --color-text-muted: #c9d1d9;
  --color-text-light: #8b949e;
  --color-border: #30363d;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Dark mode specific overrides */
[data-theme="dark"] .hero-title,
[data-theme="dark"] .hero-subtitle,
[data-theme="dark"] .section-title,
[data-theme="dark"] .section-label,
[data-theme="dark"] .card-title,
[data-theme="dark"] .timeline-title,
[data-theme="dark"] .skills-category-title,
[data-theme="dark"] .typed-text,
[data-theme="dark"] .profile-name {
  color: #ffffff;
}

[data-theme="dark"] .section:not(.section-hero) {
  background-color: #0d1117;
}

[data-theme="dark"] #about,
[data-theme="dark"] #resume,
[data-theme="dark"] #contact {
  background-color: #0d1117;
}

[data-theme="dark"] .about-card,
[data-theme="dark"] .timeline-content,
[data-theme="dark"] .contact-card {
  background-color: #161b22;
  border: 1px solid #30363d;
}

[data-theme="dark"] .about-text,
[data-theme="dark"] .timeline-bullets li,
[data-theme="dark"] .timeline-company,
[data-theme="dark"] .project-description {
  color: #c9d1d9;
}

[data-theme="dark"] .timeline-date {
  color: #5c7cfa;
}

[data-theme="dark"] .tag,
[data-theme="dark"] .skill-tag {
  background-color: #21262d;
  border-color: #30363d;
  color: #c9d1d9;
}

/* Hero section stays same in dark mode */
[data-theme="dark"] .section-hero .hero-title,
[data-theme="dark"] .section-hero .hero-subtitle,
[data-theme="dark"] .section-hero .typed-text {
  color: #ffffff;
}

/* Download button inverts in dark mode */
[data-theme="dark"] .btn-primary {
  background: #ffffff;
  color: #0d1117;
}

[data-theme="dark"] .btn-primary:hover {
  background: #e6e6e6;
}

/* Sidebar nav links in dark mode */
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  color: #ffffff;
}

[data-theme="dark"] .nav-link.active {
  background: var(--color-accent);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text-dark);
  background-color: var(--color-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Add smooth scroll with inertia/weight feeling */
body.smooth-scroll {
  scroll-snap-type: y proximity;
}

.section {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

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

ul,
ol {
  list-style: none;
}

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

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

/* -------------------- LAYOUT -------------------- */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* -------------------- TOP NAVIGATION (Home Page) -------------------- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--top-nav-height);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--space-3xl);
  z-index: 200;
  background: transparent;
  transition: all var(--transition-smooth);
}

.top-nav.hidden {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.top-nav-profile {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition: all var(--transition-smooth);
}

.top-nav-photo {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-full);
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-smooth);
}

.top-nav-info {
  transition: all var(--transition-smooth);
}

.top-nav-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 2px;
}

.top-nav-title {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.7);
}

.top-nav-menu {
  display: flex;
  gap: var(--space-xl);
}

.top-nav-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-full);
  transition: all var(--transition-base);
  position: relative;
}

.top-nav-link:hover {
  color: var(--color-white);
}

.top-nav-link.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.15);
}

/* -------------------- SIDEBAR (Other Pages) -------------------- */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
  z-index: 100;
  overflow-y: auto;
  transform: translateX(-100%);
  opacity: 0;
  transition: all var(--transition-smooth);
}

.sidebar.visible {
  transform: translateX(0);
  opacity: 1;
}

.sidebar-profile {
  text-align: center;
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: var(--border-radius-full);
  object-fit: cover;
  object-position: center 20%;
  margin: 0 auto var(--space-md);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.profile-name {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.profile-title {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  font-weight: 500;
}

/* Navigation */
.nav-menu {
  margin-top: var(--space-xl);
  flex: 1;
}

.nav-item {
  margin-bottom: var(--space-sm);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-base);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition-base);
}

.nav-link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.05);
}

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

.nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Social Links */
.sidebar-footer {
  margin-top: auto;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: var(--space-md);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-md);
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition-base);
}

.social-link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.sidebar-copyright {
  margin-top: var(--space-md);
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.4);
}

/* Theme Toggle */
.theme-toggle-section {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all var(--transition-base);
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

.theme-btn.active {
  background: var(--color-accent);
  color: var(--color-white);
}

/* -------------------- MAIN CONTENT -------------------- */
.main-content {
  flex: 1;
  min-height: 100vh;
  transition: margin-left var(--transition-smooth);
  overflow-x: hidden;
}

.main-content.with-sidebar {
  margin-left: var(--sidebar-width);
}

/* Scrollable Sections */
.section {
  padding: var(--space-4xl);
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--color-secondary);
}

/* Center content within sections (but not hero) */
.section:not(.section-hero)>* {
  max-width: var(--content-max-width);
}

/* Hero section children should not have max-width constraint */
.section-hero>* {
  max-width: none;
}

/* Alternating section backgrounds - lighter/darker pattern */
#about {
  background-color: #eef1f8;
}

#resume {
  background-color: var(--color-secondary);
}

#projects {
  background-color: #eef1f8;
}

#contact {
  background-color: var(--color-secondary);
}

/* Hero Section with Background - Full Width */
.section-hero {
  position: relative;
  overflow: visible;
  min-height: 100vh;
  max-width: none !important;
  width: 100%;
  display: flex;
  align-items: center;
  padding: var(--space-4xl);
  padding-top: calc(var(--top-nav-height) + var(--space-4xl));
  box-sizing: border-box;
  background: none;
}

.hero-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('assets/hero-background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
}

/* Dark overlay for better text contrast */
.hero-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 29, 58, 0.7) 0%, rgba(45, 49, 102, 0.5) 50%, rgba(59, 91, 219, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.section-hero .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.section-hero .hero-title {
  color: var(--color-white);
}

.section-hero .hero-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-2xl);
}

/* Typing Animation */
.typed-text {
  color: var(--color-white);
  font-weight: 700;
  font-size: var(--font-size-2xl);
}

.cursor {
  display: inline-block;
  color: var(--color-accent);
  animation: blink 0.8s infinite;
  margin-left: 2px;
  font-weight: 300;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-3xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-sm);
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  animation: scrollDown 2s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

@keyframes scrollDown {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* -------------------- ENTRANCE ANIMATIONS -------------------- */
.animate-up {
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 0.8s var(--transition-smooth) forwards;
}

.animate-up.delay-1 {
  animation-delay: 0.2s;
}

.animate-up.delay-2 {
  animation-delay: 0.4s;
}

.animate-up.delay-3 {
  animation-delay: 0.6s;
}

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

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered animation delays for children */
.cards-grid .about-card:nth-child(1) {
  transition-delay: 0s;
}

.cards-grid .about-card:nth-child(2) {
  transition-delay: 0.1s;
}

.cards-grid .about-card:nth-child(3) {
  transition-delay: 0.2s;
}

.timeline-item:nth-child(1) {
  transition-delay: 0s;
}

.timeline-item:nth-child(2) {
  transition-delay: 0.15s;
}

.timeline-item:nth-child(3) {
  transition-delay: 0.3s;
}

.project-card:nth-child(1) {
  transition-delay: 0s;
}

.project-card:nth-child(2) {
  transition-delay: 0.1s;
}

.project-card:nth-child(3) {
  transition-delay: 0.15s;
}

.project-card:nth-child(4) {
  transition-delay: 0.2s;
}

.project-card:nth-child(5) {
  transition-delay: 0.25s;
}

.project-card:nth-child(6) {
  transition-delay: 0.3s;
}

/* -------------------- TYPOGRAPHY -------------------- */
.section-label {
  display: inline-block;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.hero-title {
  font-size: var(--font-size-5xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: var(--space-xl);
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.section-title-icon {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
}

.section-subtitle {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xl);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

/* -------------------- CARDS GRID -------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.about-card {
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
}

.about-card .about-text,
.about-card p {
  text-align: justify;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* -------------------- TIMELINE -------------------- */
.timeline {
  position: relative;
  margin-top: var(--space-xl);
}

.timeline-item {
  position: relative;
  padding-left: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-left: 2px solid var(--color-border);
}

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

.timeline-item.current {
  border-left-color: var(--color-accent);
}

.timeline-dot {
  position: absolute;
  left: -8px;
  top: 0;
  width: 14px;
  height: 14px;
  background: var(--color-secondary);
  border: 2px solid var(--color-border);
  border-radius: 50%;
}

.timeline-item.current .timeline-dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.timeline-content {
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.timeline-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-primary);
}

.timeline-date {
  font-size: var(--font-size-sm);
  color: var(--color-accent);
  font-weight: 500;
}

.timeline-company {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.timeline-description {
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Bullet point list styling for timeline */
.timeline-bullets {
  list-style: disc;
  padding-left: var(--space-xl);
  margin-top: var(--space-sm);
}

.timeline-bullets li {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-xs);
  text-align: justify;
}

/* -------------------- BUTTONS -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-base);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* -------------------- CARDS -------------------- */
.card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
}

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

/* -------------------- PROJECT CARDS -------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.project-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
}

.project-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.project-thumbnail {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-secondary);
}

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

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

.project-content {
  padding: var(--space-lg);
}

.project-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.project-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-secondary);
  border-radius: var(--border-radius-full);
  border: 1px solid var(--color-border);
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.filter-btn {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-dark);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-full);
  transition: all var(--transition-base);
}

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

.filter-btn.active {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

/* -------------------- TIMELINE -------------------- */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

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

.timeline-item {
  position: relative;
  padding-bottom: var(--space-2xl);
}

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

.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-xl) + 2px);
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: var(--border-radius-full);
  background: var(--color-accent);
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 3px var(--color-secondary);
}

.timeline-item.current .timeline-dot {
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.2);
}

.timeline-content {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
  gap: var(--space-md);
}

.timeline-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-primary);
}

.timeline-date {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(59, 91, 219, 0.1);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--border-radius-full);
  white-space: nowrap;
}

.timeline-company {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.timeline-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-dark);
  line-height: 1.7;
}

/* -------------------- SKILLS -------------------- */
.skills-section {
  margin-top: var(--space-2xl);
}

.skills-category {
  margin-bottom: var(--space-xl);
}

.skills-category-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.skills-category-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--border-radius-full);
  background: var(--color-accent);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-tag {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-dark);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  transition: all var(--transition-base);
}

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

/* -------------------- ABOUT SECTION -------------------- */
.about-section {
  margin-top: var(--space-4xl);
}

.about-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
  border-left: 4px solid var(--color-primary);
}

.about-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-primary);
}

.about-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.about-text {
  font-size: var(--font-size-base);
  color: var(--color-text-dark);
  line-height: 1.8;
}

/* -------------------- CONTACT -------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.contact-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  transition: all var(--transition-base);
}

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

.contact-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 91, 219, 0.1);
  border-radius: var(--border-radius-lg);
  color: var(--color-accent);
  flex-shrink: 0;
}

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

.contact-info h4 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.contact-info p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* -------------------- MOBILE MENU -------------------- */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--color-primary);
  z-index: 101;
  padding: 0 var(--space-lg);
  align-items: center;
  justify-content: space-between;
}

.mobile-logo {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-white);
}

.hamburger {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
  opacity: 1;
}

/* -------------------- RESPONSIVE DESIGN -------------------- */

/* Tablet */
@media (max-width: 1199px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: var(--font-size-4xl);
  }

  .section {
    padding: var(--space-3xl);
    min-height: auto;
  }

  .top-nav {
    padding: 0 var(--space-xl);
  }

  .top-nav-menu {
    gap: var(--space-md);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .top-nav {
    display: none;
  }

  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%) !important;
    -webkit-transform: translateX(-100%) !important;
    transition: transform var(--transition-base);
    -webkit-transition: -webkit-transform var(--transition-base);
    opacity: 1;
    visibility: hidden;
  }

  /* On mobile, only show sidebar when hamburger is clicked (active), not on scroll (visible) */
  .sidebar.visible {
    transform: translateX(-100%) !important;
    -webkit-transform: translateX(-100%) !important;
    opacity: 1;
    visibility: hidden;
  }

  .sidebar.active,
  .sidebar.visible.active {
    transform: translateX(0) !important;
    -webkit-transform: translateX(0) !important;
    visibility: visible;
  }

  .sidebar-overlay {
    display: block;
  }

  /* Ensure theme buttons are clickable on mobile */
  .theme-toggle-section {
    position: relative;
    z-index: 10;
  }

  .theme-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
  }

  .main-content {
    margin-left: 0 !important;
    padding-top: 64px;
  }

  .section {
    padding: var(--space-xl);
    min-height: auto;
  }

  .section-hero {
    padding-top: calc(64px + var(--space-xl));
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
  }

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

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

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .timeline-header {
    flex-direction: column;
  }

  .filter-buttons {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    flex-shrink: 0;
  }

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

  .scroll-indicator {
    display: none;
  }
}

/* -------------------- FOCUS STATES (Accessibility) -------------------- */
.nav-link:focus-visible,
.top-nav-link:focus-visible,
.btn:focus-visible,
.filter-btn:focus-visible,
.social-link:focus-visible,
.project-card:focus-visible,
.contact-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* -------------------- UTILITIES -------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}