/* ===========================
   PROJECT-FORWARD LEFT/RIGHT
   =========================== */

:root {
  --bg: #f6f7fb;
  --card: #fff;
  --text: #0f1724;
  --muted: #6b7280;
  --accent: #0ea5a4;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

/* NAVIGATION */
.nav-wrap {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  z-index: 50;
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .8rem 1rem;
}
.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}
.site-nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--text);
}

/* LAYOUT GRID */
.layout-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.5rem;
  max-width: 1500px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ABOUT LEFT COLUMN */
.about-section {
  position: sticky;
  top: 96px; /* sticks under navbar */
}
.about-section h1 {
  margin: 0 0 .25rem;
}
.about-title {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .8rem;
}
.about-text {
  font-size: .95rem;
  margin-bottom: 1rem;
}
.about-links .btn {
  margin-right: .7rem;
}
.about-metrics {
  margin-top: 1.5rem;
}
.about-metrics div {
  margin-bottom: .8rem;
  font-size: .9rem;
}

/* PROJECTS RIGHT COLUMN */
.projects-section {
  width: 100%;
}
.projects-section h2 {
  margin-bottom: .3rem;
}
.projects-section .section-sub {
  color: var(--muted);
  margin-bottom: 1rem;
}

/* GRID OF PROJECT CARDS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

/* CARD STYLES */
.card {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(12,15,20,.06);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease;
}
.card:hover {
  transform: translateY(-4px);
}
.card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.card-body {
  padding: .8rem;
}
.card h3 {
  margin: .3rem 0;
  font-size: 1rem;
}
.card-date {
  font-size: .75rem;
  color: var(--muted);
}
.card-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .4rem;
  border-radius: 6px;
  margin-bottom: .35rem;
}
.card-tag.team { background: #0ea5a4; color: white; }
.card-tag.class { background: #3b82f6; color: white; }
.card-tag.personal { background: #ef4444; color: white; }

/* CONTACT SECTION */
.contact-section {
  text-align: center;
  padding: 2rem 0;
}
.contact-section a {
  color: var(--accent);
}

/* FOOTER */
.footer {
  background: #0f1724;
  color: #fff;
  padding: 1.5rem;
  text-align: center;
  margin-top: 2rem;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .layout-container {
    grid-template-columns: 1fr;
  }
  .about-section {
    position: relative;
    top: auto;
    margin-bottom: 2rem;
  }
}

/* ==================================
   CONTENT PAGES (NON-HOME)
   ================================== */

.content-page {
  padding: 3rem 1rem;
}

.content-inner {
  max-width: 900px;     /* Ideal reading width */
  margin: 0 auto;       /* Centers content */
}

/* Slightly wider on large screens */
@media (min-width: 1200px) {
  .content-inner {
    max-width: 1000px;
  }
}
/* ==================================
   PROJECT PAGE MEDIA (CLEAN + CONSISTENT)
   ================================== */

.project-page figure {
  margin: 2rem auto;
  text-align: center;
}

.project-page img,
.project-page video {
  width: 100%;
  max-width: 720px;     /* KEY: prevents oversized media */
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
}

/* Landscape videos */
.project-page video.landscape {
  aspect-ratio: 16 / 9;
}

/* Vertical / phone videos */
.project-page video.vertical {
  max-width: 420px;
  aspect-ratio: 9 / 16;
}

/* Captions */
.project-page figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* === PROJECT PAGE CONTENT WIDTH === */
.project-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ==========================
   Project Page Media Cleanup
   ========================== */
/* === PROJECT PAGE LAYOUT === */
.project-page {
  padding: 2rem 0;
}

.project-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* === PROJECT MEDIA === */
.project-media {
  margin: 2rem auto;
  text-align: center;
}

.project-media img,
.project-media video {
  width: 100%;
  max-width: 720px;     /* 🔑 THIS is the real fix */
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}

/* Video-specific polish */
.project-media video {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

/* Captions */
.project-media figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.project-page {
  max-width: 1100px;
  padding-left: 2rem;
  padding-right: 2rem;
}

.media-block {
  margin: 2rem auto;
  text-align: center;
}

.media-block img,
.media-block video {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
}

.media-block figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
