:root {
  color-scheme: dark;
  --bg: #030510;
  --surface: rgba(7, 10, 25, 0.56);
  --surface-strong: rgba(9, 13, 31, 0.76);
  --text: #f7fbff;
  --muted: rgba(232, 240, 255, 0.68);
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.34);
  --cyan: #9fb4ff;
  --pink: #d8a7c4;
  --lime: #d8c6a6;
  --violet: #b8a7e6;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --button-shadow: 0 0 8px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.08),
    inset 3px 3px 0.5px -3.5px rgba(255, 255, 255, 0.22),
    inset -3px -3px 0.5px -3.5px rgba(255, 255, 255, 0.78),
    inset 1px 1px 1px -0.5px rgba(255, 255, 255, 0.42),
    inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.42),
    inset 0 0 6px 6px rgba(255, 255, 255, 0.1),
    0 0 18px rgba(54, 229, 255, 0.12);
}

body.light-theme {
  color-scheme: light;
  --bg: #eaf3ff;
  --surface: rgba(255, 255, 255, 0.54);
  --surface-strong: rgba(255, 255, 255, 0.76);
  --text: #07111f;
  --muted: rgba(7, 17, 31, 0.68);
  --line: rgba(7, 17, 31, 0.14);
  --line-strong: rgba(7, 17, 31, 0.28);
  --shadow: 0 28px 90px rgba(55, 79, 120, 0.2);
  --button-shadow: 0 0 8px rgba(255, 255, 255, 0.2), 0 6px 18px rgba(62, 88, 135, 0.12),
    inset 3px 3px 0.5px -3px rgba(255, 255, 255, 0.86),
    inset -3px -3px 0.5px -3px rgba(28, 42, 72, 0.24),
    inset 0 0 8px 6px rgba(255, 255, 255, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(159, 180, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 78% 16%, rgba(216, 167, 196, 0.14), transparent 26rem),
    linear-gradient(135deg, var(--bg) 0%, #080a18 52%, #050b14 100%);
  color: var(--text);
  font-family: Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  transition: background 260ms ease, color 260ms ease;
}

body.light-theme {
  background:
    radial-gradient(circle at 16% 12%, rgba(159, 180, 255, 0.3), transparent 30rem),
    radial-gradient(circle at 82% 12%, rgba(216, 167, 196, 0.22), transparent 28rem),
    linear-gradient(135deg, #f4fbff 0%, #eaf3ff 48%, #f6f0ff 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(3, 5, 16, 0.1), rgba(3, 5, 16, 0.8)),
    radial-gradient(circle at 50% 0%, transparent, rgba(0, 0, 0, 0.46) 72%);
  transition: background 260ms ease;
}

body.light-theme::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(246, 250, 255, 0.72)),
    radial-gradient(circle at 50% 0%, transparent, rgba(230, 240, 255, 0.52) 72%);
}

body.modal-open {
  overflow: hidden;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
}

.glass-filter {
  position: fixed;
  width: 0;
  height: 0;
  pointer-events: none;
}

#neuro {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
  pointer-events: none;
}

body.light-theme #neuro {
  opacity: 0.36;
  filter: saturate(0.9) brightness(1.28);
}

.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.052) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.96), transparent 76%);
}

body.light-theme .ambient-grid {
  background-image:
    linear-gradient(rgba(7, 17, 31, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 17, 31, 0.06) 1px, transparent 1px);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--lime));
  box-shadow: 0 0 22px rgba(159, 180, 255, 0.48);
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 32px));
  transform: translateX(-50%);
}

.brand {
  width: 50px;
  min-width: 50px;
  padding-inline: 0;
  font-family: "Space Grotesk", Geist, sans-serif;
  font-weight: 700;
}

.nav-panel {
  display: flex;
  position: absolute;
  justify-content: center;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  padding: 8px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045)),
    var(--surface);
  box-shadow: var(--button-shadow), var(--shadow);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%) url("#container-glass");
  overflow: hidden;
}

.nav-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 8%, rgba(255, 255, 255, 0.18), transparent 42%);
  opacity: 0.72;
  pointer-events: none;
  transform: translateX(-42%);
}

.nav-panel a {
  position: relative;
  z-index: 1;
  min-height: 36px;
  padding: 9px 17px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-panel a:hover,
.nav-panel a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  outline: none;
  transform: translateY(-1px);
}

.nav-panel a:active {
  transform: translateY(1px) scale(0.99);
}

body.light-theme .nav-panel a:hover,
body.light-theme .nav-panel a:focus-visible {
  background: rgba(7, 17, 31, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.liquid-button,
.liquid-icon {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  box-shadow: var(--button-shadow);
  color: var(--text);
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 700;
  isolation: isolate;
  overflow: hidden;
  transition: transform 250ms cubic-bezier(0.1, 0.4, 0.2, 1), filter 220ms ease, border-color 220ms ease;
}

.liquid-button::before,
.liquid-icon::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  content: "";
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent 32%),
    rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%) url("#container-glass");
}

.liquid-button::after,
.liquid-icon::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  content: "";
  background: linear-gradient(110deg, transparent 8%, rgba(255, 255, 255, 0.26), transparent 42%);
  opacity: 0;
  transform: translateX(-120%);
  transition: transform 520ms ease, opacity 220ms ease;
}

.liquid-button:hover,
.liquid-icon:hover,
.liquid-button:focus-visible,
.liquid-icon:focus-visible {
  border-color: var(--line-strong);
  filter: brightness(1.08);
  outline: none;
  transform: translateY(-2px) scale(1.02);
}

.liquid-button:active,
.liquid-icon:active {
  transform: translateY(2px) scale(0.99);
}

.liquid-button:hover::after,
.liquid-icon:hover::after {
  opacity: 1;
  transform: translateX(120%);
}

.primary-action {
  border-color: rgba(54, 118, 255, 0.48);
  background: linear-gradient(135deg, rgba(159, 180, 255, 0.22), rgba(216, 167, 196, 0.16));
}

.liquid-icon {
  width: 48px;
  min-width: 48px;
  padding: 0;
}

.theme-toggle .sun,
.theme-toggle .moon {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  transition: opacity 200ms ease, transform 200ms ease;
}

.theme-toggle .sun {
  border: 2px solid currentColor;
  opacity: 0;
  transform: scale(0.55) rotate(-35deg);
}

.theme-toggle .moon {
  background: currentColor;
  box-shadow: inset -6px 0 0 rgba(8, 12, 28, 0.96);
  opacity: 1;
}

body.light-theme .theme-toggle .sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

body.light-theme .theme-toggle .moon {
  opacity: 0;
  transform: scale(0.55) rotate(35deg);
}

main,
.site-footer,
.project-modal {
  position: relative;
  z-index: 2;
}

.section-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 126px 0 82px;
  text-align: center;
}

.hero-copy {
  display: grid;
  justify-items: center;
}

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

body.light-theme .eyebrow {
  color: #0d7580;
}

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

.interactive-title,
h2,
h3,
.project-card strong {
  font-family: "Space Grotesk", Geist, sans-serif;
  letter-spacing: 0;
}

.interactive-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 860px;
  margin-bottom: 22px;
  gap: 0.18em;
  font-family: Audiowide, "Space Grotesk", Geist, sans-serif;
  font-size: clamp(2.75rem, 6.4vw, 5.7rem);
  font-weight: 400;
  line-height: 1.02;
  text-shadow: 0 0 34px rgba(63, 130, 255, 0.18);
}

.interactive-title span {
  display: inline-block;
  transition: transform 260ms ease, color 260ms ease, text-shadow 260ms ease;
}

.interactive-title span:hover {
  color: rgba(71, 110, 239, 0.74);
  text-shadow: 0 0 20px rgba(71, 110, 239, 0.46), 0 0 38px rgba(216, 167, 196, 0.22);
  transform: translateY(-8px) rotate(-2deg) scale(1.04);
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2.25rem, 4.7vw, 4.9rem);
  line-height: 0.96;
}

h3,
.project-card strong {
  margin-bottom: 13px;
  font-size: 1.22rem;
  line-height: 1.12;
}

.hero-lede {
  max-width: 640px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.62;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.glass-panel,
.project-card,
.project-modal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(26px) saturate(168%);
  backdrop-filter: blur(26px) saturate(168%);
}

body.light-theme .glass-panel,
body.light-theme .project-card,
body.light-theme .project-modal-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.36)),
    var(--surface);
}

.panel-label,
.experience-date,
.coordinate-index,
.project-kicker,
.research-card > span {
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.coordinates-section,
.projects-section,
.work-experience-section,
.skills-section,
.research-section,
.about-section {
  padding-top: 96px;
}

.section-heading {
  display: grid;
  margin-bottom: 34px;
  gap: 12px;
}

.section-heading p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.centered {
  justify-items: center;
  text-align: center;
}

.coordinate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.coordinate-grid .glass-panel {
  min-height: 230px;
  padding: 24px;
}

.coordinate-grid p,
.skill-card p,
.experience-card p,
.research-card p,
.about-card p,
.contact-card p {
  color: var(--muted);
  line-height: 1.68;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 320px;
  padding: 24px;
  text-align: left;
  transform-style: preserve-3d;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: rgba(183, 202, 205, 0.38);
  background:
    linear-gradient(145deg, rgba(159, 180, 255, 0.13), rgba(216, 167, 196, 0.1)),
    var(--surface-strong);
  box-shadow: var(--shadow), 0 0 48px rgba(159, 180, 255, 0.12);
  outline: none;
}

.project-card p {
  margin-bottom: 28px;
  color: var(--muted);
  line-height: 1.62;
}

.project-more {
  margin-top: auto;
  color: var(--lime);
  font-weight: 800;
}

body.light-theme .project-more {
  color: #0d7580;
}

.experience-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
  gap: 28px;
}

.experience-mark {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 180, 255, 0.22), rgba(216, 167, 196, 0.12), transparent 70%);
  color: var(--text);
  font-family: "Space Grotesk", Geist, sans-serif;
  font-weight: 800;
}

.skills-section {
  text-align: center;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.skill-card {
  min-height: 210px;
  padding: 22px;
}

.skill-card h3 {
  margin-bottom: 18px;
}

.research-card,
.about-card,
.contact-card {
  padding: clamp(28px, 5vw, 58px);
}

.research-card + .research-card {
  margin-top: 16px;
}

.research-card h3 {
  max-width: 900px;
  margin-top: 14px;
  font-size: clamp(1.45rem, 3vw, 2.6rem);
}

.about-card {
  max-width: 900px;
  margin: 0 auto;
}

.contact-section {
  padding: 120px 0 104px;
  overflow: hidden;
}

.marquee {
  display: flex;
  width: 100%;
  margin-bottom: 36px;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.marquee div {
  display: flex;
  min-width: max-content;
  animation: marquee 18s linear infinite;
}

.marquee span {
  padding: 18px 22px;
  color: transparent;
  font-family: "Space Grotesk", Geist, sans-serif;
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

body.light-theme .marquee span {
  -webkit-text-stroke-color: rgba(7, 17, 31, 0.36);
}

.contact-card {
  text-align: center;
}

.contact-card h2,
.contact-card p {
  margin-inline: auto;
}

.contact-card p:not(.eyebrow) {
  max-width: 720px;
  font-size: 1.08rem;
}

.contact-actions {
  justify-content: center;
  margin-top: 28px;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  perspective: 1600px;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.project-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.64);
  cursor: pointer;
}

body.light-theme .modal-backdrop {
  background: rgba(225, 236, 250, 0.66);
}

.project-modal-card {
  position: fixed;
  top: var(--card-top, 50%);
  left: var(--card-left, 50%);
  z-index: 1;
  width: var(--card-width, 320px);
  height: var(--card-height, 320px);
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: clamp(30px, 5vw, 64px);
  transform: rotateY(-92deg);
  transform-origin: center center;
  opacity: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.project-modal.active .project-modal-card {
  animation: cardFlipExpand 680ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.project-modal-card::-webkit-scrollbar {
  width: 7px;
}

.project-modal-card::-webkit-scrollbar-track {
  background: transparent;
}

.project-modal-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line-strong);
}

.project-modal-card h2 {
  max-width: 1050px;
  margin-bottom: 22px;
  font-family: "Space Grotesk", Geist, sans-serif;
  font-size: clamp(2.6rem, 5.4vw, 5.5rem);
  line-height: 0.98;
}

.project-modal-card > p:not(.eyebrow),
.project-modal-card .modal-description {
  max-width: 920px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.project-modal-card .eyebrow {
  margin-bottom: 16px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  margin: 28px 0 42px;
  gap: 10px;
}

.modal-tags span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0;
}

.modal-close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%) rotate(-90deg);
}

.project-modal-sections {
  display: grid;
  gap: 52px;
}

.modal-section-spaced {
  padding-top: 24px;
}

.project-modal-sections > section,
.project-modal-sections > div {
  margin: 0;
}

.project-modal-sections > * + * {
  margin-top: 0;
}

.project-modal-sections .modal-section-label,
.project-section-label {
  margin-bottom: 14px;
  color: var(--text);
  font-family: "Space Grotesk", Geist, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.project-modal-sections > .modal-section-spaced {
  padding-top: 24px;
}

.project-section-title {
  margin-bottom: 22px;
  color: var(--text);
  font-family: "Space Grotesk", Geist, sans-serif;
  font-size: 1.25rem;
  line-height: 1.2;
}

.project-section-text {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-family: Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.78;
}

.project-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-section-card {
  display: flex;
  position: relative;
  flex-direction: column;
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(5, 8, 20, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.project-section-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0.8;
}

.project-section-card:hover {
  border-color: var(--line-strong);
  background:
    linear-gradient(145deg, rgba(159, 180, 255, 0.11), rgba(216, 167, 196, 0.065)),
    rgba(9, 13, 31, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 45px rgba(0, 0, 0, 0.2),
    0 0 28px rgba(159, 180, 255, 0.07);
  transform: translateY(-3px);
}

.project-section-card h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-family: "Space Grotesk", Geist, sans-serif;
  font-size: 1.2rem;
  line-height: 1.2;
}

.project-section-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.68;
}

.project-section-image {
  width: min(100%, 900px);
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(159, 180, 255, 0.07), rgba(216, 167, 196, 0.045)),
    rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.project-section-image img {
  display: block;
  width: 350px;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 4px;
}

body.light-theme .project-section-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.32);
}

body.light-theme .project-section-card:hover {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(159, 180, 255, 0.12)),
    rgba(255, 255, 255, 0.42);
}

body.light-theme .project-section-image {
  background:
    linear-gradient(145deg, rgba(159, 180, 255, 0.1), rgba(216, 167, 196, 0.06)),
    rgba(255, 255, 255, 0.42);
}
.workflow-card {
  display: flex;
  position: relative;
  flex-direction: column;
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(5, 8, 20, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

body.light-theme .workflow-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.32);
}

.workflow-number {
  display: block;
  margin-bottom: 42px;
  color: var(--cyan);
  font-family: "Space Grotesk", Geist, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.workflow-card h3 {
  margin-bottom: 14px;
  font-family: "Space Grotesk", Geist, sans-serif;
  font-size: 1.3rem;
  line-height: 1.15;
}

.workflow-card p {
  margin: 0;
  color: var(--muted);
  font-family: Geist, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.94rem;
  line-height: 1.68;
}

.workflow-card:hover,
.pattern-card:hover {
  border-color: var(--line-strong);
  background:
    linear-gradient(145deg, rgba(159, 180, 255, 0.1), rgba(216, 167, 196, 0.055)),
    rgba(9, 13, 31, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 40px rgba(0, 0, 0, 0.18),
    0 0 26px rgba(159, 180, 255, 0.06);
  transform: translateY(-3px);
}

.modal-detection-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.detection-item {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

#modal-patterns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pattern-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(5, 8, 20, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

body.light-theme .pattern-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.32);
}

body.light-theme .workflow-card:hover,
body.light-theme .pattern-card:hover {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(159, 180, 255, 0.1)),
    rgba(255, 255, 255, 0.42);
}

.pattern-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 14px;
}

.pattern-heading h3 {
  margin: 0;
  font-family: "Space Grotesk", Geist, sans-serif;
  font-size: 1.1rem;
  line-height: 1.2;
}

.pattern-heading span {
  flex-shrink: 0;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  font-family: "Space Grotesk", Geist, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pattern-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.modal-link {
  display: inline-flex;
  margin-top: 34px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  gap: 16px;
}

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

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

@keyframes ringPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.52;
  }

  100% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes cardFlipExpand {
  0% {
    top: var(--card-top, 50%);
    left: var(--card-left, 50%);
    width: var(--card-width, 320px);
    height: var(--card-height, 320px);
    opacity: 0.36;
    transform: rotateY(-92deg) scale(0.98);
  }

  48% {
    top: var(--card-top, 50%);
    left: var(--card-left, 50%);
    width: var(--card-width, 320px);
    height: var(--card-height, 320px);
    opacity: 1;
    transform: rotateY(0deg) scale(1.02);
  }

  100% {
    top: 16px;
    left: 16px;
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    opacity: 1;
    transform: rotateY(0deg) scale(1);
  }
}

@media (max-width: 980px) {
  .site-header {
    display: grid;
    grid-template-columns: auto auto;
    gap: 12px;
  }

  .nav-panel {
    position: static;
    transform: none;
    order: 3;
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

  .nav-panel a {
    flex: 1;
    text-align: center;
  }

  .header-actions {
    justify-self: end;
  }

  .hero {
    min-height: auto;
    padding-top: 168px;
  }

  .coordinate-grid,
  .project-grid,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  #modal-workflow,
  #modal-patterns,
  .project-section-grid {
    grid-template-columns: 1fr;
  }

  .workflow-card {
    min-height: auto;
  }

  .project-modal-card {
    padding: 42px;
  }

  .project-modal-card h2 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
  }

  .architecture-diagram {
    width: min(100%, 760px);
  }

  .architecture-diagram img {
    max-height: 360px;
  }
}

@media (max-width: 600px) {
  .site-header {
    top: 12px;
    width: min(100% - 20px, 1160px);
    gap: 8px;
  }

  .resume-button {
    min-height: 44px;
    padding-inline: 14px;
  }

  .brand,
  .liquid-icon {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .section-shell,
  .site-footer {
    width: min(100% - 24px, 1160px);
  }

  .hero {
    padding-top: 158px;
    gap: 24px;
  }

  .interactive-title {
    font-size: clamp(2.25rem, 12.5vw, 3.8rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3.3rem);
  }

  .project-card,
  .coordinate-grid .glass-panel,
  .skill-card {
    min-height: auto;
    padding: 20px;
  }

  .experience-card {
    grid-template-columns: 1fr;
  }

  .experience-mark {
    width: 96px;
    height: 96px;
  }

  .project-modal {
    padding: 10px;
  }

  .project-modal-card {
    min-height: auto;
    max-height: calc(100vh - 20px);
    padding: 58px 20px 28px;
    overflow: auto;
  }

  .project-modal-card h2 {
    margin-bottom: 18px;
    font-size: clamp(2.15rem, 11vw, 3.5rem);
    line-height: 1;
  }

  .project-modal-card > p:not(.eyebrow),
  .project-modal-card .modal-description {
    font-size: 0.98rem;
    line-height: 1.68;
  }

  .modal-tags {
    margin: 22px 0 34px;
  }

  .project-modal-sections > * {
    margin: 0;
  }

  #modal-workflow,
  #modal-patterns,
  .project-section-grid {
    grid-template-columns: 1fr;
  }

  .project-modal-sections {
  gap: 36px;
}

.project-modal-sections > section,
.project-modal-sections > div {
  margin: 0;
}

  .project-section-card {
    min-height: auto;
    padding: 20px;
  }

  .project-section-image {
    padding: 8px;
  }

  .project-section-image img {
    max-height: 320px;
  }

  .workflow-card {
    min-height: auto;
    padding: 20px;
  }

  .workflow-number {
    margin-bottom: 28px;
  }

  .pattern-card {
    padding: 20px;
  }

  .pattern-heading {
    flex-direction: column;
    gap: 10px;
  }

  .pattern-heading span {
    align-self: flex-start;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .architecture-diagram {
    padding: 8px;
  }

  .architecture-diagram img {
    max-height: 260px;
  }

  .architecture-heading h3 {
    font-size: 1.15rem;
  }

  .architecture-heading p {
    font-size: 0.88rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.architecture-image {
  width: 90% !important;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}