:root {
  color-scheme: dark;
  --bg: #080f1d;
  --paper: #f1f6ff;
  --muted: #bdcce0;
  --subtle: #96abc4;
  --accent: #9dcaff;
  --edge: #a3caff29;
  --focus: #b9dbff;
  --active: #559deb36;
  --ease: cubic-bezier(.2, .75, .25, 1);
  font-family: "DM Sans", Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
img { display: block; width: 100%; height: auto; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(1112px, calc(100% - 156px)); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 16px; left: 16px; background: #dceeff; color: #091a2e; padding: 12px; transform: translateY(-170%); }
.skip:focus { transform: none; }
.atmosphere {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 10% 55%, #102642 0%, transparent 53%),
              radial-gradient(ellipse at 84% 0%, #14365b 0%, transparent 54%), var(--bg);
}
.atmosphere::before {
  content: "";
  position: absolute;
  inset: -18% -10%;
  background: conic-gradient(from 195deg at 51% 39%, transparent 0 11%, #305b992c 15%, transparent 24% 48%, #3d8bdb35 57%, #37a8c725 61%, transparent 72%);
  filter: blur(30px);
  animation: drift 19s ease-in-out infinite alternate;
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .4;
  background: radial-gradient(circle at 1px 1px, #a1caff36 1px, transparent 0) 0 0 / 25px 25px;
  mask-image: linear-gradient(#000, #0005 52%, transparent 90%);
}
@keyframes drift { to { transform: translate(5%, 4%) rotate(12deg) scale(1.12); } }
.mast { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.brand b { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #9ecaff50; border-radius: 11px; background: #4f8fd025; color: #cce5ff; font-size: 13px; letter-spacing: -.02em; }
.dock {
  position: fixed;
  z-index: 3;
  right: clamp(11px, 2.7vw, 45px);
  top: 50%;
  translate: 0 -50%;
  display: grid;
  gap: 5px;
  padding: 7px;
  border-radius: 26px;
  border: 1px solid #9dcaff32;
  background: #101e32ec;
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 45px #0409139e, inset 0 1px 1px #ffffff13;
}
.dock a { position: relative; display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; color: #a1b8d5; transition: color .2s, background .2s, transform .2s; }
.dock a:hover, .dock a:focus-visible, .dock [aria-current] { background: var(--active); color: var(--paper); }
.dock a:hover { transform: scale(1.06); }
.dock a span { position: absolute; right: calc(100% + 13px); padding: 6px 9px; border-radius: 7px; background: #18314f; color: var(--paper); font-size: 11px; opacity: 0; pointer-events: none; transform: translateX(4px); transition: opacity .18s, transform .18s; }
.dock a:hover span, .dock a:focus-visible span { opacity: 1; transform: none; }
.panel {
  border: 1px solid var(--edge);
  border-radius: 24px;
  background: linear-gradient(140deg, #18314e96, #101d30eb 57%, #101f35e8);
  box-shadow: 0 22px 60px #040b173b, inset 0 1px 0 #d0e8ff0d;
}
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 25px 44px; padding: clamp(28px, 4vw, 58px); padding-bottom: 0; }
.hero::before { content: ""; pointer-events: none; position: absolute; width: 90%; aspect-ratio: 1; right: -35%; top: -58%; border-radius: 50%; background: radial-gradient(ellipse, #347cbe4c 0%, transparent 68%); }
.hero-content, .hero-portrait { position: relative; }
.hero-content { container-type: inline-size; }
.kicker { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .115em; text-transform: uppercase; line-height: 1.45; }
.hero-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 17px; }
.profile-name { font-weight: 800; line-height: 1; letter-spacing: -.022em; }
.hero .profile-name {
  font-size: clamp(46px, 7.1vw, 100px);
  font-size: clamp(46px, 18cqi, 100px);
}
.hero .profile-name > span { display: block; }
.hero .profile-name > span + span { margin-inline-start: -.035em; }
.period { color: var(--accent); }
.lead { color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6; max-width: 525px; }
.hero .lead { margin-block: 20px; max-width: 390px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 8px 15px; border-radius: 11px; border: 1px solid transparent; font-size: 13px; font-weight: 750; line-height: 1.25; transition: transform .22s var(--ease), background .22s, border-color .22s, box-shadow .22s; }
.button:hover { transform: translateY(-3px); }
.button:active { transform: translateY(0) scale(.97); }
.button .icon { transition: transform .22s var(--ease); }
.button:hover .icon { transform: translateX(2px); }
.primary { color: #0a1b32; background: linear-gradient(120deg, #cee7ff, #8fbcf3); box-shadow: 0 7px 21px #508dd640; }
.primary:hover { box-shadow: 0 8px 26px #508dd665; }
.glass { background: #e2efff09; border-color: #b4d6ff36; }
.glass:hover { background: #a8ccfa20; border-color: #99c5fc75; }
.mast-cv { min-height: 36px; font-size: 12px; border-radius: 10px; }
.profile-photo { overflow: hidden; isolation: isolate; border: 1px solid #afd4ff4f; border-radius: 18px; }
.profile-photo img { width: 165%; max-width: none; height: 100%; margin-left: -50%; object-fit: cover; object-position: 60% 69%; transition: transform .65s var(--ease); }
.hero-portrait { height: clamp(285px, 32vw, 390px); box-shadow: 0 12px 33px #070f1d7d; }
.hero-portrait:hover img { transform: scale(1.04); }
.availability { grid-column: 1 / -1; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 9px 14px; border-top: 1px solid var(--edge); padding-block: 17px; font-size: 13px; }
.availability > span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.availability i { width: 7px; height: 7px; border-radius: 50%; background: #a0edc6; box-shadow: 0 0 12px #87ffb67e; }
.availability small { color: var(--subtle); margin-left: 10px; }
.section-gap { margin-top: 32px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 15px; }
h2 { font-size: clamp(25px, 3.5vw, 39px); line-height: 1.1; letter-spacing: -.032em; }
h3 { font-size: clamp(17px, 2vw, 23px); line-height: 1.12; letter-spacing: -.022em; }
.inline-link { color: #c2deff; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.inline-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.project-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 17px; transition: transform .28s var(--ease), border-color .28s, box-shadow .28s; }
.project-card:hover { transform: translateY(-5px); border-color: #98c9ff83; box-shadow: 0 15px 36px #071326aa; }
.cover { position: relative; overflow: hidden; background: #0b1626; }
.project-card .cover { aspect-ratio: 16 / 9; flex: none; border-bottom: 1px solid var(--edge); }
.cover img { position: absolute; inset: 0; height: 100%; object-fit: contain; object-position: center; }
.project-card .cover-meet-me img { object-fit: cover; object-position: 50% 38%; }
.card-copy { position: relative; padding: 14px 45px 16px 15px; }
.card-copy h3 { margin-block: 6px; }
.card-copy > p:last-of-type { color: var(--muted); font-size: 13px; line-height: 1.45; }
.round-arrow { position: absolute; display: grid; place-items: center; top: 13px; right: 12px; width: 30px; height: 30px; border: 1px solid #a9cfff35; border-radius: 50%; color: var(--accent); transition: background .2s, color .2s; }
.project-card:hover .round-arrow { background: var(--accent); color: #0b2037; }
.interests { padding: clamp(19px, 4vw, 35px); display: grid; grid-template-columns: .7fr 1.3fr; gap: 20px; }
details { border-bottom: 1px solid var(--edge); }
details:first-child { border-top: 1px solid var(--edge); }
summary { cursor: pointer; display: flex; list-style: none; justify-content: space-between; align-items: center; gap: 12px; padding-block: 12px; font-size: 16px; font-weight: 700; }
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent); }
summary span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--edge); color: var(--accent); }
summary .icon { transition: transform .24s var(--ease); }
details[open] summary .icon { transform: rotate(45deg); }
.detail-content p { color: var(--muted); padding-bottom: 15px; line-height: 1.5; }
@supports selector(::details-content) {
  details::details-content { display: block; content-visibility: hidden; overflow: clip; block-size: 0; opacity: 0; interpolate-size: allow-keywords; transition: block-size .28s var(--ease), opacity .22s, content-visibility .28s allow-discrete; }
  details[open]::details-content { content-visibility: visible; block-size: auto; opacity: 1; }
}
.quote { padding: clamp(20px, 4vw, 38px); }
.quote h2 { margin-bottom: 17px; }
.review-switch:not([hidden]) { display: flex; flex-wrap: wrap; gap: 8px; }
.review-switch button {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 11px 6px 6px; border: 1px solid var(--edge); border-radius: 11px;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--muted);
  background: #e2efff09; cursor: pointer; transition: background .22s, border-color .22s;
}
.review-switch button:hover, .review-switch [aria-pressed="true"] {
  background: var(--active); border-color: #99c5fc75; color: var(--paper);
}
.review-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.review-switch img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; }
.review-switch [aria-pressed="true"] img { visibility: hidden; }
.review-switch button span { transition: transform .24s var(--ease); }
.review-switch [aria-pressed="true"] span { transform: translateX(-19px); }
.review:not([hidden]) {
  display: grid; grid-template-columns: clamp(150px, 18vw, 208px) minmax(0, 1fr);
  align-items: center; gap: clamp(18px, 3vw, 36px); margin-top: 20px;
}
.review-profile { display: grid; gap: 9px; border-radius: 13px; }
.review-portrait {
  position: relative; z-index: 1; aspect-ratio: 1; object-fit: cover;
  border-radius: 13px; transform-origin: top left; pointer-events: none;
}
.review-profile > span {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  color: var(--accent); font-size: 12px; font-weight: 700; line-height: 1.4;
}
.review-profile:hover > span, .review-profile:focus-visible > span { text-decoration: underline; text-underline-offset: 3px; }
.quote blockquote { font-size: clamp(21px, 3.5vw, 35px); line-height: 1.24; letter-spacing: -.028em; max-width: 29em; margin-bottom: 13px; }
.review-copy p { display: grid; gap: 4px; color: var(--subtle); font-size: 13px; }
.review-copy strong { color: var(--paper); }
.contact-strip { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: clamp(20px, 4vw, 38px); }
.contact-strip p { color: var(--muted); margin-top: 7px; font-size: 14px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 25px 38px; color: var(--subtle); font-size: 12px; }
.footer div { display: flex; gap: 16px; }
.footer a { display: inline-flex; align-items: center; gap: 4px; }
.footer a:hover { color: var(--paper); }
.page-title { padding-block: 20px 28px; }
.page-title h1, .case-top h1, .about-hero h1, .contact-page h1 { font-size: clamp(40px, 6.7vw, 88px); line-height: .95; letter-spacing: -.077em; }
.about-hero .profile-name { font-size: clamp(37px, 5.2vw, 69px); line-height: 1; letter-spacing: -.022em; }
.page-title .lead, .case-top .lead, .about-hero .lead, .contact-page .lead { margin-top: 13px; }
.academic, .about-hero, .contact-page, .case-top { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.content-panel, .about-hero, .contact-page { padding: clamp(20px, 4vw, 45px); }
.content-panel p, .about-hero p:not(.kicker) { color: var(--muted); line-height: 1.6; }
.content-panel p:not(.kicker), .about-hero p:not(.kicker) { margin-top: 10px; }
.content-panel .kicker { margin-block: 12px 6px; }
.content-panel .button, .about-hero .button { margin-top: 17px; }
.about-hero, .contact-page { align-items: center; gap: clamp(18px, 4vw, 54px); }
.about-hero .kicker { margin-bottom: 9px; }
.about-portrait { width: min(100%, 374px); aspect-ratio: 1; justify-self: center; }
.about-portrait img { width: 118%; height: 100%; margin-left: -9%; object-position: center 67%; }
.languages { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 16px; }
.languages div { border-top: 1px solid var(--edge); padding-block: 8px; }
.languages dd { color: var(--muted); margin-top: 5px; }
.case-top { overflow: hidden; align-items: stretch; }
.case-intro { align-self: center; padding: clamp(20px, 4vw, 45px); }
.case-intro .back { margin-bottom: 23px; }
.case-intro h1 { font-size: clamp(35px, 5.5vw, 69px); margin-top: 8px; }
.case-top .cover { min-height: 265px; }
.case-top .cover-meet-me { background: #f5efe9; }
.experience { display: grid; gap: 12px; margin-top: 20px; }
.experience article { border-top: 1px solid var(--edge); }
.case-stats, .responsibilities { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.case-stats { padding: clamp(18px, 3vw, 35px); }
.case-stats div { display: grid; gap: 4px; }
.case-stats strong { font-size: clamp(19px, 3.7vw, 39px); letter-spacing: -.05em; }
.case-stats span { color: var(--muted); font-size: 13px; }
.responsibilities { margin-top: 20px; }
.responsibilities div { border-top: 1px solid var(--edge); padding-top: 10px; }
.contact-page { min-height: 390px; }
.contact-links { display: grid; gap: 8px; }
.contact-links a { display: flex; align-items: center; gap: 10px; border: 1px solid var(--edge); padding: 12px; border-radius: 11px; transition: background .2s, border-color .2s; }
.contact-links a:hover { background: #558fce23; border-color: #9dcbff7f; }
.contact-links span { flex: 1; min-width: 0; }
.contact-links small { display: block; margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.contact-links .icon { color: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .review:not([hidden]) .review-copy { animation: enter .35s var(--ease) .1s both; }
  .review:not([hidden]) .review-profile > span { animation: enter .26s var(--ease) .2s both; }
  main { animation: page-in .36s var(--ease) both; }
  .hero-content, .hero-portrait { animation: enter .62s var(--ease) backwards; }
  .hero-portrait { animation-delay: .09s; }
  .reveal.waiting { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
  .reveal.visible, .reveal:focus-within { opacity: 1; transform: none; }
}
@keyframes enter { from { opacity: 0; transform: translateY(12px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 930px) {
  .shell { width: calc(100% - 124px); }
  .hero { gap: 24px; }
  .card-copy { padding-right: 14px; }
  .card-copy .round-arrow { display: none; }
}
@media (max-width: 740px) {
  .shell { width: min(580px, calc(100% - 34px)); }
  .mast { padding-block: 15px; }
  .dock { display: flex; right: auto; top: auto; bottom: max(10px, env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; padding: 6px; gap: 4px; }
  .dock a { display: flex; flex-direction: column; justify-content: center; gap: 2px; width: clamp(51px, 14vw, 66px); height: 45px; border-radius: 17px; }
  .dock a span { position: static; opacity: 1; transform: none; padding: 0; background: transparent; font-size: 9px; }
  .hero { padding: 20px 20px 0; gap: 19px; }
  .hero-portrait { height: clamp(240px, 46vw, 325px); }
  .hero-kicker { margin-bottom: 12px; }
  .hero .lead { margin-block: 13px; }
  .availability { align-items: start; }
  .availability small { display: block; margin: 2px 0 0; }
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer { padding-bottom: 86px; }
}
@media (max-width: 510px) {
  .review:not([hidden]) { grid-template-columns: 1fr; }
  .review-profile { width: min(100%, 174px); }
  .hero { grid-template-columns: 1fr; }
  .hero-portrait { height: clamp(240px, 66vw, 330px); margin-bottom: 20px; }
  .availability { grid-row: 2; flex-wrap: wrap; padding-bottom: 0; }
  .section-gap { margin-top: 24px; }
  .project-grid, .interests, .academic, .about-hero, .contact-page, .case-top { grid-template-columns: 1fr; }
  .case-top .cover { aspect-ratio: 16 / 9; min-height: 0; }
  .contact-page { min-height: auto; }
  .case-stats { grid-template-columns: 1fr 1fr; }
  .case-stats div:last-child { grid-column: 1 / -1; }
  .responsibilities { grid-template-columns: 1fr; }
  .contact-strip { align-items: start; flex-direction: column; }
  .languages { grid-template-columns: repeat(2,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
