/* ==========================================================================
   MODERN PORTFOLIO STYLESHEET
   Supports responsive side-by-side photo + text layout, dark/light theme,
   animations, and clean typography.
   ========================================================================== */

:root {
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Light Theme Colors (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --accent: #06b6d4;
  
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --card-shadow-hover: 0 20px 35px -5px rgba(79, 70, 229, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #151e32;
  --bg-card-border: #1f293d;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --accent: #22d3ee;
  
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --card-shadow-hover: 0 20px 40px -10px rgba(99, 102, 241, 0.25);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.65;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Container */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid var(--bg-card-border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .navbar {
  background-color: rgba(11, 15, 25, 0.85);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.logo-accent {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.btn-nav {
  padding: 8px 18px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-nav:hover {
  background-color: var(--primary);
  color: #ffffff;
}

/* Theme Toggle Button */
.theme-btn {
  background: none;
  border: 1px solid var(--bg-card-border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
}

.theme-btn:hover {
  border-color: var(--primary);
  transform: rotate(15deg);
}

.moon-icon { display: block; }
.sun-icon { display: none; }

[data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* HERO SECTION */
.hero-section {
  padding: 90px 0 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 50px;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3.25rem;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 36px;
  border-top: 1px solid var(--bg-card-border);
  padding-top: 28px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-media {
  display: flex;
  justify-content: center;
}

.photo-card-hero {
  max-width: 380px;
  width: 100%;
}

/* SECTION COMMON STYLES */
.section {
  padding: 90px 0;
  border-top: 1px solid var(--bg-card-border);
}

.section-header {
  margin-bottom: 50px;
  max-width: 650px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 12px;
}

.section-description {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.cards-stack {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* TWO COLUMN SIDE-BY-SIDE CARD (TEXT NEXT TO PHOTO) */
.two-col-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background-color: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.two-col-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(99, 102, 241, 0.4);
}

/* Alternating layout: Photo Left, Text Right */
.two-col-card.reversed {
  grid-template-columns: 0.85fr 1.15fr;
}

.two-col-card.reversed .card-text {
  order: 2;
}

.two-col-card.reversed .card-media {
  order: 1;
}

.card-text {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-media {
  position: relative;
  overflow: hidden;
  display: flex;
  background-color: var(--bg-secondary);
  min-height: 280px;
}

/* Photo Card & Image Display */
.photo-card {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.card-media .photo-card {
  border-radius: 0;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.two-col-card:hover .card-img {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  pointer-events: none;
}

/* Badge Pill */
.badge-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  margin-bottom: 12px;
}

.item-meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.item-title {
  font-size: 1.45rem;
  margin-bottom: 14px;
  color: var(--text-main);
}

.item-summary {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.item-bullets {
  list-style: none;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-bullets li {
  position: relative;
  padding-left: 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.item-bullets li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 1rem;
}

.details-block {
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.details-block strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 2px;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px;
  background-color: var(--bg-primary);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.card-links {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}

.project-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
}

.project-btn:hover {
  text-decoration: underline;
  transform: translateX(3px);
}

.project-btn-ghost {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.project-btn-ghost:hover {
  color: var(--text-main);
}

/* CONTACT SECTION */
.contact-container {
  max-width: 900px;
}

.text-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background-color: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--card-shadow);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light);
  border-radius: var(--radius-md);
}

.contact-item strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-item p {
  color: var(--text-main);
  font-weight: 500;
}

.contact-item a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  color: var(--text-main);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-block {
  width: 100%;
  border: none;
  margin-top: 8px;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--bg-card-border);
  padding: 30px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 20px;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & MOBILE SCREENS)
   ========================================================================== */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-media {
    order: -1;
  }

  .two-col-card,
  .two-col-card.reversed {
    grid-template-columns: 1fr;
  }

  .two-col-card.reversed .card-text {
    order: 2;
  }

  .two-col-card.reversed .card-media {
    order: 1;
  }

  .card-media {
    height: 260px;
  }

  .card-text {
    padding: 28px 24px;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--bg-card-border);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    display: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
