/* ------------------------------------------------
   James Yun — Personal Site
   Stealth-mode minimalism
   ------------------------------------------------ */

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

:root {
  --bg: #0a0a0a;
  --fg: #e8e8e8;
  --fg-muted: #6b6b6b;
  --fg-dim: #3a3a3a;
  --accent: #c8ff00;
  --font: "Inter", -apple-system, system-ui, sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  overflow: hidden;
}

/* ---- Ambient cursor glow ---- */
.glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(
    600px circle at var(--x, 50%) var(--y, 50%),
    rgba(200, 255, 0, 0.04),
    transparent 60%
  );
}

/* ---- Noise / grain overlay ---- */
.noise {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: 1;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ---- Layout ---- */
.container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0 12vw;
}

.content {
  max-width: 640px;
}

/* ---- Typography ---- */
.greeting {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.name {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  background: linear-gradient(
    135deg,
    var(--fg) 0%,
    var(--fg-muted) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 48px;
}

.rotating-text {
  color: var(--accent);
  font-weight: 500;
  position: relative;
}

.rotating-text::after {
  content: "▎";
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
  color: var(--accent);
  font-weight: 300;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ---- Links ---- */
.links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.link {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}

.link::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.link:hover {
  color: var(--fg);
}

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

/* ---- Footer / Status ---- */
.footer {
  position: absolute;
  bottom: 48px;
  left: 12vw;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(200, 255, 0, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(200, 255, 0, 0); }
}

.status-text {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--fg-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---- Reveal animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: revealUp 0.8s ease forwards;
  animation-delay: calc(var(--delay) * 0.2s + 0.3s);
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Responsive ---- */
@media screen and (max-width: 768px) {
  .container {
    padding: 0 8vw;
  }

  .name {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .tagline {
    font-size: 1rem;
    margin-bottom: 36px;
  }

  .links {
    gap: 24px;
  }

  .footer {
    left: 8vw;
    bottom: 36px;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 6vw;
  }

  .links {
    flex-direction: column;
    gap: 8px;
  }

  .greeting {
    font-size: 0.75rem;
  }

  .tagline br {
    display: none;
  }
}
