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

@font-face {
  font-family: "GT Standard";
  src: url("fonts/GTStandard-Light.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GT Standard";
  src: url("fonts/GTStandard-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf8f4;
  --text: #14140f;
  --text-secondary: #65645c;
  --text-tertiary: #77766d;
  --text-quaternary: #8b8a80;
  --text-muted: #9e9d92;
  --text-faint: #b0afa3;
  --border: #e8e5dd;
  --border-strong: #dbd8cd;
  --surface: #f2f0e9;
  --card-grad-1: #eeece3;
  --card-grad-2: #dfddd2;
  --tooltip-bg: rgba(255, 255, 255, 0.92);
  --tooltip-border: #ddd9cd;
  --btn-bg: #14140f;
  --btn-color: #faf8f4;
}

/* PAGE TRANSITIONS */
main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 300ms ease;
}
main.visible { opacity: 1; }

html { scroll-behavior: smooth; }

body {
  font-family: "GT Standard", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 18px;
  font-weight: 400;
}

/* NAV */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

header.scrolled {
  background: rgba(250, 248, 244, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
}

/* NAV LOGO */
.nav-logo {
  display: flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.nav-logo svg {
  height: 22px;
  width: auto;
  display: block;
  opacity: 0.9;
  transition: opacity 150ms ease;
}

.nav-logo:hover svg {
  opacity: 1;
}

/* NAV RIGHT (icon + label links) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  color: rgba(20, 20, 15, 0.45);
  transition: color 0.15s, background 0.15s;
}

.nav-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.nav-btn:hover {
  color: rgba(20, 20, 15, 0.75);
  background: var(--surface);
}

.nav-btn.active {
  color: var(--text);
}

/* HERO */
.hero {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 164px 2rem 20px;
}

.hero h1 {
  font-size: 36px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: normal;
  margin-bottom: 12px;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 640px;
  margin-bottom: 2rem;
}

.hero .hero-role {
  margin-bottom: 1.5rem;
}

/* PILL BUTTON (CTA "Say hello") */
.btn {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  height: 40px;
  padding: 0 20px;
  background: var(--btn-bg);
  color: var(--btn-color);
  text-decoration: none;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn:hover { opacity: 0.88; }

/* SECTIONS */
section:not(.hero) {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.label {
  display: block;
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: normal;
  text-transform: none;
  margin-bottom: 1.25rem;
}

/* PROJECTS GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1rem;
  row-gap: 28px;
}

@media (max-width: 725px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: none;
  border: none;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--card-grad-1) 0%, var(--card-grad-2) 100%);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* IMAGE HOVER ZOOM (homepage project grid) */
#projects .card:hover .card-img {
  transform: scale(1.012);
}

/* LOCKED CARDS */
.card.locked .card-img { transition: filter 200ms ease; }
.card.locked:hover .card-img { filter: brightness(0.7); }

.lock-tooltip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--tooltip-bg);
  border: 0.5px solid var(--tooltip-border);
  border-radius: 999px;
  color: var(--text-quaternary);
  font-size: 18px;
  font-weight: 400;
  padding: 6px 14px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}

.card.locked:hover .lock-tooltip { opacity: 1; }

/* IMAGE HOVER CROSSFADE */
.card-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 300ms ease;
}

.card-img img.base { position: relative; }
.card-img img.hover { opacity: 0; }
.card:hover .card-img img.hover { opacity: 1; }

.card-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.card-title {
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
}

.card-year {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-tertiary);
}

/* MORE LINK */
.more-link {
  display: inline-block;
  font-size: 18px;
  font-weight: 400;
  color: rgba(20, 20, 15, 0.45);
  text-decoration: none;
  transition: color 0.15s;
}

.more-link:hover {
  color: var(--text);
}

/* CONTACT */
.contact-text {
  font-size: 18px;
  color: var(--text-quaternary);
  margin-bottom: 1.25rem;
}

/* FOOTER */
footer {
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  margin-top: auto;
  padding: 1.5rem 2rem;
  border-top: 0.5px solid var(--border);
  font-size: 14px;
  color: var(--text-faint);
}

/* CASE STUDY */
.case-wrap {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 164px 2rem 6rem;
}

.case-title {
  font-size: 36px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: normal;
  margin-bottom: 12px;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 2rem 0;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 4rem;
}

@media (max-width: 725px) {
  .case-meta {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.case-meta-key {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.case-meta-val {
  font-size: 16px;
  color: var(--text);
  font-weight: 400;
}

.case-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--card-grad-1) 0%, var(--card-grad-2) 100%);
  border-radius: 12px;
  margin-bottom: 4rem;
}

.case-img-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 4rem;
}

.case-img-row .case-img {
  margin-bottom: 0;
}

.case-img-sm {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--card-grad-1) 0%, var(--card-grad-2) 100%);
  border-radius: 12px;
}

.case-context {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 620px;
  margin-bottom: 5rem;
}

.case-context-top {
  max-width: 640px;
  margin-bottom: 3rem;
}

/* KEY METRIC */
.case-keymetric {
  margin-bottom: 5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.case-keymetric-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.case-keymetric-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.case-keymetric-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.case-section {
  margin-bottom: 5rem;
}

.case-section-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.case-section-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2rem;
}

.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.ps-block {
  padding-top: 1.25rem;
  border-top: 0.5px solid var(--text);
}

.ps-block-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.ps-block-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.case-divider {
  border: none;
  border-top: 0.5px solid var(--border);
  margin: 5rem 0;
}

.more-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* PROJECT OVERLAY */
.project-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transition: opacity 280ms ease, transform 280ms ease, visibility 0s linear 280ms;
}

.project-overlay.open {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition: opacity 280ms ease, transform 280ms ease;
}

/* NAV CLOSE BUTTON (shown only while overlay is open) */
.nav-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  color: rgba(20, 20, 15, 0.45);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.nav-close-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.5;
}

.nav-close-btn:hover {
  color: rgba(20, 20, 15, 0.75);
  background: var(--surface);
}

nav.overlay-active .nav-right {
  display: none;
}

nav.overlay-active .nav-close-btn {
  display: flex;
}

body.overlay-open {
  overflow: hidden;
}
