:root {
  color-scheme: dark;
  --bg: #09111f;
  --bg-soft: #111c2f;
  --bg-card: rgba(255, 255, 255, 0.075);
  --bg-card-solid: #131f33;
  --text: #f7fbff;
  --muted: #a9b8ce;
  --border: rgba(255, 255, 255, 0.12);
  --accent: #68e1fd;
  --accent-2: #a78bfa;
  --accent-3: #2dd4bf;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  --ease: 220ms ease;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.light {
  color-scheme: light;
  --bg: #f6f8fb;
  --bg-soft: #edf2f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-solid: #ffffff;
  --text: #102033;
  --muted: #5d6b7d;
  --border: rgba(16, 32, 51, 0.12);
  --accent: #006adc;
  --accent-2: #7c3aed;
  --accent-3: #008c79;
  --shadow: 0 24px 70px rgba(16, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(104, 225, 253, 0.12), transparent 34rem), var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.section-pad {
  padding: 105px 0;
  position: relative;
}

.alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border-block: 1px solid var(--border);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(9, 17, 31, 0.7);
  border-bottom: 1px solid var(--border);
}

body.light .site-header {
  background: rgba(246, 248, 251, 0.82);
}

.navbar {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06101e;
  font-weight: 900;
  box-shadow: 0 16px 38px rgba(104, 225, 253, 0.22);
}

.brand-text {
  white-space: nowrap;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.theme-toggle,
.nav-toggle {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  transition: color var(--ease), background var(--ease), border var(--ease), transform var(--ease);
}

.nav-links a {
  padding: 10px 12px;
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a.active,
.theme-toggle:hover,
.nav-admin {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  background: transparent;
  font-size: 1.15rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  margin-left: auto;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: var(--text);
}

.hero {
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 44px;
  align-items: center;
}

.hero-bg-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(16px);
  opacity: 0.55;
  pointer-events: none;
}

.hero-bg-orb.one {
  width: 360px;
  height: 360px;
  background: rgba(104, 225, 253, 0.18);
  top: 90px;
  right: 12%;
}

.hero-bg-orb.two {
  width: 220px;
  height: 220px;
  background: rgba(167, 139, 250, 0.18);
  bottom: 80px;
  left: 5%;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.77rem;
}

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

h1 {
  font-size: clamp(3.2rem, 8vw, 6.6rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
  margin-bottom: 18px;
}

h3 {
  margin-bottom: 10px;
}

.hero-headline {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--accent);
  font-weight: 700;
  max-width: 760px;
}

.hero-intro,
.about-card p,
.section-heading p:not(.eyebrow),
.references-card p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions,
.hero-meta,
.contact-strip,
.contact-actions,
.project-controls,
.login-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin: 30px 0 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 46px;
  font-weight: 800;
  transition: transform var(--ease), background var(--ease), border var(--ease), box-shadow var(--ease);
}

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

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06101e;
  border-color: transparent;
  box-shadow: 0 18px 45px rgba(104, 225, 253, 0.2);
}

.btn.secondary {
  background: var(--bg-card);
  color: var(--text);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
}

.text-link,
.text-button {
  color: var(--accent);
  background: none;
  border: none;
  font-weight: 800;
  padding: 0;
}

.hero-meta span,
.contact-strip a,
.contact-strip span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.hero-card,
.about-card,
.skill-card,
.project-card,
.edu-card,
.cert-card,
.references-card,
.admin-login-card,
.admin-panel,
.setup-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 190px;
  height: 190px;
  background: rgba(104, 225, 253, 0.15);
  border-radius: 50%;
}

.status-pill {
  display: inline-flex;
  border: 1px solid rgba(45, 212, 191, 0.3);
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent-3);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  margin-bottom: 24px;
}

.quick-stats {
  display: grid;
  gap: 16px;
}

.quick-stats div {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

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

.quick-stats strong {
  font-size: 1.2rem;
}

.quick-stats span {
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 42px;
  align-items: start;
}

.section-heading.centered {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 44px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.about-card {
  padding: 30px;
}

.skills-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.skill-card {
  padding: 24px;
}

.skill-tags,
.project-tech,
.cert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.9rem;
}

.project-controls input,
.project-controls select,
.admin-form input,
.admin-form textarea,
.admin-form select,
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.project-controls input:focus,
.project-controls select:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(104, 225, 253, 0.12);
}

.project-controls input {
  min-width: min(320px, 100%);
}

.project-controls select {
  min-width: 180px;
}

.project-grid,
.card-grid,
.cert-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.project-card,
.edu-card,
.cert-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card p,
.edu-card p,
.cert-card p {
  color: var(--muted);
}

.card-kicker {
  display: inline-flex;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.project-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.project-links a,
.project-links button,
.cert-card a {
  color: var(--accent);
  font-weight: 800;
  background: none;
  border: none;
  padding: 0;
}

.timeline {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 58px;
  margin-bottom: 22px;
}

.timeline-dot {
  position: absolute;
  top: 10px;
  left: 11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(104, 225, 253, 0.12);
}

.timeline-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--bg-card);
  transition: transform var(--ease), border var(--ease);
}

.timeline-card:hover {
  transform: translateY(-3px);
  border-color: rgba(104, 225, 253, 0.38);
}

.timeline-meta,
.edu-meta {
  color: var(--accent);
  font-weight: 800;
}

.timeline-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.references-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px;
}

.contact-bubble {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06101e;
  font-size: 1.5rem;
  box-shadow: var(--shadow);
}

.contact-panel {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 70;
  width: min(420px, calc(100% - 44px));
  max-height: calc(100vh - 128px);
  overflow: auto;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: all var(--ease);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 22px;
  background: var(--bg-card-solid);
  box-shadow: var(--shadow);
}

.contact-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.contact-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.contact-panel-header button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
}

.contact-form,
.admin-form {
  display: grid;
  gap: 14px;
}

.contact-form label,
.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 52px 0 24px;
  background: rgba(0, 0, 0, 0.16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 32px;
}

.footer p,
.footer a,
.footer span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.footer h3 {
  margin: 0 0 12px;
}

.footer-bottom {
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 30px;
  padding-top: 22px;
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Admin */
.admin-body {
  min-height: 100vh;
}

.admin-shell {
  min-height: 100vh;
}

.admin-login-card {
  width: min(100% - 32px, 540px);
  margin: 8vh auto;
  padding: 34px;
}

.admin-brand {
  margin-bottom: 28px;
}

.muted {
  color: var(--muted);
}

.setup-warning,
.admin-notice {
  border: 1px solid rgba(248, 191, 80, 0.28);
  background: rgba(248, 191, 80, 0.12);
  color: #ffe2a3;
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 16px 0;
}

.admin-dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px 1fr;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-tabs {
  display: grid;
  gap: 8px;
}

.admin-tabs button {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.admin-tabs button.active,
.admin-tabs button:hover {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border);
}

.admin-content {
  padding: 32px;
  min-width: 0;
}

.admin-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}

.admin-content-header h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-bottom: 10px;
}

.admin-panel {
  padding: 24px;
  background: var(--bg-card-solid);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.grid-form label:has(textarea),
.grid-form .full,
.editor-form label:has(textarea) {
  grid-column: 1 / -1;
}

.collection-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  gap: 24px;
}

.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.item-list,
.message-list {
  display: grid;
  gap: 12px;
}

.item-button,
.message-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.item-button {
  text-align: left;
  width: 100%;
}

.item-button.active,
.item-button:hover {
  border-color: var(--accent);
}

.item-button strong,
.item-button span {
  display: block;
}

.item-button span,
.message-card p,
.message-card small {
  color: var(--muted);
}

.editor-actions,
.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger {
  color: #fecaca !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.setup-card {
  padding: 22px;
  box-shadow: none;
}

.setup-card.wide {
  grid-column: 1 / -1;
}

pre {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.18);
  overflow: auto;
}

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

  .nav-links {
    position: fixed;
    inset: 78px 16px auto 16px;
    display: grid;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 14px;
    box-shadow: var(--shadow);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
  }

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

  .hero-grid,
  .two-col,
  .skills-layout,
  .project-grid,
  .card-grid,
  .cert-grid,
  .footer-grid,
  .admin-dashboard,
  .collection-layout,
  .setup-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .navbar {
    min-height: 68px;
  }

  .brand-text {
    display: none;
  }

  .section-heading.split,
  .references-card,
  .admin-content-header,
  .collection-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 18px;
  }

  .admin-tabs {
    grid-template-columns: 1fr;
  }
}
