:root {
  color-scheme: light;
  --bg: #faf9f6;
  --text: #171717;
  --muted: #6f6f6f;
  --line: #cfcac1;
  --link: #075fe7;
  --link-soft: #e4ecff;
  --status: #6baa1f;
  --font: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 0, 0, 0.035), transparent 24rem),
    radial-gradient(circle at 45% 64%, rgba(7, 95, 231, 0.035), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  transition: background-color 180ms ease, color 180ms ease;
}

body.dark {
  color-scheme: dark;
  --bg: #030712;
  --text: #e9edf7;
  --muted: #8f9aad;
  --line: #1b2740;
  --link: #7fb4ff;
  --link-soft: #0b1b35;
  --status: #9ed34f;
  background:
    radial-gradient(circle at 18% 18%, rgba(127, 180, 255, 0.075), transparent 24rem),
    radial-gradient(circle at 60% 70%, rgba(77, 104, 180, 0.08), transparent 28rem),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 5px;
}

.page-shell {
  width: calc(100% - 96px);
  max-width: 1120px;
  min-height: 100vh;
  margin: 0 48px;
  padding: 40px 0 48px;
}

.content {
  width: min(100%, 570px);
  padding-top: 10px;
}

.hero {
  margin-bottom: 38px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(50px, 7vw, 74px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
}

.intro {
  width: min(100%, 540px);
  margin: 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.55;
}

.mobile-word {
  display: none;
}

.button-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  margin-top: 40px;
}

.text-link {
  color: var(--link);
}

.button-links button {
  display: inline-flex;
  min-width: 112px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button-links button:hover,
.text-link:hover,
.writing-list a:hover span {
  background: var(--link-soft);
}

.button-links button:hover,
.button-links button.active {
  border-color: var(--link);
  color: var(--link);
}

.button-links button.active {
  background: transparent;
}

.button-links button:hover {
  transform: translateY(-1px);
}

.guestbook-nav .nav-particles {
  display: none;
}

.panel-stage {
  min-height: 270px;
}

.section {
  margin-top: 54px;
}

.panel {
  animation: panel-in 180ms ease both;
}

.panel[hidden] {
  display: none;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section h2 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
}

.philosophy-list {
  display: grid;
  gap: 14px;
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
}

.philosophy-list li::before {
  margin-right: 16px;
  color: var(--text);
  content: "->";
}

.home-panel p {
  margin: 18px 0 0;
  color: var(--text);
}

.info-copy {
  margin: 18px 0 0;
  color: var(--text);
  line-height: 1.7;
}

.video-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.video-list iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.22);
}

.social-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 18px;
}

.social-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.22);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.social-list a span {
  display: inline-flex;
  gap: 9px;
  align-items: center;
}

.social-list img {
  width: 16px;
  height: 16px;
  opacity: 0.82;
  transition:
    filter 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.social-list a:hover {
  border-color: var(--social-color, var(--link));
  color: var(--social-color, var(--link));
  background: var(--social-bg, var(--link-soft));
  transform: translateY(-1px);
}

.social-list a:hover img {
  opacity: 1;
  transform: translateY(-1px);
}

.social-list b {
  color: currentColor;
  font-weight: 400;
}

.social-github {
  --social-color: #181717;
  --social-bg: rgba(24, 23, 23, 0.06);
}

.social-twitter {
  --social-color: #000000;
  --social-bg: rgba(0, 0, 0, 0.055);
}

.social-instagram {
  --social-color: #e4405f;
  --social-bg: rgba(228, 64, 95, 0.08);
}

.social-tiktok {
  --social-color: #fe2c55;
  --social-bg: rgba(254, 44, 85, 0.08);
}

.social-telegram {
  --social-color: #26a5e4;
  --social-bg: rgba(38, 165, 228, 0.09);
}

.discord-card {
  margin-top: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  color: var(--text);
  overflow: hidden;
}

body.dark .discord-card {
  border-color: #24314f;
  background: rgba(7, 14, 31, 0.92);
}

.discord-banner {
  height: 104px;
  border-bottom: 1px solid var(--line);
  background-image: url("./assets/discord-banner.png");
  background-position: 55% 31%;
  background-size: cover;
}

body.dark .discord-banner {
  border-bottom-color: #24314f;
}

.discord-body {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.discord-avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin-top: -42px;
}

.discord-avatar,
.discord-avatar-fallback {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  background: var(--bg);
}

body.dark .discord-avatar,
body.dark .discord-avatar-fallback {
  border-color: #24314f;
  background: #07101f;
}

.discord-avatar[hidden] {
  display: none;
}

.discord-avatar {
  display: block;
  object-fit: cover;
}

.discord-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 16px;
}

.discord-avatar:not([hidden]) + .discord-avatar-fallback {
  display: none;
}

.discord-status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--muted);
}

body.dark .discord-status {
  border-color: #07101f;
}

.discord-card[data-status="online"] .discord-status {
  background: #3ba55d;
}

.discord-card[data-status="idle"] .discord-status {
  background: #faa61a;
}

.discord-card[data-status="dnd"] .discord-status {
  background: #ed4245;
}

.discord-card[data-status="offline"] .discord-status {
  background: #747f8d;
}

.discord-info {
  position: relative;
  min-width: 0;
  padding-top: 1px;
}

.discord-topline {
  position: absolute;
  top: 1px;
  right: 0;
}

.discord-identity {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.discord-name {
  overflow: hidden;
  font-size: 16px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-topline span,
.discord-info p {
  color: var(--muted);
  font-size: 14px;
}

.discord-handle {
  flex: 0 1 auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-info p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-info p[data-discord-activity] {
  margin-top: 8px;
}

.presence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.presence-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.22);
}

body.dark .presence-card {
  border-color: #24314f;
  background: rgba(7, 14, 31, 0.82);
}

.presence-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.presence-card strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-card p {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.presence-row img {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  object-fit: cover;
}

body.dark .presence-row img,
body.dark .spotify-row img {
  border-color: #24314f;
}

.presence-row img[hidden] {
  display: none;
}

.presence-row:has(img[hidden]) {
  grid-template-columns: 1fr;
}

.spotify-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.spotify-row img {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.spotify-row img[hidden] {
  display: none;
}

.spotify-row:has(img[hidden]) {
  grid-template-columns: 1fr;
}

.spotify-progress {
  height: 3px;
  margin-top: 12px;
  overflow: hidden;
  background: rgba(111, 111, 111, 0.18);
}

body.dark .spotify-progress {
  background: rgba(143, 154, 173, 0.18);
}

.spotify-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: #1db954;
  transition: width 260ms ease;
}

.project-list {
  border-bottom: 1px solid var(--line);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 18px;
  align-items: center;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
}

.project:last-child {
  border-bottom: 0;
}

.project strong {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 1px;
  font-size: 20px;
  font-weight: 400;
}

.project small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.project-status::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.active-status {
  color: #5d9f20;
}

.hold-status {
  color: #b7791f;
}

.inactive-status {
  color: var(--muted);
}

.other-status {
  color: #075fe7;
}

.project em {
  display: block;
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.28;
}

.project b {
  color: var(--link);
  font-weight: 400;
  transition: transform 160ms ease;
}

.project:hover b {
  transform: translateX(4px);
}

.text-link {
  display: inline-block;
  margin-top: 18px;
}

.writing-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.writing-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 20px;
  align-items: baseline;
}

.writing-list span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.writing-list time {
  color: var(--muted);
  font-size: 14px;
}

.stack-switch {
  position: relative;
  display: inline-flex;
  gap: 8px;
  margin-top: 18px;
  padding: 4px;
  border: 1px solid var(--line);
}

body.dark .stack-switch {
  border-color: #24314f;
  background: rgba(7, 14, 31, 0.5);
}

.stack-switch-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 16px) / 2);
  background: var(--link-soft);
  transform: translateX(var(--stack-switch-x, 0));
  transition: transform 190ms ease;
}

.stack-switch[data-active="programs"] {
  --stack-switch-x: calc(100% + 8px);
}

.stack-switch button {
  position: relative;
  z-index: 1;
  min-width: 124px;
  min-height: 32px;
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.stack-switch button:hover,
.stack-switch button.active {
  color: var(--link);
}

.stack-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  animation: stack-list-in 180ms ease both;
}

.stack-list[hidden] {
  display: none;
}

@keyframes stack-list-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stack-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.22);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

body.dark .stack-item {
  border-color: #24314f;
  background: rgba(7, 14, 31, 0.82);
}

.stack-item:hover {
  border-color: var(--link);
  background: var(--link-soft);
  transform: translateY(-1px);
}

.stack-item img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.stack-duo {
  display: grid;
  gap: 4px;
}

.stack-duo img {
  width: 22px;
  height: 22px;
}

.stack-logo-fallback {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
}

.adobe-pr,
.adobe-ae {
  border-color: #9999ff;
  background: #00005b;
  color: #cfcfff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}

.stack-item strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.guestbook-intro {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.guestbook-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.22);
}

body.dark .guestbook-form {
  border-color: #24314f;
  background: rgba(7, 14, 31, 0.82);
}

.guestbook-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

body.dark .guestbook-form input,
body.dark .guestbook-form textarea {
  border-color: #24314f;
  background: rgba(3, 7, 18, 0.62);
}

.guestbook-form input {
  height: 38px;
  padding: 0 11px;
}

.guestbook-form textarea {
  min-height: 94px;
  resize: vertical;
  padding: 10px 11px;
}

.guestbook-form input::placeholder,
.guestbook-form textarea::placeholder {
  color: var(--muted);
}

.guestbook-mode {
  position: relative;
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
}

body.dark .guestbook-mode {
  border-color: #24314f;
  background: rgba(3, 7, 18, 0.42);
}

.guestbook-mode-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 14px) / 2);
  background: var(--link-soft);
  transform: translateX(var(--guestbook-mode-x, 0));
  transition: transform 190ms ease;
}

.guestbook-mode[data-active="private"] {
  --guestbook-mode-x: calc(100% + 6px);
}

.guestbook-mode button,
.guestbook-submit {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.guestbook-mode button {
  position: relative;
  z-index: 1;
  min-width: 86px;
  min-height: 30px;
}

.guestbook-mode button:hover,
.guestbook-mode button.active {
  color: var(--link);
}

.guestbook-submit {
  width: fit-content;
  padding: 0;
  color: var(--link);
}

.guestbook-submit:disabled {
  cursor: wait;
  opacity: 0.55;
}

.guestbook-submit:hover {
  background: var(--link-soft);
}

.guestbook-feedback {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.guestbook-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.guestbook-entry {
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.18);
}

body.dark .guestbook-entry {
  border-color: #24314f;
  background: rgba(7, 14, 31, 0.82);
}

.guestbook-entry div {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.guestbook-entry div span {
  display: inline-flex;
  min-width: 0;
  gap: 8px;
  align-items: baseline;
}

.guestbook-entry strong {
  font-size: 15px;
  font-weight: 500;
}

.guestbook-entry small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guestbook-loved {
  color: var(--link);
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}

.guestbook-loved::before {
  content: "<3 ";
}

.guestbook-entry time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.guestbook-entry p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.guestbook-empty {
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.message p {
  margin: 18px 0 0;
  color: var(--text);
}

.footer {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 72px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer .status {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.footer .dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.footer i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--status);
}

.theme-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  min-width: 72px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

body.dark .social-list a {
  border-color: #24314f;
  background: rgba(7, 14, 31, 0.82);
}

.theme-toggle:hover {
  border-color: var(--link);
  color: var(--link);
  transform: translateY(-1px);
}

body.dark .theme-toggle {
  background: rgba(3, 7, 18, 0.82);
}

@media (max-width: 820px) {
  .page-shell {
    width: calc(100% - 40px);
    max-width: 570px;
    margin: 0 auto;
    padding-top: 28px;
  }

  .content {
    padding-top: 76px;
  }

  .intro {
    font-size: 17px;
  }

  .desktop-word {
    display: none;
  }

  .mobile-word {
    display: inline;
  }

  .button-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 22px;
  }

  .button-links button {
    min-width: 0;
    width: 100%;
  }

  .video-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .social-list {
    grid-template-columns: 1fr;
  }

  .presence-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    display: grid;
    gap: 9px;
  }

  .footer .status {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .content {
    padding-top: 58px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .discord-card {
    padding: 0;
  }

  .discord-banner {
    height: 86px;
  }

  .discord-body {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 14px;
  }

  .discord-avatar-wrap,
  .discord-avatar,
  .discord-avatar-fallback {
    width: 52px;
    height: 52px;
  }

  .discord-avatar-wrap {
    margin-top: -32px;
  }

  .discord-status {
    width: 13px;
    height: 13px;
    border-width: 2px;
  }

  .project {
    grid-template-columns: minmax(0, 1fr) 22px;
    min-height: 104px;
  }

  .project time {
    display: none;
  }

  .project b {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .writing-list a {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .stack-switch {
    width: 100%;
  }

  .stack-switch button {
    flex: 1;
    min-width: 0;
  }

  .guestbook-mode {
    width: 100%;
  }

  .guestbook-mode button {
    flex: 1;
  }
}
