/* ─────────────────────────────────────
   Yvaine.life — Minimal Personal Site
   ───────────────────────────────────── */

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

:root {
  --white: #fafaf9;
  --black: #0c0c0e;
  --gray-1: #f5f5f4;
  --gray-2: #e7e5e4;
  --gray-3: #a8a29e;
  --gray-4: #78716c;
  --gray-5: #44403c;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --max-w: 1080px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(120, 100, 180, 0.2);
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 64px);
  height: 64px;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav--light {
  color: rgba(250, 250, 249, 0.9);
}

.nav--solid {
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--gray-2);
  color: var(--black);
}

.nav-logo {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: inherit;
  text-decoration: none;
}

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

.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.25s;
}

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

/* ── Hero ── */
.hero {
  position: relative;
  height: 60vh;
  min-height: 520px;
  background: #000;
  overflow: hidden;
}

/* Background container */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

/* Planet image — rotates and translates with scroll */
.hero-planet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 110%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  pointer-events: none;
}

/* Cosmic particles canvas */
.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Frosted glass overlay — covers right half, soft fade from middle */
.hero-overlay {
  position: absolute;
  top: 0; right: 0;
  width: 55%;
  height: 100%;
  z-index: 3;
  backdrop-filter: blur(45px) saturate(1.1);
  -webkit-backdrop-filter: blur(45px) saturate(1.1);
  background: linear-gradient(
    to right,
    rgba(20, 20, 30, 0) 0%,
    rgba(20, 20, 30, 0.3) 25%,
    rgba(15, 15, 25, 0.55) 70%,
    rgba(10, 10, 20, 0.7) 100%
  );
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 18%, black 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 18%, black 100%);
}

/* Content layer — text on the right, no card frame */
.hero-content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 64px clamp(32px, 7vw, 100px) 64px 40px;
}

.hero-glass {
  max-width: 420px;
  width: 100%;
  /* No border, no background, no card — just text */
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.hero-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.1);
}

.hero-greeting {
  display: none;
}

.hero-greeting {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 8px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}

.hero-role {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.hero-divider {
  width: 36px; height: 1px;
  background: rgba(255, 255, 255, 0.18);
  margin: 18px 0;
}

.hero-tagline {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
}

.hero-scroll {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.hero-scroll span {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

.hero-scroll-line {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ── Sections ── */
.section {
  padding: clamp(80px, 12vw, 140px) 0;
}

.section-muted {
  background: var(--gray-1);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-3);
  padding-top: 6px;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 32px;
  color: var(--black);
}

/* ── About ── */
.about-text p {
  font-size: 0.95rem;
  color: var(--gray-4);
  line-height: 1.85;
  margin-bottom: 20px;
  max-width: 560px;
}

.about-text p:last-child { margin-bottom: 0; }

/* ── Thoughts ── */
.thoughts-desc {
  font-size: 0.95rem;
  color: var(--gray-4);
  line-height: 1.85;
  max-width: 560px;
  margin-bottom: 24px;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-3);
  border: 1px solid var(--gray-2);
  border-radius: 100px;
  padding: 6px 16px;
}

/* ── Projects ── */
.projects {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project {
  display: flex;
  gap: 28px;
  padding: 32px 0;
  border-bottom: 1px solid var(--gray-2);
  transition: padding-left 0.3s var(--ease);
}

.project:first-child {
  border-top: 1px solid var(--gray-2);
}

.project:hover {
  padding-left: 8px;
}

.project-number {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-3);
  letter-spacing: 0.04em;
  padding-top: 4px;
  flex-shrink: 0;
  width: 28px;
}

.project-info h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--black);
}

.project-info p {
  font-size: 0.88rem;
  color: var(--gray-4);
  line-height: 1.7;
  max-width: 480px;
}

/* ── Links ── */
.links {
  display: flex;
  flex-direction: column;
}

.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-2);
  text-decoration: none;
  color: var(--black);
  transition: padding-left 0.3s var(--ease), color 0.25s;
}

.link:first-child {
  border-top: 1px solid var(--gray-2);
}

.link:hover {
  padding-left: 8px;
}

.link span {
  font-size: 0.95rem;
  font-weight: 400;
}

.link svg {
  color: var(--gray-3);
  transition: transform 0.25s var(--ease), color 0.25s;
}

.link:hover svg {
  transform: translate(3px, -3px);
  color: var(--black);
}

/* ── Footer ── */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--gray-2);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--gray-3);
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 540px;
  }

  .hero-bg {
    background-position: center 30%;
    background-size: 130% auto;
  }

  .hero-overlay {
    width: 100%;
    background: linear-gradient(
      to bottom,
      rgba(20, 20, 30, 0) 0%,
      rgba(20, 20, 30, 0.4) 40%,
      rgba(15, 15, 25, 0.7) 100%
    );
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
  }

  .hero-content {
    padding: 80px 24px 60px;
    align-items: flex-end;
    justify-content: center;
  }

  .hero-glass {
    padding: 28px 24px;
    max-width: 100%;
  }

  .section-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section-label {
    padding-top: 0;
  }

  .nav-links { gap: 20px; }
  .nav-links a { font-size: 0.72rem; }

  .project { gap: 16px; }

  .footer-inner {
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .nav-links a:nth-child(n+3) { display: none; }
  .hero-scroll { display: none; }
}
