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

:root {
  --bg: #faf9f7;
  --bg-light: #f3f1ed;
  --bg-card: #f0ede8;
  --text: #1a1a1a;
  --text-dim: #666;
  --text-muted: #aaa;
  --accent: #b8926a;
  --border: rgba(0,0,0,0.08);
  --white: #ffffff;
  --font-sans: 'DM Sans', -apple-system, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) transparent;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
img { max-width: 100%; display: block; }
button { cursor: none; }

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

/* ===== Loader ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
}

.loader-line {
  width: 60px;
  height: 1px;
  background: var(--text-muted);
  margin: 0 auto 1.5rem;
  position: relative;
  overflow: hidden;
}

.loader-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: loaderSlide 1s var(--ease) forwards;
}

@keyframes loaderSlide {
  to { left: 0; }
}

.loader-text {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ===== Custom Cursor ===== */
.cursor {
  width: 8px;
  height: 8px;
  background: var(--text);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s;
  transform: translate(-50%, -50%);
}

.cursor-follower {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease), height 0.4s var(--ease), border-color 0.3s, background 0.3s;
}

.cursor.hovering {
  width: 60px;
  height: 60px;
  background: var(--accent);
  opacity: 0.2;
}

.cursor-follower.hovering {
  width: 60px;
  height: 60px;
  border-color: var(--accent);
}

/* ===== Scroll Progress ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 200;
  width: 0%;
  transition: none;
}

/* ===== Noise Texture ===== */
.noise {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3.5rem;
  transition: padding 0.4s var(--ease), background 0.4s;
}

.nav.scrolled {
  padding: 1.2rem 3.5rem;
  background: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.logo-img { height: 26px; width: auto; opacity: 0.9; }
.logo-footer { height: 22px; width: auto; opacity: 0.5; }

.nav-logo { transition: opacity 0.3s; }
.nav-logo:hover { opacity: 0.6; }

.nav-links { display: flex; gap: 2.5rem; }

.nav-link {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
}

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

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

/* Mobile Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: all 0.3s var(--ease);
}

.nav-toggle span:first-child { top: 4px; }
.nav-toggle span:last-child { bottom: 4px; }

.nav-toggle.active span:first-child {
  top: 50%; transform: translateY(-50%) rotate(45deg);
}
.nav-toggle.active span:last-child {
  bottom: 50%; transform: translateY(50%) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.mobile-menu.active { opacity: 1; pointer-events: all; }

.mobile-menu-link {
  font-family: var(--font-serif);
  font-size: 3rem;
  transition: opacity 0.2s;
}

.mobile-menu-link:hover { opacity: 0.5; }

/* ===== Section Tag ===== */
.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 3.5rem 6rem;
  position: relative;
}

.hero-content { max-width: 900px; }

.line-mask { overflow: hidden; }

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-title-italic { font-style: italic; }

.hero-anim {
  transform: translateY(110%);
  animation: slideUp 1.1s var(--ease-out) forwards;
}

.anim-d1 { animation-delay: 0.1s; }
.anim-d2 { animation-delay: 0.3s; }
.anim-d3 { animation-delay: 0.4s; }

@keyframes slideUp {
  to { transform: translateY(0); }
}

.hero-subtitle {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text-dim);
  max-width: 550px;
  font-weight: 300;
  line-height: 1.8;
  margin-top: 2rem;
}

.hero-subtitle-small {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 480px;
  font-weight: 300;
  line-height: 1.8;
  margin-top: 1rem;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  right: 3.5rem;
  bottom: 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

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

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

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

.scroll-text {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}

/* ===== Projects ===== */
.projects {
  padding: 8rem 3.5rem;
}

.projects-header {
  margin-bottom: 5rem;
}

.projects-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
}

/* Project Row */
.project-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
  padding: 5rem 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  transition: opacity 0.4s;
}

.project-row:last-of-type {
  border-bottom: 1px solid var(--border);
}

.project-text-inner { max-width: 400px; }

.project-number {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 1rem;
}

.project-name {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.project-desc {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.project-cta {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
  transition: letter-spacing 0.3s var(--ease);
}

.project-row:hover .project-cta {
  letter-spacing: 0.12em;
}

/* Image reveal */
.project-image-col { overflow: hidden; border-radius: 8px; }

.project-img-clip {
  overflow: hidden;
  border-radius: 8px;
}

.project-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
  will-change: transform;
}

.project-row:hover .project-img {
  transform: scale(1.05);
}

/* ===== Reveal Animations ===== */
.reveal-text {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

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

.reveal-img {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease-out);
}

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

/* ===== Marquee ===== */
.marquee {
  overflow: hidden;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.marquee-inner {
  display: flex;
  gap: 3rem;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}

.marquee-inner span {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
}

.marquee-dot {
  color: var(--accent) !important;
  font-size: 0.8rem !important;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Page Hero (About/Contact) ===== */
.page-hero {
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  padding: 0 3.5rem 4rem;
}

.page-hero-content { max-width: 800px; }

.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.25;
}

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

/* ===== About ===== */
.about-photo-band {
  height: 50vh;
  overflow: hidden;
}

.about-photo-band-inner {
  width: 100%;
  height: 120%;
  background: linear-gradient(135deg, #d4cfc7 0%, #b8b0a5 50%, #a09889 100%);
  transform: translateY(-10%);
}

.about-content {
  padding: 6rem 3.5rem;
}

.about-two-col {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.about-large-text {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.about-body-text {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--text-dim);
}

/* Experience */
.exp-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.exp-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.exp-company {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.exp-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.exp-role {
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

/* Capabilities */
.capabilities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cap-item {
  padding: 0.6rem 1.4rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: all 0.3s var(--ease);
}

.cap-item:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg-light);
}

/* ===== Contact ===== */
.contact-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 3.5rem;
}

.contact-wrapper {
  width: 100%;
  max-width: 600px;
}

.contact-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.contact-subtitle {
  font-size: 1rem;
  color: var(--text-dim);
  font-weight: 300;
  margin-bottom: 4rem;
}

.contact-email-btn {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--border);
  transition: all 0.3s var(--ease);
  margin-bottom: 4rem;
}

.contact-email-btn:hover {
  border-bottom-color: var(--text);
}

.contact-links {
  display: flex;
  gap: 0.75rem;
}

.social-pill {
  padding: 0.6rem 1.4rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: all 0.3s var(--ease);
}

.social-pill:hover {
  border-color: var(--text);
  color: var(--white);
  background: var(--text);
}

/* ===== Project Detail ===== */
.project-detail {
  max-width: 950px;
  margin: 0 auto;
  padding: 10rem 3.5rem 6rem;
}

.back-link {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3rem;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent); }

.project-header { margin-bottom: 3.5rem; }

.project-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.project-detail-tagline {
  font-size: 1.05rem;
  color: var(--text-dim);
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.meta-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.meta-value { font-size: 0.9rem; }

.project-hero-image {
  margin-bottom: 4rem;
  border-radius: 8px;
  overflow: hidden;
}

.project-hero-image img { border-radius: 8px; }

.project-image-grid {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.project-image-grid img {
  width: 100%;
  border-radius: 8px;
}

.project-section-detail { margin-bottom: 3.5rem; }

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.project-body {
  font-size: 0.95rem;
  line-height: 1.9;
  font-weight: 300;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.goals-grid, .deliverables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.goal-item, .deliverable {
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.05);
}

.goal-item h3, .deliverable h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.goal-item p, .deliverable p {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.7;
}

/* Project Nav */
.project-nav {
  display: flex;
  justify-content: space-between;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  gap: 1.5rem;
}

.project-nav-link { transition: opacity 0.2s; }
.project-nav-link:hover { opacity: 0.6; }
.project-nav-link.next { text-align: right; margin-left: auto; }

.nav-direction {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.nav-project-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

/* ===== Footer ===== */
.footer {
  padding: 6rem 3.5rem 3rem;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.footer-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  max-width: 400px;
}

.footer-cta {
  display: inline-block;
  padding: 1.2rem 3rem;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.4s var(--ease);
  flex-shrink: 0;
}

.footer-cta:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

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

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .project-row {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0;
  }

  .about-two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 3rem 0;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  body { cursor: auto; }
  a, button { cursor: auto; }
  .cursor, .cursor-follower { display: none; }
  .form-input { cursor: auto; }

  .nav { padding: 1.25rem 1.5rem; }
  .nav.scrolled { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu { display: flex; }

  .hero { padding: 0 1.5rem 4rem; }
  .hero-scroll { right: 1.5rem; bottom: 4rem; }

  .projects { padding: 4rem 1.5rem; }

  .page-hero { padding: 0 1.5rem 3rem; min-height: 50vh; }

  .about-content { padding: 3rem 1.5rem; }

  .contact-page { padding: 8rem 1.5rem 4rem; }

  .project-detail { padding: 7rem 1.5rem 4rem; }

  .footer { padding: 4rem 1.5rem 2rem; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .project-meta { gap: 1.5rem; }

  .project-nav { flex-direction: column; }
  .project-nav-link.next { text-align: left; }

  .contact-social { flex-wrap: wrap; }

  .exp-top { flex-direction: column; gap: 0.2rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.8rem; }
  .mobile-menu-link { font-size: 2rem; }
}
