/**
 * Layout Styles
 * 
 * Page structure and section layouts:
 * - Hero section
 * - Content sections
 * - Grid layouts
 * - Flexbox layouts
 */

/* ===== HERO SECTION ===== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-xl);
  margin-top: var(--navbar-height);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-hero);
  pointer-events: none;
}

.hero-content {
  max-width: var(--container-max-width);
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  line-height: var(--line-height-tight);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  font-weight: var(--font-weight-light);
}

.hero-description {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: var(--line-height-relaxed);
}

/* CTA buttons container */
.cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== SECTION LAYOUT ===== */

/**
 * Generic section container
 * Provides consistent spacing and max-width
 */
.section {
  padding: var(--space-4xl) var(--space-xl);
  max-width: var(--container-max-width);
  margin: 0 auto;
}

/* Alternate background for sections */
.section-alt {
  background: var(--color-bg-secondary);
}

/* Section header */
.section-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  position: relative;
  display: inline-block;
}

/* Decorative underline for section titles */
.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--border-radius-sm);
}

.section-description {
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: var(--space-lg) auto 0;
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
}

/* ===== ABOUT SECTION ===== */

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.about-text p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.about-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.about-image:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* ===== PROJECTS SECTION ===== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-xl);
}

/* ===== SKILLS SECTION ===== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

/* ===== CONTACT SECTION ===== */

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-xl);
  line-height: var(--line-height-relaxed);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
}

/* ===== GRID UTILITIES ===== */

/**
 * Reusable grid layouts
 */

/* Two column grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

/* Three column grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

/* Four column grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

/* Auto-fit grid (responsive without media queries) */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
}

/* Auto-fill grid */
.grid-auto-fill {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-xl);
}

/* ===== FLEXBOX UTILITIES ===== */

/**
 * Common flexbox patterns
 */

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-start {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.flex-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* ===== SPACING UTILITIES ===== */

/**
 * Margin and padding utilities
 * Following a consistent spacing scale
 */

/* Margin utilities */
.m-0 { margin: 0; }
.m-sm { margin: var(--space-sm); }
.m-md { margin: var(--space-md); }
.m-lg { margin: var(--space-lg); }
.m-xl { margin: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Padding utilities */
.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

.pt-0 { padding-top: 0; }
.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }
.pt-xl { padding-top: var(--space-xl); }

.pb-0 { padding-bottom: 0; }
.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }
.pb-xl { padding-bottom: var(--space-xl); }

/* ===== WIDTH & HEIGHT UTILITIES ===== */

.w-full { width: 100%; }
.h-full { height: 100%; }
.w-screen { width: 100vw; }
.h-screen { height: 100vh; }

/* Max width utilities */
.max-w-sm { max-width: 640px; }
.max-w-md { max-width: 768px; }
.max-w-lg { max-width: 1024px; }
.max-w-xl { max-width: 1280px; }
.max-w-2xl { max-width: 1400px; }

/* ===== POSITION UTILITIES ===== */

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* ===== OVERFLOW UTILITIES ===== */

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }