/* ─── Variables ─── */
:root {
  --bg:    #0d0d0b;
  --fg:    #f0ede5;
  --muted: #565650;
  --clay:  #a06840;
  --line:  rgba(240, 237, 229, 0.1);
  --nav-h: 68px;
  --pad:   clamp(24px, 3.6vw, 56px);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Custom cursor (pointer devices only) ─── */
@media (pointer: fine) {
  body { cursor: none; }

  .cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 6px; height: 6px;
    background: var(--fg);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    will-change: transform;
  }

  .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 38px; height: 38px;
    border: 1px solid rgba(240, 237, 229, 0.35);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.25s ease, height 0.25s ease, border-color 0.2s;
    will-change: transform;
  }

  body.cursor-hover .cursor-ring {
    width: 58px;
    height: 58px;
    border-color: rgba(240, 237, 229, 0.55);
  }
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  height: var(--nav-h);
  transition: background 0.35s, backdrop-filter 0.35s;
}

.nav.scrolled {
  background: rgba(13, 13, 11, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-brand {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  gap: 36px;
}

.nav-menu a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.nav-menu a:hover { opacity: 1; }

/* ─── Page fade-in ─── */
@keyframes page-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
body { animation: page-in 0.4s ease both; }

/* ─── Scroll-reveal base ─── */
.js-reveal,
.js-reveal-card {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-reveal.in,
.js-reveal-card.in {
  opacity: 1;
  transform: none;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 56px) var(--pad) 68px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-img {
  position: absolute;
  right: 0;
  top: 0;
  width: 55vw;
  height: auto;
  display: block;
  filter: grayscale(22%) brightness(0.68);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 32%),
                      linear-gradient(to top, transparent 0%, black 8%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, black 32%),
              linear-gradient(to top, transparent 0%, black 8%);
  mask-composite: intersect;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-bg-img.loaded {
  opacity: 1;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(13, 13, 11, 0.95) 0%,
      rgba(13, 13, 11, 0.7) 40%,
      rgba(13, 13, 11, 0.0) 62%
    ),
    linear-gradient(to top,
      rgba(13, 13, 11, 0.97) 0%,
      rgba(13, 13, 11, 0.5) 28%,
      rgba(13, 13, 11, 0.0) 55%
    );
}

.hero > *:not(.hero-bg) {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(28px, 4.5vh, 56px);
}

.hero-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(88px, 14.5vw, 214px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
}

.hero-name .italic {
  font-style: italic;
  margin-left: clamp(20px, 4.5vw, 88px);
}

.hero-descriptor {
  max-width: 440px;
  margin-top: clamp(28px, 4vh, 52px);
  font-size: 15px;
  line-height: 1.72;
  color: rgba(240, 237, 229, 0.5);
}

.hero-scroll-cue {
  position: absolute;
  bottom: 44px;
  right: var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 54px;
  background: var(--muted);
  animation: scroll-pulse 2.4s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1);    }
  50%       { opacity: 0.9; transform: scaleY(0.5);  }
}

/* ─── Ticker ─── */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  padding: 17px 0;
}

.ticker-inner {
  display: inline-flex;
  align-items: center;
  animation: ticker 30s linear infinite;
}

.ticker-inner span {
  padding: 0 26px;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticker-inner b {
  font-weight: 300;
  color: var(--clay);
  padding: 0 2px;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Shared section ─── */
.section {
  padding: clamp(72px, 10vw, 130px) var(--pad);
}

.section-top {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: clamp(40px, 5vw, 72px);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.idx {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.section-top h2 {
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* ─── Work list ─── */
.work-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  grid-template-columns: 48px 1fr auto;
  gap: 0 clamp(16px, 2vw, 32px);
  padding: clamp(14px, 1.8vw, 22px) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  overflow: hidden;
  transition: padding 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  justify-items: center;
}

.work-row .row-n { justify-self: start; }
.work-row .row-tag { justify-self: end; }

.work-list .work-row:first-child { border-top: 1px solid var(--line); }

.work-row:hover { padding: clamp(22px, 2.8vw, 36px) 0; }

.row-n {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(240, 237, 229, 0.55);
  font-variant-numeric: tabular-nums;
}

.row-title {
  font-family: var(--serif);
  font-size: clamp(24px, 3.6vw, 58px);
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.row-title > span { white-space: nowrap; }

.row-title > span + span { margin-left: 0.18em; }

.work-row:hover .row-title { transform: scale(1.02); }

/* inline thumbnail — slides open between the two title words */
.row-img {
  display: block;
  width: 0;
  height: clamp(28px, 3.2vw, 52px);
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-row:hover .row-img {
  width: clamp(28px, 3.2vw, 52px);
}

.row-img .ph {
  width: clamp(28px, 3.2vw, 52px);
  height: clamp(28px, 3.2vw, 52px);
  aspect-ratio: 1;
  background: #1a1a18;
}

.row-tag {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(240, 237, 229, 0.55);
  text-align: right;
  white-space: nowrap;
}

.work-row:hover .row-tag {
  color: rgba(240, 237, 229, 0.85);
}

/* shared .ph for about section portrait */
.ph {
  display: block;
  background: #181816;
}

/* ─── About ─── */
.about-section {
  border-top: 1px solid var(--line);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6.5vw, 100px);
  align-items: center;
}

.about-carousel {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #181816;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(240, 237, 229, 0.25);
  transition: background 0.3s;
}

.carousel-dot.active {
  background: rgba(240, 237, 229, 0.8);
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: none;
  border: none;
  padding: 20px 14px;
  color: var(--fg);
  opacity: 0;
  transition: opacity 0.3s;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.about-carousel:hover .carousel-prev,
.about-carousel:hover .carousel-next {
  opacity: 0.45;
}

.carousel-prev:hover,
.carousel-next:hover {
  opacity: 1;
}

@media (hover: none) {
  .carousel-prev,
  .carousel-next {
    opacity: 0.45;
  }
}

.img-cap {
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-heading {
  font-family: var(--serif);
  font-size: clamp(58px, 8.5vw, 122px);
  font-weight: 300;
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin-bottom: clamp(32px, 4.5vh, 58px);
}

.about-heading em { font-style: italic; }

.about-body {
  font-size: 16px;
  line-height: 1.72;
  color: rgba(240, 237, 229, 0.6);
  max-width: 500px;
  margin-bottom: 32px;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(240, 237, 229, 0.22);
  padding-bottom: 4px;
  transition: border-color 0.2s, gap 0.25s;
}

.cta-link:hover {
  border-color: var(--fg);
  gap: 16px;
}

/* ─── Stats ─── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: clamp(32px, 4.5vw, 60px) var(--pad);
  border-right: 1px solid var(--line);
}

.stat:last-child { border-right: none; }

.stat-num {
  font-family: var(--serif);
  font-size: clamp(52px, 5.5vw, 86px);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-lbl {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Practice ─── */
.practice-section {
  border-top: 1px solid var(--line);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 48px);
}

.roman {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  color: var(--clay);
  margin-bottom: 16px;
}

.practice-item h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 12px;
}

.practice-item p {
  font-size: 14px;
  line-height: 1.68;
  color: rgba(240, 237, 229, 0.48);
}

/* ─── Contact ─── */
.contact-section {
  border-top: 1px solid var(--line);
}

.contact-heading {
  font-family: var(--serif);
  font-size: clamp(72px, 12vw, 172px);
  font-weight: 300;
  line-height: 0.94;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  margin-bottom: clamp(48px, 7vh, 92px);
}

.contact-heading em { font-style: italic; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.email-link {
  font-family: var(--serif);
  font-size: clamp(24px, 3.2vw, 48px);
  font-weight: 300;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  transition: color 0.2s;
}

.email-link:hover { color: var(--clay); }

.social-link {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.social-link:hover { color: var(--fg); }

/* ─── Footer ─── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 28px var(--pad);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.footer-l {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-l strong {
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-l span { color: var(--muted); }

.footer-r {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
}

.footer-r a {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(240, 237, 229, 0.18);
  padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.footer-r a:hover {
  border-color: var(--fg);
  color: var(--fg);
}

/* ─── Responsive: tablet ─── */
@media (max-width: 1080px) {
  .practice-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2) {
    border-right: none;
  }

  .stat:nth-child(3) {
    border-right: 1px solid var(--line);
    border-top: 1px solid var(--line);
  }

  .stat:nth-child(4) {
    border-right: none;
    border-top: 1px solid var(--line);
  }
}

/* ─── Responsive: mobile ─── */
@media (max-width: 720px) {
  .nav-menu { gap: 20px; }

  .work-row {
    grid-template-columns: 1fr auto;
    gap: 0 12px;
  }

  .row-n { display: none; }

  .work-row:hover .row-title { transform: none; }

  .row-tag {
    opacity: 1;
    transform: none;
    font-size: 10px;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-col-img { order: -1; }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .practice-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

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

@media (max-width: 420px) {
  .nav-menu { gap: 14px; }

  .nav-menu a { font-size: 11px; }
}
