/* ===== BASIC RESPONSIVE PORTFOLIO (MOBILE-FIRST) ===== */
/*
 * MOBILE-FIRST STRATEGY:
 * 1. Base styles are now mobile (small screens)
 * 2. Media queries use min-width instead of max-width
 * 3. Progressive enhancement - we add styles for larger screens
 */

/* Basic CSS variables for Exercise 1 */
:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --accent-color: #f59e0b;
  --white: #ffffff;
  --border-color: #e2e8f0;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --border-radius: 0.5rem;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

/* ===== BASIC CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* ===== RESPONSIVE HEADER (Mobile-First: base styles for mobile) ===== */
.site-header {
  background: var(--primary-color);
  color: white;
  padding: var(--spacing-md) 0;
}

.site-header .container {
  display: flex;
  flex-direction: column; /* Mobile: vertical navigation */
  text-align: center;
  gap: var(--spacing-sm);
}

.site-title {
  font-size: 1.25rem; /* Mobile: smaller title */
  font-weight: 700;
}

.main-nav ul {
  display: flex;
  flex-direction: column; /* Mobile: links stacked vertically */
  list-style: none;
  gap: var(--spacing-sm);
}

.main-nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: background-color 0.2s;
}

.main-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ===== SECTIONS ===== */
.hero-section {
  text-align: center;
  padding: var(--spacing-lg) 0; /* Mobile: reduced padding */
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
  color: white;
  margin: var(--spacing-lg) 0;
  border-radius: var(--border-radius);
}

.hero-section h2 {
  font-size: 1.25rem; /* Mobile: smaller text */
  margin-bottom: var(--spacing-sm);
}

.hero-section p {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
}

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

.projects-section h2 {
  text-align: center;
  font-size: 1.5rem; /* Mobile: moderate size */
  margin-bottom: var(--spacing-lg);
}

/* ===== PROJECTS GRID WITH FLEXBOX ===== */
.projects-grid {
  display: flex;
  flex-direction: column; /* Mobile: single column */
  gap: var(--spacing-lg);
  align-items: center;
}

.project-card {
  width: 100%; /* Mobile: full width */
  max-width: 100%;
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-info {
  padding: var(--spacing-md);
}

.project-info h3 {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-sm);
}

.project-info p {
  color: var(--secondary-color);
  margin-bottom: var(--spacing-md);
  font-size: 0.875rem;
}

/* ===== TAGS ===== */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ===== CTA BUTTON ===== */
.cta-button {
  background: var(--accent-color);
  color: white;
  padding: var(--spacing-sm) var(--spacing-lg);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background-color 0.2s;
  display: inline-block;
}

.cta-button:hover {
  background: #d97706;
}

/* ===== MEDIA QUERIES (Mobile-First: Progressive Enhancement) ===== */

/* Tablet: 2-3 columns - 481px+ */
@media (min-width: 481px) {
  .site-title {
    font-size: 1.5rem;
  }

  .projects-grid {
    flex-direction: row; /* Tablet: multiple columns */
    flex-wrap: wrap;
    justify-content: center;
  }

  .project-card {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
  }

  .hero-section h2 {
    font-size: 1.5rem;
  }

  .projects-section h2 {
    font-size: 1.75rem;
  }
}

/* Desktop: Full horizontal layout - 769px+ */
@media (min-width: 769px) {
  .site-header .container {
    flex-direction: row; /* Desktop: horizontal navigation */
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .main-nav ul {
    flex-direction: row; /* Desktop: inline links */
    gap: var(--spacing-md);
  }

  .site-title {
    font-size: 1.5rem;
  }

  .project-card {
    min-width: 300px;
    max-width: 400px; /* Desktop: wider cards */
  }

  .hero-section {
    padding: var(--spacing-xl) 0; /* Desktop: more space */
  }

  .hero-section h2 {
    font-size: 2rem; /* Desktop: larger titles */
  }

  .hero-section p {
    font-size: 1.125rem;
  }
}

/* ===== BASIC TYPOGRAPHY ===== */
h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.125rem;
}

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

/* ===== FOOTER ===== */
.site-footer {
  background: var(--secondary-color);
  color: white;
  text-align: center;
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
}

/* ===== RESPONSIVE IMAGES ===== */
img {
  max-width: 100%;
  height: auto;
}

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