:root {
  --bg: #F7F6F5;
  --surface: #E1E1E2;
  --ink: #050606;
  --ink-soft: #4A4744;
  --line: rgba(5, 6, 6, 0.12);
  --line-strong: rgba(5, 6, 6, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---- Nav ---- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(20px, 5vw, 48px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-name {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.nav-links { display: flex; gap: 28px; font-family: 'Lato', sans-serif; font-weight: 400; font-size: 13px; }
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover, .nav-links a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

/* ---- Footer ---- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 28px clamp(20px, 5vw, 48px) 40px;
  border-top: 1px solid var(--line);
}
.footer-name { font-family: 'Lato', sans-serif; font-weight: 400; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 20px; font-family: 'Lato', sans-serif; font-weight: 300; font-size: 13px; }
.footer-contact a { color: var(--ink); text-decoration: none; }
.footer-contact a:hover, .footer-contact a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 480px) { .site-footer { flex-direction: column; align-items: flex-start; } }

/* ---- Shared type ---- */
.title-lg {
  font-family: 'Cormorant', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
.sub {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.section-label {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 24px;
}

/* =========================================================
   HOME PAGE
   ========================================================= */
.cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.5vw, 16px);
  padding: clamp(64px, calc(3vw + 48px), 80px);
  text-align: center;
}
.cover-banner { width: 100%; }
.cover-banner img { width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 229px); display: block; margin: 0 auto; }

@media (max-width: 640px) {
  .cover { padding-left: 12px; padding-right: 12px; padding-top: 48px; padding-bottom: 48px; }
  .cover-banner img { max-height: none; max-width: 50%; }
}

.section { padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 48px); max-width: 1080px; margin: 0 auto; }
#about { padding-top: 0; scroll-margin-top: 80px; }

.about-intro { display: flex; gap: clamp(24px, 4vw, 48px); align-items: flex-start; }
.about-photo { position: relative; flex: none; width: clamp(144px, 17.6vw, 208px); aspect-ratio: 3 / 4; overflow: hidden; }
.about-photo img { position: absolute; inset: 0; }
.about-photo .photo-hover { opacity: 0; transition: opacity 0.45s ease; }
.about-photo:hover .photo-hover { opacity: 1; }
.about-intro-text { flex: 1; min-width: 0; }
@media (max-width: 560px) { .about-intro { flex-direction: column-reverse; align-items: center; } .about-photo { width: clamp(176px, 52vw, 240px); } }
@media (prefers-reduced-motion: reduce) { .about-photo .photo-hover { transition: none; } }

.bio { font-family: 'Lato', sans-serif; font-weight: 400; letter-spacing: 0.015em; font-size: 17px; line-height: 1.75; max-width: 62ch; margin: 0; }

.cv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.btn {
  font-family: 'Lato', sans-serif; font-weight: 400; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px 26px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--bg); }

.timeline-heading { font-family: 'Cormorant', Georgia, serif; font-weight: 500; font-size: clamp(26px, 3vw, 32px); margin: 56px 0 32px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 40px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -32.5px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.timeline-role { font-family: 'Cormorant', Georgia, serif; font-weight: 500; font-size: 24px; margin: 0 0 4px; }
.timeline-meta { font-family: 'Lato', sans-serif; font-weight: 300; font-size: 13px; letter-spacing: 0.03em; color: var(--ink-soft); margin: 0 0 14px; }
.timeline-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.timeline-list li { font-family: 'Lato', sans-serif; font-weight: 400; letter-spacing: 0.015em; font-size: 14.5px; line-height: 1.6; color: var(--ink); padding-left: 14px; position: relative; }
.timeline-list li::before { content: "\2014"; position: absolute; left: 0; color: var(--ink-soft); }

.contact-section { background: var(--surface); width: 100%; padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 48px); }
.contact-inner { max-width: 900px; margin: 0 auto; }
.contact-heading { font-family: 'Cormorant', Georgia, serif; font-weight: 500; font-size: clamp(32px, 4.5vw, 44px); margin: 0 0 32px; text-wrap: balance; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.contact-item { display: flex; align-items: center; gap: 14px; }
.contact-icon { flex: none; width: 22px; height: 22px; color: var(--ink); }
.contact-text { display: flex; flex-direction: column; gap: 6px; }
.contact-label { font-family: 'Lato', sans-serif; font-weight: 300; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.contact-value { font-family: 'Lato', sans-serif; font-weight: 400; font-size: 16px; color: var(--ink); text-decoration: none; }
.contact-value:hover, .contact-value:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

/* =========================================================
   PROJECTS LISTING (full-bleed split, 1:1, 2 per row)
   ========================================================= */
.split-row { display: grid; grid-template-columns: 1fr; gap: clamp(20px, 3vw, 40px); margin-bottom: clamp(20px, 3vw, 40px); }
@media (min-width: 861px) {
  .split-row {
    --card-size: min(
      calc((100vw - 2 * clamp(20px, 5vw, 48px) - clamp(20px, 3vw, 40px)) / 2),
      calc(100vh - 69px - 150px)
    );
    grid-template-columns: repeat(2, var(--card-size));
    justify-content: center;
    align-items: center;
    height: calc(100vh - 69px);
    padding: 0 clamp(20px, 5vw, 48px);
    margin-bottom: 0;
  }
  .split-image { width: var(--card-size); height: var(--card-size); }
}
.split-half { display: flex; flex-direction: column; }
.split-half a { color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.split-image { aspect-ratio: 1 / 1; overflow: hidden; }
.split-image img { filter: grayscale(100%); transition: filter 0.4s ease; }
.split-half a:hover .split-image img,
.split-half a:focus-visible .split-image img { filter: grayscale(0%); }
@media (prefers-reduced-motion: reduce) { .split-image img { transition: none; } }
.split-caption { padding: 20px clamp(20px, 4vw, 32px) 20px 3px; display: flex; flex-direction: column; gap: 4px; }
.split-caption .title-lg {
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(19px, 2vw, 23px);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

/* =========================================================
   PROJECT DETAIL
   ========================================================= */
.hero-detail { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 69px); }
.hero-image { position: relative; overflow: hidden; aspect-ratio: 1 / 1; align-self: end; }
.hero-image img { object-position: center 20%; }
.hero-content { display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; padding: clamp(32px, 5vw, 80px); }
.hero-content .title-lg { font-size: clamp(38px, 5vw, 60px); }
.hero-content .sub { margin-top: -10px; }
.write-up { font-family: 'Lato', sans-serif; font-weight: 400; letter-spacing: 0.015em; font-size: 14px; line-height: 1.75; color: var(--ink); max-width: 78ch; margin: 0; white-space: pre-wrap; }
@media (max-width: 760px) { .hero-detail { grid-template-columns: 1fr; min-height: auto; } }

.carousel-section { padding: clamp(56px, 8vw, 96px) 0; }
.carousel-label { margin: 0 0 24px; padding: 0 clamp(20px, 5vw, 48px); }
.carousel-wrap { position: relative; }
.carousel-track { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0; margin: 0; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: none; width: min(61vw, 442px); aspect-ratio: 4 / 5; scroll-snap-align: start; overflow: hidden; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 35px; height: 35px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); opacity: 0.55;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity 0.2s ease;
}
.carousel-btn:hover, .carousel-btn:focus-visible { background: var(--ink); color: var(--bg); border-color: var(--ink); opacity: 1; }
.carousel-btn.prev { left: clamp(4px, 2vw, 16px); }
.carousel-btn.next { right: clamp(4px, 2vw, 16px); }
.carousel-btn svg { width: 14px; height: 14px; }
@media (max-width: 640px) { .carousel-btn { display: none; } }
.keyword-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-tags-band { max-width: 1080px; margin: 0 auto; padding: 24px clamp(20px, 5vw, 48px); justify-content: center; }
.keyword-tag {
  font-family: 'Lato', sans-serif; font-weight: 400; letter-spacing: 0.03em; font-size: 10px;
  padding: 6px 12px; background: var(--surface); color: var(--ink);
  border-radius: 999px; text-transform: uppercase;
}
.closing-section { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; padding-top: clamp(32px, 4vw, 56px); padding-bottom: clamp(32px, 4vw, 56px); padding-left: clamp(16px, 3vw, 32px); padding-right: clamp(16px, 3vw, 32px); }
