:root {
  color-scheme: dark;
  color: #e5e7eb;
  background: #05060e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(67,56,202,0.18), transparent 24%),
              radial-gradient(circle at bottom right, rgba(14,165,233,0.08), transparent 18%),
              #05060e;
  color: #e5e7eb;
}

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

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid rgba(148,163,184,0.12);
  margin-bottom: 1.5rem;
}

.logo {
  text-decoration: none;
  color: #f8fafc;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.25rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.logo:hover {
  transform: scale(1.05);
  color: #a78bfa;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-nav a,
.sidebar-nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 0.6rem;
  transition: all 0.2s ease;
}

.site-nav a:hover,
.sidebar-nav a:hover,
.hero-stack a:hover,
.sidebar-card a:hover {
  color: #f8fafc;
  background: rgba(124, 58, 237, 0.15);
}

.hero-layout {
  padding-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

.centered-hero {
  display: flex;
  justify-content: center;
}

.hero-panel {
  display: grid;
  gap: 1.5rem;
  max-width: 720px;
}

.centered-hero .hero-panel {
  text-align: center;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7c3aed;
}

.hero-panel h1 {
  margin: 0.6rem 0 0;
  font-size: clamp(3.25rem, 6vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-stack {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: 0.8rem;
  color: #cbd5e1;
}

.hero-stack a {
  color: inherit;
  text-decoration: none;
}

.hero-copy {
  margin: 1.85rem 0 0;
  max-width: 42rem;
  color: #d1d5db;
  font-size: 1.03rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.hero-tags span {
  display: inline-flex;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(148,163,184,0.18);
  color: #e5e7eb;
  font-size: 0.92rem;
}

.sidebar {
  display: grid;
  gap: 1.5rem;
  align-self: start;
  position: sticky;
  top: 2rem;
  width: 300px;
  z-index: 1;
}

.profile-image {
  width: 100%;
  border-radius: 1.5rem;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(148,163,184,0.14);
}

.sidebar-card {
  border-radius: 1.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(148,163,184,0.14);
  box-shadow: 0 28px 65px rgba(15, 23, 42, 0.22);
  padding: 1.75rem;
}

.sidebar-card h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.sidebar-card p {
  margin: 0.8rem 0 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.sidebar-nav {
  display: grid;
  gap: 0.6rem;
}

.sidebar-nav a {
  color: #cbd5e1;
}

.section {
  padding: 3rem 0;
  border-top: 1px solid rgba(148,163,184,0.08);
}

.section:first-of-type {
  border-top: none;
}

.section-light {
  background: rgba(255,255,255,0.02);
}

.section-dark {
  background: rgba(15,23,42,0.5);
}

.section-inner {
  display: grid;
  gap: 2rem;
  width: min(100%, 1040px);
  margin: 0 auto;
}

.section-header {
  max-width: 52rem;
}

.section-header p {
  margin-top: 1rem;
  color: #cbd5e1;
  line-height: 1.8;
}

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw, 2.6rem);
}

.skill-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 2rem;
}

.certification-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 2rem;
}

.skill-card,
.cert-card,
.experience-card,
.education-card,
.contact-panel {
  border-radius: 1.25rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148,163,184,0.12);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2);
  padding: 1.75rem;
}

.cert-card {
  display: grid;
  gap: 1rem;
}

.skill-card h3,
.cert-card h3,
.experience-card h3,
.education-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.08rem;
  color: #f1f5f9;
  font-weight: 700;
}

.skill-card p,
.experience-card p,
.education-card p,
.cert-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.cert-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #cbd5e1;
}

.cert-list li {
  margin: 0.35rem 0;
}

.experience-card {
  display: grid;
  gap: 1rem;
}

.experience-details {
  display: none;
}

.item-description {
  color: #cbd5e1;
  line-height: 1.7;
}

.experience-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
  width: fit-content;
  margin-top: 0.5rem;
  cursor: pointer;
}

.experience-link:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.6);
}

.project-image {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.project-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(5, 6, 14, 0.66);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 50;
}

.project-modal-image {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.project-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
}

.project-modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(90vh, 100%);
  overflow: auto;
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.4);
  padding: 2rem;
  z-index: 1;
}

.project-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  font-size: 1.25rem;
  cursor: pointer;
}

.project-modal-close:hover,
.project-modal-close:focus-visible {
  background: rgba(124, 58, 237, 0.95);
}

.project-modal-title {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 3.5vw, 2.6rem);
}

.project-modal-subtitle,
.project-modal-date,
.project-modal-description {
  color: #cbd5e1;
}

.project-modal-date {
  display: inline-block;
  margin: 0.25rem 0 1.2rem;
  color: #a78bfa;
  font-weight: 600;
}

.project-modal-description {
  margin: 0 0 1.5rem;
  line-height: 1.8;
}

.project-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-modal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(124, 58, 237, 0.95);
  color: #f8fafc;
  font-weight: 600;
}

.project-modal-link:hover,
.project-modal-link:focus-visible {
  background: #7c3aed;
}

.item-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.item-subtitle {
  margin: 0.35rem 0 0;
  color: #cbd5e1;
}

.education-card {
  display: grid;
  gap: 0.85rem;
}

.contact-panel {
  display: grid;
  gap: 1.5rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer {
  padding-top: 2rem;
  color: #94a3b8;
  font-size: 0.95rem;
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.95);
  color: #ffffff;
  text-decoration: none;
  font-size: 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  opacity: 0.95;
  z-index: 20;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-2px);
  background: #7c3aed;
  opacity: 1;
}

.back-to-top:focus-visible {
  outline: 2px solid #c7d2fe;
  outline-offset: 3px;
}

a {
  color: inherit;
}

@media (max-width: 950px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    top: auto;
    width: auto;
    right: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100%, calc(100% - 1.5rem));
  }

  .site-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    padding: 1.5rem 0 2rem;
  }

  .site-nav {
    justify-content: center;
    gap: 0.35rem;
  }

  .site-nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.65rem;
  }

  .hero-panel h1 {
    font-size: clamp(2.6rem, 10vw, 4rem);
  }

  .hero-tags {
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 1rem;
  }

  .hero-panel,
  .contact-actions {
    grid-template-columns: 1fr;
  }
}
