*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0b0712;
  --ink: #f4f0fb;
  --muted: rgba(244, 240, 251, 0.72);
  --purple: #b28af4;
  --purple-strong: #d3b7ff;
  --purple-soft: rgba(178, 138, 244, 0.18);
  --glass: rgba(24, 16, 36, 0.68);
  --glass-light: rgba(255, 255, 255, 0.08);
  --line: rgba(218, 190, 255, 0.18);
  --shadow: rgba(0, 0, 0, 0.42);
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(11, 7, 18, 0.24), rgba(11, 7, 18, 0.70)),
    url("algy_background.png") center / cover fixed,
    var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 12%, rgba(211, 183, 255, 0.16), transparent 34rem),
    linear-gradient(90deg, rgba(11, 7, 18, 0.48), rgba(11, 7, 18, 0.12) 46%, rgba(11, 7, 18, 0.50));
  z-index: 0;
}

a {
  color: inherit;
}

.site-header {
  position: relative;
  z-index: 10;
  width: min(1200px, calc(100% - 1.5rem));
  margin: 0.85rem auto 0;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(28, 20, 42, 0.74);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.nav-shell {
  width: min(1180px, calc(100% - 2rem));
  min-height: 108px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

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

.brand__mark {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px solid rgba(211, 183, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 24px rgba(178, 138, 244, 0.24);
  object-fit: cover;
}

.brand__name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px var(--shadow);
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.55rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(211, 183, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(244, 240, 251, 0.88);
  font-weight: 750;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.22s, border-color 0.22s, color 0.22s, box-shadow 0.22s, transform 0.22s;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--purple-strong);
  background: rgba(178, 138, 244, 0.14);
  border-color: rgba(211, 183, 255, 0.32);
  box-shadow: 0 8px 28px rgba(94, 54, 130, 0.20);
  transform: translateY(-2px);
  outline: none;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.25rem 0 4rem;
}

.content-sheet {
  min-height: calc(100vh - 11rem);
  padding: clamp(1.35rem, 4vw, 3.5rem);
  border: 1px solid rgba(211, 183, 255, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
    rgba(22, 13, 34, 0.48);
  backdrop-filter: blur(6px);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.40),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.content-sheet + .content-sheet {
  margin-top: 2rem;
}

.sheet-kicker {
  color: var(--purple);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sheet-title {
  max-width: 760px;
  margin-top: 0.75rem;
  font-size: clamp(2rem, 6vw, 4.8rem);
  font-weight: 850;
  line-height: 1.04;
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.62), 0 2px 8px rgba(0, 0, 0, 0.45);
}

.bio-body {
  max-width: 920px;
  margin-top: 1.8rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.78;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.38);
}

.bio-body::after {
  content: "";
  display: block;
  clear: both;
}

.profile-portrait {
  float: left;
  display: block;
  width: min(33.333%, 300px);
  min-width: 220px;
  height: auto;
  aspect-ratio: 1;
  margin: 0.15rem 1.65rem 1rem 0;
  padding: 0.35rem;
  border: 1px solid rgba(211, 183, 255, 0.38);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(211, 183, 255, 0.28), rgba(120, 78, 172, 0.14)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.30),
    0 0 30px rgba(178, 138, 244, 0.18);
}

.bio-body p + p {
  margin-top: 1rem;
}

.bio-body ul,
.bio-body ol {
  margin-left: 1.35rem;
  padding-left: 1rem;
}

.bio-body li > ul,
.bio-body li > ol {
  margin-top: 0.35rem;
  margin-left: 1.25rem;
}

.bio-body ul + h2 {
  margin-top: 1.8rem;
}

.bio-lede {
  color: rgba(244, 240, 251, 0.88);
  font-size: clamp(1.08rem, 2.2vw, 1.24rem);
  line-height: 1.68;
}

.bio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.bio-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.58rem 0.78rem;
  border: 1px solid rgba(211, 183, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(244, 240, 251, 0.82);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  transition: background 0.22s, border-color 0.22s, color 0.22s, transform 0.22s;
}

.bio-pill:hover,
.bio-pill:focus-visible {
  color: var(--purple-strong);
  background: rgba(178, 138, 244, 0.15);
  border-color: rgba(211, 183, 255, 0.40);
  transform: translateY(-2px);
  outline: none;
}

.emoji-sticker {
  width: 1.35em;
  height: 1.35em;
  margin: 0 0.08em;
  vertical-align: -0.28em;
  object-fit: contain;
}

.project-toc {
  min-height: auto;
}

.project-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.project-link {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(211, 183, 255, 0.20);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.20);
  transition: background 0.22s, border-color 0.22s, box-shadow 0.22s, transform 0.22s;
}

.project-link:hover,
.project-link:focus-visible {
  background: rgba(178, 138, 244, 0.15);
  border-color: rgba(211, 183, 255, 0.42);
  box-shadow: 0 16px 38px rgba(94, 54, 130, 0.24);
  transform: translateY(-2px);
  outline: none;
}

.project-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.24));
}

.project-name {
  display: block;
  color: var(--purple-strong);
  font-size: 1.08rem;
  font-weight: 850;
}

.project-description {
  display: block;
  margin-top: 0.15rem;
  color: rgba(244, 240, 251, 0.74);
  line-height: 1.5;
}

.project-banner {
  display: block;
  width: 100%;
  height: min(310px, 36vw);
  aspect-ratio: 4192 / 1536;
  margin-top: 1.4rem;
  object-fit: cover;
  border: 1px solid rgba(211, 183, 255, 0.24);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.30);
}

.project-article {
  width: 100%;
  margin-top: 1.8rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.78;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.38);
}

.project-article p + p {
  margin-top: 1rem;
}

.project-actions {
  margin-top: 1.6rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}

.profile-grid__wide {
  grid-column: 1 / -1;
}

#about.content-sheet.profile-grid__wide {
  min-height: 0;
  height: auto;
  align-self: start;
}

.profile-grid > .content-sheet + .content-sheet {
  margin-top: 0;
}

.profile-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  min-width: 0;
  padding: 1.6rem;
  transition: background 0.25s, transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.profile-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(232, 196, 240, 0.35);
  box-shadow: 0 8px 32px rgba(140, 80, 160, 0.15), 0 0 0 1px rgba(232, 196, 240, 0.10);
  transform: translateY(-4px);
}

.profile-card h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #e8c4f0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.profile-card p {
  margin-top: 0.6rem;
  color: rgba(240, 238, 230, 0.82);
  font-size: 0.95rem;
  line-height: 1.6;
}

.profile-card .card-footer {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.profile-card .card-url {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  color: rgba(232, 196, 240, 0.6);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s;
}

.profile-card:hover .card-url,
.profile-card .card-url:hover,
.profile-card .card-url:focus-visible {
  color: rgba(232, 196, 240, 0.9);
  outline: none;
}

.profile-card .card-url .arrow {
  transition: transform 0.25s;
  font-size: 0.75rem;
}

.profile-card:hover .card-url .arrow,
.profile-card .card-url:hover .arrow,
.profile-card .card-url:focus-visible .arrow {
  transform: translateX(3px);
}

.profile-card__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  opacity: 0.9;
  pointer-events: none;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.interest-card {
  padding: 1.15rem;
  border: 1px solid rgba(211, 183, 255, 0.20);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.20);
}

.interest-card h2 {
  color: var(--purple-strong);
  font-size: 1.08rem;
  line-height: 1.3;
}

.interest-card p {
  margin-top: 0.55rem;
  color: rgba(244, 240, 251, 0.74);
  line-height: 1.6;
}

.interest-panel {
  position: relative;
  overflow: hidden;
}

.interest-panel .sheet-title {
  max-width: calc(100% - min(22vw, 190px));
}

.interest-panel .bio-body {
  max-width: none;
  padding-right: min(19vw, 170px);
}

.interest-panel__icon {
  position: absolute;
  top: clamp(1.35rem, 4vw, 3.5rem);
  right: clamp(1.35rem, 4vw, 3.5rem);
  width: min(18vw, 150px);
  min-width: 110px;
  aspect-ratio: 1;
  border: 1px solid rgba(211, 183, 255, 0.34);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(211, 183, 255, 0.24), rgba(120, 78, 172, 0.12)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(178, 138, 244, 0.16);
  object-fit: cover;
}

.contact-sheet {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.contact-list {
  width: min(760px, 100%);
  margin-top: 2.25rem;
  display: grid;
  gap: 1.1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-height: 98px;
  padding: 1.3rem 1.45rem;
  border: 1px solid rgba(211, 183, 255, 0.20);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.20);
  transition: background 0.22s, border-color 0.22s, box-shadow 0.22s, transform 0.22s;
}

.contact-card:hover,
.contact-card:focus-visible {
  background: rgba(178, 138, 244, 0.15);
  border-color: rgba(211, 183, 255, 0.42);
  box-shadow: 0 16px 38px rgba(94, 54, 130, 0.24);
  transform: translateY(-2px);
  outline: none;
}

.contact-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.24));
}

.contact-name {
  display: block;
  color: var(--purple-strong);
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.contact-value {
  display: block;
  margin-top: 0.1rem;
  color: rgba(244, 240, 251, 0.74);
  font-size: 1.02rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .nav-shell {
    width: min(1180px, calc(100% - 1.2rem));
    min-height: 92px;
    gap: 1rem;
  }

  .brand {
    gap: 0.65rem;
  }

  .brand__mark {
    width: 62px;
    height: 62px;
  }

  .brand__name {
    font-size: 1.16rem;
  }

  .nav-menu {
    gap: 0.35rem;
  }

  .nav-link {
    min-height: 40px;
    padding: 0.56rem 0.68rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 640px) {
  .nav-shell {
    min-height: auto;
    padding: 0.75rem 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .brand__mark {
    width: 62px;
    height: 62px;
  }

  .nav-menu {
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .nav-link {
    min-height: 40px;
    padding: 0.6rem 0.78rem;
  }

  .page {
    padding-top: 1.2rem;
  }

  .content-sheet {
    min-height: calc(100vh - 12rem);
    border-radius: 14px;
  }

  .profile-portrait {
    width: min(40vw, 240px);
    min-width: 170px;
    margin-right: 1.1rem;
  }

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

  .profile-grid__wide {
    grid-column: auto;
  }

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

  .interest-panel .bio-body {
    padding-right: 0;
  }

  .interest-panel .sheet-title {
    max-width: 760px;
  }

  .interest-panel__icon {
    position: static;
    display: block;
    width: min(48vw, 150px);
    margin: 1.1rem 0 0;
  }
}

@media (max-width: 480px) {
  body {
    background-position: 47% center;
  }

  .nav-menu {
    gap: 0.35rem;
  }

  .nav-link {
    font-size: 0.92rem;
  }

  .profile-portrait {
    float: none;
    display: block;
    width: min(100%, 250px);
    margin: 0.25rem auto 1.25rem;
  }

  .project-link {
    grid-template-columns: 1fr;
  }

  .contact-card {
    align-items: flex-start;
    gap: 0.8rem;
    min-height: 88px;
    padding: 1.1rem;
  }

}
