:root {
  --bg: #0b0f1a;
  --bg-alt: #10162a;
  --surface: #141b2f;
  --surface-border: #232c47;
  --text: #eef1f8;
  --text-muted: #a4acc4;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-gradient: linear-gradient(120deg, var(--accent), var(--accent-2));
  --radius: 14px;
  --max-width: 1100px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #0b0f1a;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 15, 26, 0.75);
  border-bottom: 1px solid var(--surface-border);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--text);
}

.nav-cta {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--accent-gradient);
  color: #0b0f1a !important;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 480px;
  background: radial-gradient(60% 60% at 50% 0%, rgba(124, 92, 255, 0.35), transparent 70%),
    radial-gradient(40% 40% at 80% 20%, rgba(34, 211, 238, 0.25), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 600;
  margin: 0 0 1.25rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-bio {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin: 0 0 2rem;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #0b0f1a;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.35);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--surface-border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.hero-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 1px solid transparent;
}
.hero-links a:hover {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}
.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 1.8rem;
  margin: 0 0 2rem;
  letter-spacing: -0.01em;
}

/* Education */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.edu-card,
.card,
.exp-card,
.skills-block {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.edu-card h3 {
  margin: 0 0 0.4rem;
}

.edu-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.3rem;
}

/* Experience */
.exp-card {
  box-shadow: var(--shadow);
}

.exp-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.exp-head h3 {
  margin: 0 0 0.2rem;
}

.exp-meta {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.92rem;
}

.exp-dates {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.exp-summary {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.exp-highlights {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
}
.exp-highlights li {
  margin-bottom: 0.5rem;
}

/* Tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent-2);
  border: 1px solid rgba(124, 92, 255, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Cards grid (projects/research) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card-summary {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.card-link {
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: auto;
  align-self: flex-start;
}
.card-link:hover {
  text-decoration: underline;
}

/* Project card visuals — most are decorative CSS-animated placeholders; some are real demo clips */
.card-visual {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.14), rgba(34, 211, 238, 0.08));
  border: 1px solid var(--surface-border);
  overflow: hidden;
}
.card-visual svg,
.card-visual video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .card-visual * {
    animation: none !important;
  }
}

@keyframes node-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
@keyframes drift-x {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(20px); }
}
@keyframes dash-flow {
  to { stroke-dashoffset: 0; }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.85; }
}
@keyframes ripple {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.2); }
}
@keyframes kernel-slide {
  0%, 100% { transform: translate(6px, 6px); }
  25% { transform: translate(78px, 6px); }
  50% { transform: translate(78px, 54px); }
  75% { transform: translate(6px, 54px); }
}
@keyframes reveal {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.skills-block h3 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  color: var(--text);
}

.plain-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.plain-list li {
  margin-bottom: 0.4rem;
}

/* Contact */
.contact-section {
  text-align: center;
}
.contact-lead {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.5rem;
}
.contact-links {
  justify-content: center;
  font-size: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--surface-border);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Responsive nav */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--surface-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
    display: none;
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-menu li {
    width: 100%;
  }
  .nav-menu a {
    display: block;
    padding: 0.75rem 0;
  }
  .nav-cta {
    display: inline-block;
    margin-top: 0.5rem;
  }
}
