:root {
  --bg: #0d1117;
  --bg-soft: rgba(21, 32, 45, 0.88);
  --surface: rgba(15, 25, 38, 0.74);
  --surface-strong: rgba(8, 18, 31, 0.95);
  --line: rgba(149, 176, 204, 0.18);
  --text: #ebf2fa;
  --muted: #9bb2c8;
  --accent: #7dd3fc;
  --accent-strong: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.1), transparent 24%),
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.08), transparent 26%),
    linear-gradient(180deg, #041018 0%, #08131d 38%, #0b1118 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 92%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 20%, rgba(125, 211, 252, 0.14), transparent 0 7px, transparent 8px),
    radial-gradient(circle at 82% 18%, rgba(125, 211, 252, 0.12), transparent 0 6px, transparent 7px),
    radial-gradient(circle at 74% 70%, rgba(245, 158, 11, 0.12), transparent 0 6px, transparent 7px),
    linear-gradient(90deg, transparent 12%, rgba(125, 211, 252, 0.08) 12.2%, transparent 12.6%),
    linear-gradient(180deg, transparent 26%, rgba(125, 211, 252, 0.08) 26.2%, transparent 26.6%);
  opacity: 0.55;
}

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

.trace,
.node,
.chip {
  position: absolute;
}

.trace {
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.22), transparent);
  box-shadow: 0 0 18px rgba(125, 211, 252, 0.12);
}

.trace-a {
  top: 18%;
  left: -4%;
  width: 36%;
  height: 1px;
  animation: drift-x 18s ease-in-out infinite;
}

.trace-b {
  top: 44%;
  right: -8%;
  width: 32%;
  height: 1px;
  transform: rotate(-24deg);
  animation: drift-y 22s ease-in-out infinite;
}

.trace-c {
  bottom: 16%;
  left: 62%;
  width: 22%;
  height: 1px;
  transform: rotate(90deg);
  animation: pulse-line 10s ease-in-out infinite;
}

.node {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.7);
  box-shadow: 0 0 20px rgba(125, 211, 252, 0.45);
}

.node-a {
  top: 17%;
  left: 30%;
  animation: pulse-node 4s ease-in-out infinite;
}

.node-b {
  top: 49%;
  right: 24%;
  animation: pulse-node 5s ease-in-out infinite 0.8s;
}

.node-c {
  bottom: 18%;
  right: 15%;
  width: 12px;
  height: 12px;
  background: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
  animation: pulse-node 6s ease-in-out infinite 1.2s;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 32px;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 0.8rem;
  color: rgba(235, 242, 250, 0.8);
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(9, 20, 30, 0.68);
  backdrop-filter: blur(8px);
}

.chip-a {
  top: 14%;
  right: 10%;
  animation: float-chip 11s ease-in-out infinite;
}

.chip-b {
  top: 58%;
  left: 7%;
  animation: float-chip 12s ease-in-out infinite 1.4s;
}

.chip-c {
  bottom: 10%;
  left: 68%;
  animation: float-chip 10s ease-in-out infinite 0.6s;
}

a {
  color: inherit;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  background: rgba(6, 16, 24, 0.66);
}

.brand,
.nav a,
.nav-contact,
.button,
.contact-card {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 2px solid rgba(125, 211, 252, 0.3);
  object-fit: cover;
  object-position: top center;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.topbar-meta a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

.topbar-meta a:hover,
.topbar-meta a:focus-visible {
  color: var(--text);
}

.topbar-divider {
  width: 1px;
  min-height: 2.2rem;
  background: linear-gradient(180deg, transparent, rgba(125, 211, 252, 0.28), transparent);
}

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

.nav a,
.nav-contact {
  color: var(--muted);
  font: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.nav a:hover,
.nav a:focus-visible,
.nav-contact:hover,
.nav-contact:focus-visible {
  color: var(--text);
}

.hero,
.section {
  margin-top: 2rem;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: auto;
  padding: 2rem 0 1rem;
}

.hero-copy,
.panel,
.timeline-item,
.contact-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  border-radius: 2rem;
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(14, 25, 39, 0.9), rgba(9, 17, 27, 0.86));
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: auto -10% 18% 52%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.28), transparent);
  transform: rotate(-10deg);
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: 1.2rem 1.2rem auto auto;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 1.2rem;
  transform: rotate(12deg);
  opacity: 0.65;
}

.eyebrow,
.card-label,
.role,
.school,
.project-title {
  font-family: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow,
.card-label {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 900;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 700;
  line-height: 1.08;
}

h1 {
  margin-top: 0.7rem;
  font-size: clamp(2.9rem, 5.8vw, 5.15rem);
  max-width: 100%;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  max-width: 14ch;
}

h3 {
  font-size: 1.25rem;
}

.lede,
.panel p,
.timeline-body li,
.contact-card span {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.lede {
  max-width: 58ch;
  margin-top: 1.25rem;
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
}

.button-primary {
  color: #07131f;
  background: linear-gradient(135deg, var(--accent), #d6f7ff);
}

.button-secondary {
  border: 1px solid rgba(125, 211, 252, 0.2);
  color: var(--text);
  background: rgba(125, 211, 252, 0.08);
}

.topbar-link {
  min-height: 2.65rem;
  padding-inline: 1rem;
  cursor: pointer;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  align-items: center;
}

.hero-summary {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-card-copy {
  flex: 1;
  min-width: 300px;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background:
    linear-gradient(180deg, rgba(16, 33, 50, 0.98), rgba(8, 18, 31, 0.96)),
    linear-gradient(90deg, rgba(125, 211, 252, 0.08), transparent);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.06);
}

.looking-for-card {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 1.1rem;
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(14, 22, 34, 0.9)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent);
  position: relative;
  z-index: 1;
}

.looking-for-card p:last-child {
  margin: 0.45rem 0 0;
}

.hero-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orbit-ring,
.signal {
  position: absolute;
}

.orbit-ring {
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 999px;
}

.orbit-ring-a {
  width: 220px;
  height: 220px;
  top: -84px;
  right: -34px;
  animation: spin-slow 20s linear infinite;
}

.orbit-ring-b {
  width: 146px;
  height: 146px;
  top: -46px;
  right: 4px;
  border-style: dashed;
  animation: spin-reverse 14s linear infinite;
}

.signal {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.78);
  box-shadow: 0 0 18px rgba(125, 211, 252, 0.42);
}

.signal-a {
  top: 56px;
  right: 78px;
  animation: blink-signal 3.5s ease-in-out infinite;
}

.signal-b {
  top: 90px;
  right: 156px;
  animation: blink-signal 4.2s ease-in-out infinite 0.8s;
}

.signal-c {
  top: 150px;
  right: 92px;
  background: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.34);
  animation: blink-signal 5s ease-in-out infinite 0.4s;
}

.section-heading {
  margin-bottom: 1.25rem;
}

.grid-two,
.skills-grid,
.contact-grid {
  display: grid;
  gap: 1.25rem;
}

.grid-two {
  grid-template-columns: 1.1fr 0.9fr;
}

.panel,
.timeline-item,
.contact-card {
  border-radius: 1.5rem;
  padding: 1.4rem;
}

.callout {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(10, 21, 33, 0.75));
}

.quote {
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.35rem;
  line-height: 1.45;
}

.quote-source {
  margin-top: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.timeline-meta {
  padding-right: 1rem;
  border-right: 1px solid var(--line);
}

.company-logo {
  display: block;
  max-width: 170px;
  height: 40px;
  width: auto;
  margin-bottom: 0.9rem;
  object-fit: contain;
  object-position: left center;
}

.company-logo.is-square {
  width: 52px;
  height: 52px;
}

.company-logo.is-wide {
  max-width: 180px;
}

.role,
.school,
.project-title {
  margin-bottom: 0.3rem;
  color: var(--text);
  font-size: 1rem;
}

.timeline-meta p {
  margin: 0.2rem 0;
  color: var(--muted);
}

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

.timeline-body li + li {
  margin-top: 0.7rem;
}

.metric-highlight {
  display: inline-block;
  padding: 0.08rem 0.45rem;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.14), rgba(245, 158, 11, 0.12));
  font-weight: 700;
}

.education-card {
  max-width: 720px;
}

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

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

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: linear-gradient(180deg, rgba(8, 18, 31, 0.96), rgba(14, 24, 37, 0.96));
}

.contact-card strong {
  font-size: 1.05rem;
}

.contact-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(1, 7, 12, 0.7);
  backdrop-filter: blur(14px);
}

.contact-modal {
  width: min(100%, 680px);
  padding: 1.5rem;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 1.6rem;
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(11, 20, 31, 0.98), rgba(7, 15, 24, 0.96));
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.45);
}

.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 2.6rem;
  margin-bottom: 0.35rem;
  position: relative;
}

.contact-modal-header h2 {
  text-align: center;
  max-width: none;
}

.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 2.6rem;
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible,
.button:hover,
.button:focus-visible {
  filter: brightness(1.08);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-modal-success {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.contact-modal-success h2 {
  max-width: 14ch;
}

.contact-modal-success p {
  margin: 0;
}

.contact-modal-success .contact-form-actions {
  justify-content: center;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 1rem;
  color: var(--text);
  font: inherit;
  background: rgba(255, 255, 255, 0.04);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form-note {
  margin: -0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

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

.contact-form-actions .button-secondary {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.1);
}

body.modal-open {
  overflow: hidden;
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-reverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes blink-signal {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

@keyframes pulse-node {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

@keyframes float-chip {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes drift-x {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.5;
  }
  50% {
    transform: translateX(28px);
    opacity: 0.9;
  }
}

@keyframes drift-y {
  0%,
  100% {
    transform: rotate(-24deg) translateY(0);
    opacity: 0.45;
  }
  50% {
    transform: rotate(-24deg) translateY(-16px);
    opacity: 0.85;
  }
}

@keyframes pulse-line {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.9;
  }
}

@media (max-width: 980px) {
  .grid-two,
  .timeline-item,
  .skills-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .ambient-grid {
    opacity: 0.7;
  }

  .timeline-meta {
    padding-right: 0;
    padding-bottom: 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

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

  .topbar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.8rem 0.95rem;
    border-radius: 1.25rem;
  }

  .brand {
    gap: 0.65rem;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .topbar-meta,
  .nav {
    grid-column: 1 / -1;
  }

  .topbar-meta {
    gap: 0.45rem 0.75rem;
    font-size: 0.84rem;
    line-height: 1.3;
  }

  .topbar-divider {
    display: none;
  }

  .nav {
    gap: 0.7rem 0.9rem;
    font-size: 0.92rem;
  }

  .topbar-link {
    align-self: center;
    padding: 0.65rem 0.95rem;
    white-space: nowrap;
  }

  .hero-copy,
  .panel,
  .timeline-item,
  .contact-card {
    border-radius: 1.25rem;
  }

  .hero-copy::after,
  .hero-orbit,
  .chip-c,
  .trace-c {
    display: none;
  }

  .meta-list {
    flex-direction: column;
    gap: 0.45rem;
    align-items: flex-start;
  }

  .contact-modal {
    border-radius: 1.2rem;
    padding: 1.15rem;
  }
}

@media (max-width: 520px) {
  .topbar-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .nav {
    font-size: 0.88rem;
    gap: 0.55rem 0.8rem;
  }

  .hero {
    margin-top: 1.25rem;
  }
}
