:root {
  --text: #ffffff;
  --background: #212223;
  --star: rgba(242, 105, 0, 0.78);
  --shooting-star: rgba(255, 255, 255, 0.92);
  --border: rgba(255, 255, 255, 0.14);
  --radius: 16px;
  --glass: rgba(224, 225, 241, 0.072);
  --glass-edge: rgba(0, 0, 0, 0.5);
  --glass-shadow: rgba(0, 0, 0, 0.08);
  --glass-inset-shadow: rgba(176, 165, 165, 0.54);
  --shoot-angle: 26.565deg;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f7f7f7;
    --background: #111;
    --star: rgba(255, 255, 255, 0.8);
    --shooting-star: rgba(255, 255, 255, 0.95);
    --border: rgba(255, 255, 255, 0.16);
    --glass: rgba(255, 255, 255, 0.04);
    --glass-edge: rgba(255, 255, 255, 0.22);
    --glass-shadow: rgba(0, 0, 0, 0.18);
    --glass-inset-shadow: rgba(0, 0, 0, 0.06);
  }
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--background);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(120, 170, 255, 0.15), transparent 20%),
    radial-gradient(circle at 78% 30%, rgba(255, 160, 210, 0.17), transparent 18%),
    radial-gradient(circle at 62% 78%, rgba(140, 255, 220, 0.16), transparent 22%),
    radial-gradient(circle at 34% 70%, rgba(247, 207, 114, 0.12), transparent 16%);
  animation: opalescentDrift 90s ease-in-out infinite alternate;
}

@media (prefers-color-scheme: dark) {
  body::before {
    display: none;
  }
}

#starfield {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background: var(--star);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  animation: twinkle ease-in-out infinite;
}

.shooting-star {
  position: absolute;
  width: 140px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--shooting-star));
  border-radius: 999px;
  opacity: 0;
  transform-origin: right center;
  transform: rotate(var(--shoot-angle));
}

.shooting-star.active {
  animation: shoot 1.8s linear forwards;
}

main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 24px;
}

.header {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 36px;
}

.header img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
}

.header-text h1 {
  font-size: 3rem;
  margin: 0 0 12px 0;
}

.header-text p {
  margin: 0;
  font-size: 1.15rem;
}

.bio,
.resume {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(5px) saturate(90%);
  -webkit-backdrop-filter: blur(5px) saturate(90%);
  box-shadow:
    inset 1px 1px 8px var(--glass-inset-shadow),
    inset -1px -1px 0 var(--glass-edge),
    0 3px 10px var(--glass-shadow);
}

@media (prefers-color-scheme: dark) {
  .bio,
  .resume {
    box-shadow:
      inset 1px 1px 0 var(--glass-edge),
      0 6px 18px var(--glass-shadow);
  }
}

.bio,
.resume {
  margin-top: 24px;
  padding: 24px 28px;
}

.bio::before,
.resume::before,
.bio::after,
.resume::after {
  display: none;
}

.bio-title,
.section-title {
  margin: 0 0 4px 0;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: underline;
}

.bio p {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 1.08rem;
}

.resume iframe {
  width: 100%;
  height: 950px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
}

.resume-link {
  margin-top: 6px;
  margin-bottom: 0;
  text-align: center;
  line-height: 1.2;
}

.resume-link a {
  color: inherit;
  font-size: 0.92rem;
}

@keyframes opalescentDrift {
  0% {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
    opacity: 0.85;
  }

  50% {
    transform: translate3d(1%, 1.5%, 0) scale(1.03);
    opacity: 1;
  }

  100% {
    transform: translate3d(2%, -1%, 0) scale(1.02);
    opacity: 0.9;
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.15;
    transform: scale(1);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.8);
  }
}

@keyframes shoot {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--shoot-angle));
  }

  10% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(120vw, 60vw, 0) rotate(var(--shoot-angle));
  }
}

@media (max-width: 700px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-text h1 {
    font-size: 2.4rem;
  }

  .resume iframe {
    height: 700px;
  }
}
