/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@500;700;900&display=swap');

:root {
  /* Colors */
  --bg-color: #050505;
  --text-color: #e5e5e5;
  --heading-color: #ffffff;
  --text-muted: #a3a3a3;
  --primary-color: #8b5cf6;
  --primary-hover: #7c3aed;
  --secondary-color: #ec4899;
  --accent-color: #6366f1;
  --dark-surface: #121212;
  --dark-surface-hover: #1e1e1e;

  /* Glassmorphism */
  --glass-bg: rgba(10, 10, 10, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.03);

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --spacing-2xl: 8rem;

  /* Typography */
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Layout */
  --container-width: 1200px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

body.light-theme {
  --bg-color: #f3f4f6;
  /* Lighter background */
  --text-color: #1f2937;
  /* Darker text */
  --heading-color: #111827;
  /* Almost black for headings */
  --text-muted: #4b5563;
  --text-muted: #4b5563;
  --primary-color: #1d4ed8;
  /* Blue 700 - Darker for better contrast */
  --primary-hover: #1e40af;
  /* Blue 800 */
  --secondary-color: #3b82f6;
  /* Blue 500 */
  --accent-color: #1e40af;
  /* Blue 800 */
  --dark-surface: #ffffff;
  /* White cards */
  --dark-surface-hover: #dbeafe;
  /* Blue 50 tint */
  /* Subtle hover */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-highlight: rgba(0, 0, 0, 0.05);

  /* Gradient for H1 in light mode */
  h1 {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    /* Required for background-clip to work nicely on some browsers/layouts */
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--heading-color);
  line-height: 1.1;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-lg);
}

h3 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius-sm);
}

ul {
  list-style: none;
}

/* Restore list style for markdown content */
.markdown-content ul,
.blog-content ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: var(--spacing-md);
}

.markdown-content ol,
.blog-content ol {
  list-style: decimal;
  margin-left: 20px;
  margin-bottom: var(--spacing-md);
}

.markdown-content li,
.blog-content li {
  margin-bottom: 5px;
}

/* Layout Utilities */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.flex {
  display: flex;
  gap: var(--spacing-md);
}

/* Components */
.btn,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
}

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

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

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

.btn-outline:hover {
  border-color: var(--primary-color);
  background: rgba(139, 92, 246, 0.1);
  color: white;
  /* Keep white on hover for primary accent */
}

/* Fix text color on hover for light theme */
body.light-theme .btn-outline:hover {
  color: var(--primary-color);
  background: rgba(59, 130, 246, 0.1);
  /* Blue tint */
}

.card {
  background: var(--dark-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  background: var(--dark-surface-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  /* Softer shadow */
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  cursor: default;
  border: 1px solid var(--glass-border);
  font-family: var(--font-sans);
}

body.light-theme .skill-tag {
  background: rgba(37, 99, 235, 0.1);
  /* Light Blue Tint */
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--primary-color);
  font-weight: 600;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--heading-color);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--heading-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

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

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--heading-color);
  /* Use variable */
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 70%;
    background: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--glass-border);
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.5rem;
  }

  /* Hamburger Animation */
  .mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .container {
    width: 92%;
  }

  h1 {
    font-size: 2.5rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

/* Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}