:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;

  --bg-black: #060816;
  --bg-navy: #0d1633;
  --bg-deep: #1b1336;
  --text-main: #d7e4ff;
  --text-soft: #a4b4da;

  --cyan: #54deff;
  --blue: #45acff;
  --pink: #ff4fcb;
  --violet: #ae84ff;
  --green: #80ff98;
  --yellow: #ffe57f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  line-height: 1.5;
  color: var(--text-main);
  background:
    radial-gradient(1280px 700px at 50% -14%, rgba(132, 97, 255, 0.2), transparent 63%),
    linear-gradient(180deg, #070c20 0%, #0f1330 46%, #171236 100%);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: #8cd6ff;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: #c6edff;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1240px 720px at 6% -6%, rgba(160, 122, 255, 0.3), transparent 62%),
    radial-gradient(1000px 680px at 95% 2%, rgba(92, 170, 255, 0.2), transparent 66%),
    radial-gradient(940px 620px at 54% 110%, rgba(255, 104, 212, 0.15), transparent 70%),
    radial-gradient(780px 420px at 50% 18%, rgba(47, 63, 142, 0.28), transparent 66%);
}

.bg-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background:
    radial-gradient(circle at 1px 1px, rgba(206, 224, 255, 0.28) 0.6px, transparent 0.6px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  background-size: 4px 4px, 100% 100%;
}

.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 78% at 50% 30%, rgba(11, 18, 50, 0.28) 0%, rgba(8, 12, 34, 0.46) 58%, rgba(4, 6, 19, 0.72) 100%);
}

.terminal-home {
  width: min(980px, calc(100% - 0.8rem));
  margin: max(0.9rem, env(safe-area-inset-top)) auto max(1rem, env(safe-area-inset-bottom));
  padding: clamp(0.45rem, 1.5vw, 0.8rem);
}

.hero {
  width: min(860px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: 0.06rem 0 0.2rem;
}

.avatar-shell {
  width: fit-content;
  margin: 0 auto 0.42rem;
  border-radius: 999px;
  padding: 2px;
  background: linear-gradient(130deg, var(--pink), var(--violet), var(--cyan));
  box-shadow:
    0 0 18px rgba(174, 132, 255, 0.62),
    0 0 24px rgba(84, 222, 255, 0.48);
}

.avatar {
  width: clamp(106px, 18vw, 134px);
  height: clamp(106px, 18vw, 134px);
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.name-glow {
  margin: 0;
  font-size: clamp(1.92rem, 3.35vw, 2.56rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #57d5ff;
  font-weight: 800;
  text-shadow:
    0 1px 0 rgba(4, 12, 32, 0.88),
    0 0 11px rgba(84, 222, 255, 0.72),
    0 0 20px rgba(84, 222, 255, 0.3);
}

.title-glow {
  margin: 0.1rem 0 0;
  font-size: clamp(1.12rem, 2vw, 1.6rem);
  line-height: 1.2;
  color: var(--yellow);
  text-shadow:
    0 0 10px rgba(255, 229, 127, 0.85),
    0 0 22px rgba(255, 229, 127, 0.42);
}

.socials {
  margin: 0.4rem 0 0;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.socials a,
.socials button {
  text-decoration: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(132, 160, 220, 0.52);
  background: rgba(7, 16, 36, 0.84);
  color: #eaf2ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.socials a:hover,
.socials button:hover {
  transform: translateY(-1px);
  border-color: rgba(84, 222, 255, 0.84);
  box-shadow: 0 0 18px rgba(84, 222, 255, 0.46);
}

.socials svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.cta-row {
  margin: 0.46rem auto 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.52rem;
}

.inline-cta {
  margin: 0.5rem 0 0;
  width: 100%;
}

.inline-cta .neon-btn {
  min-height: 42px;
  font-size: clamp(0.82rem, 1vw, 0.94rem);
  width: 100%;
}

.hero-cta {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: 100%;
  margin: 0.42rem 0 0;
}

.hero-cta .neon-btn {
  width: 100%;
  min-height: 36px;
  box-shadow: inset 0 0 11px rgba(8, 18, 42, 0.9);
}

.hero-cta .neon-pink {
  box-shadow:
    inset 0 0 10px rgba(255, 79, 203, 0.22);
}

.hero-cta .neon-blue {
  box-shadow:
    inset 0 0 10px rgba(69, 172, 255, 0.24);
}

.hero-cta .neon-btn:hover {
  transform: none !important;
  filter: brightness(1.06) !important;
}

.neon-btn {
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 0.56rem 0.72rem;
  border-radius: 12px;
  border: 2px solid transparent;
  font-size: clamp(0.86rem, 1.05vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  background: rgba(7, 15, 35, 0.9);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.neon-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.neon-pink {
  border-color: rgba(255, 79, 203, 0.95);
  color: #ffd7f4;
  box-shadow:
    0 0 24px rgba(255, 79, 203, 0.74),
    inset 0 0 14px rgba(255, 79, 203, 0.18);
}

.neon-blue {
  border-color: rgba(69, 172, 255, 0.95);
  color: #d9f1ff;
  box-shadow:
    0 0 24px rgba(69, 172, 255, 0.72),
    inset 0 0 14px rgba(69, 172, 255, 0.19);
}

.content-stream {
  margin-top: 0.42rem;
  width: min(860px, 100%);
  margin-left: auto;
  margin-right: auto;
  display: block;
  font-family: var(--font-mono);
}

.section-card + .section-card {
  margin-top: 0.46rem;
}

@media (min-width: 900px) {
  .section-card + .section-card {
    margin-top: 0.62rem;
  }
}

.section-card {
  position: relative;
  padding: 0.08rem 0 0.14rem 0.8rem;
  background: transparent;
}

.section-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12rem;
  bottom: 0.12rem;
  width: 2px;
  border-radius: 999px;
  background: rgba(84, 222, 255, 0.9);
  box-shadow: 0 0 12px rgba(84, 222, 255, 0.65);
}

.section-card:nth-of-type(2)::before {
  background: rgba(69, 172, 255, 0.92);
  box-shadow: 0 0 12px rgba(69, 172, 255, 0.64);
}

.section-card:nth-of-type(3)::before {
  background: rgba(255, 79, 203, 0.92);
  box-shadow: 0 0 12px rgba(255, 79, 203, 0.64);
}

.section-card:nth-of-type(4)::before {
  background: rgba(174, 132, 255, 0.92);
  box-shadow: 0 0 12px rgba(174, 132, 255, 0.64);
}

.section-card:nth-of-type(5)::before {
  background: rgba(255, 229, 127, 0.94);
  box-shadow: 0 0 12px rgba(255, 229, 127, 0.64);
}

.section-card:nth-of-type(6)::before {
  background: rgba(128, 255, 152, 0.92);
  box-shadow: 0 0 12px rgba(128, 255, 152, 0.58);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.fold-btn {
  border: 0;
  background: transparent;
  color: #8ad8ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.26rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  width: 0.92em;
  min-width: 0.92em;
  text-align: center;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(84, 222, 255, 0.82);
  transition: color 180ms ease, opacity 180ms ease;
}

.fold-btn:hover {
  color: #fff;
  opacity: 1;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 1.7vw, 1.56rem);
  line-height: 1.16;
  color: #f4f8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.section-card:nth-of-type(1) .section-head h2 {
  color: var(--green);
  text-shadow: none;
}

.crt-hello {
  position: relative;
  display: inline-block;
  color: #4eff6c;
  letter-spacing: 0.014em;
  text-shadow:
    0 0 1px rgba(78, 255, 108, 0.88),
    0 0 5px rgba(78, 255, 108, 0.28);
  animation: crt-flicker 3.1s linear infinite;
}

.crt-hello::before,
.crt-hello::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.crt-hello::before {
  color: rgba(214, 128, 255, 0.95);
  opacity: 0;
  text-shadow: 0 0 2px rgba(214, 128, 255, 0.62);
  animation: crt-diag-purple 2.1s linear infinite;
}

.crt-hello::after {
  color: rgba(108, 238, 255, 0.72);
  opacity: 0;
  animation: crt-diag-cyan 2.55s linear infinite;
}

.emoji {
  display: inline-block;
  margin-right: 0.22rem;
  opacity: 1;
  filter: none;
  text-shadow: none;
}

.section-body {
  margin-top: 0.2rem;
  overflow: visible;
  max-height: none;
  opacity: 1;
  transition: max-height 280ms ease, opacity 220ms ease, margin-top 220ms ease;
}

.section-card.is-collapsed .section-body {
  max-height: 0 !important;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
}

.section-body p {
  margin: 0;
  color: #b7c7ea;
  font-size: clamp(0.98rem, 1.08vw, 1.04rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.section-note {
  margin: 0 0 0.36rem;
  color: #a8b8df;
  font-size: clamp(0.84rem, 0.92vw, 0.92rem);
  line-height: 1.4;
}

.intro-copy {
  font-family: var(--font-mono) !important;
  font-size: clamp(0.92rem, 0.98vw, 1rem) !important;
  line-height: 1.34 !important;
  color: #c9d5f0 !important;
  text-align: left;
  hyphens: none;
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: pretty !important;
  max-width: none !important;
}

.contact-row {
  margin-top: 0.32rem !important;
  margin-bottom: 0.16rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.5rem;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.16rem 0.52rem 0.18rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 229, 127, 0.34);
  background: linear-gradient(
    90deg,
    rgba(255, 229, 127, 0.22) 0%,
    rgba(255, 229, 127, 0.14) 52%,
    rgba(255, 229, 127, 0.05) 100%
  );
  box-shadow:
    0 0 16px rgba(255, 229, 127, 0.2),
    inset 0 0 10px rgba(255, 229, 127, 0.08);
  color: #e8edf9;
  font-size: clamp(0.84rem, 0.9vw, 0.92rem);
  position: relative;
  z-index: 2;
}

.contact-label {
  color: #fff3a8;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 0.93em;
}

.contact-link {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-sep {
  color: rgba(255, 243, 168, 0.9);
  font-size: 0.8em;
}

.clean-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: block;
}

.clean-list li {
  position: relative;
  padding-left: 0;
  color: #c4d2ef;
  font-size: clamp(0.95rem, 1vw, 1rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.clean-list li + li {
  margin-top: 0.2rem;
}

.item-tag {
  color: #e7f0ff;
  font-weight: 700;
  font-size: 0.93em;
}

.desc {
  color: var(--text-soft);
  margin-left: 0;
  display: block;
}

.projects-list li,
.contributions-list li {
  display: block;
}

.projects-list li > .desc,
.contributions-list li > .desc {
  margin: 0;
  display: inline;
}

.projects-list li > .desc::before,
.contributions-list li > .desc::before {
  content: " - ";
  color: #7f95c9;
}

.writings-list .topic-block {
  display: block;
}

.writings-list .topic-block + .topic-block {
  margin-top: 0.26rem;
}

.writings-list .item-tag {
  display: block;
  margin-bottom: 0.02rem;
}

.stack-link {
  display: inline;
  width: auto;
  margin-top: 0;
  overflow-wrap: anywhere;
}

.dash-list {
  margin: 0.03rem 0 0;
  padding: 0;
  list-style: none;
}

.dash-list li {
  position: relative;
  padding-left: 0.8rem;
}

.dash-list li + li {
  margin-top: 0.05rem;
}

.dash-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: #88dbff;
}

.academia-list li {
  display: block;
}

.academia-list li .item-tag {
  margin-bottom: 0;
  display: block;
  line-height: 1.34;
}

.academia-list li .desc {
  display: block;
  margin-top: 0.04rem;
  margin-left: 0.52rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(132, 162, 224, 0.52);
}

.academia-list li .stack-link {
  margin-top: 0;
  display: inline;
  margin-left: 0;
}

.thesis-line {
  display: block;
  margin-top: 0.06rem;
  margin-left: 0.52rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(186, 118, 255, 0.58);
}

.links-list li {
  display: block;
}

.links-list li + li {
  margin-top: 0.24rem;
}

.links-list li > .desc {
  margin: 0;
  display: block;
  color: var(--text-soft);
  font-size: 0.95em;
  line-height: 1.4;
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.qr-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.qr-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(2, 7, 20, 0.76);
  cursor: pointer;
}

.qr-panel {
  position: relative;
  width: min(92vw, 395px);
  margin: min(9vh, 4rem) auto 0;
  padding: 1rem 0.95rem 0.88rem;
  border-radius: 14px;
  border: 1px solid rgba(95, 153, 255, 0.62);
  background: linear-gradient(180deg, rgba(7, 16, 38, 0.96), rgba(5, 13, 31, 0.98));
  box-shadow:
    0 0 30px rgba(84, 222, 255, 0.2),
    0 0 50px rgba(255, 79, 203, 0.14);
  text-align: center;
  font-family: var(--font-mono);
}

.qr-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.23;
  border-radius: inherit;
  background: repeating-linear-gradient(
    to bottom,
    rgba(120, 180, 255, 0.2) 0px,
    rgba(120, 180, 255, 0.2) 1px,
    transparent 2px,
    transparent 4px
  );
}

.qr-close {
  position: absolute;
  top: 0.36rem;
  right: 0.52rem;
  border: 0;
  background: transparent;
  color: #ccdcff;
  font-size: 1.42rem;
  line-height: 1;
  cursor: pointer;
}

.qr-panel h3 {
  margin: 0;
  color: #f4f8ff;
  font-size: 1.16rem;
  text-shadow: 0 0 14px rgba(84, 222, 255, 0.35);
}

.qr-sub {
  margin: 0.22rem 0 0.54rem !important;
  color: #a9b9de !important;
  font-size: 0.92rem !important;
}

.qr-image-shell {
  width: fit-content;
  margin: 0 auto 0.54rem;
  border-radius: 11px;
  padding: 0.54rem;
  border: 1px solid rgba(95, 153, 255, 0.58);
  background: rgba(6, 14, 34, 0.86);
  box-shadow: 0 0 18px rgba(84, 222, 255, 0.22);
}

.qr-image-shell img {
  display: block;
  width: min(72vw, 214px);
  height: auto;
}

.qr-panel a {
  font-size: 0.9rem;
}

.sep {
  color: #7e95c9;
  margin: 0 0.15rem;
}

.section-head:hover .emoji-wave {
  animation: wave 700ms ease;
  transform-origin: 70% 75%;
}

.section-head:hover .emoji-rocket {
  animation: rocket 700ms ease;
}

.section-head:hover .emoji-pencil {
  animation: pencil 650ms ease;
}

.section-head:hover .emoji-cap {
  animation: cap 700ms ease;
}

.section-head:hover .emoji-star {
  animation: star 700ms ease;
}

.section-head:hover .emoji-links {
  animation: links-pulse 760ms ease;
}

.socials a:focus-visible,
.socials button:focus-visible,
.neon-btn:focus-visible,
.section-body a:focus-visible,
.fold-btn:focus-visible {
  outline: 2px solid rgba(84, 222, 255, 0.95);
  outline-offset: 2px;
}

.js .reveal,
.js .reveal.in-view {
  opacity: 1;
  transform: none;
  transition: none;
}

@keyframes wave {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(12deg); }
  100% { transform: rotate(0deg); }
}

@keyframes rocket {
  0% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(4px, -4px) rotate(-12deg); }
  70% { transform: translate(2px, -1px) rotate(2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes pencil {
  0% { transform: rotate(0deg) translateX(0); }
  30% { transform: rotate(-16deg) translateX(3px); }
  60% { transform: rotate(10deg) translateX(-2px); }
  100% { transform: rotate(0deg) translateX(0); }
}

@keyframes cap {
  0% { transform: translateY(0) rotate(0deg); }
  45% { transform: translateY(-4px) rotate(-10deg); }
  75% { transform: translateY(-1px) rotate(6deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes star {
  0% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.2) rotate(18deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes links-pulse {
  0% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(-16deg) scale(1.16); }
  70% { transform: rotate(8deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes crt-flicker {
  0%, 64%, 100% {
    opacity: 1;
    transform: translate(0, 0);
    filter: none;
  }
  65% {
    opacity: 1;
    transform: translate(0.5px, -0.4px);
  }
  66% {
    opacity: 0.98;
    transform: translate(-0.6px, 0.4px);
  }
  67% {
    opacity: 1;
    transform: translate(0, 0);
  }
  84% {
    opacity: 1;
    transform: translate(0.6px, 0);
  }
  85% {
    opacity: 1;
    transform: translate(-0.7px, 0);
  }
  86% {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes crt-diag-purple {
  0%, 22%, 44%, 66%, 100% {
    transform: translate(0, 0);
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
  23% {
    transform: translate(2px, -1px) skewX(9deg);
    opacity: 0.92;
    clip-path: polygon(0 6%, 100% 0, 100% 34%, 0 48%);
  }
  24% {
    transform: translate(-2px, 1px) skewX(-9deg);
    opacity: 0.84;
    clip-path: polygon(0 56%, 100% 49%, 100% 82%, 0 95%);
  }
  25% {
    transform: translate(0, 0);
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
  45% {
    transform: translate(1px, -1px) skewX(8deg);
    opacity: 0.82;
    clip-path: polygon(0 20%, 100% 12%, 100% 39%, 0 52%);
  }
  46% {
    transform: translate(-1px, 1px) skewX(-10deg);
    opacity: 0.78;
    clip-path: polygon(0 66%, 100% 58%, 100% 90%, 0 100%);
  }
  47% {
    transform: translate(0, 0);
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
  67% {
    transform: translate(2px, 0) skewX(-8deg);
    opacity: 0.86;
    clip-path: polygon(0 40%, 100% 34%, 100% 64%, 0 75%);
  }
  68% {
    transform: translate(-1px, 0) skewX(8deg);
    opacity: 0.76;
    clip-path: polygon(0 40%, 100% 34%, 100% 64%, 0 75%);
  }
  69% {
    transform: translate(0, 0);
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes crt-diag-cyan {
  0%, 30%, 58%, 100% {
    transform: translate(0, 0);
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
  31% {
    transform: translate(1px, -1px);
    opacity: 0.48;
    clip-path: polygon(0 22%, 100% 14%, 100% 39%, 0 52%);
  }
  32% {
    transform: translate(-1px, 1px);
    opacity: 0.42;
    clip-path: polygon(0 66%, 100% 58%, 100% 90%, 0 100%);
  }
  33% {
    transform: translate(0, 0);
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
  59% {
    transform: translate(1px, 0);
    opacity: 0.42;
    clip-path: polygon(0 10%, 100% 2%, 100% 22%, 0 34%);
  }
  60% {
    transform: translate(0, 0);
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
}

@media (max-width: 760px) {
  .terminal-home {
    width: min(980px, calc(100% - 0.72rem));
    padding: 0.52rem;
  }

  .section-card {
    padding-left: 0.78rem;
  }

  .section-card + .section-card {
    margin-top: 0.44rem;
  }

  .content-stream {
    width: min(860px, 100%);
  }

  .neon-btn {
    font-size: 0.92rem;
  }

  .contact-row {
    gap: 0.18rem 0.42rem;
  }

  .intro-copy {
    font-size: clamp(0.84rem, 2.15vw, 0.9rem) !important;
    line-height: 1.32 !important;
  }

  .section-note {
    margin-bottom: 0.28rem;
    font-size: 0.82rem;
    line-height: 1.34;
  }

  .hero-cta {
    margin: 0.38rem 0 0;
  }
}

@media (max-width: 500px) {
  .terminal-home {
    width: min(980px, calc(100% - 0.44rem));
    padding: 0.42rem;
  }

  .hero {
    padding: 0 0 0.1rem;
  }

  .avatar {
    width: clamp(76px, 23.5vw, 88px);
    height: clamp(76px, 23.5vw, 88px);
  }

  .name-glow {
    font-size: clamp(1.44rem, 6.1vw, 1.72rem);
  }

  .title-glow {
    font-size: clamp(0.82rem, 3.4vw, 1rem);
  }

  .socials {
    margin-top: 0.3rem;
    gap: 0.38rem;
  }

  .socials a,
  .socials button {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .cta-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.28rem;
    margin-top: 0.34rem;
  }

  .neon-btn {
    min-height: 30px;
    font-size: 0.7rem;
    padding: 0.24rem 0.2rem;
  }

  .inline-cta {
    margin: 0.42rem 0 0;
  }

  .inline-cta .neon-btn {
    min-height: 34px;
    font-size: 0.72rem;
    padding: 0.3rem 0.24rem;
  }

  .section-head h2 {
    font-size: clamp(0.96rem, 4.4vw, 1.12rem);
    letter-spacing: -0.01em;
  }

  .clean-list li {
    font-size: 0.88rem;
    line-height: 1.44;
  }

  .contact-row {
    margin-bottom: 0.12rem;
    padding: 0.11rem 0.32rem 0.12rem;
    gap: 0.12rem 0.32rem;
  }

  .contact-sep {
    opacity: 0.75;
  }

  .academia-list li .desc,
  .thesis-line {
    margin-left: 0.4rem;
    padding-left: 0.42rem;
  }

  .intro-copy {
    font-size: 0.82rem !important;
    line-height: 1.3 !important;
  }

  .projects-list li > .desc::before,
  .contributions-list li > .desc::before {
    content: "";
    margin: 0;
  }

  .projects-list li > .desc,
  .contributions-list li > .desc {
    display: block;
    margin-left: 0;
  }

  .thesis-line {
    margin-left: 0.4rem;
    margin-top: 0.05rem;
  }

  .hero-cta {
    margin: 0.32rem 0 0;
  }

  .hero-cta .neon-btn {
    min-height: 29px;
    font-size: 0.64rem;
    padding: 0.2rem 0.14rem;
  }

  .links-list li + li {
    margin-top: 0.2rem;
  }

  .links-list li > .desc {
    font-size: 0.92em;
    line-height: 1.35;
  }

  .section-card {
    padding-left: 0.62rem;
  }

  .qr-panel {
    width: min(94vw, 360px);
    margin-top: min(7vh, 2.8rem);
    padding: 0.88rem 0.72rem 0.72rem;
  }
}

@media (max-width: 380px) {
  .terminal-home {
    width: min(940px, calc(100% - 0.28rem));
    padding: 0.38rem;
  }

  .socials a,
  .socials button {
    width: 33px;
    height: 33px;
  }

  .section-card {
    padding-left: 0.54rem;
  }

  .intro-copy {
    font-size: 0.8rem !important;
    line-height: 1.28 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .socials a,
  .socials button,
  .neon-btn,
  .fold-btn,
  .js .reveal,
  .section-body,
  .emoji,
  .crt-hello,
  .crt-hello::before,
  .crt-hello::after {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }

  .js .reveal {
    opacity: 1 !important;
  }
}
