:root {
  --bg: #0e0f12;
  --surface: #14161b;
  --surface-2: #1a1d24;
  --border: #262a33;
  --text: #e7e9ee;
  --muted: #9aa1ad;
  --accent: #7dd3fc;
  --accent-dim: #38bdf8;
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 800px at 50% -10%, #1b1f2a 0%, var(--bg) 60%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

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

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  mix-blend-mode: screen;
  will-change: transform;
}

.blob-1 {
  width: 460px;
  height: 460px;
  left: -120px;
  top: -80px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.55), transparent 70%);
  animation: drift1 18s ease-in-out infinite;
}

.blob-2 {
  width: 520px;
  height: 520px;
  right: -160px;
  top: 22%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.5), transparent 70%);
  animation: drift2 22s ease-in-out infinite;
}

.blob-3 {
  width: 420px;
  height: 420px;
  left: 30%;
  bottom: -140px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4), transparent 70%);
  animation: drift3 26s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(120px, 90px) scale(1.15); }
  66% { transform: translate(-40px, 160px) scale(0.95); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-140px, -70px) scale(1.2); }
}

@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-110px, -80px) scale(1.1); }
  66% { transform: translate(70px, -30px) scale(0.9); }
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 520px;
  height: 520px;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.12), transparent 65%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
}

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
  animation: twinkle var(--tw, 4s) ease-in-out infinite;
  animation-delay: var(--td, 0s);
}

.shooting-star {
  position: fixed;
  z-index: 1;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.5);
  animation: shoot var(--dur, 1s) ease-out forwards;
}

.shooting-star::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  width: 110px;
  height: 1.5px;
  transform: translateY(-50%);
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.85), rgba(125, 211, 252, 0.25), transparent);
}

@keyframes shoot {
  0% { opacity: 0; transform: translate(0, 0); }
  10% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7); box-shadow: 0 0 2px rgba(125, 211, 252, 0.2); }
  50% { opacity: 0.85; transform: scale(1.15); box-shadow: 0 0 10px rgba(125, 211, 252, 0.7); }
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 64px;
}

.hero {
  text-align: center;
  margin-bottom: 40px;
}

.avatar-wrap {
  position: relative;
  width: 116px;
  height: 116px;
  margin: 0 auto 20px;
}

.ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(125, 211, 252, 0.8), rgba(99, 102, 241, 0.8), rgba(16, 185, 129, 0.7), rgba(125, 211, 252, 0.8));
  filter: blur(6px);
  opacity: 0.55;
  animation: spin-ring 6s linear infinite;
}

@keyframes spin-ring {
  to { transform: rotate(360deg); }
}

.avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: 0 0 0 6px rgba(125, 211, 252, 0.12), 0 12px 40px -12px rgba(56, 189, 248, 0.5);
  animation: breathe 5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 6px rgba(125, 211, 252, 0.12), 0 12px 40px -12px rgba(56, 189, 248, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(125, 211, 252, 0.2), 0 12px 52px -8px rgba(56, 189, 248, 0.75); }
}

.spark {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.25), transparent 55%);
  animation: sparkle 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.9; }
}

.name {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.glitch-name {
  background: linear-gradient(90deg, #7dd3fc, #a5b4fc, #6ee7b7, #7dd3fc);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  to { background-position: 300% center; }
}

.tagline {
  color: var(--accent);
  font-size: 1.02rem;
  margin-top: 6px;
  font-weight: 500;
}

.bio {
  max-width: 54ch;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.bio strong {
  color: var(--text);
  font-weight: 600;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.82rem;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); }
}

.meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--muted);
}

.meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.meta svg {
  width: 15px;
  height: 15px;
  color: var(--accent-dim);
}

.meta a {
  color: var(--muted);
  text-decoration: none;
}

.meta a:hover {
  color: var(--accent);
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.links a svg {
  width: 16px;
  height: 16px;
}

.links a:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  animation: rise 0.6s ease both;
  animation-delay: calc(var(--i, 0) * 80ms);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 20%), rgba(125, 211, 252, 0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(125, 211, 252, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -18px rgba(56, 189, 248, 0.35);
}

.card:hover::before {
  opacity: 1;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 18px;
}

.summary {
  color: var(--muted);
  font-size: 0.95rem;
}

.timeline {
  display: grid;
  gap: 22px;
}

.timeline article h3 {
  font-size: 1.02rem;
  color: var(--text);
}

.timeline article h3 span {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-dim);
  margin-top: 2px;
}

.lede {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 6px 0 8px;
}

.timeline ul {
  list-style: none;
  display: grid;
  gap: 5px;
}

.timeline li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-dim);
}

.edu {
  display: grid;
  gap: 14px;
}

.edu h3 {
  font-size: 0.98rem;
  color: var(--text);
}

.edu p {
  color: var(--muted);
  font-size: 0.86rem;
}

.edu em {
  color: var(--accent-dim);
  font-style: normal;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.skill-grid {
  display: grid;
  gap: 16px;
}

.skill-grid h3 {
  font-size: 0.86rem;
  margin-bottom: 8px;
  color: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 11px;
  border-radius: 8px;
}

.project h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.project p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.project a {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.project a:hover {
  text-decoration: underline;
}

.foot {
  margin-top: 34px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.mono {
  font-family: "JetBrains Mono", monospace;
  margin-top: 4px;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .shell { padding: 48px 18px 48px; }
  .links a { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .ring, .avatar, .spark, .glitch-name, .star, .card, .dot {
    animation: none !important;
  }
  .cursor-glow { display: none; }
}