/* Hallmark v2.0.0 · theme: custom · dark/roman-serif/wine · hero: portrait brain film */
/* Give the film and the section navigation independent space. */
/* waive 7b: the supplied palette calls for pure white, and the eye fades to black. */
@font-face {
  font-family: Prata;
  src: url('prata-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0c0c14;
  --plum: #44142c;
  --wine: #642444;
  --mist: #e4e4ec;
  --ink: #ffffff;
  --muted: #c8b8c5;
  --line: #d7bbca44;
  --rose: #dfa6bd;
  --pupil-glint: #e4e4ec33;
  --eye-letter-glow: #b04b77;
  --mask: #000;
  --clear: transparent;
  --detail-plum: #210f1d;
  --font-display: Prata, Georgia, serif;
  --font-body: 'Segoe UI', Arial, sans-serif;
  --font-eye: Bahnschrift, Arial, sans-serif;
  --container: 77rem;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 1rem/1.5 var(--font-body);
}
a { color: inherit; text-decoration: none; }
:is(a, button):focus-visible { outline: 2px solid var(--rose); outline-offset: 5px; }
::selection { color: var(--ink); background: var(--wine); }
h1, h2, h3, p { margin: 0; }
h1, h2 { min-width: 0; overflow-wrap: break-word; text-wrap: balance; }
img { display: block; max-width: 100%; }
.wrap { width: min(var(--container), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
[id] { scroll-margin-block-start: 1.5rem; }
#intro, #top { scroll-margin-block-start: 0; }

.intro, .intro-stage { background: var(--mask); min-height: 100svh; }
.intro.is-animated { height: 205svh; }
.intro-stage {
  position: relative;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  height: 100svh;
  place-items: center;
  overflow: clip;
  isolation: isolate;
}
.intro.is-animated .intro-stage { position: sticky; inset-block-start: 0; }
.intro-zoom {
  width: min(94%, 75rem);
  min-width: 34rem;
  transform: scale(var(--eye-scale, 1));
  transform-origin: 50% 48%;
}
.intro-eye {
  position: relative;
  transform: translate(var(--eye-x, 0), var(--eye-y, 0));
  transition: transform 650ms cubic-bezier(.16, 1, .3, 1);
}
.intro-eye img {
  width: 100%;
  height: auto;
  filter: grayscale(1) sepia(.34) hue-rotate(286deg) saturate(1.32);
}
.eye-pupil {
  position: absolute;
  inset-inline-start: 49.75%;
  inset-block-start: 48.05%;
  width: 8.15%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 37% 23%, var(--pupil-glint), var(--clear) 23%),
    radial-gradient(circle closest-side, var(--wine) 0% 30%, var(--plum) 65%, var(--clear) 100%);
}
.eye-closed {
  position: absolute;
  inset: 0;
  opacity: 0;
  clip-path: polygon(0 0, 100% 0, 100% 20%, 76% 21%, 55% 22%, 32% 21%, 0 20%);
}
.is-eye-visible .eye-closed { animation: eyelid 6.4s linear infinite; }
.is-eye-visible .intro-wordmark { animation: blink-wordmark 6.4s linear infinite; }
.intro-wordmark {
  position: absolute;
  inset-inline-start: 49.8%;
  inset-block-start: 54%;
  transform: translate(-50%, -50%);
  color: var(--ink);
  font: 700 clamp(1.1rem, 2.2vw, 1.78rem)/1 var(--font-eye);
  letter-spacing: .12em;
  text-indent: .12em;
  -webkit-text-stroke: .085em var(--wine);
  paint-order: stroke fill;
  text-shadow: 0 1px .15em var(--mask), 0 0 .32em var(--eye-letter-glow);
}
.intro-blackout { position: absolute; inset: 0; background: var(--mask); opacity: var(--blackout, 0); pointer-events: none; }
.intro-controls {
  position: absolute;
  inset-inline: 0;
  inset-block-end: max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-block-start: .55rem;
  opacity: var(--intro-controls, 1);
}
.intro-controls:focus-within { opacity: 1; }
.intro-hint { color: var(--muted); font-size: .875rem; }
.intro-skip { display: grid; min-height: 2.75rem; align-items: center; font-size: .875rem; color: var(--mist); }
.intro-skip:hover { text-decoration: underline; text-underline-offset: .25em; }
.intro-skip:focus-visible { outline-color: var(--ink); }

@keyframes eyelid {
  0%, 22%, 28%, 74%, 79%, 100% {
    opacity: 0;
    clip-path: polygon(0 0, 100% 0, 100% 20%, 76% 21%, 55% 22%, 32% 21%, 0 20%);
  }
  23.8%, 24.9%, 75.6%, 76.4% {
    opacity: 1;
    clip-path: polygon(0 0, 100% 0, 100% 57%, 76% 65%, 55% 72%, 32% 70%, 0 57%);
  }
}
@keyframes blink-wordmark {
  0%, 23%, 27%, 74.8%, 78%, 100% { opacity: 1; }
  23.8%, 24.9%, 75.6%, 76.4% { opacity: 0; }
}

.site {
  position: relative;
  isolation: isolate;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; min-height: 2.75rem; font: 400 1.25rem/1 var(--font-display); letter-spacing: -.04em; }
.profile {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  min-height: calc(100svh - 4.75rem);
}
.profile-copy { min-width: 0; padding-block: 3.5rem; }
.profile h1 {
  font: 400 clamp(4.4rem, 10.4vw, 8.5rem)/.98 var(--font-display);
  letter-spacing: -.045em;
  margin-inline-start: -.055em;
}
.profile-copy > p { color: var(--mist); margin-top: 1.25rem; font-size: clamp(1.05rem, 1.7vw, 1.38rem); }
.profile-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .5rem;
  margin-top: clamp(1.4rem, 3vw, 2.45rem);
}
.profile-nav a {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  padding-inline: .65rem;
  border: 1px solid var(--line);
  color: var(--mist);
  font-size: .9375rem;
}
.profile-nav a:hover { border-color: var(--rose); color: var(--ink); }
.profile-nav a:active { background: var(--wine); }
.brain-viewport {
  min-width: 0;
  height: clamp(25rem, 69svh, 42rem);
  background: radial-gradient(ellipse at center, var(--plum), var(--clear) 69%);
}
.brain-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  mask-image: radial-gradient(ellipse at center, var(--mask) 36%, var(--clear) 76%);
}
[hidden] { display: none; }

.detail-page {
  display: grid;
  min-height: 100svh;
  align-items: center;
  border-top: 1px solid var(--line);
  scroll-margin-block-start: 0;
}
.detail-page:nth-of-type(even) { background: var(--detail-plum); }
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(2rem, 7vw, 7rem);
  padding-block: clamp(3.75rem, 9vw, 8rem);
}
.detail-page h2 { font: 400 clamp(2.35rem, 5.2vw, 4.65rem)/1.15 var(--font-display); letter-spacing: -.035em; }
.detail-copy p { color: var(--mist); max-width: 40ch; font-size: clamp(1.12rem, 1.9vw, 1.5rem); }
.detail-copy a { display: inline-flex; min-height: 2.75rem; align-items: center; margin-top: 1.25rem; color: var(--rose); text-decoration: underline; text-underline-offset: .35em; }
.detail-copy a:hover { color: var(--ink); }

.about-layout { align-items: center; gap: clamp(2.5rem, 6vw, 6rem); }
.about-text .detail-copy { margin-top: clamp(1.25rem, 3vw, 2rem); }
.about-portrait {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: end center;
  width: min(100%, 28rem);
  margin: 0;
  justify-self: center;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 62%, var(--wine), var(--clear) 71%);
}
.about-portrait::before {
  content: '';
  position: absolute;
  inset: 9% 12% 15%;
  z-index: -1;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.about-portrait img { display: block; width: 100%; height: auto; }

.achievements-layout { grid-template-columns: minmax(0, 1fr); gap: clamp(1.25rem, 3.2vw, 2.75rem); }
.achievement-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.85rem, 2vw, 1.5rem); }
.achievements-layout .detail-copy a { margin-top: 0; }
.achievement-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: start;
  gap: .55rem;
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--line);
}
.achievement-card:hover { background: var(--detail-plum); border-color: var(--rose); }
.achievement-card:active { background: var(--plum); }
.achievement-card h3 { font: 400 clamp(1.35rem, 2.45vw, 2rem)/1.25 var(--font-display); color: var(--ink); }
.achievement-card p { color: var(--mist); }
.achievement-card span { margin-top: .55rem; color: var(--rose); font-size: .9375rem; }

.certificate-page {
  min-height: 100svh;
  background: var(--background) radial-gradient(ellipse at 82% 0, var(--plum), var(--background) 51%) no-repeat;
}
.certificate-back, .certificate-original { color: var(--rose); }
.certificate-back { display: inline-flex; min-height: 2.75rem; align-items: center; }
.certificate-back:hover, .certificate-original:hover { color: var(--ink); }
.certificate-content { width: min(63rem, calc(100% - var(--gutter) * 2)); padding-block: clamp(2.5rem, 5vw, 4rem); }
.certificate-content h1 { max-width: 24ch; font: 400 clamp(2rem, 4.7vw, 4rem)/1.15 var(--font-display); letter-spacing: -.035em; }
.certificate-meta { display: flex; flex-wrap: wrap; gap: .35rem 1.4rem; margin-block: 1.25rem clamp(1.5rem, 3vw, 2.25rem); color: var(--mist); }
.certificate-meta time { color: var(--muted); }
.certificate-document { max-width: 46rem; margin: 0; padding: clamp(.35rem, 1.05vw, .8rem); border: 1px solid var(--line); background: var(--detail-plum); }
.certificate-document--square { max-width: 34rem; }
.certificate-document img { display: block; width: 100%; height: auto; }
.certificate-original { display: inline-flex; min-height: 2.75rem; align-items: center; margin-top: .75rem; text-decoration: underline; text-underline-offset: .35em; }
.certificate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin-bottom: 1.25rem; }
.certificate-actions .certificate-original { margin-top: 0; }
.certificate-verify { display: inline-flex; min-height: 2.75rem; align-items: center; padding-inline: .85rem; border: 1px solid var(--line); background: var(--wine); }
.certificate-verify:hover { border-color: var(--rose); }
.certificate-verify:active { background: var(--plum); }

@media (max-width: 48rem) {
  .top { min-height: 4.25rem; }
  .profile { grid-template-columns: minmax(0, 1fr); align-content: start; min-height: auto; gap: .85rem; padding-block: .6rem 3rem; }
  .profile-copy { padding-block: 0; }
  .profile h1 { font-size: clamp(4.15rem, 16vw, 7rem); }
  .profile-nav { gap: .45rem; }
  .profile-nav a { font-size: .875rem; }
  .brain-viewport { grid-row: 1; height: clamp(15.5rem, 52vw, 27rem); }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .about-portrait { width: min(100%, 22rem); }
  .achievement-list { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .is-eye-visible .eye-closed, .is-eye-visible .intro-wordmark { animation: none; }
  .intro-zoom, .intro-eye { transform: none; }
  .intro-eye { transition: none; }
}

