/* =============================================================================
   projects.css — Home grid, project cards, project detail, info page
   ============================================================================= */

/* ── Hero ─────────────────────────────────────────────────────────────────────── */
.hero-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--pad) 32px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 60px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: rgb(10, 80, 41);
  margin-bottom: 48px;
}
.hero-headline em { font-style: italic; }
.hero-headline .s1 { color: #c94832; }
.hero-headline .s2 { color: #2a5ba8; }
.hero-headline .s3 { color: #e8a020; }

.line-reveal .reveal-stage { display: block; }
.line-reveal .reveal-word { display: inline-block; overflow: hidden; }
.line-reveal .reveal-word-inner {
  display: inline-block;
  transform: translateY(115%);
  opacity: 0;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
  transition-delay: var(--line-delay, 0ms);
}
.line-reveal.is-revealed .reveal-word-inner { transform: translateY(0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .line-reveal .reveal-word-inner { transition: none; transform: none; opacity: 1; }
}

.hero-followup {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.hero-followup.is-revealed { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .hero-followup { transition: none; opacity: 1; transform: none; }
}

.hero-scroll {
  font-family: 'Roboto Mono', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 27px;
  letter-spacing: 0.02em;
  color: rgb(26, 25, 37);
}

.hero-divider {
  height: 1px;
  background: var(--border);
  margin-top: 32px;
}

/* ── Project grid ─────────────────────────────────────────────────────────────── */
.grid-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 52px var(--pad) 64px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 32px;
}

/* Scroll reveal — starts hidden */
.project-card {
  display: block;
  background: none;
  padding: 0;
  position: relative;
  overflow: visible;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.project-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--light);
  margin-bottom: 14px;
}
.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.project-card:hover .project-card-image img { transform: scale(1.05); }

.project-card-info {
  padding: 0 2px;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0em;
  line-height: 1.25;
  color: rgb(10, 80, 41);
  margin-bottom: 5px;
  transition: color 0.2s;
}
.project-card:hover .project-card-title { color: var(--accent); }

.project-card-tagline {
  display: block;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.project-card-meta {
  margin-top: 3px;
  font-family: var(--font);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Project Detail ───────────────────────────────────────────────────────────── */
.project-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: calc(100vh - var(--nav-h));
  max-width: var(--max-w);
  margin: 0 auto;
}

.project-sidebar {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 50px 40px 50px 0;
}
.project-sidebar::-webkit-scrollbar { display: none; }

.project-sidebar h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: rgb(10, 80, 41);
  margin-bottom: 28px;
}

.project-meta,
.project-description,
.project-ext-link {
  font-family: 'Roboto Mono', monospace;
  font-weight: 400;
  font-size: 16px;
  line-height: 27px;
  color: rgb(26, 25, 37);
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.meta-row { display: grid; grid-template-columns: 70px 1fr; gap: 12px; }
.meta-label { color: var(--muted); }
.meta-value { text-align: left; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.tag-pill {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--light);
  padding: 7px 10px;
  border-radius: 3px;
}

.project-description p { margin-bottom: 18px; }
.project-description p:last-child { margin-bottom: 0; }

.project-ext-links {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-ext-link {
  width: fit-content;
  color: rgb(10, 80, 41);
  transition: color 0.2s;
}
.project-ext-link::after { content: ' ↗'; font-size: 10px; }
.project-ext-link:hover { color: var(--accent-hover); }

.project-images {
  padding: 50px 0 50px 50px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-img-wrap { overflow: hidden; border-radius: 4px; }
.project-img-wrap img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}
.project-img-wrap:hover img { transform: scale(1.01); }

.project-img-caption {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 8px;
  padding-bottom: 28px;
}

/* ── Info Page ────────────────────────────────────────────────────────────────── */
.info-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px var(--pad) 64px;
}

.info-display-heading {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: rgb(10, 80, 41);
  text-align: center;
  margin-bottom: 28px;
}
.info-display-heading .s2 { color: rgb(26, 25, 37); font-weight: 400; }

.info-top {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  max-width: 860px;
  margin: 0 auto;
}

.info-photo-wrap { aspect-ratio: 4 / 5; }

.info-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  border: 8px solid rgb(10, 80, 41);
  display: block;
}

.info-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.info-bio p {
  font-family: 'Roboto Mono', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 22px;
  color: rgb(26, 25, 37);
  margin-bottom: 12px;
}
.info-bio p:last-child { margin-bottom: 0; }
.info-bio .location { color: var(--fg); font-weight: 500; }

.info-connect {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.info-connect-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: rgb(10, 80, 41);
  letter-spacing: -0.01em;
}

.connect-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}
.connect-icons a {
  display: inline-flex;
  color: rgb(26, 25, 37);
  transition: color 0.2s;
}
.connect-icons a:hover { color: rgb(10, 80, 41); }
.connect-icons svg { width: 20px; height: 20px; display: block; }

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 850px) {
  .project-layout { grid-template-columns: 1fr; }
  .project-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 36px 0 32px;
  }
  .project-images { padding: 32px 0; }
}

@media (max-width: 960px) {
  .project-grid { gap: 40px 24px; }
}

@media (max-width: 700px) {
  .hero-inner { flex-direction: column; align-items: flex-start; padding: 48px var(--pad) 40px; }
  .hero-sub { text-align: left; }
  .project-grid { gap: 32px 16px; }
  .grid-wrap { padding: 40px var(--pad) 64px; }
}

@media (max-width: 480px) {
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .info-top { grid-template-columns: 1fr; gap: 32px; }
  .info-photo-wrap { aspect-ratio: 4 / 3; }
  .info-display-heading { text-align: left; }
}
