:root {
  color-scheme: dark;
  font-family: Cambria, Georgia, serif;
  --accent: #4da3ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #ffffff;
  position: relative;
  overflow-x: hidden;
}

.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  z-index: -1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(40px, 7vw, 140px);
  backdrop-filter: blur(8px);
  background: rgba(8, 8, 8, 0.36);
}

.brand {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
}

.nav-links {
  display: flex;
  gap: 18px;
}

.nav-links a {
  color: #f3f3f3;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  font-size: 1rem;
}

.nav-links a::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  border-radius: 999px;
  background: var(--accent);
  transition: transform 0.2s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.nav-links a:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.nav-links a.active {
  background: rgba(77, 163, 255, 0.22);
  box-shadow: 0 8px 18px rgba(77, 163, 255, 0.18);
}

.nav-links a.active::before {
  transform: translateY(-50%) scaleY(0);
}

.page-content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 90px);
  padding: 24px clamp(24px, 5vw, 80px);
}

.hero-card,
.content-card {
  width: 90%;
  max-width: 1600px;
  padding: clamp(28px, 3vw, 56px);
}

.hero-card h1,
.page-title {
  text-align: center;
  margin-top: 0;
  margin-bottom: 12px;
  font-size: clamp(2.6rem, 3.5vw, 4.2rem);
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-card p,
.content-card p,
.about-copy p,
.plain-list p,
.git-history p {
  color: #f5f5f5;
  line-height: 1.75;
  font-size: 1.12rem;
}

.nav-stack {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.nav-stack a {
  color: #ffffff;
  text-decoration: none;
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-stack a:hover {
  transform: translateY(-2px);
  background: rgba(77, 163, 255, 0.18);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.about-layout {
  display: grid;
  grid-template-columns: clamp(220px, 18vw, 300px) 1fr;
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
  margin-top: 24px;
}

.profile-photo {
  width: clamp(220px, 18vw, 300px);
  height: clamp(220px, 18vw, 300px);
  border-radius: 24px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
}

.about-copy h2,
.plain-list h2,
.git-history h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 1.8vw, 2rem);
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  text-transform: uppercase;
}

.git-history {
  margin-top: 32px;
}

.graph-shell {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
}

#contribution-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  background: transparent;
}

#contribution-image.filter-dark {
  filter: invert(1) hue-rotate(180deg);
}

body.about-page .about-layout,
body.about-page .about-copy,
body.about-page .git-history,
.content-card {
  text-align: left;
}

.content-card {
  align-items: flex-start;
}

/* Tall-content pages: anchor to top instead of centering, left-align titles */
body.tall-page .page-content {
  align-items: flex-start;
  padding-top: 48px;
  padding-bottom: 64px;
}

body.tall-page .page-title {
  text-align: left;
}

/* Individual section blocks */
.section-item {
  margin-bottom: 40px;
}

.section-header {
  text-decoration: underline;
  text-underline-offset: 7px;
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.7rem;
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  text-transform: uppercase;
}

.section-meta {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px 0;
}

.section-desc {
  color: #f5f5f5;
  line-height: 1.75;
  font-size: 1.08rem;
  margin: 0 0 12px 0;
}

.paper-title {
  font-style: italic;
  font-size: 1.08rem;
  color: #d8d8d8;
  margin: 10px 0 14px 0;
  font-family: Cambria, Georgia, serif;
  font-weight: normal;
}

.pub-closing {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-style: italic;
  color: rgba(255, 255, 255, 0.75);
}

.section-item ul {
  margin: 0;
  padding-left: 22px;
}

.section-item ul li {
  color: #f0f0f0;
  line-height: 1.75;
  font-size: 1.03rem;
  margin-bottom: 7px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tech-tag {
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: #00e676;
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 36px 0;
}

/* About page certifications */
.certifications {
  margin-top: 36px;
  text-align: center;
}

.certifications h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: clamp(1.5rem, 1.8vw, 2rem);
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  text-transform: uppercase;
}

.cert-list {
  display: flex;
  flex-wrap: wrap;
  gap: 80px;
  justify-content: center;
  align-items: flex-end;
}

.cert-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cert-logo {
  width: 160px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.cert-logo.cert-logo--snowflake {
  width: 200px;
}

.cert-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.cert-name {
  font-size: 0.78rem;
  color: #f5f5f5;
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cert-code {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* About page contact section */
.about-contact {
  margin-top: 36px;
}

.about-contact h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.7rem;
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  text-transform: uppercase;
}

/* Contact */
.contact-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
  text-decoration: none;
  color: #00e676;
  transition: opacity 0.2s ease;
}

.contact-item:hover {
  opacity: 0.7;
}

.contact-icon {
  font-size: 1rem;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  font-weight: 700;
  color: #00e676;
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-family: "Bahnschrift SemiLight", "Bahnschrift", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.contact-value {
  font-size: 1rem;
  color: #00e676;
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .about-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  body.about-page .about-layout,
  body.about-page .about-copy {
    text-align: center;
  }
}
