:root {
  --bg: #0a0a0b;
  --bg-soft: #121215;
  --fg: #e7e7ea;
  --muted: #9a9aa3;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --border: #232329;
  --radius: 14px;
  --maxw: 980px;
  --mono: "SFMono-Regular", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animated background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(700px 500px at 85% 30%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(600px 500px at 50% 100%, rgba(124, 92, 255, 0.10), transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-3%, 2%) scale(1.08); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 11, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  position: relative;
  transition: color 0.15s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--grad);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 100%; }

/* Hero */
.hero { padding: 90px 24px 70px; }
.hero-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: center;
  max-width: 860px;
}
.hero-photo { position: relative; }
.hero-photo::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  background: var(--grad);
  filter: blur(14px);
  opacity: 0.5;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.98); }
  50% { opacity: 0.7; transform: scale(1.04); }
}
.photo-img {
  position: relative;
  display: block;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid var(--border);
  background: var(--bg-soft);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 14px;
}
.hero-name {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 18px;
}
.hero-tagline {
  color: var(--muted);
  font-size: clamp(1.02rem, 2.3vw, 1.2rem);
  max-width: 600px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(124, 92, 255, 0.55); }
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--muted); box-shadow: 0 4px 16px rgba(0,0,0,0.4); }

/* Sections */
section { padding: 64px 24px; }
.section-title {
  font-size: 1.7rem;
  letter-spacing: -1px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
}
.section-sub { color: var(--muted); margin-bottom: 32px; }

/* Scroll-reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Project grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.project-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.2s;
}
.project-card:hover {
  border-color: rgba(124, 92, 255, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}
.project-card:hover::before { opacity: 1; }
.project-card .p-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-card h3 { font-size: 1.1rem; letter-spacing: -0.3px; }
.project-card .p-lang {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.project-card p {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}
.project-card .p-links { display: flex; gap: 16px; }
.project-card .p-links a {
  font-size: 0.88rem;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.15s;
}
.project-card .p-links a:hover { color: var(--accent); }
.project-card .p-links a.live { color: var(--accent); }
.project-card .p-links a.live:hover { color: var(--accent-2); }

/* Skills */
.skill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-list span {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--fg);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.skill-list span:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.2);
}

/* Contact */
.contact-line { color: var(--muted); margin-bottom: 24px; }
.contact-links { display: flex; flex-direction: column; gap: 10px; }
.contact-links a {
  color: var(--fg);
  font-family: var(--mono);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
  width: fit-content;
  transition: border-color 0.15s, color 0.15s, padding-left 0.2s;
}
.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  padding-left: 6px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px 40px;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .hero-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-photo { order: -1; }
  .nav-links { gap: 18px; }
}
