:root {
  --bg-page: #101217;
  --bg-section: #161a21;
  --bg-elevated: #1d222b;
  --surface-glass: rgba(27, 32, 42, 0.76);
  --line-soft: rgba(220, 224, 235, 0.18);
  --text-high: #f3f4f8;
  --text-mid: #d2d5de;
  --text-low: #a6acbb;
  --accent-primary: #b12a3d;
  --accent-primary-deep: #8b1e30;
  --accent-secondary: #3b8f95;
  --focus-ring: rgba(114, 196, 203, 0.72);
  --radius-card: 16px;
  --shadow-1: 0 14px 28px rgba(7, 8, 12, 0.34);
  --shadow-2: 0 24px 46px rgba(6, 7, 11, 0.44);
  --shadow-3: 0 36px 64px rgba(5, 6, 10, 0.55);
  --crimson: var(--accent-primary);
  --crimson-deep: var(--accent-primary-deep);
  --midnight: #0f2038;
  --midnight-soft: #1f385d;
  --teal: var(--accent-secondary);
  --paper: var(--bg-page);
  --cloud: var(--bg-section);
  --line: var(--line-soft);
  --text: var(--text-high);
  --muted: var(--text-mid);
  --radius-lg: 22px;
  --radius-md: var(--radius-card);
  --shadow-soft: var(--shadow-1);
  --shadow-strong: var(--shadow-2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text-high);
  line-height: 1.58;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% -10%, rgba(59, 143, 149, 0.07), transparent 33%),
    radial-gradient(circle at 94% 1%, rgba(177, 42, 61, 0.16), transparent 36%),
    linear-gradient(180deg, #101217 0%, #13161c 58%, #101216 100%);
}

.species-name {
  font-style: italic;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 88% 7%, rgba(59, 143, 149, 0.07), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(177, 42, 61, 0.12), transparent 25%);
  opacity: 0.82;
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.2rem;
  z-index: 300;
  padding: 0.58rem 0.82rem;
  border-radius: 10px;
  background: #132641;
  color: #f4f8ff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 22px rgba(9, 20, 38, 0.22);
  transition: top 160ms ease;
}

.skip-link:focus-visible {
  top: 0.9rem;
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-family: "Fraunces", serif;
}

p {
  margin: 0;
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid rgba(15, 32, 56, 0.12);
  background: rgba(250, 248, 242, 0.95);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  width: min(1220px, calc(100% - 2.2rem));
  margin: 0 auto;
  min-height: 4.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
}

.brand::before {
  content: "";
  width: 0.42rem;
  height: 2.28rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal), var(--crimson));
  box-shadow: 0 8px 14px rgba(14, 117, 125, 0.2);
}

.brand-text {
  display: grid;
  gap: 0.04rem;
}

.brand-text strong {
  font-size: 1rem;
  color: var(--midnight);
}

.brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
}

.top-links {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
}

.top-links a {
  text-decoration: none;
  color: var(--midnight-soft);
  font-size: 0.88rem;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  padding: 0.2rem 0;
}

.top-links a:hover,
.top-links a:focus-visible {
  border-color: var(--crimson);
}

.main {
  width: min(1220px, calc(100% - 2.2rem));
  margin: 2.1rem auto;
  position: relative;
}

.main::before {
  content: "";
  position: absolute;
  right: -2.5rem;
  top: -1.2rem;
  width: min(30vw, 300px);
  height: min(30vw, 300px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 36%, rgba(143, 210, 215, 0.32), rgba(14, 117, 125, 0.12) 54%, rgba(245, 240, 230, 0) 74%),
    radial-gradient(circle at 62% 64%, rgba(165, 28, 48, 0.16), rgba(245, 240, 230, 0) 68%);
  opacity: 0.54;
  pointer-events: none;
  animation: float-orb 18s ease-in-out infinite alternate;
}

.profile-shell {
  display: grid;
  gap: 1.2rem;
}

.profile-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(124deg, rgba(255, 255, 255, 0.98), rgba(245, 240, 230, 0.96));
  box-shadow: var(--shadow-strong);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
}

.profile-copy {
  padding: 1.6rem 1.7rem 1.45rem;
  display: grid;
  gap: 0.74rem;
  align-content: start;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--teal);
}

.profile-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
}

.role {
  color: #314a6c;
  font-size: 0.98rem;
  font-weight: 700;
}

.profile-lab-dates {
  width: fit-content;
  margin-top: -0.08rem;
  border: 1px solid rgba(15, 32, 56, 0.16);
  border-radius: 999px;
  padding: 0.2rem 0.62rem;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
}

.profile-lab-dates strong {
  color: inherit;
}

.bio {
  color: var(--muted);
  max-width: 74ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
  margin-top: 0.18rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  min-height: 2.45rem;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 220ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline-offset: 3px;
}

.button-primary {
  color: #fff;
  background: linear-gradient(130deg, var(--crimson), var(--crimson-deep));
}

.button-secondary {
  color: #2a3e61;
  border: 1px solid var(--line);
  background: #fff;
}

.linkedin-button {
  color: #0a66c2;
  border-color: rgba(10, 102, 194, 0.35);
  background: rgba(10, 102, 194, 0.06);
}

.linkedin-button:hover,
.linkedin-button:focus-visible {
  border-color: rgba(10, 102, 194, 0.65);
}

.profile-photo-wrap {
  border-left: 1px solid var(--line);
  background:
    radial-gradient(circle at 22% 18%, rgba(14, 117, 125, 0.18), transparent 44%),
    radial-gradient(circle at 84% 78%, rgba(165, 28, 48, 0.11), transparent 45%),
    #e7edf5;
  padding: 1.08rem;
  display: grid;
  gap: 0.54rem;
  align-content: start;
}

.profile-photo {
  width: 100%;
  min-height: 430px;
  max-height: 620px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: #f4f7fb;
}

.profile-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}

.profile-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 1.02rem;
  display: grid;
  gap: 0.5rem;
  grid-column: span 6;
  min-height: 0;
}

.profile-panel:first-child {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 245, 253, 0.9));
}

.profile-grid > .profile-panel:only-child {
  grid-column: 1 / -1;
}

.profile-grid > .profile-panel:first-child:nth-last-child(3),
.profile-grid > .profile-panel:first-child:nth-last-child(3) ~ .profile-panel {
  grid-column: span 4;
}

.profile-panel h2 {
  font-size: 1.2rem;
  color: var(--midnight);
}

.profile-panel p {
  color: #2f3e55;
  font-size: 0.95rem;
}

.profile-panel strong {
  color: var(--midnight);
}

.profile-link {
  width: fit-content;
  color: var(--crimson);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.profile-link:hover,
.profile-link:focus-visible {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid rgba(220, 224, 235, 0.18);
  background:
    radial-gradient(circle at 12% 0%, rgba(59, 143, 149, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(17, 20, 26, 0.99), rgba(11, 14, 20, 0.99));
  padding: 1rem 0;
}

.site-footer p {
  width: min(1220px, calc(100% - 2.2rem));
  margin: 0 auto;
  color: var(--text-low);
  font-size: 0.84rem;
}

.site-footer a {
  color: var(--text-mid);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text-high);
  text-decoration: underline;
}

@keyframes float-orb {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-6px, -10px, 0) scale(1.02);
  }
  100% {
    transform: translate3d(-12px, 6px, 0) scale(1);
  }
}

@media (max-width: 980px) {
  .topbar-inner,
  .main,
  .site-footer p {
    width: min(1220px, calc(100% - 1.8rem));
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-photo-wrap {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .profile-photo {
    min-height: 360px;
    max-height: 520px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-panel,
  .profile-panel:first-child {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    width: min(1220px, calc(100% - 1.2rem));
    min-height: auto;
    padding: 0.72rem 0 0.54rem;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.64rem;
  }

  .brand {
    width: 100%;
  }

  .brand-text strong {
    font-size: 0.93rem;
  }

  .brand-text small {
    font-size: 0.66rem;
    line-height: 1.25;
  }

  .top-links {
    width: 100%;
    gap: 0.75rem;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.18rem;
  }

  .top-links a {
    flex: 0 0 auto;
    font-size: 0.82rem;
  }

  .main {
    width: min(1220px, calc(100% - 1.2rem));
    margin: 1rem auto 1.3rem;
  }

  .main::before {
    width: min(50vw, 240px);
    height: min(50vw, 240px);
    right: -1.4rem;
    top: -0.8rem;
    opacity: 0.22;
  }

  .profile-copy {
    padding: 1.05rem;
  }

  .profile-copy h1 {
    font-size: clamp(1.8rem, 9vw, 2.5rem);
  }

  .profile-copy .bio {
    font-size: 0.92rem;
  }

  .actions {
    gap: 0.52rem;
  }

  .actions .button {
    flex: 1 1 11rem;
    font-size: 0.8rem;
  }

  .profile-photo-wrap {
    padding: 0.72rem;
  }

  .profile-photo {
    min-height: 300px;
    max-height: 420px;
  }

  .profile-panel {
    padding: 0.84rem;
  }

  .profile-panel h2 {
    font-size: 1.08rem;
  }

  .site-footer p {
    width: min(1220px, calc(100% - 1.2rem));
  }
}

@media (max-width: 520px) {
  .actions .button {
    width: 100%;
  }

  .site-footer p {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Hybrid-dark redesign overrides */
.topbar {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(16, 18, 24, 0.84);
  box-shadow: 0 14px 30px rgba(6, 7, 11, 0.28);
}

.brand-text strong {
  color: var(--text-high);
}

.brand-text small {
  color: var(--text-low);
}

.top-links a {
  color: var(--text-mid);
  border: 1px solid rgba(220, 224, 235, 0.2);
  border-radius: 999px;
  background: rgba(30, 34, 43, 0.6);
  padding: 0.34rem 0.8rem;
}

.top-links a:hover,
.top-links a:focus-visible {
  border-color: rgba(177, 42, 61, 0.56);
  color: var(--text-high);
  background: rgba(38, 43, 55, 0.82);
  transform: translateY(-1px);
}

.main::before {
  background:
    radial-gradient(circle at 42% 36%, rgba(59, 143, 149, 0.1), rgba(25, 29, 37, 0) 60%),
    radial-gradient(circle at 62% 64%, rgba(177, 42, 61, 0.16), rgba(25, 29, 37, 0) 72%);
  opacity: 0.42;
}

.profile-hero,
.profile-panel {
  border-color: var(--line-soft);
  background: linear-gradient(145deg, rgba(33, 37, 47, 0.95), rgba(26, 30, 39, 0.9));
  box-shadow: var(--shadow-1);
}

.profile-panel {
  min-height: 132px;
}

.profile-panel:first-child {
  background:
    radial-gradient(circle at 86% 14%, rgba(59, 143, 149, 0.08), transparent 46%),
    linear-gradient(145deg, rgba(33, 37, 47, 0.95), rgba(26, 30, 39, 0.9));
}

.profile-photo-wrap {
  border-left-color: var(--line-soft);
  background:
    radial-gradient(circle at 22% 18%, rgba(59, 143, 149, 0.09), transparent 46%),
    radial-gradient(circle at 84% 78%, rgba(177, 42, 61, 0.12), transparent 46%),
    rgba(28, 32, 41, 0.92);
}

.profile-photo {
  border-color: rgba(220, 224, 235, 0.24);
  background: rgba(22, 25, 33, 0.88);
}

.eyebrow {
  color: var(--accent-secondary);
}

.profile-copy h1,
.profile-panel h2 {
  color: var(--text-high);
}

.role,
.bio,
.profile-panel p {
  color: var(--text-mid);
}

.profile-lab-dates {
  border-color: rgba(220, 224, 235, 0.24);
  background: rgba(40, 45, 56, 0.54);
  color: var(--text-mid);
}

.button {
  transition: transform 170ms ease, box-shadow 170ms ease, background-color 170ms ease, border-color 170ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #b12a3d 0%, #8b1e30 100%);
  box-shadow: 0 12px 24px rgba(130, 28, 44, 0.34);
}

.button-secondary {
  color: var(--text-high);
  border-color: rgba(220, 224, 235, 0.22);
  background: rgba(31, 35, 44, 0.76);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(177, 42, 61, 0.54);
  background: rgba(40, 45, 58, 0.86);
}

.linkedin-button {
  color: #a8d8ff;
  border-color: rgba(130, 177, 221, 0.46);
  background: rgba(31, 60, 89, 0.3);
}

.linkedin-button:hover,
.linkedin-button:focus-visible {
  border-color: rgba(175, 210, 239, 0.78);
}

.profile-link {
  color: #f2a7b3;
}

.site-footer {
  border-top-color: rgba(220, 224, 235, 0.18);
  background: #11141a;
}

.site-footer p {
  color: var(--text-low);
}

.site-footer a {
  color: var(--text-mid);
}

/* Editorial science refinement */
.topbar {
  border-bottom-color: var(--line-soft);
  background: rgba(14, 16, 22, 0.88);
  box-shadow: 0 16px 32px rgba(6, 7, 11, 0.28);
}

.brand-text strong {
  color: var(--text-high);
}

.brand-text small {
  color: var(--text-low);
}

.top-links {
  gap: 0.52rem;
}

.top-links a {
  min-height: 2.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.92rem;
  border: 1px solid rgba(220, 224, 235, 0.18);
  border-radius: 999px;
  background: rgba(28, 32, 41, 0.7);
  color: var(--text-mid);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.top-links a:hover,
.top-links a:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 214, 221, 0.5);
  background: rgba(42, 47, 59, 0.96);
  color: var(--text-high);
  box-shadow: 0 10px 20px rgba(6, 7, 11, 0.24);
}

.main {
  margin: 2.35rem auto 2.8rem;
}

.profile-shell {
  gap: 1.35rem;
}

.profile-hero {
  border-color: rgba(220, 224, 235, 0.2);
  border-radius: 30px;
  background:
    radial-gradient(circle at 84% 14%, rgba(59, 143, 149, 0.08), transparent 38%),
    linear-gradient(145deg, rgba(31, 35, 44, 0.95), rgba(24, 28, 36, 0.92));
  box-shadow: 0 22px 42px rgba(6, 7, 11, 0.32);
}

.profile-copy {
  padding: 1.8rem 1.9rem 1.65rem;
  gap: 0.88rem;
}

.profile-copy h1 {
  color: var(--text-high);
  font-size: clamp(2.35rem, 4.8vw, 4rem);
}

.role,
.bio,
.profile-panel p {
  color: var(--text-mid);
}

.bio {
  max-width: 64ch;
  line-height: 1.72;
}

.profile-lab-dates {
  border-color: rgba(220, 224, 235, 0.24);
  background: rgba(40, 45, 56, 0.54);
  color: var(--text-mid);
}

.actions {
  gap: 0.68rem;
}

.button {
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(248, 250, 255, 0.04);
}

.button-secondary {
  color: var(--text-high);
  border-color: rgba(220, 224, 235, 0.22);
  background: rgba(31, 35, 44, 0.76);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(255, 214, 221, 0.42);
  background: rgba(42, 47, 59, 0.96);
}

.profile-photo-wrap {
  border-left-color: rgba(220, 224, 235, 0.16);
  background:
    radial-gradient(circle at 22% 18%, rgba(59, 143, 149, 0.09), transparent 46%),
    radial-gradient(circle at 84% 78%, rgba(177, 42, 61, 0.12), transparent 46%),
    rgba(28, 32, 41, 0.92);
  padding: 1.16rem;
}

.profile-photo {
  border-color: rgba(220, 224, 235, 0.24);
  background: rgba(22, 25, 33, 0.88);
  border-radius: 18px;
}

.profile-grid {
  gap: 1.08rem;
}

.profile-panel {
  min-height: 136px;
  border-color: rgba(220, 224, 235, 0.2);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(33, 37, 47, 0.95), rgba(26, 30, 39, 0.9));
  box-shadow: 0 18px 34px rgba(6, 7, 11, 0.26);
  padding: 1.08rem;
}

.profile-panel:first-child {
  background:
    radial-gradient(circle at 86% 14%, rgba(59, 143, 149, 0.08), transparent 46%),
    linear-gradient(145deg, rgba(33, 37, 47, 0.95), rgba(26, 30, 39, 0.9));
}

.profile-panel h2 {
  color: var(--text-high);
}

.profile-link {
  color: #f2a7b3;
}

.site-footer {
  border-top-color: rgba(220, 224, 235, 0.16);
  background: rgba(12, 14, 19, 0.96);
}

@media (max-width: 760px) {
  .top-links a {
    flex: 0 0 auto;
    width: auto;
  }

  .profile-copy {
    padding: 1.12rem;
  }

  .profile-panel {
    border-radius: 22px;
  }
}
