/* =============== Base styles  =============== */

body {
  font-family: 'Forum', serif;
  margin: 20px;
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
}

/* Sticky header with simple nav */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #f9f9f9e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #ccc;
}

header h1 {
  font-family: 'Bodoni Moda', serif;
  margin: 0;
  font-size: 1.1rem;
}

/* Shared heading styles */
h2,
h3 {
  font-family: 'Bodoni Moda', serif;
  color: #222;
}

/* =============== Navigation =============== */

nav {
  display: flex;
  gap: 30px;
  margin: 0;
  font-size: 1.1rem;
}

nav a {
  text-decoration: none;
  color: #000;
  transition: all 0.2s ease;
}

nav a:hover {
  color: #616161;
  font-style: italic;
}

nav a:active {
  font-style: italic;
  text-decoration: line-through;
  color: #444;
}

/* Current page underline (from aria-current) */
nav a[aria-current="page"] {
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* =============== Footer (shared across all pages) =============== */

.site-footer {
  margin-top: 7px;
  padding: 40px 0 20px;
  text-align: center;
  font-family: 'Forum', serif;
  color: #444;
  font-size: 1.2rem;
}

.site-footer a {
  color: #000;
  text-decoration: none;
}

.site-footer a:hover {
  font-style: italic;
  color: #616161;
}

.site-footer a:active {
  font-style: italic;
  text-decoration: line-through;
  color: #444;
}


/* =============== Layout helpers =============== */

/* Base layout – home uses this flex, other pages override when needed */
main {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: left;
  min-height: 80vh;
}

/* Reusable page container (About, etc.) */
.page {
  max-width: 1100px;
  width: 90%;
  gap: 40px;
  margin: 48px auto 96px;
}

/* Section titles with small divider line */
.section-title {
  font-family: 'Bodoni Moda', serif;
  font-size: 2rem;
  margin: 0 0 20px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: #000;
  margin-top: 10px;
  opacity: 0.8;
}

/* =============== INDEX Home / intro section =============== */

.intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 900px;
  width: 90%;
  margin: 0 auto;
}

.profile-photo {
  width: 400px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
}

.intro-text {
  flex: 1;
}

.intro-text h2.hello {
  font-family: "Dancing Script", cursive;
  font-size: 2rem;
  margin: 0 0 6px;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.intro-text h3 {
  font-family: 'Bodoni Moda', serif;
  font-size: 3.8rem;
  margin: 0 0 10px;
}

.intro-text p {
  font-size: 1.1rem;
  font-family: 'Forum', serif;
  color: #444;
  margin: 0;
}

/* Primary button used on home + reused elsewhere */
.view-projects-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 28px;
  background-color: #000;
  color: #fff;
  font-family: 'Forum', serif;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.25s ease;
  position: relative;
}

.view-projects-btn:hover {
  background-color: #616161;
  font-style: italic;
  padding-right: 36px; /* room for arrow */
}

.view-projects-btn::after {
  content: ' →';
  opacity: 0;
  position: absolute;
  right: 16px;
  transition: opacity 0.25s ease;
}

.view-projects-btn:hover::after {
  opacity: 1;
}

.view-projects-btn:active {
  text-decoration: line-through;
  color: #ccc;
}

/* =============== About page layout =============== */

/* Two-column about layout */
.about-container {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 36px 48px;
  align-items: start;
}

/* About photo box look */
.about-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Comfortable reading width */
.about-text {
  max-width: 68ch;
}

.about-text .lead {
  color: #222;
}

/* Small facts grid */
.about-facts {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px 18px;
  font-size: 0.98rem;
}

.about-facts li::before {
  content: "• ";
  color: #000;
}

/* Resume button – same style as primary button */
.view-resume-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 28px;
  background-color: #000;
  color: #fff;
  font-family: 'Forum', serif;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.25s ease;
  position: relative;
}

.view-resume-btn:hover {
  background-color: #616161;
  font-style: italic;
  padding-right: 36px;
}

.view-resume-btn::after {
  content: ' →';
  opacity: 0;
  position: absolute;
  right: 16px;
  transition: opacity 0.25s ease;
}

.view-resume-btn:hover::after {
  opacity: 1;
}

.view-resume-btn:active {
  text-decoration: line-through;
  color: #ccc;
}

/* =============== Projects grid page =============== */

.projects {
  /* overrides the main flex for this page */
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 32px 36px;
  max-width: 1100px;
  width: min(92%, 1100px);
  margin: 48px auto 96px;
  align-content: start;
  min-height: auto;
}

.project {
  position: relative;
  overflow: hidden;
}

.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project h2 {
  margin: 10px 0 6px;
  font-size: 1.35rem;
}

.project p {
  margin: 0;
  color: #444;
  font-size: 0.98rem;
  line-height: 1.55;
}

/* Project thumbnail */
.project img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Overlay on hover */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: 1rem 1.4rem;
}

.overlay h3 {
  font-family: 'Bodoni Moda', serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.overlay p {
  font-family: 'Forum', serif;
  font-size: 1.1rem;
  margin: 0;
  color: #111;
}

.project:hover img {
  transform: scale(1.05);
}

.project:hover .overlay {
  opacity: 1;
}

/* =============== Project detail pages =============== */


main.project-detail {
  display: block;
  justify-content: initial;
  align-items: initial;
  min-height: auto;
  text-align: left;
}

/* Shared container width for all detail pages */
.project-detail {
  max-width: 1100px;
  width: min(92%, 1100px);
  margin: 48px auto 120px;
}

/* Back to Projects button */
.back-link {
  display: inline-block;
  background: #0d0d0c;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
  transition: 0.25s ease;
  margin-bottom: 28px;
}

.back-link:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
}

/* Mini gameplay / simulation hero video */
.mini-video-hero {
  width: 100%;
  height: 600px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mini-video-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =============== Process section (Week 1, Week 2, Week 3 & 4) =============== */

/* Top hero block on each project detail */
.pd-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px 48px;
  align-items: start;
  margin-top: 8px;
}

.pd-title {
  font-family: 'Bodoni Moda', serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.05;
  margin: 0 0 18px;
}

.pd-meta {
  font-family: 'Forum', serif;
  margin: 6px 0;
  font-size: 1.05rem;
  color: #222;
}

.pd-right p {
  font-family: 'Forum', serif;
  margin: 0 0 14px;
  max-width: 66ch;
  color: #333;
}

/* Process section container */
.pd-process {
  margin-top: 72px;
}

.pd-process .section-title {
  font-family: 'Bodoni Moda', serif;
  font-size: 2rem;
  margin: 0 0 18px;
  position: relative;
}

.pd-process .section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: #000;
  margin-top: 10px;
  opacity: 0.85;
}

/* Each Week block */
.pd-step {
  margin: 80px 0; /* space between Week sections */
}

.pd-step h4 {
  font-family: 'Bodoni Moda', serif;
  margin: 0 0 6px;
  font-size: 1.2rem;
}

/* Extra breathing room after text inside each step */
.pd-step p {
  margin-bottom: 36px;
}

/* Image grid inside process steps */
.pd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin: 24px 0 24px;
}

/* Process images – same aspect and subtle frame */
.pd-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}




/* =============== Glazing Guide slides carousel =============== */

.slides-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.slide-image {
  max-width: 100%;
  width: min(900px, 100%);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.slide-arrow {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
}

.slide-arrow:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

/* =============== Utility spacing helpers =============== */

.section-spaced {
  margin-top: 84px;
}

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

.section-title-inline {
  display: inline-block;
}

.section-top-md {
  margin-top: 24px;
}

.section-top-sm {
  margin-top: 16px;
}

.section-top-xs {
  margin-top: 12px;
}

.video-frame {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* =============== Responsive styles =============== */

/* Tablets and small laptops */
@media (max-width: 900px) {
  header h1 {
    font-size: 2rem;
  }

  nav {
    gap: 18px;
    font-size: 1rem;
  }

  .about-container,
  .project-container {
    gap: 16px;
  }

  /* Home hero tweaks */
  .intro {
    gap: 24px;
    max-width: 820px;
  }

  .profile-photo {
    width: 240px;
  }

  .intro-text h2.hello {
    font-size: 2.1rem;
  }

  .intro-text h3 {
    font-size: 2.6rem;
  }

  /* About grid tighten */
  .about-container {
    grid-template-columns: 220px 1fr;
    gap: 24px;
  }

  /* Projects grid tighter */
  .projects {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 24px;
  }

  /* Project detail hero stacks on smaller widths */
  .pd-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pd-right p {
    max-width: 70ch;
  }
}

/* Process grids stack to single column just before mobile */
@media (max-width: 800px) {
  .pd-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pd-grid img {
    aspect-ratio: 16 / 10;
  }
}

/* Slide arrows slightly smaller on small screens */
@media (max-width: 700px) {
  .slide-arrow {
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
  }
}

/* Phones */
@media (max-width: 600px) {
  body {
    margin: 12px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px;
  }

  header h1 {
    font-size: 1.9rem;
    line-height: 1.15;
  }

  nav {
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    margin: 0;
  }

  /* Stack hero vertically on mobile */
  main {
    justify-content: flex-start;
    align-items: flex-start;
    min-height: auto;
  }

  .intro {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    width: min(100%, 460px);
    margin: 90px auto 80px; /* more space after nav, less big gap at bottom */
  }

  .profile-photo {
    width: 280px;
    margin: 8px auto 0;
    border-radius: 50%; /* keep the circle on mobile too */
  }

  .intro-text h2.hello {
    font-size: 1.5rem;
  }

  .intro-text h3 {
    font-size: 2rem;
  }

  .intro-text p {
    font-size: 1rem;
  }

  /* About page stacks nicely */
  .page {
    width: min(92%, 700px);
    margin: 32px auto 72px;
  }

  .about-container {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 320px;
    margin: 0 auto;
  }

  .about-text {
    max-width: 100%;
  }

  .about-facts {
    grid-template-columns: 1fr;
  }

  /* Projects grid becomes single column */
  .projects {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 92%;
    margin: 24px auto 56px;
  }

  .project img {
    border-radius: 12px;
  }

  /* footer a bit tighter on phones */
  .site-footer {
    padding: 24px 0 12px;
    margin-top: 16px;
  }
}

/* =============== click-to-zoom (lightbox) for project images =============== */

/* make it feel clickable */
.project-detail img {
  cursor: zoom-in;
}

/* subtle hover so ppl realize it’s interactive */
.project-detail img:hover {
  transform: scale(1.01);
  transition: transform 0.2s ease;
}

/* overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
}

/* when open */
.lightbox.is-open {
  display: flex;
}

/* image inside overlay */
.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  cursor: zoom-out;
}

/* close button */
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: white;
}
