:root {
  --bg: #f4f3ef;
  --bg-alt: #eceae4;
  --ink: #111111;
  --muted: #6c6b66;
  --line: rgba(17, 17, 17, 0.12);
  --dark: #111111;
  --dark-line: rgba(255, 255, 255, 0.14);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
}
body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

.container { width: min(1160px, 90%); margin: 0 auto; }
.section { padding: 130px 0; position: relative; }
.alt { background: var(--bg-alt); }
.dark { background: var(--dark); color: #f4f3ef; }
.muted { color: var(--muted); }
.dark .muted { color: #a5a49e; }

h1, h2, h3 { font-weight: 500; line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 28px; }
h2, .hero-title { font-family: var(--sans); }

.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.dark .eyebrow { color: #a5a49e; }

/* Reveal */
[data-reveal] {
  opacity: 0; transform: translateY(36px);
  transition: opacity 0.9s var(--ease) var(--d, 0s), transform 0.9s var(--ease) var(--d, 0s);
}
[data-reveal].in { opacity: 1; transform: none; }

/* Preloader */
.preloader {
  position: fixed; inset: 0; z-index: 200; background: var(--dark); color: #f4f3ef;
  display: flex; align-items: flex-end; padding: 6vw;
  transition: transform 1s var(--ease);
}
.preloader.done { transform: translateY(-100%); }
.pre-inner { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; }
.pre-name { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); }
.pre-count { font-size: clamp(4rem, 14vw, 10rem); font-weight: 300; line-height: 0.9; letter-spacing: -0.04em; }

/* Progress + cursor */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--ink); z-index: 150; }
.cursor {
  position: fixed; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference; pointer-events: none; z-index: 180;
  transform: translate(-50%, -50%); transition: width 0.3s var(--ease), height 0.3s var(--ease); opacity: 0;
}
.cursor.grow { width: 56px; height: 56px; }
@media (hover: none) { .cursor { display: none; } }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 5%; transition: background 0.4s, padding 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.header.scrolled { background: rgba(244, 243, 239, 0.85); backdrop-filter: blur(14px); padding: 14px 5%; border-color: var(--line); }
.logo { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { font-size: 0.92rem; position: relative; }
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease);
}
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { padding: 10px 22px; border: 1px solid var(--ink); border-radius: 999px; transition: background 0.3s, color 0.3s; }
.nav-cta:hover { background: var(--ink); color: var(--bg); }

.menu-btn { display: none; background: none; border: 0; width: 36px; height: 28px; position: relative; cursor: pointer; z-index: 120; }
.menu-btn span { position: absolute; left: 4px; right: 4px; height: 2px; background: var(--ink); transition: 0.35s var(--ease); }
.menu-btn span:first-child { top: 9px; }
.menu-btn span:last-child { top: 17px; }
.menu-btn.open span:first-child { top: 13px; transform: rotate(45deg); }
.menu-btn.open span:last-child { top: 13px; transform: rotate(-45deg); }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 150px 0 90px; position: relative; overflow: hidden; }
.hero-inner { position: relative; }
.status {
  display: inline-flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--muted);
  border: 1px solid var(--line); padding: 8px 18px; border-radius: 999px; margin-bottom: 38px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: blink 1.8s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

.hero-title { font-size: clamp(2.7rem, 8.2vw, 7rem); font-weight: 500; letter-spacing: -0.045em; line-height: 1.02; }
.hero-title em { font-size: 1.08em; letter-spacing: -0.02em; }
.line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.line > span { display: block; transform: translateY(110%); transition: transform 1.2s var(--ease); }
body.ready .line > span { transform: none; }
body.ready .line:nth-child(2) > span { transition-delay: 0.1s; }
body.ready .line:nth-child(3) > span { transition-delay: 0.2s; }
body.ready .line:nth-child(4) > span { transition-delay: 0.3s; }

.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero-sub { max-width: 440px; color: var(--muted); font-size: 1.1rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.badge { position: absolute; right: 0; top: -10px; width: 150px; height: 150px; animation: spin 22s linear infinite; }
.badge text { font-size: 15.5px; letter-spacing: 3px; fill: var(--ink); text-transform: uppercase; }
.badge circle { fill: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-hint { position: absolute; left: 0; bottom: -50px; width: 24px; height: 40px; border: 1px solid var(--ink); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Buttons */
.btn {
  display: inline-block; padding: 15px 34px; border-radius: 999px; font-weight: 500; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent; transition: background 0.35s, color 0.35s, border-color 0.35s, transform 0.25s;
}
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: #333; }
.btn-line { border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--bg); }
.btn-light { background: #f4f3ef; color: var(--ink); }
.btn-light:hover { background: #fff; }

/* Marquee */
.marquee { background: var(--ink); color: #f4f3ef; overflow: hidden; padding: 22px 0; }
.marquee-track { display: flex; width: max-content; animation: slide 32s linear infinite; }
.marquee-track span { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2.2rem); padding: 0 28px; display: flex; align-items: center; gap: 56px; white-space: nowrap; }
.marquee-track span::after { content: "✦"; font-style: normal; font-size: 0.8em; opacity: 0.6; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* About */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 90px; align-items: center; }
.about-visual { position: relative; }
.portrait {
  aspect-ratio: 4/5; border-radius: 6px; background: linear-gradient(160deg, #2a2a2a, #0e0e0e);
  display: grid; place-items: center; overflow: hidden; position: relative; will-change: transform;
}
.portrait::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,0.04) 18px 19px); }
.portrait span { font-family: var(--serif); font-style: italic; font-size: 8rem; color: #f4f3ef; position: relative; }
.tag-float {
  position: absolute; right: -28px; bottom: 40px; background: var(--bg); border: 1px solid var(--line);
  padding: 16px 22px; font-size: 0.85rem; line-height: 1.5; border-radius: 4px; animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-12px); } }
.about-body p { color: var(--muted); font-size: 1.08rem; margin-bottom: 20px; }
.link-arrow { display: inline-flex; gap: 10px; align-items: center; margin-top: 12px; font-weight: 500; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.link-arrow span { transition: transform 0.35s var(--ease); }
.link-arrow:hover span { transform: translateX(6px); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 110px; border-top: 1px solid var(--line); padding-top: 50px; }
.stats strong { font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 300; letter-spacing: -0.04em; display: block; line-height: 1; }
.stats p { color: var(--muted); font-size: 0.92rem; margin-top: 10px; }

/* Services */
.services { margin-top: 60px; border-top: 1px solid var(--dark-line); }
.services li {
  display: grid; grid-template-columns: 80px 1fr 40px; gap: 20px; align-items: center;
  padding: 44px 0; border-bottom: 1px solid var(--dark-line); cursor: default;
  transition: padding 0.5s var(--ease), background 0.4s;
}
.services li:hover { padding-left: 24px; padding-right: 24px; background: rgba(255,255,255,0.04); }
.num { color: #8a8984; font-size: 0.9rem; }
.svc-main h3 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); margin-bottom: 10px; }
.svc-main p { color: #a5a49e; max-width: 620px; }
.arrow { font-size: 1.8rem; transition: transform 0.4s var(--ease); }
.services li:hover .arrow { transform: translate(6px, -6px); }

/* Work */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-bottom: 20px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filters button { background: none; border: 1px solid var(--line); padding: 9px 20px; border-radius: 999px; cursor: pointer; font-size: 0.88rem; transition: 0.3s; }
.filters button:hover { border-color: var(--ink); }
.filters button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 50px 36px; margin-top: 30px; }
.project { display: block; transition: opacity 0.5s, transform 0.5s var(--ease); }
.project.hide { display: none; }
.project.tilt { transform-style: preserve-3d; }
.thumb { aspect-ratio: 4/3; border-radius: 6px; position: relative; overflow: hidden; display: grid; place-items: center; }
.thumb::before { content: ""; position: absolute; inset: 0; transition: transform 1s var(--ease); background: inherit; }
.project:hover .thumb::before { transform: scale(1.08); }
.thumb span { position: relative; font-family: var(--serif); font-style: italic; font-size: 5.5rem; color: rgba(255,255,255,0.9); mix-blend-mode: difference; }
.t1 { background: linear-gradient(135deg, #1b1b1b, #3b3b3b); }
.t2 { background: linear-gradient(135deg, #bdbab0, #8f8c82); }
.t3 { background: linear-gradient(135deg, #2b2b2b, #0d0d0d); }
.t4 { background: linear-gradient(135deg, #d5d2c8, #aaa79c); }
.t5 { background: linear-gradient(135deg, #4a4a48, #232322); }
.t6 { background: linear-gradient(135deg, #a8a59b, #77746b); }
.meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); position: relative; }
.meta::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease); }
.project:hover .meta::after { transform: scaleX(1); }
.meta h3 { font-size: 1.35rem; }
.meta p { color: var(--muted); font-size: 0.88rem; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chips span { border: 1px solid var(--line); padding: 8px 18px; border-radius: 999px; font-size: 0.88rem; transition: 0.3s; }
.chips span:hover { background: var(--ink); color: var(--bg); transform: translateY(-3px); }
.bar { margin-bottom: 30px; }
.bar-top { display: flex; justify-content: space-between; font-size: 0.95rem; margin-bottom: 10px; }
.bar-top b { font-weight: 500; }
.track { height: 2px; background: var(--line); position: relative; }
.track i { position: absolute; left: 0; top: -1px; height: 4px; width: 0; background: var(--ink); transition: width 1.6s var(--ease); }

/* Timeline */
.timeline { margin-top: 56px; border-top: 1px solid var(--line); }
.t-item { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 44px 0; border-bottom: 1px solid var(--line); transition: padding 0.5s var(--ease); }
.t-item:hover { padding-left: 20px; }
.t-year { color: var(--muted); font-size: 0.95rem; }
.t-item h3 { font-size: 1.6rem; margin-bottom: 10px; }
.t-item p { color: var(--muted); max-width: 640px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 60px; border-top: 1px solid var(--dark-line); }
.step { padding: 38px 28px 20px 0; border-right: 1px solid var(--dark-line); padding-left: 28px; transition: background 0.4s; }
.step:first-child { padding-left: 0; }
.step:last-child { border-right: 0; }
.step:hover { background: rgba(255,255,255,0.04); }
.step span { font-family: var(--serif); font-style: italic; font-size: 3.4rem; color: #8a8984; display: block; margin-bottom: 20px; line-height: 1; }
.step h3 { font-size: 1.5rem; margin-bottom: 12px; }
.step p { color: #a5a49e; font-size: 0.96rem; }

/* Reviews */
.slider { max-width: 880px; margin-top: 50px; position: relative; min-height: 340px; }
.slide { display: none; }
.slide.active { display: block; animation: fadeUp 0.8s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } }
.slide p { font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.3; letter-spacing: -0.01em; }
.slide cite { display: block; margin-top: 30px; font-style: normal; font-weight: 500; }
.slide cite small { display: block; font-weight: 400; color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.slider-controls { display: flex; align-items: center; gap: 22px; margin-top: 40px; }
.slider-controls button { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--ink); background: none; cursor: pointer; font-size: 1.1rem; transition: 0.3s; }
.slider-controls button:hover { background: var(--ink); color: var(--bg); }
.dots { display: flex; gap: 8px; }
.dots span { width: 8px; height: 8px; border-radius: 8px; background: var(--line); cursor: pointer; transition: 0.4s var(--ease); }
.dots span.active { background: var(--ink); width: 30px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 90px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q { width: 100%; background: none; border: 0; text-align: left; padding: 28px 0; font-size: 1.15rem; font-weight: 500; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.faq-q i { width: 14px; height: 14px; position: relative; flex-shrink: 0; }
.faq-q i::before, .faq-q i::after { content: ""; position: absolute; background: var(--ink); transition: transform 0.4s var(--ease); }
.faq-q i::before { left: 0; right: 0; top: 6px; height: 2px; }
.faq-q i::after { top: 0; bottom: 0; left: 6px; width: 2px; }
.faq-item.open .faq-q i::after { transform: scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.6s var(--ease); }
.faq-a p { color: var(--muted); padding-bottom: 28px; max-width: 560px; }

/* CTA */
.cta { padding: 150px 0; text-align: center; overflow: hidden; }
.cta .eyebrow { justify-content: center; }
.cta-title { font-size: clamp(2.6rem, 8vw, 6.5rem); letter-spacing: -0.045em; line-height: 1.02; margin-bottom: 50px; font-weight: 500; }
.cta-title em { font-size: 1.05em; color: #b9b8b1; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; }
.contact-list { margin-top: 40px; }
.contact-list li { display: flex; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); gap: 20px; }
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-list span { color: var(--muted); }
.contact-list a { border-bottom: 1px solid var(--ink); }
.form { display: grid; gap: 26px; }
.form label span { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; }
.form input, .form textarea {
  width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 12px 0; font: inherit; color: var(--ink); outline: none; resize: vertical; transition: border-color 0.3s;
}
.form input:focus, .form textarea:focus { border-color: var(--ink); }
.form .btn { justify-self: start; }
.form-note { font-size: 0.9rem; color: var(--muted); min-height: 1.4em; }

/* Footer */
.footer { background: var(--dark); color: #f4f3ef; padding: 60px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 28px; }
.footer p { color: #a5a49e; font-size: 0.9rem; }
.footer strong { font-size: 1.15rem; font-weight: 500; }
.footer nav { display: flex; gap: 26px; font-size: 0.92rem; }
.footer nav a { color: #cfcec8; transition: color 0.3s; }
.footer nav a:hover { color: #fff; }

.to-top {
  position: fixed; right: 28px; bottom: 28px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: var(--bg); border: 0; font-size: 1.1rem; cursor: pointer; z-index: 90;
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: 0.4s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* Responsive */
@media (max-width: 960px) {
  .about-grid, .skills-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { border-bottom: 1px solid var(--dark-line); padding-left: 0 !important; }
  .step:nth-child(2) { border-right: 0; }
  .t-item { grid-template-columns: 1fr; gap: 10px; }
  .badge { display: none; }
  .tag-float { right: 10px; }
}
@media (max-width: 760px) {
  .section { padding: 90px 0; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 0; background: var(--bg); flex-direction: column; justify-content: center;
    gap: 28px; transform: translateY(-100%); transition: transform 0.7s var(--ease); z-index: 110;
  }
  .nav.open { transform: none; }
  .nav a { font-size: 1.7rem; }
  .projects { grid-template-columns: 1fr; }
  .services li { grid-template-columns: 40px 1fr 24px; padding: 32px 0; }
  .services li:hover { padding-left: 0; padding-right: 0; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; }
  .scroll-hint { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .line > span { transform: none; }
}
