/* ===== Google Fonts — Thin Serif ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,700&family=Inter:wght@200;300;400&display=swap');

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

:root {
  --bg:        #0a0a0a;
  --white:     #ffffff;
  --grey-1:    rgba(255,255,255,0.7);
  --grey-2:    rgba(255,255,255,0.35);
  --grey-3:    rgba(255,255,255,0.12);
  --border:    rgba(255,255,255,0.14);
  --serif:     'Playfair Display', Georgia, serif;
  --sans:      'Inter', 'Helvetica Neue', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;
  cursor: none;
}

/* ===== Custom Cursor ===== */
.cursor {
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, opacity 0.2s ease;
}

.cursor-trail {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: all 0.18s ease;
}

/* ===== Canvas ===== */
#canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
#canvas.dragging { cursor: grabbing; }

/* ===== Drag Hint ===== */
#drag-hint {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
#drag-hint.visible { opacity: 1; }
#drag-hint.hidden  { opacity: 0; }

.drag-hint-icon {
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dragPulse 2.4s ease infinite;
}
.drag-hint-icon svg { width: 18px; height: 18px; }

@keyframes dragPulse {
  0%, 100% { transform: scale(1);    border-color: rgba(255,255,255,0.2); }
  50%       { transform: scale(1.1); border-color: rgba(255,255,255,0.45); }
}

.drag-hint-text {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 200;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--grey-2);
}

/* ===== Zoom indicator ===== */
#zoom-hint {
  position: fixed;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#zoom-hint.visible { opacity: 1; }

.zoom-bar-bg {
  width: 1px;
  height: 70px;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
.zoom-bar-fill {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  transition: height 0.2s ease;
}
.zoom-label {
  font-size: 0.5rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--grey-2);
  writing-mode: vertical-rl;
}

/* ===== Loading ===== */
#loading {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loading.hidden { opacity: 0; visibility: hidden; }

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

.loading-ring {
  width: 48px; height: 48px;
  border: 1px solid rgba(255,255,255,0.1);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-inner p {
  color: var(--grey-2);
  font-size: 0.7rem;
  font-weight: 200;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

/* ===== Navigation ===== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 56px;
  mix-blend-mode: difference;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--white);
}

.nav-links {
  display: flex;
  gap: 48px;
  list-style: none;
}

.nav-links a {
  color: var(--grey-1);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--white); }

/* ===== Sections ===== */
section {
  position: relative;
  z-index: 10;
  min-height: 100vh;
}

.section-label {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--grey-2);
  margin-bottom: 28px;
}

/* ===== Hero ===== */
#hero {
  display: flex;
  align-items: center;
  padding: 0 10vw;
  min-height: 100vh;
}

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

.hero-greeting {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 200;
  color: var(--grey-2);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s 0.5s ease forwards;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.9s 0.7s ease forwards;
}

.hero-title {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 200;
  color: var(--grey-2);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s 0.9s ease forwards;
}

.hero-cta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.8s 1.1s ease forwards;
}

.btn-primary {
  padding: 13px 36px;
  background: var(--white);
  color: var(--bg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.btn-primary:hover { opacity: 0.82; transform: translateY(-2px); }

.btn-secondary {
  padding: 13px 36px;
  border: 1px solid var(--border);
  color: var(--grey-1);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.5); color: var(--white); transform: translateY(-2px); }

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeIn 1s 1.6s ease forwards;
}
.scroll-hint span {
  font-size: 0.55rem;
  font-weight: 200;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--grey-2);
}
.scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5), transparent);
  animation: scrollPulse 2.2s ease infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.9; }
  50%       { transform: scaleY(0.5); opacity: 0.3; }
}

/* ===== About ===== */
#about {
  display: flex;
  align-items: center;
  padding: 140px 10vw;
}

.about-inner {
  max-width: 520px;
  margin-left: auto;
}

.about-text h2 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 32px;
}

.about-text h2 em {
  font-style: italic;
  color: var(--grey-1);
}

.about-text p {
  color: var(--grey-1);
  line-height: 1.9;
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 56px;
}

.about-profile-p {
  color: var(--grey-1);
  line-height: 1.9;
  font-size: 0.82rem;
  font-weight: 300;
  margin-bottom: 20px;
}
.about-profile-p:last-child { margin-bottom: 48px; }

.about-stats { display: flex; gap: 48px; }

.stat { display: flex; flex-direction: column; gap: 6px; }

.stat-num {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--white);
}

.stat-label {
  font-size: 0.6rem;
  font-weight: 200;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--grey-2);
}

/* ===== Works ===== */
#works { padding: 140px 10vw; }

.works-inner h2 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 72px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
}

.work-card {
  background: var(--bg);
  border: none;
  border-right: 1px solid var(--border);
  transition: background 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
}
.work-card:last-child { border-right: none; }
.work-card.visible { opacity: 1; transform: translateY(0); }
.work-card:hover { background: rgba(255,255,255,0.03); }

.work-card-inner { padding: 40px 36px; }

.work-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--grey-2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 24px;
}

.work-card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 14px;
}

.work-card p {
  color: var(--grey-1);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 28px;
}

.work-link {
  font-size: 0.65rem;
  font-weight: 200;
  letter-spacing: 0.3em;
  color: var(--grey-2);
  text-transform: uppercase;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}
.work-card:hover .work-link { color: var(--white); letter-spacing: 0.4em; }

/* ===== Contact ===== */
#contact {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 10vw;
  text-align: center;
  border-top: 1px solid var(--border);
}

.contact-inner h2 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 28px;
}

.contact-inner h2 em {
  font-style: italic;
  color: var(--grey-1);
}

.contact-desc {
  color: var(--grey-1);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.9;
  margin-bottom: 64px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.contact-links { display: flex; gap: 0; justify-content: center; border: 1px solid var(--border); }

.contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--grey-2);
  padding: 32px 48px;
  border-right: 1px solid var(--border);
  transition: color 0.3s ease, background 0.3s ease;
}
.contact-link:last-child { border-right: none; }
.contact-link:hover { color: var(--white); background: rgba(255,255,255,0.03); }

.contact-icon { font-size: 1.2rem; }

.contact-link span:last-child {
  font-size: 0.6rem;
  font-weight: 200;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

/* ===== Animations ===== */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  #nav { padding: 20px 24px; }
  .nav-links { gap: 24px; }
  #hero, #about, #works, #contact { padding-left: 6vw; padding-right: 6vw; }
  .about-inner { margin: 0 auto; }
  .works-grid { grid-template-columns: 1fr; }
  .work-card { border-right: none; border-bottom: 1px solid var(--border); }
  .contact-links { flex-direction: column; }
  .contact-link { border-right: none; border-bottom: 1px solid var(--border); }
}
