/* ========================================
   AVINASHSANGLE.COM - DESIGN SYSTEM
   Warm, minimalist portfolio with light/dark theme
   ======================================== */

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */

:root {
  /* Light Theme Colors (Default) */
  --primary: #2E2E2E;           /* Ink black */
  --accent: #B08968;            /* Warm clay */
  --text-primary: #1C1C1C;      /* Dark text */
  --text-secondary: #555555;    /* Medium gray */
  --bg-primary: #FAF9F6;        /* Bone white */
  --bg-secondary: #FFFFFF;      /* Pure white */
  --shadow: rgba(0, 0, 0, 0.1); /* Subtle shadows */
  --shadow-hover: rgba(0, 0, 0, 0.15);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  
  /* Spacing Scale */
  --space-xs: 0.5rem;    /* 8px */
  --space-sm: 1rem;      /* 16px */
  --space-md: 1.5rem;    /* 24px */
  --space-lg: 2rem;      /* 32px */
  --space-xl: 3rem;      /* 48px */
  --space-2xl: 4rem;     /* 64px */
  --space-3xl: 6rem;     /* 96px */
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Transitions */
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Container */
  --container-max: 1200px;
  --container-padding: 2rem;
}

/* Dark Theme */
[data-theme="dark"] {
  --primary: #FAF9F6;           /* Light text */
  --accent: #D4A574;            /* Lighter clay */
  --text-primary: #E8E8E8;      /* Light text */
  --text-secondary: #B0B0B0;    /* Light gray */
  --bg-primary: #1C1C1C;        /* Dark background */
  --bg-secondary: #2E2E2E;      /* Lighter dark */
  --shadow: rgba(0, 0, 0, 0.3); /* Deeper shadows */
  --shadow-hover: rgba(0, 0, 0, 0.5);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  color: var(--primary);
}

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

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

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

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

code {
  font-family: var(--font-mono);
  background-color: var(--bg-secondary);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

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

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-primary);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: background-color var(--transition), border-color var(--transition);
}

[data-theme="dark"] .navbar {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  align-items: center;
}

.navbar-menu a {
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 2px solid var(--accent);
  color: var(--accent);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 1.2rem;
}

.theme-toggle:hover {
  background-color: var(--accent);
  color: var(--bg-primary);
  transform: rotate(180deg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font-primary);
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  box-shadow: 0 4px 12px var(--shadow);
}

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

.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: white;
  transform: translateY(-2px);
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: 0 4px 12px var(--shadow);
  transition: all var(--transition);
  height: 100%;
}

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

.card-header {
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
  color: var(--primary);
}

.card-subtitle {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-body {
  margin-bottom: var(--space-md);
}

.card-footer {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: auto;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */

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

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ========================================
   BADGES & TAGS
   ======================================== */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: rgba(176, 137, 104, 0.1);
  color: var(--accent);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(176, 137, 104, 0.3);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: var(--space-2xl) 0;
  position: relative;
}

.hero-content {
  max-width: 800px;
}

.hero-greeting {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.hero-title {
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.hero-description {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: var(--space-xl);
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Typing Animation */
.typing-text {
  display: inline-block;
  border-right: 3px solid var(--accent);
  padding-right: 0.25rem;
  animation: blink 1s infinite;
  min-height: 1.5em;
}

@keyframes blink {
  0%, 50% { border-color: var(--accent); }
  51%, 100% { border-color: transparent; }
}

/* ========================================
   PROJECT CARDS
   ======================================== */

.project-card {
  position: relative;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, rgba(176, 137, 104, 0.1), rgba(46, 46, 46, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent);
}

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

.project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.project-link:hover {
  background-color: var(--accent);
  color: white;
}

/* ========================================
   SKILLS SECTION
   ======================================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.skill-category h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
}

.skill-category-icon {
  font-size: 1.5rem;
  color: var(--accent);
}

.skill-list {
  list-style: none;
}

.skill-list li {
  padding: var(--space-xs) 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.skill-list li::before {
  content: '▸';
  color: var(--accent);
  font-weight: bold;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background-color: var(--bg-secondary);
  padding: var(--space-xl) 0 var(--space-lg);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: var(--space-3xl);
}

[data-theme="dark"] .footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  color: var(--accent);
  transition: all var(--transition);
  font-size: 1.25rem;
}

.social-link:hover {
  background-color: var(--accent);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

[data-theme="dark"] .footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

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

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  :root {
    --container-padding: 1.5rem;
    --space-3xl: 4rem;
    --space-2xl: 3rem;
  }
  
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    flex-direction: column;
    padding: var(--space-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    gap: var(--space-sm);
  }
  
  .navbar-menu.active {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-lg { margin-top: var(--space-lg); }
