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

:root {
  --black: #0a0a0a;
  --white: #e8e8e8;
  --gray: #555;
  --dim: #2a2a2a;
  --accent: #fff;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--gray) var(--black);
}

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--white);
  color: var(--black);
}

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

button {
  cursor: none;
}

a *,
button * {
  cursor: none;
}

/* ── Canvas ──────────────────────────────────────────── */
#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Custom Cursor ───────────────────────────────────── */
.cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
  mix-blend-mode: difference;
}

.cursor.hover {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
}

.cursor.media-hover {
  width: 68px;
  height: 68px;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.92);
}

/* ── Nav ─────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
  z-index: 100;
  mix-blend-mode: difference;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}

.nav-logo img {
  display: block;
  width: 76px;
  height: auto;
}

.nav-logo-text {
  font-size: 0.92rem;
  letter-spacing: 0.16em;
}

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

.nav-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 1;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.lang-switcher__btn {
  min-width: 42px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gray);
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, opacity 0.25s;
}

.lang-switcher__btn:hover {
  color: var(--white);
}

.lang-switcher__btn.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* ── Sections ────────────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
}

.section {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 48px;
  position: relative;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}

.section-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gray);
  margin-bottom: 48px;
}

/* ── Hero ─────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  min-height: 100svh;
  justify-content: center;
}

#hero .label {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 24px;
}

#hero h1 {
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

#hero .hero-intro {
  max-width: 40rem;
  margin-top: 28px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(232, 232, 232, 0.82);
}

#hero .subtitle {
  margin-top: 22px;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--gray);
}

.scroll-hint {
  position: absolute;
  bottom: 48px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.scroll-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}

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

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

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

/* ── Projects ────────────────────────────────────────── */
.projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 120px 32px;
  align-items: start;
  padding-top: 48px;
}

.project {
  position: relative;
  display: block;
  overflow: visible;
  --project-chaos-y: 0px;
  --project-rotation: 0deg;
  transform: translate3d(
    0,
    calc(var(--project-chaos-y) + var(--parallax-y, 0px) + var(--reveal-y, 0px)),
    0
  ) rotate(var(--project-rotation));
  will-change: transform, opacity;
}

.project-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--dim);
  position: relative;
}

.project-img.project-img-text {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 35%),
    linear-gradient(145deg, #1b1b1b, #0d0d0d 55%, #181818);
}

.project-img.project-img-text::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project:hover .project-img img {
  transform: scale(1.06);
  filter: none;
}

.project-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 200;
  color: var(--gray);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s;
}

.project-img-text .project-placeholder {
  padding: 32px;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  color: rgba(232, 232, 232, 0.72);
}

.project:hover .project-placeholder {
  transform: scale(1.08);
  color: var(--white);
}

.project-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  transition: opacity 0.4s;
  pointer-events: none;
}

.project:hover .project-img::after {
  opacity: 0;
}

.project-info {
  padding: 20px 0;
}

.project-info h3 {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.project-info p {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: 6px;
}

/* ── About ───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}

.about-text {
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--white);
  opacity: 0.85;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.skills span {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 8px 18px;
  border: 1px solid var(--dim);
  color: var(--gray);
  transition: color 0.3s, border-color 0.3s;
}

.skills span:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ── Contact ─────────────────────────────────────────── */
.contact-inner {
  text-align: center;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-top: 8px;
  position: relative;
  overflow-wrap: anywhere;
  transition: opacity 0.3s;
}

.contact-email::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.socials {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 64px;
}

.socials a {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.3s;
}

.socials a:hover {
  color: var(--white);
}

.footer-note {
  margin-top: 80px;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--dim);
}

/* ── Reveal Animations ───────────────────────────────── */
.reveal {
  --reveal-y: 40px;
  opacity: 0;
  transform: translate3d(0, var(--reveal-y), 0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  --reveal-y: 0px;
}

/* ── Grain Overlay ───────────────────────────────────── */
main::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.035;
  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: 128px 128px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .section {
    min-height: auto;
    padding: 88px 20px 64px;
  }

  nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px;
    mix-blend-mode: normal;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.72) 72%, rgba(10, 10, 10, 0) 100%);
    backdrop-filter: blur(14px);
  }

  .nav-logo {
    gap: 10px;
  }

  .nav-logo img {
    width: 58px;
  }

  .nav-logo-text {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
  }

  .nav-links {
    width: auto;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .nav-links a {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .nav-controls {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .lang-switcher {
    padding: 3px;
  }

  .lang-switcher__btn {
    min-width: 38px;
    padding: 6px 8px;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  #hero {
    justify-content: flex-end;
    min-height: 100svh;
    padding-top: 132px;
    padding-bottom: 84px;
  }

  #hero h1 {
    font-size: clamp(2.7rem, 12vw, 4.6rem);
    line-height: 0.98;
    max-width: 8.5ch;
  }

  #hero .hero-intro {
    margin-top: 22px;
    font-size: 0.96rem;
    line-height: 1.7;
    max-width: 30rem;
  }

  #hero .subtitle {
    margin-top: 18px;
    max-width: 18rem;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    line-height: 1.7;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 0;
  }

  .project {
    transform: translate3d(0, var(--reveal-y, 0px), 0) rotate(0deg);
  }

  .project-info {
    padding: 16px 0 0;
  }

  .project-info h3 {
    font-size: 1rem;
  }

  .project-info p {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-text {
    font-size: 1.08rem;
    line-height: 1.75;
  }

  .skills {
    gap: 10px;
    margin-top: 28px;
  }

  .skills span {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    padding: 8px 14px;
  }

  .scroll-hint {
    display: none;
  }

  .contact-inner {
    text-align: left;
  }

  .contact-email {
    font-size: clamp(1.4rem, 8vw, 2.4rem);
    line-height: 1.2;
  }

  .socials {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-top: 36px;
  }

  .socials a {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
  }

  .footer-note {
    margin-top: 44px;
    font-size: 0.62rem;
    line-height: 1.6;
  }

  .cursor {
    display: none;
  }

  body {
    cursor: auto;
  }
}
