:root {
  --bg: #ffffff;
  --fg: #000000;
  --fg-dim: #4a4a4a;
  --fg-dimmer: #8f8f8f;
  --line: #e2e2e2;
  --serif: "Poppins", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --content-max: 880px;
  --hero-max: 1200px;
  --nav-height: 76px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  font-size: 118%;
}

body {
  position: relative;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--fg);
  text-decoration: none;
}

/* ---------- aurora background ---------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 72vw;
  height: 72vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  will-change: transform;
}

.blob-red {
  top: 12%;
  left: 14%;
  background: radial-gradient(circle, #ff6fc2 0%, transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.blob-blue {
  bottom: 12%;
  right: 14%;
  background: radial-gradient(circle, #6ec6ff 0%, transparent 70%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

@keyframes drift-a {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8vw, 10vh) scale(1.15); }
}

@keyframes drift-b {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-10vw, -8vh) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .blob-red, .blob-blue {
    animation: none;
  }
}

/* ---------- paper texture ---------- */

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ---------- top nav ---------- */

.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 3rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.topnav-mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--fg);
}

.topnav-links {
  display: flex;
  gap: 2.25rem;
}

.topnav-links a {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--fg-dim);
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.topnav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--fg);
  transition: right 0.25s ease;
}

.topnav-links a:hover {
  color: var(--fg);
}

.topnav-links a.active {
  color: var(--fg);
}

.topnav-links a.active::after {
  right: 0;
}

/* ---------- main / views ---------- */

main {
  position: relative;
  z-index: 1;
}

.view {
  min-height: 100vh;
  padding: calc(var(--nav-height) + 4rem) 20vw 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: var(--nav-height);
}

.view-inner {
  max-width: none;
  margin: 0 auto;
  width: 100%;
}

#experience .view-inner,
#projects .view-inner,
#contact .view-inner {
  margin: 0 auto;
  max-width: none;
  text-align: center;
}

#experience .view-inner,
#contact .view-inner {
  text-align: left;
}

#experience, #projects, #contact {
  justify-content: flex-start;
}

/* ---------- hero (home) ---------- */

.view-hero {
  text-align: center;
}

.view-hero .view-inner {
  max-width: none;
}

.glass-panel {
  position: relative;
  padding: 2.25rem 2.75rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, 0.18),
    inset -1px -1px 1px rgba(255, 255, 255, 0.06),
    0 12px 40px rgba(0, 0, 0, 0.35);
}

.glass-panel > *:last-child {
  margin-bottom: 0;
}

.hero-eyebrow {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 1.75rem;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.75rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(18px);
}

.hero-name.reveal {
  animation: reveal-up 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-role {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--fg-dim);
  margin-bottom: 1.75rem;
}

.hero-heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.1rem, 2.8vw, 2.1rem);
  line-height: 1.35;
  color: var(--fg-dim);
  margin-bottom: 2.25rem;
  max-width: none;
  white-space: nowrap;
}

#intro-sequence {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.8s ease, transform 0.8s ease, font-size 0.3s ease;
}

#intro-sequence.howdy-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  color: var(--fg);
}

#intro-sequence.visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-name {
  font-weight: 600;
  color: var(--fg);
  font-size: 1.35em;
}

@media (prefers-reduced-motion: reduce) {
  .hero-name {
    animation: none;
    opacity: 1;
    transform: none;
  }

  #intro-sequence {
    transition: none;
  }
}

.hero-text {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--fg-dim);
  max-width: none;
  line-height: 1.7;
  margin-bottom: 2.75rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-tags {
  max-width: 40rem;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--fg);
  color: #000;
}

.btn-primary:hover {
  background: var(--fg-dim);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--fg);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  border-color: var(--fg-dimmer);
  transform: translateY(-1px);
}

/* ---------- page header (experience / projects / contact) ---------- */

.page-eyebrow {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 1rem;
}

#experience .page-eyebrow {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 3.8vw, 3rem);
  letter-spacing: normal;
  text-transform: none;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.intro-bio {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--fg-dim);
  max-width: none;
  line-height: 1.6;
  margin-bottom: 3.5rem;
}

.page-heading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 3.8vw, 3rem);
  margin-bottom: 3.5rem;
}

/* ---------- experience subsections ---------- */

.subsection {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}

.subsection:first-of-type {
  padding-top: 0;
  border-top: none;
}

.section-num {
  display: none;
}

.section-heading {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: var(--fg);
  margin-bottom: 1.75rem;
}

/* ---------- timeline (roadmap) ---------- */

.timeline {
  position: relative;
  list-style: none;
  padding-left: 2.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-bottom: 5rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.timeline-item.reveal {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--fg-dim);
}

.timeline-date {
  font-size: 1.2rem;
  color: var(--fg);
  margin-bottom: 0.4rem;
}

.timeline-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--fg);
  margin-bottom: 0.2rem;
}

.timeline-sub {
  font-size: 1.1rem;
  color: var(--fg-dim);
  margin-bottom: 0.75rem;
}

.timeline-desc {
  font-size: 1.2rem;
  color: var(--fg-dim);
  max-width: none;
  line-height: 1.6;
}

.timeline-item .entry-list {
  margin-top: 1rem;
}

/* ---------- entries ---------- */

.entry + .entry {
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--line);
}

.entry-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

#experience .entry-grid {
  align-items: flex-start;
}

.entry-meta {
  padding-top: 0.2rem;
}

.entry-date {
  font-size: 0.9rem;
  color: var(--fg-dimmer);
  margin-bottom: 0.3rem;
}

.entry-sub {
  font-size: 0.95rem;
  color: var(--fg-dim);
}

.entry-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--fg);
  margin-bottom: 0.2rem;
}

.entry-tag {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dimmer);
  border: 1px solid var(--line);
  padding: 0.2em 0.6em;
  border-radius: 999px;
  margin-left: 0.6em;
  vertical-align: middle;
}

.entry-list {
  list-style: none;
  color: var(--fg-dim);
  font-size: 1.08rem;
  margin: 0.9rem auto 0;
  max-width: 50ch;
  text-align: left;
}

#experience .entry-list {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  font-size: 1.15rem;
}

.entry-list li {
  position: relative;
  padding-left: 1.1em;
  margin-bottom: 0.6em;
}

.entry-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--fg-dimmer);
}

.entry-list.plain {
  margin-top: 0;
}

.cert-source {
  color: var(--fg-dimmer);
}

/* ---------- skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.skill-group {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.skill-group.reveal {
  opacity: 1;
  transform: translateY(0);
}

.skill-label {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.35rem;
}

.skill-value {
  font-size: 1.2rem;
  color: var(--fg-dim);
  line-height: 1.6;
}

/* ---------- tags ---------- */

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

#experience .tag-list {
  justify-content: flex-start;
}

.tag-list li {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--fg-dim);
  border: 1px solid rgba(0, 0, 0, 0.14);
  padding: 0.6em 1.2em;
  border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.tag-list li:hover {
  border-color: var(--fg-dimmer);
  color: var(--fg);
}

/* ---------- summary ---------- */

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.25rem;
}

.summary-label {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.summary-text {
  font-size: 1.2rem;
  color: var(--fg-dim);
}

/* ---------- projects ---------- */

.project-list {
  max-width: none;
  margin: 0 auto;
}

.project-card {
  padding: 2.75rem 0;
  border-top: 1px solid var(--line);
}

.project-card:first-child {
  border-top: none;
  padding-top: 0;
}

.project-kicker {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-dimmer);
  margin-bottom: 0.9rem;
}

.project-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}

.project-org {
  font-size: 1rem;
  color: var(--fg-dim);
  margin-bottom: 1.25rem;
}

/* ---------- contact ---------- */

.contact-intro {
  font-size: 1.5rem;
  max-width: none;
  margin-bottom: 3.5rem;
}

.contact-para {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--fg-dim);
  line-height: 1.7;
  max-width: 70ch;
}

.contact-para a {
  color: var(--fg);
  border-bottom: 1px solid var(--fg-dimmer);
  transition: border-color 0.2s ease;
}

.contact-para a:hover {
  border-color: var(--fg);
}

.social-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-dim);
  transition: color 0.2s ease;
}

.social-link svg {
  width: 32px;
  height: 32px;
}

.social-link:hover {
  color: var(--fg);
}

.contact-list {
  max-width: none;
  margin: 0 0 4rem;
}

.contact-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  transition: opacity 0.2s ease;
}

a.contact-row:hover {
  opacity: 0.7;
}

.contact-row:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-label {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dimmer);
}

.contact-value {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--fg);
  text-align: left;
}

/* ---------- footer ---------- */

.footer {
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.declaration {
  font-size: 0.75rem;
  color: var(--fg-dimmer);
  font-style: italic;
  max-width: 46rem;
  margin-bottom: 1rem;
}

.footer-meta {
  font-size: 0.8rem;
  color: var(--fg-dimmer);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .topnav {
    padding: 0 1.5rem;
  }

  .topnav-links {
    gap: 1.25rem;
  }

  .view {
    padding: calc(var(--nav-height) + 2.5rem) 1.5rem 3.5rem;
  }
}

@media (max-width: 560px) {
  .glass-panel {
    padding: 1.5rem 1.5rem;
    border-radius: 20px;
  }

  .topnav-links {
    gap: 0.9rem;
  }

  .topnav-links a {
    font-size: 0.75rem;
  }

  .skills-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }

  .hero-name,
  .hero-heading {
    white-space: normal;
  }

  .blob {
    width: 80vw;
    height: 80vw;
  }
}
