:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --surface: #151515;
  --accent: #ff8c42;
  --accent-hover: #ffa94d;
  --text: #f5f5f5;
  --muted: #888888;
  --line: rgba(255, 255, 255, 0.07);
  --input-bg: #1a1a1a;
  --danger: #f87171;
  --max-width: 1080px;
  --radius-card: 14px;
  --radius-control: 10px;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

button,
input {
  font: inherit;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

li + li {
  margin-top: 0.42rem;
}

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

h1 {
  margin-bottom: 1.1rem;
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

h1 span {
  display: block;
  color: var(--accent);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

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

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

.eyebrow {
  margin-bottom: 0.85rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem max(1rem, calc((100vw - var(--max-width)) / 2));
  background: rgba(11, 11, 11, 0.85);
  backdrop-filter: blur(20px);
  transition: border-color 180ms ease, background 180ms ease;
}

.site-header.scrolled,
.private-header {
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.site-nav a,
.nav-button {
  padding: 0.5rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.nav-button:hover,
.nav-button:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section-shell {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 8rem 0;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 7rem 1rem 5rem;
  text-align: center;
}

.hero-inner {
  width: min(820px, 100%);
}

.hero-description {
  max-width: 640px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--radius-control);
  font-weight: 700;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button {
  padding: 0.72rem 1.4rem;
  border: 1px solid var(--line);
}

.button.primary {
  border: none;
  background: var(--accent);
  color: var(--bg);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-1px);
  outline: none;
}

.button.secondary {
  background: transparent;
  color: var(--text);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: rgba(255, 140, 66, 0.4);
  color: var(--accent);
  transform: translateY(-1px);
  outline: none;
}

.button.cta {
  border: 1px solid rgba(255, 140, 66, 0.2);
  background: rgba(255, 140, 66, 0.08);
  color: var(--accent);
}

.button.cta:hover,
.button.cta:focus-visible {
  border-color: rgba(255, 140, 66, 0.4);
  background: rgba(255, 140, 66, 0.15);
  outline: none;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(280px, 0.4fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 5rem);
}

.about-copy p {
  max-width: 670px;
  font-size: 1.02rem;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding-top: 3.4rem;
}

.about-tags span,
.metric-list span,
.card-meta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 2rem;
}

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

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

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

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

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

.card,
.auth-card,
.future-panel {
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.card {
  min-height: 190px;
  padding: 1.35rem;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 140, 66, 0.3);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.card p,
.card li {
  color: var(--muted);
}

.compact-card p {
  margin-bottom: 1.25rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
}

.achievement-card strong {
  display: block;
  margin-bottom: 0.85rem;
  color: var(--accent);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.final-cta {
  text-align: center;
}

.final-cta h2 {
  margin-bottom: 0;
}

.site-footer {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
  text-align: center;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-shell {
  width: min(420px, 100%);
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
  outline: none;
}

.auth-card {
  padding: clamp(1.4rem, 5vw, 2rem);
  border-radius: 16px;
}

.auth-card h1 {
  font-size: clamp(2rem, 9vw, 2.7rem);
}

.login-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.login-form label {
  color: var(--muted);
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--input-bg);
  color: var(--text);
}

.login-form input:focus {
  border-color: var(--accent);
  outline: none;
}

.form-error {
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-control);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
}

.full {
  width: 100%;
  margin-top: 0.5rem;
}

.inline-form {
  display: inline;
  margin: 0;
}

.dashboard-shell {
  padding-top: 9rem;
}

.dashboard-hero {
  max-width: 760px;
  margin-bottom: 5rem;
}

.dashboard-hero p {
  color: var(--muted);
}

.dashboard-card {
  min-height: 170px;
}

.future-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 5rem;
  padding: 1.35rem;
}

.future-panel > div:first-child {
  flex: 0 1 360px;
}

.metric-list {
  display: flex;
  flex: 1 1 420px;
  flex-wrap: wrap;
  gap: 0.7rem;
}

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

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 920px) {
  .about-section,
  .future-panel {
    grid-template-columns: 1fr;
  }

  .about-section {
    display: grid;
  }

  .about-tags {
    padding-top: 0;
  }

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

  .future-panel {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding-inline: 0.75rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav:not(.visible) {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0.75rem;
    display: none;
    min-width: min(240px, calc(100vw - 1.5rem));
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  }

  .site-nav.open {
    display: flex;
  }

  .section-shell {
    width: min(100% - 1.25rem, var(--max-width));
    padding: 5.5rem 0;
  }

  .hero {
    padding-inline: 0.75rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .research-grid,
  .experience-grid,
  .achievements-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: auto;
  }

  .dashboard-shell {
    padding-top: 7rem;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Temporary construction landing page */
.construction-page {
  min-height: 100vh;
  overflow: hidden;
}

.construction-shell {
  display: grid;
  min-height: 100vh;
  place-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}

.construction-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(3rem, 11vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}

.loading-dots {
  display: inline-block;
  min-width: 0.75em;
  color: var(--accent);
  text-align: left;
}
