:root {
  --bg: #f8fafc;
  --bg-alt: #eef6ff;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --line: #dbe3ef;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #14b8a6;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.11);
  --radius: 24px;
  --max-width: 1140px;
}

[data-theme="dark"] {
  --bg: #020617;
  --bg-alt: #0f172a;
  --surface: #111827;
  --surface-soft: #1e293b;
  --text: #e5e7eb;
  --muted: #a8b3c7;
  --line: #243247;
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --accent: #2dd4bf;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.16), transparent 32rem);
  pointer-events: none;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--text);
  color: var(--surface);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  z-index: 100;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--line);
}

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

.brand,
.nav-menu {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.nav-menu {
  gap: 1.15rem;
  color: var(--muted);
  font-weight: 700;
}

.nav-menu a {
  position: relative;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--primary);
  transition: transform 0.2s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  transform: scaleX(1);
}

.theme-toggle,
.nav-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  min-width: 44px;
  height: 40px;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-weight: 800;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
}

.section {
  padding: 6.25rem 0;
}

.section-alt {
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-alt) 75%, transparent), transparent);
}

.hero {
  padding-top: 7.5rem;
}

.hero-grid,
.two-column,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 4rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 1rem;
  color: var(--primary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.25;
  margin-bottom: 0.55rem;
}

h4 {
  font-size: 1.05rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.hero-lead,
.section-heading p,
.content-block p,
.contact-section p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 2rem 0 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.18rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.hero-stats div,
.profile-card,
.education-card,
.timeline article,
.highlight-card,
.project-card,
.timeline-card,
.mini-card,
.document-card,
.contact-form {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-stats div {
  padding: 1rem;
}

.hero-stats strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-stats span,
.timeline-date,
.tag,
.timeline-card span,
.document-type {
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-card {
  width: 100%;
  max-width: 390px;
  margin-left: auto;
  overflow: hidden;
}

.profile-cover {
  height: 130px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.profile-photo {
  width: 220px;
  height: 270px;
  margin: -72px auto 20px;
  border-radius: 30px;
  overflow: hidden;
  border: 6px solid var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  background: var(--surface-soft);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.profile-body {
  padding: 0 1.75rem 1.75rem;
}

.profile-card h2 {
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: 2.1rem;
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.profile-card p {
  margin-bottom: 1.4rem;
  color: var(--muted);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.profile-stats div {
  padding: 0.9rem 0.65rem;
  text-align: center;
  border-right: 1px solid var(--line);
}

.profile-stats div:last-child {
  border-right: none;
}

.profile-stats strong,
.profile-stats span {
  display: block;
}

.profile-stats strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
}

.profile-stats span {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2.5rem;
}

.section-heading.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.highlights-grid,
.project-grid,
.leadership-grid,
.documents-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

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

.highlight-card,
.project-card,
.mini-card,
.document-card,
.timeline-card {
  padding: 1.55rem;
  box-shadow: none;
}

.highlight-card strong {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--text);
  font-size: 1.05rem;
}

.highlight-card p,
.project-card p,
.timeline-card p,
.mini-card p,
.document-card p,
.education-card p,
.timeline p {
  color: var(--muted);
  margin-bottom: 0;
}

.content-block {
  max-width: 720px;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.skill-cloud span,
.badge,
.tag,
.project-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  font-weight: 800;
}

.project-tag {
  margin-bottom: 1rem;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
}

.project-card ul {
  margin: 1.15rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.project-card li {
  margin-bottom: 0.55rem;
}

.education-card {
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.gpa-box {
  text-align: center;
  padding: 1rem 1.4rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(20, 184, 166, 0.12));
}

.gpa-box span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.gpa-box strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
}

.timeline,
.achievement-timeline {
  display: grid;
  gap: 1rem;
}

.timeline.compact {
  grid-template-columns: repeat(3, 1fr);
}

.timeline article {
  padding: 1.5rem;
  box-shadow: none;
}

.timeline-date {
  display: block;
  margin-bottom: 0.65rem;
  font-weight: 900;
}

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

.timeline-card span {
  display: inline-flex;
  margin-bottom: 0.65rem;
  color: var(--primary);
  font-weight: 900;
}

.document-group {
  margin-top: 3rem;
}

.document-group:first-of-type {
  margin-top: 0;
}

.document-group h3 {
  margin-bottom: 1.15rem;
  font-size: 1.35rem;
}

.document-card-highlight {
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 82%, var(--primary)), color-mix(in srgb, var(--surface) 86%, var(--accent)));
}

.document-type {
  display: inline-flex;
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  color: var(--primary);
  font-weight: 900;
}

.document-link::after {
  content: "->";
  margin-left: 0.35rem;
}

.contact-section {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.13), rgba(20, 184, 166, 0.13));
}

.contact-links {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
  color: var(--text);
  font-weight: 900;
}

.contact-links a:hover {
  color: var(--primary);
}

.contact-form {
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

.hidden-field {
  display: none;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-grid p {
  margin: 0;
}

.footer-grid a {
  font-weight: 900;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 76px;
    display: grid;
    gap: 0;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
  }

  .nav-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-menu a,
  .theme-toggle {
    padding: 0.85rem 1rem;
  }

  .theme-toggle {
    width: 100%;
    text-align: left;
    border-radius: 16px;
  }

  .hero-grid,
  .two-column,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .profile-card {
    margin: 0 auto;
  }

  .highlights-grid,
  .project-grid,
  .timeline.compact,
  .achievement-timeline,
  .leadership-grid,
  .documents-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4.5rem 0;
  }

  .hero {
    padding-top: 5.5rem;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 3.3rem);
  }

  .hero-actions,
  .education-card,
  .footer-grid {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-stats,
  .highlights-grid,
  .project-grid,
  .timeline.compact,
  .achievement-timeline,
  .leadership-grid,
  .documents-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .brand-text {
    display: none;
  }

  .profile-photo {
    width: 190px;
    height: 230px;
  }

  .profile-card h2 {
    font-size: 1.75rem;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .profile-stats div {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .profile-stats div:last-child {
    border-bottom: none;
  }
}

@media print {
  .site-header,
  .contact-form,
  .site-footer,
  .hero-actions {
    display: none;
  }

  body {
    color: #000000;
    background: #ffffff;
  }

  .section {
    padding: 1rem 0;
  }

  .profile-card,
  .education-card,
  .timeline article,
  .highlight-card,
  .project-card,
  .timeline-card,
  .mini-card,
  .document-card {
    box-shadow: none;
    break-inside: avoid;
  }
}
