/* ═══════════════════════════════════════════════════════
   ATON STUDIO — Stylesheet
   ═══════════════════════════════════════════════════════ */

/* ─── Custom Font ────────────────────────────────────── */
@font-face {
  font-family: 'Testue';
  src: url('Testue.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ─── Variables ──────────────────────────────────────── */
:root {
  --bg: #080808;
  --surface: #111111;
  --text: #e8e4de;
  --text-dim: #4a4540;
  --border: rgba(232, 228, 222, 0.07);
  --font-display: 'Testue', 'Instrument Serif', serif;
  --font-body: 'Manrope', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.45, 0, 0.55, 1);
}

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

html {
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar { display: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
}

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

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


/* ─── Grain Overlay ──────────────────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  animation: grainShift 0.8s steps(6) infinite;
}

@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, -3%); }
  40% { transform: translate(3%, -1%); }
  60% { transform: translate(-3%, 2%); }
  80% { transform: translate(1%, 3%); }
}

/* ─── Custom Cursor ──────────────────────────────────── */
.cursor {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  pointer-events: none;
  mix-blend-mode: difference;
}

@media (hover: hover) and (pointer: fine) {
  * { cursor: none !important; }
  .cursor { display: block; }
}

.cursor-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s var(--ease);
}

.cursor-circle {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: width 0.45s var(--ease), height 0.45s var(--ease),
              border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}

.cursor.is-hovering .cursor-circle {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.cursor.is-project .cursor-circle {
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ─── Preloader ──────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: flex-end;
  padding: 48px;
}

.preloader-content {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.preloader-counter {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  min-width: 26px;
  font-variant-numeric: tabular-nums;
}

.preloader-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  overflow: hidden;
}

.preloader-line-inner {
  width: 0%;
  height: 100%;
  background: var(--text-dim);
}

/* ─── Navigation ─────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  opacity: 0;
  transition: background 0.6s var(--ease-smooth),
              backdrop-filter 0.6s var(--ease-smooth);
}

.nav.is-scrolled {
  background: rgba(8, 8, 8, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 3px;
}

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

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

/* ─── Full-page Sections ─────────────────────────────── */
.hero,
.about,
.projects,
.contact {
  height: 100vh;
  height: 100dvh;
}

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 48px 80px;
}

.hero-content {
  text-align: center;
}

.hero-title-line {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.88;
  font-size: clamp(80px, 20vw, 320px);
  letter-spacing: -0.02em;
  overflow: hidden;
}

.hero-title-sub {
  font-family: var(--font-body);
  font-size: clamp(22px, 4.5vw, 72px);
  font-weight: 200;
  letter-spacing: 0.35em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 16px;
}

.hero-tagline {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 56px;
  opacity: 0;
}

.char {
  display: inline-block;
  overflow: hidden;
}

.char-inner {
  display: inline-block;
  transform: translateY(115%);
  will-change: transform;
}

/* ─── About ──────────────────────────────────────────── */
.about {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.about-text {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.8vw, 54px);
  line-height: 1.35;
  font-weight: 400;
}

.about-text .word {
  display: inline-block;
  opacity: 0.1;
  transition: opacity 0.3s ease;
  margin-right: 0.25em;
}

/* ─── Projects ───────────────────────────────────────── */
.projects {
  display: flex;
  flex-direction: column;
  padding: 80px 0 48px;
}

.projects-header {
  padding: 0 48px 40px;
}

.section-label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.projects-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.projects-track {
  display: flex;
  gap: 3vw;
  padding: 0 48px;
  overflow-x: auto;
  scrollbar-width: none;
}

.projects-track::-webkit-scrollbar { display: none; }

.project-card {
  width: 50vw;
  min-width: 360px;
  max-width: 700px;
  flex-shrink: 0;
  perspective: 1200px;
}

.project-link {
  display: block;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.1s linear;
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.project-image-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.9s var(--ease);
}

.project-card:hover .project-image-inner {
  transform: scale(1.05);
}

.project-image iframe {
  width: 1440px;
  height: 900px;
  transform: scale(var(--iframe-scale, 0.35));
  transform-origin: top left;
  border: none;
  pointer-events: none;
  display: block;
}

.project-info {
  padding: 24px 4px 0;
}

.project-number {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 44px);
  font-weight: 400;
  margin-top: 6px;
  line-height: 1.2;
}

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

.project-category,
.project-year {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.project-arrow {
  font-size: 14px;
  color: var(--text-dim);
  transition: transform 0.5s var(--ease), color 0.4s var(--ease);
}

.project-card:hover .project-arrow {
  transform: translateX(5px);
  color: var(--text);
}

/* ─── Contact ────────────────────────────────────────── */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 80px 48px;
}

.contact-label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 36px;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(26px, 5.5vw, 88px);
  line-height: 1.2;
  display: inline-block;
  position: relative;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.7s var(--ease);
}

.contact-email:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ─── Footer (inside contact) ────────────────────────── */
.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 48px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 20px 24px; }
  .nav-links { gap: 24px; }

  .hero { padding: 100px 24px 60px; }
  .hero-title-sub { letter-spacing: 0.18em; }
  .hero-tagline { margin-top: 36px; }

  .about { padding: 60px 24px; }

  .projects { padding: 60px 0 36px; }
  .projects-header { padding: 0 24px 30px; }
  .projects-track { padding: 0 24px; gap: 20px; }
  .project-card { width: 82vw; min-width: 280px; }

  .contact { padding: 60px 24px; }

  .footer {
    padding: 20px 24px;
    flex-direction: column;
    gap: 6px;
  }
}

/* ─── Reduced Motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .char-inner { transform: none !important; }
  .hero-tagline { opacity: 1 !important; }
  .about-text .word { opacity: 1 !important; }
  .grain { display: none; }
}
