:root {
  color-scheme: dark;
  --bg: #080b12;
  --bg-elevated: rgba(15, 20, 31, 0.84);
  --panel: #111724;
  --panel-soft: rgba(17, 23, 36, 0.72);
  --line: rgba(159, 178, 211, 0.16);
  --line-strong: rgba(159, 178, 211, 0.28);
  --text: #f3f6fb;
  --muted: #a8b2c3;
  --subtle: #748095;
  --accent: #8fb7ff;
  --accent-strong: #c3d8ff;
  --accent-warm: #d9c8a6;
  --success: #75d4aa;
  --danger: #ff9f9f;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.background__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(143, 183, 255, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 183, 255, 0.034) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.background__glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.12;
}

.background__glow--one {
  top: -250px;
  right: -140px;
  background: #547bc6;
}

.background__glow--two {
  top: 52%;
  left: -310px;
  background: #6c5b8f;
}

.site-header,
main,
.site-footer {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  margin-top: 14px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 11, 18, 0.78);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(143, 183, 255, 0.18), rgba(143, 183, 255, 0.04));
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand__text {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.site-nav a,
.footer-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav a:hover,
.footer-links a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-toggle,
.icon-button {
  border: 0;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
}

.language-toggle {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 9px 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.language-toggle__active {
  color: var(--text);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, color 170ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.language-toggle:focus-visible,
.icon-button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(143, 183, 255, 0.42);
  outline-offset: 3px;
}

.button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--compact {
  min-height: 40px;
  padding-inline: 15px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.button--primary {
  background: var(--text);
  color: #10141d;
}

.button--primary:hover {
  background: var(--accent-strong);
}

.button--secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.button--secondary:hover {
  border-color: rgba(143, 183, 255, 0.55);
  background: rgba(143, 183, 255, 0.08);
}

.button--light {
  flex: 0 0 auto;
  background: #0d111a;
  color: var(--text);
}

main {
  padding-bottom: 84px;
}

.hero {
  display: grid;
  min-height: 760px;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
  padding: 100px 34px 76px;
  overflow: clip;
}

.hero__content {
  max-width: 710px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  margin-bottom: 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.6rem, 7.3vw, 6.8rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.91;
}

.hero__lead {
  max-width: 700px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(1.06rem, 1.6vw, 1.28rem);
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 44px;
}

.hero__meta {
  display: grid;
  max-width: 620px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero__meta > div {
  display: grid;
  gap: 4px;
}

.hero__meta-label {
  color: var(--subtle);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero__meta strong {
  color: var(--text);
  font-size: 0.91rem;
}

.portrait-panel {
  position: relative;
  width: min(100%, 420px);
  justify-self: center;
}

.portrait-panel__photo-wrap {
  position: relative;
  z-index: 2;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(195, 216, 255, 0.22);
  border-radius: 160px 160px 28px 28px;
  background: linear-gradient(160deg, #172033, #0d121d);
  box-shadow: var(--shadow);
}

.portrait-panel__photo,
.portrait-panel__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portrait-panel__photo {
  z-index: 2;
  object-fit: cover;
  object-position: center;
}

.portrait-panel__photo.is-missing {
  display: none;
}

.portrait-panel__fallback {
  display: grid;
  place-items: center;
  color: rgba(195, 216, 255, 0.5);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 6rem;
}

.portrait-panel__orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(143, 183, 255, 0.18);
  border-radius: 50%;
}

.portrait-panel__orbit::after {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(143, 183, 255, 0.8);
  content: "";
}

.portrait-panel__orbit--outer {
  inset: -44px -54px 35px;
  transform: rotate(-9deg);
}

.portrait-panel__orbit--outer::after {
  top: 13%;
  right: 8%;
}

.portrait-panel__orbit--inner {
  inset: 36px -30px -22px 28px;
  border-color: rgba(217, 200, 166, 0.17);
  transform: rotate(8deg);
}

.portrait-panel__orbit--inner::after {
  bottom: 13%;
  left: 3%;
  background: var(--accent-warm);
  box-shadow: 0 0 18px rgba(217, 200, 166, 0.7);
}

.portrait-panel__status {
  position: relative;
  z-index: 3;
  display: flex;
  width: calc(100% - 36px);
  align-items: center;
  gap: 10px;
  margin: -22px auto 0;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 16, 25, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-size: 0.78rem;
  backdrop-filter: blur(14px);
}

.status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(117, 212, 170, 0.11);
}

.section {
  padding: 100px 34px;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 830px;
  margin-bottom: 48px;
}

.section-heading--split {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
  align-items: end;
  gap: 48px;
}

.section-heading h2,
.contact-cta h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 4.4vw, 4.25rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.section-heading__note {
  margin-bottom: 8px;
  color: var(--muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.panel--statement {
  padding: clamp(28px, 4vw, 50px);
}

.panel--statement p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.5vw, 1.2rem);
  line-height: 1.8;
}

.panel--statement p:last-child {
  margin-bottom: 0;
}

.panel--facts {
  display: grid;
  gap: 0;
  padding: 8px 28px;
}

.fact {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.fact:last-child {
  border-bottom: 0;
}

.fact strong {
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.85rem;
  font-weight: 500;
}

.fact span {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.research-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(17, 23, 36, 0.92), rgba(12, 16, 25, 0.82));
}

.research-card::after {
  position: absolute;
  right: -80px;
  bottom: -100px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(143, 183, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.research-card--featured {
  background: linear-gradient(145deg, rgba(39, 56, 88, 0.85), rgba(17, 23, 36, 0.88));
}

.research-card__number {
  display: inline-block;
  margin-bottom: 50px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.research-card h3 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 500;
}

.research-card p {
  max-width: 500px;
  margin-bottom: 0;
  color: var(--muted);
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 44px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item__date {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.timeline-item__content h3 {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.timeline-item__content p {
  margin-bottom: 4px;
  color: var(--muted);
}

.timeline-item__content span {
  color: var(--subtle);
  font-size: 0.88rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 34px;
}

.skills span {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.contact-cta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  margin: 50px 0 0;
  padding: clamp(34px, 6vw, 68px);
  border-radius: var(--radius-lg);
  background: var(--accent-strong);
  color: #10141d;
}

.contact-cta .eyebrow {
  color: #415371;
}

.contact-cta h2 {
  max-width: 780px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 36px;
  padding: 30px 4px 46px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.78rem;
}

.site-footer > div:first-child {
  display: grid;
}

.site-footer strong {
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.contact-dialog {
  width: min(calc(100% - 32px), 720px);
  max-height: min(90vh, 820px);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #101622;
  color: var(--text);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.65);
}

.contact-dialog::backdrop {
  background: rgba(2, 4, 8, 0.74);
  backdrop-filter: blur(7px);
}

.contact-dialog[open] {
  animation: dialog-in 180ms ease-out;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.contact-dialog__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 30px 12px;
}

.contact-dialog__header .eyebrow {
  margin-bottom: 10px;
}

.contact-dialog__header h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  font-weight: 500;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.icon-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.contact-dialog__intro {
  margin: 0;
  padding: 0 30px 22px;
  color: var(--muted);
}

#contact-form {
  padding: 0 30px 30px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #0b1019;
  color: var(--text);
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field input {
  min-height: 48px;
  padding: 0 13px;
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
  padding: 12px 13px;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(143, 183, 255, 0.11);
}

.form-field input:user-invalid,
.form-field textarea:user-invalid {
  border-color: rgba(255, 159, 159, 0.72);
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.turnstile-container {
  min-height: 2px;
  margin-bottom: 14px;
}

.form-footer {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.form-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--danger);
}

#submit-contact[disabled] {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 88px;
  }

  .hero__content {
    max-width: 780px;
  }

  .portrait-panel {
    width: min(78vw, 430px);
    margin-top: 18px;
  }

  .section-heading--split {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .contact-cta {
    align-items: start;
    flex-direction: column;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer > span:last-child {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header,
  main,
  .site-footer {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .site-header {
    top: 8px;
    margin-top: 8px;
    padding: 8px;
  }

  .brand__text,
  .header-actions .button {
    display: none;
  }

  .hero {
    gap: 54px;
    padding: 74px 10px 62px;
  }

  h1 {
    font-size: clamp(3.15rem, 16vw, 4.6rem);
  }

  .hero__lead {
    font-size: 1rem;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero__meta {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .portrait-panel {
    width: min(90%, 360px);
  }

  .section {
    padding: 76px 10px;
  }

  .section-heading {
    margin-bottom: 34px;
  }

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

  .research-card {
    min-height: 230px;
    padding: 26px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .contact-cta {
    margin-top: 26px;
    border-radius: 22px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .contact-dialog__header {
    padding: 22px 20px 10px;
  }

  .contact-dialog__intro {
    padding: 0 20px 18px;
  }

  #contact-form {
    padding: 0 20px 22px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

@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;
  }
}
