:root {
  --bg: #faf8f5;
  --ink: #1a1817;
  --muted: #8a8580;
  --line: #e6e1da;
  --accent: #b0553a;
  --serif: 'Playfair Display', 'Songti SC', serif;
  --sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.italic {
  font-style: italic;
}

/* ---------- Cursor ---------- */
.cursor-dot {
  display: none;
}

@media (pointer: fine) {
  .cursor-dot {
    display: block;
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease;
    opacity: 0;
  }
  .cursor-dot.is-visible {
    opacity: 1;
  }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.6rem 0;
  transition: background 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

.site-header.is-scrolled {
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-logo .dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.4rem;
}

.nav-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-inner {
  padding: 8rem 0 6rem;
}

.hero-kicker {
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.2rem;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin-bottom: 2.4rem;
}

.hero-title .italic {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.hero-sub {
  max-width: 34rem;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 3rem;
}

.hero-cta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.scroll-line {
  width: 1px;
  height: 56px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollDrop 2.2s ease-in-out infinite;
}

@keyframes scrollDrop {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

.scroll-text {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Sections ---------- */
.section {
  padding: 7rem 0;
}

.section-label {
  font-size: 0.82rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.2;
  margin-bottom: 2.5rem;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: center;
}

.portrait-placeholder {
  aspect-ratio: 4 / 5;
  background: linear-gradient(150deg, #3a3633, #1a1817);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.portrait-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(176, 85, 58, 0.28), transparent 60%);
}

.portrait-name {
  font-family: var(--serif);
  font-size: 4.5rem;
  font-style: italic;
  color: rgba(250, 248, 245, 0.85);
  z-index: 1;
}

.about-content .section-title {
  margin-bottom: 1.6rem;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1.2rem;
  max-width: 30rem;
}

.about-stats {
  list-style: none;
  display: flex;
  gap: 2.6rem;
  margin-top: 2.6rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
}

.about-stats strong {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.2rem;
  line-height: 1.2;
}

.about-stats span {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Works ---------- */
.works {
  background: #f3efe9;
}

.works-filter {
  display: flex;
  gap: 1.6rem;
}

.filter-btn {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  padding-bottom: 4px;
  position: relative;
  transition: color 0.3s ease;
}

.filter-btn::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.filter-btn:hover {
  color: var(--ink);
}

.filter-btn.is-active {
  color: var(--ink);
}

.filter-btn.is-active::after {
  width: 100%;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6rem;
}

.work-card {
  cursor: pointer;
}

.work-media {
  aspect-ratio: 3 / 4;
  margin-bottom: 1.2rem;
  overflow: hidden;
  position: relative;
}

.work-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover .work-visual {
  transform: scale(1.05);
}

.work-monogram {
  font-family: var(--serif);
  font-style: italic;
  font-size: 4.6rem;
  color: rgba(26, 24, 23, 0.75);
}

.work-media[data-tone="ink"] {
  background: linear-gradient(160deg, #d8d2c8, #a9a29a);
}
.work-media[data-tone="sand"] {
  background: linear-gradient(160deg, #e6d9c4, #cbb495);
}
.work-media[data-tone="sage"] {
  background: linear-gradient(160deg, #d4dcc9, #a8b89a);
}
.work-media[data-tone="clay"] {
  background: linear-gradient(160deg, #e0c2b0, #c2987e);
}
.work-media[data-tone="fog"] {
  background: linear-gradient(160deg, #c9d2d8, #96a6b0);
}
.work-media[data-tone="blush"] {
  background: linear-gradient(160deg, #e8cfc9, #cf9f94);
}

.work-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.work-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
}

.work-tag {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

/* filter animation */
.work-card.is-hidden {
  display: none;
}

.work-card.is-appearing {
  animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6rem;
  border-top: 1px solid var(--line);
}

.service-card {
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
  margin-top: -1px;
  transition: border-color 0.3s ease;
}

.service-card:hover {
  border-color: var(--accent);
}

.service-index {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--accent);
}

.service-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 1.2rem 0 0.9rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Contact ---------- */
.contact {
  background: #1a1817;
  color: var(--bg);
}

.contact .section-label {
  color: var(--accent);
}

.contact-inner {
  text-align: center;
  padding: 2rem 0;
}

.contact-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 1.4rem;
}

.contact-sub {
  color: rgba(250, 248, 245, 0.65);
  margin-bottom: 3rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.2rem;
}

.btn {
  display: inline-block;
  padding: 0.95rem 2.4rem;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-solid {
  background: var(--accent);
  color: #fff;
}

.btn-solid:hover {
  background: #c96a4b;
}

.btn-ghost {
  border: 1px solid var(--ink);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

.contact-social {
  display: flex;
  gap: 2.2rem;
}

.social-link {
  color: rgba(250, 248, 245, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  position: relative;
  padding-bottom: 4px;
}

.social-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.social-link:hover {
  color: #fff;
}

.social-link:hover::after {
  width: 100%;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #1a1817;
  border-top: 1px solid rgba(250, 248, 245, 0.12);
  padding: 2.2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(250, 248, 245, 0.5);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.footer-motto {
  font-family: var(--serif);
  font-style: italic;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .portrait-placeholder {
    max-width: 24rem;
  }

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

  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 5rem 0;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-family: var(--serif);
    font-size: 1.6rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 110;
  }

  .nav-toggle.is-open span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.is-open span:last-child {
    transform: rotate(-45deg) translate(4px, -4px);
  }

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

  .works-filter {
    gap: 1rem;
  }

  .about-stats {
    gap: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-line::after {
    animation: none;
  }
  .work-card.is-appearing {
    animation: none;
  }
}
