/* ============================================
   Design System
   ============================================ */
:root {
  --bg: #0c0c0c;
  --bg-elevated: #141414;
  --text: #f4f4f4;
  --text-muted: #888;
  --accent: #ddd5c5;
  --border: rgba(244,244,244,0.08);

  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(244,244,244,0.15) transparent;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(244,244,244,0.15);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(244,244,244,0.35);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  touch-action: pan-y;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   Custom Cursor
   ============================================ */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background: var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.15s var(--ease-out-quart);
  will-change: transform;
}

.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(244,244,244,0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.35s var(--ease-out-expo), width 0.3s, height 0.3s;
  will-change: transform;
}

.cursor.hover {
  transform: scale(0.5);
}

.cursor-trail.hover {
  width: 64px;
  height: 64px;
  border-color: rgba(244,244,244,0.6);
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 3vw;
  z-index: 100;
  mix-blend-mode: difference;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

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

.main-nav a {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease-out-expo);
}

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

.lang-switch {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out-quart);
}

.lang-switch:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 3vw;
  overflow: hidden;
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(6rem, 25vw, 28rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244,244,244,0.06);
  text-stroke: 1px rgba(244,244,244,0.06);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  max-width: 100vw;
  overflow: hidden;
}

.hero-bg-text-outline {
  position: absolute;
  top: 58%;
  left: 52%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(5rem, 20vw, 22rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244,244,244,0.04);
  text-stroke: 1px rgba(244,244,244,0.04);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  max-width: 100vw;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 75vw;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 11rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin-bottom: 2.5rem;
}

.hero-title .line {
  display: block;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-desc {
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 1.2vw, 1.125rem);
  font-weight: 300;
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.9;
}

.hero-sidebar {
  position: absolute;
  right: 3vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.vertical-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-meta {
  position: absolute;
  bottom: 3rem;
  left: 3vw;
  display: flex;
  gap: 4rem;
  z-index: 1;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meta-value {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* ============================================
   Section Header
   ============================================ */
.section-header {
  padding: 12vh 3vw 8vh;
}

.section-number {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

/* ============================================
   Projects
   ============================================ */
.works {
  position: relative;
  overflow: hidden;
}

.projects-list {
  display: flex;
  flex-direction: column;
}

.project {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4vw;
  align-items: center;
  padding: 10vh 3vw;
  overflow: hidden;
}

.project-number-bg {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(12rem, 30vw, 28rem);
  font-weight: 700;
  line-height: 0.75;
  color: var(--text);
  opacity: 0.025;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100vw;
  overflow: hidden;
}

.project-visual {
  position: relative;
  z-index: 1;
}

.project-image-wrap {
  position: relative;
  background: var(--bg-elevated);
  min-height: 200px;
}

.project-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.8s;
  filter: grayscale(30%) contrast(1.05);
}

.project:hover .project-image-wrap img {
  filter: grayscale(0%) contrast(1);
}

.project-info {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.project-tags {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.project-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  transition: transform 0.5s var(--ease-out-expo);
}

.project:hover .project-name {
  transform: translateX(8px);
}

.project-desc {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 2rem;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.project-year {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.project-link {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.3s;
}

.project-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease-out-expo);
}

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

/* Alternating layouts */
.project-left .project-number-bg {
  left: 20%;
  transform: translate(-50%, -50%);
}

.project-right .project-number-bg {
  left: 80%;
  transform: translate(-50%, -50%);
}

/* ============================================
   About
   ============================================ */
.about {
  padding: 12vh 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6vw;
  align-items: start;
  padding: 0 3vw;
}

.about-visual {
  position: sticky;
  top: 15vh;
  min-height: 360px;
}

.about-visual img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(1.1);
  transition: filter 1s;
}

.about-visual img:hover {
  filter: grayscale(0%) contrast(1);
}

.about-content {
  padding-top: 4vh;
}

.about-text {
  margin: 3rem 0 4rem;
}

.about-text p {
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 1.5rem;
  max-width: 520px;
}

.about-text .about-motto {
  margin-top: 2rem;
  font-style: italic;
  color: var(--text);
  border-left: 1px solid var(--border);
  padding-left: 1.5rem;
}

.about-stats {
  display: flex;
  gap: 4rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  padding: 16vh 3vw 4vh;
  border-top: 1px solid var(--border);
}

.footer-cta {
  margin-bottom: 12vh;
}

.footer-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.footer-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.footer-title a {
  display: inline-block;
  position: relative;
  transition: color 0.4s;
}

.footer-title a::after {
  content: '';
  position: absolute;
  bottom: 0.05em;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease-out-expo);
}

.footer-title a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

.footer-links a {
  transition: color 0.3s;
}

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

/* ============================================
   Reveal Animations
   ============================================ */
.reveal-line,
.reveal-fade {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

.reveal-line.is-visible {
  transition-delay: calc(var(--i, 0) * 0.08s);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  body { cursor: auto; }
  .cursor, .cursor-trail { display: none; }

  .site-header {
    padding: 1.5rem 5vw;
  }

  .hero {
    padding: 0 5vw;
    min-height: 100svh;
  }

  .hero-title {
    font-size: clamp(2.5rem, 12vw, 5rem);
    line-height: 1.15;
  }

  .hero-sidebar {
    display: none;
  }

  .hero-meta {
    left: 5vw;
    bottom: 2rem;
    gap: 2rem;
  }

  .project {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 8vh 5vw;
  }

  .project-right .project-info {
    order: 2;
  }

  .project-right .project-visual {
    order: 1;
  }

  .about-grid {
    grid-template-columns: 1fr;
    padding: 0 5vw;
  }

  .about-visual {
    position: relative;
    top: auto;
    max-width: 320px;
    min-height: 280px;
  }

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

  .site-footer {
    padding: 10vh 5vw 3vh;
  }

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

@media (max-width: 480px) {
  .main-nav {
    gap: 1.25rem;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .project-name {
    font-size: 2rem;
  }
}
