/* ============================================================================
   PORTFOLIO WEBSITE - MAIN STYLES
   Mobile-first responsive design with dark mode support
   ============================================================================ */

/* CSS Variables for theming */
:root {
  /* Light mode colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --accent: #3498db;
  --accent-dark: #2980b9;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 48px;
  
  /* Spacing */
  --spacing-unit: 1rem;
}

/* Dark mode colors */
body.dark-mode {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --shadow: rgba(0, 0, 0, 0.5);
}

/* ============================================================================
   GLOBAL STYLES
   ============================================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-dark);
}

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

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

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-bottom: var(--spacing-unit);
}

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */

header {
  background-color: var(--bg-secondary);
  box-shadow: 0 2px 8px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem var(--spacing-unit);
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: bold;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
}

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

.nav-toggle {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 0.4rem;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
}

.theme-toggle {
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Mobile menu open state */
.nav-links.active {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  padding: 1rem;
  gap: 1rem;
  box-shadow: 0 4px 6px var(--shadow);
}

/* Hamburger animation */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

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

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

/* Tablet and up - show nav links */
@media (min-width: 768px) {
  .nav-links {
    display: flex !important;
  }
  
  .nav-toggle {
    display: none;
  }
}

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

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  text-align: center;
  padding: var(--spacing-unit);
  gap: 2rem;
}

.hero-content h1 {
  font-size: var(--font-size-3xl);
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease;
}

.hero-content p {
  font-size: var(--font-size-lg);
  margin-bottom: 2rem;
  opacity: 0.95;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
  display: inline-block;
  background-color: white;
  color: var(--accent);
  padding: 0.75rem 2rem;
  border-radius: 30px;
  font-weight: bold;
  animation: fadeInUp 0.8s ease 0.4s both;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   CONTAINER & SECTIONS
   ============================================================================ */

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

section {
  padding: 4rem var(--spacing-unit);
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

section h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--accent);
  font-size: var(--font-size-2xl);
}

/* ============================================================================
   ABOUT SECTION
   ============================================================================ */

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.about-text h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

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

.about-image {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

@media (min-width: 768px) {
  .about-content {
    grid-template-columns: 1fr 1fr;
  }
}

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

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.skill-category {
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
}

.skill-category h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

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

.skill-tag {
  background-color: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: var(--font-size-sm);
  animation: fadeIn 0.5s ease;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================================
   PROJECTS SECTION
   ============================================================================ */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-card {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.5s ease;
}

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

.project-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: var(--font-size-sm);
}

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

.tech-badge {
  background-color: var(--accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: var(--font-size-sm);
}

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

.project-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--accent);
  color: white;
  border-radius: 4px;
  font-size: var(--font-size-sm);
  transition: background-color 0.3s ease;
}

.project-links a:hover {
  background-color: var(--accent-dark);
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================================
   CONTACT SECTION
   ============================================================================ */

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-btn {
  background-color: var(--accent);
  color: white;
  padding: 1rem;
  font-size: var(--font-size-base);
  font-weight: bold;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

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

.submit-btn:active {
  transform: translateY(0);
}

.contact-info {
  text-align: center;
  margin-top: 2rem;
}

.contact-info p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-links a:hover {
  transform: scale(1.1) translateY(-3px);
  background-color: var(--accent-dark);
}

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

footer {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem var(--spacing-unit);
  border-top: 1px solid var(--border);
}

footer p {
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.fade-in-on-scroll {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

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

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

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

.mt-1 {
  margin-top: var(--spacing-unit);
}

.mt-2 {
  margin-top: calc(var(--spacing-unit) * 2);
}

.mb-1 {
  margin-bottom: var(--spacing-unit);
}

.mb-2 {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }
  
  h2 {
    font-size: 24px;
  }
  
  section {
    padding: 2rem var(--spacing-unit);
  }
}
