:root {
  color-scheme: dark;
  --ink: #f6f7fb;
  --muted: #a9b2c4;
  --surface: rgba(16, 25, 43, 0.78);
  --surface-strong: #152239;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #53d5c4;
  --accent-soft: rgba(83, 213, 196, 0.12);
  --navy: #08111f;
  --navy-light: #0d1a2d;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--navy);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 16%, rgba(31, 104, 119, 0.24), transparent 32rem),
    radial-gradient(circle at 12% 82%, rgba(38, 55, 96, 0.28), transparent 34rem),
    linear-gradient(145deg, var(--navy) 0%, var(--navy-light) 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.28;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a {
  color: inherit;
}

.page-shell {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  flex-direction: column;
}

.site-header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  min-height: 104px;
  border-bottom: 1px solid var(--line);
}

.monogram {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.monogram span {
  color: var(--accent);
}

.header-note,
footer {
  color: var(--muted);
  font-size: 0.875rem;
}

main {
  display: grid;
  flex: 1;
  align-items: center;
  padding: 64px 0;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: clamp(48px, 8vw, 112px);
  align-items: center;
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(4.4rem, 8.5vw, 7.8rem);
  font-weight: 750;
  letter-spacing: -0.07em;
  line-height: 0.84;
}

.roles {
  margin: 32px 0 0;
  color: #dfe5ef;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 600;
  line-height: 1.7;
}

.roles span {
  margin: 0 0.35rem;
  color: var(--accent);
}

.links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.link-card {
  display: grid;
  min-height: 82px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  grid-template-columns: 42px 1fr auto;
  gap: 13px;
  align-items: center;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: rgba(83, 213, 196, 0.58);
  background: var(--surface-strong);
  outline: none;
  transform: translateY(-2px);
}

.link-card--primary {
  border-color: rgba(83, 213, 196, 0.32);
  background: var(--accent-soft);
}

.link-mark {
  display: grid;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  color: var(--accent);
  background: rgba(3, 10, 20, 0.46);
  place-items: center;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.link-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.link-copy strong {
  font-size: 0.98rem;
}

.link-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow {
  color: var(--muted);
  font-size: 1rem;
}

.portrait-wrap {
  width: min(100%, 410px);
  margin: 0;
  justify-self: end;
}

.portrait-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 26px 26px 90px 26px;
  background: #111d30;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.34);
}

.portrait-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(4, 12, 24, 0.45), transparent 42%);
  pointer-events: none;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.82) contrast(1.04);
}

figcaption {
  display: flex;
  margin-top: 18px;
  color: var(--muted);
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(83, 213, 196, 0.1);
}

footer {
  min-height: 86px;
  border-top: 1px solid var(--line);
}

footer a {
  text-underline-offset: 4px;
  text-decoration-color: rgba(169, 178, 196, 0.45);
}

footer a:hover,
footer a:focus-visible {
  color: var(--ink);
}

@media (max-width: 860px) {
  .page-shell {
    width: min(680px, calc(100% - 36px));
  }

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

  .portrait-wrap {
    width: min(82%, 390px);
    grid-row: 1;
    justify-self: start;
  }

  h1 {
    font-size: clamp(4rem, 16vw, 6rem);
  }
}

@media (max-width: 540px) {
  .page-shell {
    width: min(100% - 28px, 440px);
  }

  .site-header {
    min-height: 82px;
  }

  main {
    padding: 40px 0 52px;
  }

  .portrait-wrap {
    width: 100%;
  }

  .portrait-frame {
    max-height: 500px;
  }

  h1 {
    font-size: clamp(3.55rem, 18vw, 5rem);
  }

  .roles span {
    display: none;
  }

  .roles {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
  }

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

  footer {
    padding: 24px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

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