:root {
  --bg: #05070f;
  --bg-soft: #0a1020;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(148, 163, 184, 0.34);
  --text: #e2e8f0;
  --muted: #9ca3af;
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --accent-soft: #22d3ee;
  --radius-control: 0.85rem;
  --radius-card: 1.35rem;
  --radius-hero: 1.75rem;
  --shadow-soft: 0 8px 24px rgba(2, 6, 23, 0.32);
  --shadow-focus: 0 14px 44px rgba(79, 70, 229, 0.26);
  --shell: min(1120px, calc(100% - 2rem));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, #182341 0, transparent 34%),
    radial-gradient(circle at 82% 0%, #07273a 0, transparent 28%), var(--bg);
  font-family: "Plus Jakarta Sans", Inter, Roboto, Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

.cinematic-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(99, 102, 241, 0.1), transparent 38%, rgba(34, 211, 238, 0.08));
  z-index: -1;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 0.6rem;
  top: -100%;
  background: #111827;
  color: #fff;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-control);
  z-index: 1000;
}

.skip-link:focus {
  top: 0.7rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(4, 8, 18, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nav {
  min-height: 4.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  font-size: 1.03rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.5rem 0.72rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
}

.nav-toggle {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: var(--radius-control);
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  display: grid;
  place-items: center;
}

.nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0.8rem;
  position: absolute;
  right: 1rem;
  top: 4.5rem;
  min-width: 13rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(10px);
  background: rgba(8, 12, 22, 0.94);
  box-shadow: var(--shadow-soft);
  display: none;
}

.nav-menu.open {
  display: grid;
  gap: 0.22rem;
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  display: block;
  border-radius: 0.72rem;
  padding: 0.62rem 0.7rem;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: rgba(99, 102, 241, 0.18);
  outline: none;
}

.hero {
  margin-top: 2rem;
  padding: 1.35rem;
  border-radius: var(--radius-hero);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow-soft);
}

.hero-layout {
  display: grid;
  gap: 1rem;
}

.hero-content {
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: #bfdbfe;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.85rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-copy {
  color: #cbd5e1;
  max-width: 69ch;
  margin-top: 0.95rem;
}

.hero-chips {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.58rem;
}

.hero-chips li {
  font-size: 0.86rem;
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.44);
  background: rgba(148, 163, 184, 0.1);
  border-radius: 999px;
  padding: 0.42rem 0.76rem;
}

.hero-actions {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.68rem;
  flex-wrap: wrap;
}

.hero-photo {
  margin: 0;
  max-width: 300px;
  width: 100%;
  justify-self: center;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.btn {
  text-decoration: none;
  color: #f8fafc;
  border-radius: var(--radius-control);
  padding: 0.65rem 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), #4338ca 54%, #3730a3);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.34);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: var(--shadow-focus);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(148, 163, 184, 0.4);
}

.section {
  margin-top: 2.9rem;
}

.section-heading h2 {
  font-size: clamp(1.46rem, 3.2vw, 2.15rem);
  margin-bottom: 0.55rem;
}

.section-heading p {
  margin-top: 0;
  color: var(--muted);
}

.glass {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.card {
  padding: 1rem;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.6);
  background: var(--surface-strong);
}

.timeline {
  position: relative;
  margin-top: 1.1rem;
  display: grid;
  gap: 0.88rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.7), rgba(34, 211, 238, 0.25));
}

.timeline .card {
  position: relative;
  margin-left: 1rem;
}

.timeline .card::before {
  content: "";
  position: absolute;
  left: -1.45rem;
  top: 1.25rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.28);
}

.period {
  color: #bfdbfe;
  font-size: 0.85rem;
  margin: 0 0 0.45rem;
  font-weight: 600;
}

.card h3 {
  margin-bottom: 0.65rem;
  font-size: 1.03rem;
}

.card p,
.card li {
  color: #d1d5db;
}

.card ul {
  margin: 0;
  padding-left: 1.15rem;
}

.tech-line {
  margin: 0.8rem 0 0;
  color: #bfdbfe;
  font-size: 0.88rem;
}

.project-grid,
.skills-grid,
.contact-grid,
.edu-layout,
.metrics-grid {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.82rem;
}

.contact-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  min-height: 100%;
}

.contact-card h3 {
  margin-bottom: 0.32rem;
}

.contact-card p {
  margin: 0;
}

.contact-note {
  margin: 0.95rem 0 0;
  color: var(--muted);
}

.contact-card svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: #c7d2fe;
  flex: 0 0 auto;
  margin-top: 0.08rem;
}

.site-footer {
  margin: 2.8rem auto 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

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

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: fade-up 0.52s ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.08s;
}

.reveal:nth-child(3) {
  animation-delay: 0.16s;
}

.reveal:nth-child(4) {
  animation-delay: 0.24s;
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 780px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    min-width: auto;
    border: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    padding: 0;
    gap: 0.2rem;
  }

  .hero {
    margin-top: 2.5rem;
    padding: 2rem;
    border-radius: 2rem;
  }

  .hero-layout {
    grid-template-columns: 1.25fr 0.75fr;
    align-items: center;
  }

  .hero-photo {
    max-width: 340px;
    justify-self: end;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .edu-layout {
    grid-template-columns: 2fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
