:root {
  --bg: #f5f4f6;
  /* Light gray background like the image */
  --ink: #1a1a1a;
  --muted: #666;
  --link-color: #333;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Helvetica Neue", Helvetica, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 6vw;
  position: relative;
  background-color: transparent;
}

.logo {
  font-size: 26px;
  font-weight: 600;
  text-decoration: none;
  color: #111;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.nav a {
  text-decoration: none;
  color: #444;
  font-size: 16px;
  padding-bottom: 2px;
  letter-spacing: 0.02em;
}

.nav a:hover {
  color: var(--ink);
}

.nav a.active {
  color: #111;
  border-bottom: 1.5px solid #111;
}

/* Main */
.page {
  padding: 40px 6vw 100px;
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 30px;
  color: #222;
  letter-spacing: 0.01em;
}

/* Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  margin-bottom: 60px;
}

.hero-img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  display: block;
  transition: opacity 1.2s ease-in-out;
}

.hero-text-overlay {
  position: absolute;
  top: 15%;
  right: 6%;
  text-align: left;
  color: #fff;
}

.hero-text-overlay h2 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.04em;
  margin: 0 0 16px 0;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-text-overlay p {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  letter-spacing: 0.05em;
  margin: 0;
  color: #eaeaea;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Projects */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.project-row {
  display: grid;
  gap: 20px;
  text-decoration: none;
  color: inherit;
}

/* Scroll Animation Styles */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-row-3 {
  grid-template-columns: repeat(3, 1fr);
}

.project-row-4 {
  grid-template-columns: repeat(4, 1fr);
}

.project-column {
  display: flex;
  flex-direction: column;
}

.project-thumb {
  width: 100%;
  height: 320px;
  overflow: hidden;
  background-color: var(--bg);
}

.project-row-4 .project-column .project-thumb {
  height: 220px;
}

.project-thumb .img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  background-color: transparent;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-thumb:hover .img {
  transform: scale(1.08);
}

.project-info {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-name {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.02em;
  margin: 0;
}

.project-desc {
  font-size: 14px;
  color: #333;
  margin: 0;
  line-height: 1.5;
}

.see-more {
  font-size: 14px;
  font-style: italic;
  color: #777;
  margin-top: 2px;
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 6vw 40px;
  font-size: 14px;
  color: #444;
}

.footer-left {
  color: #444;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer-right a {
  text-decoration: none;
  color: #333;
  font-size: 15px;
}

.footer-right a:hover {
  color: var(--ink);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

.social-icon:hover {
  color: #000;
}

/* --- Project Detail Page --- */
.project-detail-page {
  padding: 0 6vw 100px;
}

.project-header {
  margin-top: 20px;
  margin-bottom: 80px;
}

.project-header h2 {
  font-size: 38px;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.project-header p {
  font-size: 14px;
  color: #555;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* --- Random Scattered Gallery --- */
.random-gallery {
  display: flex;
  flex-direction: column;
  gap: 6vh;
  margin-top: 40px;
}

.random-row {
  display: flex;
  width: 100%;
}

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

.random-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.random-item:hover img {
  transform: scale(1.03);
}

/* Mobile responsiveness */
@media (max-width: 900px) {
  .hero-img {
    aspect-ratio: 4 / 3;
  }

  .hero-text-overlay {
    top: 10%;
    right: 5%;
  }

  .hero-text-overlay h2 {
    font-size: 32px;
  }

  .project-row-3,
  .project-row-4 {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-column .project-thumb {
    height: auto;
    max-height: 400px;
    aspect-ratio: 3 / 2;
  }

  .project-column .project-thumb .img {
    height: 100%;
    min-height: 200px;
    object-position: center;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 30px 6vw;
  }

  .nav {
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .footer-right {
    flex-wrap: wrap;
    gap: 20px;
  }

  /* Flatten the random gallery into columns for mobile */
  .random-row {
    flex-direction: column;
    align-items: center !important;
    gap: 40px;
  }

  .random-item {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
