/* Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

/* ========== Project detail pages (project1.html – project12.html) ==========
   Single-column flow: no absolute hero overlay, no grey rgba text panels, no
   side-by-side flex sections. */

body.project-detail-page {
  text-align: left;
}

body.project-detail-page header.hero {
  padding-top: 100px;
}

body.project-detail-page .hero {
  position: relative;
  text-align: left;
}

body.project-detail-page .hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

body.project-detail-page .hero-content {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px 24px;
  box-sizing: border-box;
  color: #111;
  background: none;
  background-color: transparent;
}

body.project-detail-page .hero h1,
body.project-detail-page .hero h2 {
  text-align: left;
  margin-bottom: 16px;
}

body.project-detail-page .skills-overview-projects {
  margin-bottom: 1.25rem;
}

body.project-detail-page main.project-page-content,
body.project-detail-page .project-page-content {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
  text-align: left;
}

body.project-detail-page .project-page-content h1,
body.project-detail-page .project-page-content h2,
body.project-detail-page .project-page-content h3 {
  text-align: left;
  margin-bottom: 16px;
}

body.project-detail-page .project-page-content p {
  text-align: left;
  line-height: 1.6;
  margin-bottom: 20px;
}

body.project-detail-page .project-section {
  display: block;
  margin-bottom: 40px;
}

body.project-detail-page .project-section .text-left,
body.project-detail-page .project-section .text-right {
  flex: none;
  width: 100%;
  max-width: none;
  padding: 0;
  text-align: left;
}

body.project-detail-page .project-section.full-width {
  text-align: left;
}

body.project-detail-page .project-image {
  max-width: 100%;
  width: 100%;
  height: auto;
  margin: 16px 0;
  display: block;
}

body.project-detail-page .project-image.full {
  width: 100%;
  height: auto;
}

/* Responsive YouTube embeds (16:9) */
body.project-detail-page .video-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 32px auto;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
}

body.project-detail-page .video-wrapper iframe,
body.project-detail-page .video-wrapper .youtube-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

body.project-detail-page .video-section {
  text-align: left;
  margin-top: 20px;
}

body.project-detail-page .video-section iframe {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Project detail pages: heading sizes; weights/spacing unchanged */
body.project-detail-page h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

body.project-detail-page h2 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

body.project-detail-page.project-page header.hero h1,
body.project-detail-page.project-page .hero-content h1,
body.project-detail-page.project-page main h1 {
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}

body.project-detail-page.project-page header.hero h2,
body.project-detail-page.project-page .hero-content h2,
body.project-detail-page.project-page main h2 {
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

body.project-detail-page.project-page header.hero h3,
body.project-detail-page.project-page .hero-content h3,
body.project-detail-page.project-page main h3,
body.project-detail-page.project-page .text-left h3,
body.project-detail-page.project-page .project-section h3 {
  font-weight: 600;
  margin-bottom: 8px;
}

body.project-detail-page.project-page main p,
body.project-detail-page.project-page .hero-content p,
body.project-detail-page.project-page .text-left p,
body.project-detail-page.project-page .project-paragraph,
body.project-detail-page.project-page main li {
  line-height: 1.65;
  margin-bottom: 16px;
}

body.project-detail-page.project-page .project-subtitle,
body.project-detail-page.project-page .project-meta {
  line-height: 1.4;
  opacity: 0.75;
}

/* --- Projects listing (projects.html) — static / hover two-state rows --- */

header,
.button-container {
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-inline: clamp(16px, 4vw, 48px);
}

.button-container {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  gap: 0;
  padding: 0;
  box-sizing: border-box;
}

.button-link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  padding: 20px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  /* Stable row height — static and hover layers match */
  min-height: clamp(100px, 18vw, 200px);
}

.button-link:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* STATIC STATE — visible by default */
.project-static {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition: opacity 0.25s ease;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  position: relative;
  z-index: 1;
}

.project-name {
  font-weight: 400;
  color: #111;
  flex: 1;
  min-width: 0;
}

/* HOVER STATE — hidden by default */
.project-hover {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  width: 100%;
  opacity: 0;
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  padding-right: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 2;
}

.project-desc {
  color: #333;
  max-width: 220px;
  line-height: 1.4;
  flex-shrink: 0;
}

.project-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 48px;
}

/* Placeholder icon dots (reference-style) */
.project-icons::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #111;
  box-shadow: 12px 0 0 #111, 24px 0 0 #111;
  opacity: 0.65;
}

.button-link:hover .project-static {
  opacity: 0;
}

.button-link:hover .project-hover {
  opacity: 1;
  pointer-events: auto;
}

/* Floppy image card — same size in static + hover disk */
.hover-image {
  display: block;
  flex-shrink: 0;
  width: clamp(80px, 10vw, 140px);
  aspect-ratio: 3 / 4;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid #111;
  box-sizing: border-box;
}

/* Wider color preview next to floppy on hover */
.hover-image.hover-preview {
  width: clamp(100px, 18vw, 240px);
  aspect-ratio: 16 / 9;
}

@media (max-width: 600px) {
  .project-hover {
    flex-wrap: wrap;
  }

  .project-static .hover-image,
  .hover-image.hover-disk {
    width: clamp(60px, 18vw, 100px);
  }

  .hover-image.hover-preview {
    width: clamp(80px, 42vw, 200px);
  }

  .project-desc {
    max-width: 100%;
    flex: 1 1 100%;
  }
}

/* Thumbnail art — one background per project index (shared sizing: .hover-image, etc.) */
.project1  { background-image: url('../images/project1.jpg');  }
.project2  { background-image: url('../images/project2.jpg');  }
.project3  { background-image: url('../images/project3.jpg');  }
.project4  { background-image: url('../images/project4.jpg');  }
.project5  { background-image: url('../images/project5.jpg');  }
.project6  { background-image: url('../images/project6.jpg');  }
.project7  { background-image: url('../images/project7.jpg');  }
.project8  { background-image: url('../images/project8.jpg');  }
.project9  { background-image: url('../images/project9.jpg');  }
.project10 { background-image: url('../images/project10.jpg'); }
.project11 { background-image: url('../images/project11.jpg'); }
.project12 { background-image: url('../images/project12.jpg'); }
