:root {
  --bg-pink: #fff4ed;
  --bg-blue: #eaf8ff;
  --accent-orange: #ffb86c;
  --accent-pink: #ff8fa3;
  --accent-blue: #aee1ff;
  --text: #5b5554;
  --heading: #3e3938;
  --muted: #746f6d;
  --panel: rgba(255, 255, 255, 0.6);
  --radius: 20px;
  --shadow: 0 8px 32px rgba(31, 38, 135, 0.05), 0 20px 48px rgba(255, 184, 108, 0.08);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-highlight: rgba(255, 255, 255, 0.72);
  --candy-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background: #fffaf7;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  isolation: isolate;
}

body::before,
body::after {
  display: none;
}

.candy-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(135deg, #fff5ed 0%, #fffaf7 46%, #edf8ff 100%);
}

.candy-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.bg-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(82, 102, 128, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 102, 128, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 92%);
  opacity: 1;
}

.bg-orb {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  filter: blur(92px);
  transform: translateZ(0);
  animation: orbBreath 18s ease-in-out infinite alternate;
}

.orb-a {
  width: 620px;
  height: 620px;
  background: rgba(255, 184, 108, 0.62);
  top: -170px;
  left: -120px;
}

.orb-b {
  width: 700px;
  height: 700px;
  background: rgba(174, 225, 255, 0.72);
  right: -210px;
  top: 2vh;
  animation-delay: -4s;
}

.orb-c {
  width: 760px;
  height: 760px;
  background: rgba(255, 143, 163, 0.28);
  right: 16vw;
  bottom: -300px;
  animation-delay: -8s;
}

.bg-shape {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 18px 44px rgba(174, 225, 255, 0.18);
  opacity: 0.95;
  animation: shapeFloat 16s ease-in-out infinite alternate;
}

.shape-ring {
  border-radius: 50%;
}

.shape-ring::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.shape-star {
  width: 34px;
  height: 34px;
  clip-path: polygon(50% 0, 61% 34%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 34%);
}

.shape-a {
  width: 88px;
  height: 88px;
  left: 3vw;
  top: 34vh;
}

.shape-b {
  width: 132px;
  height: 132px;
  right: 4vw;
  top: 52vh;
  animation-name: shapeFloatReverse;
  animation-delay: -5s;
}

.shape-c {
  right: 18vw;
  top: 18vh;
  animation-delay: -9s;
}

.site-header {
  position: sticky;
  top: 8px;
  z-index: 20;
  margin: 22px auto;
  width: min(1120px, 92vw);
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  transition: transform 0.28s var(--candy-ease), box-shadow 0.28s ease, background 0.28s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 16px 42px rgba(111, 92, 88, 0.1);
  transform: translateY(-2px);
}

.container,
.site-footer {
  position: relative;
  z-index: 1;
}

.hero > *,
.panel > *,
.site-footer > * {
  position: relative;
  z-index: 1;
}

.brand {
  font-family: "Outfit", sans-serif;
  color: #f06873;
  font-size: 1.55rem;
  font-weight: 700;
}

.top-nav {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
}

.top-nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.top-nav a:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #d86f47;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 20px rgba(255, 184, 108, 0.14);
  transform: translateY(-1px);
}

.lang-btn {
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255, 248, 224, 0.88), rgba(255, 255, 255, 0.64));
  color: #5d4937;
  font-weight: 700;
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 10px 20px rgba(255, 184, 108, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lang-btn:hover,
.like-btn:hover,
.btn:hover {
  transform: translateY(-3px) scale(1.01);
}

.lang-btn:active,
.like-btn:active,
.btn:active,
.skill-card:active {
  transform: translateY(1px) scale(0.99);
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto 56px;
  display: grid;
  gap: 18px;
}

.hero,
.panel {
  position: relative;
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid var(--glass-border);
  padding: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 124px;
  transition: transform 0.32s var(--candy-ease), box-shadow 0.32s ease, border-color 0.32s ease;
}

.hero::before,
.panel::before,
.site-footer::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.48), transparent 42%, rgba(174, 225, 255, 0.13));
  pointer-events: none;
}

.panel:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.64);
  box-shadow: 0 16px 42px rgba(31, 38, 135, 0.07), 0 22px 56px rgba(255, 184, 108, 0.12);
}

.hero {
  min-height: 390px;
  background:
    radial-gradient(circle at var(--mx, 68%) var(--my, 28%), rgba(255, 255, 255, 0.68), transparent 18%),
    linear-gradient(120deg, rgba(255, 237, 224, 0.68), rgba(241, 250, 255, 0.72));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.typing-line {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: 1px;
}

.typing-line strong {
  color: #f18b47;
}

h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--heading);
}

.subtitle {
  color: var(--muted);
  margin-top: 14px;
  font-size: 1.1rem;
  min-height: 1.8em;
}

.subtitle::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(238, 127, 99, 0.72);
  vertical-align: -0.12em;
  animation: caretBlink 0.9s steps(2, start) infinite;
}

.hero-visual {
  position: relative;
  width: min(360px, 100%);
  height: 325px;
  justify-self: end;
}

.ip-halo {
  position: absolute;
  inset: 26px 58px 12px;
  border-radius: 42% 58% 45% 55%;
  background: linear-gradient(145deg, rgba(255, 184, 108, 0.16), rgba(174, 225, 255, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 34px rgba(47, 39, 38, 0.08);
}

.ip-character {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: auto;
  height: 315px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 16px rgba(47, 39, 38, 0.14));
  z-index: 2;
}

.floating-tag {
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(47, 39, 38, 0.08);
  animation: float 5.8s ease-in-out infinite;
  z-index: 3;
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s ease;
}

.floating-tag:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 26px rgba(240, 109, 127, 0.14), 0 0 0 5px rgba(255, 255, 255, 0.28);
}

.t1 {
  top: 42px;
  left: 20px;
}

.t2 {
  top: 22px;
  right: 18px;
  animation-delay: 0.4s;
}

.t3 {
  top: 152px;
  left: 2px;
  animation-delay: 0.9s;
}

.t4 {
  top: 148px;
  right: 4px;
  animation-delay: 1.3s;
}

.t5 {
  left: 14px;
  bottom: 24px;
  animation-delay: 1.7s;
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
  }
}

.panel-title {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 232, 235, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: #de5f74;
  font-weight: 700;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 8px 18px rgba(240, 109, 127, 0.08);
}

h2 {
  margin: 4px 0 18px;
  font-size: 2rem;
  color: var(--heading);
  line-height: 1.25;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 0;
}

.section-head p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-head.compact {
  align-items: start;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.section-kicker {
  margin: 0 0 8px;
  color: #e06776;
  font-weight: 700;
}

.about-story h2 {
  max-width: 540px;
}

.about-story p:not(.section-kicker) {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

.about-story p:last-child {
  margin-bottom: 0;
}

.about-cards {
  display: grid;
  gap: 14px;
  perspective: 900px;
}

.about-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 20px;
  padding: 18px 18px 20px;
  box-shadow:
    0 16px 30px rgba(47, 39, 38, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translateY(18px) rotate(-1deg);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.about-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 143, 163, 0.34), rgba(174, 225, 255, 0.34));
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}

.about-card::after {
  content: "";
  position: absolute;
  width: 86px;
  height: 86px;
  right: -28px;
  top: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(255, 143, 163, 0.08) 62%, transparent 64%);
  pointer-events: none;
}

.about-card:nth-child(1) {
  min-height: 160px;
  --card-rotate: -0.7deg;
}

.about-card:nth-child(2) {
  min-height: 145px;
  margin-left: 18px;
  --card-rotate: 0.8deg;
}

.about-card:nth-child(3) {
  min-height: 172px;
  margin-right: 12px;
  transform: translateY(18px) rotate(1deg);
  --card-rotate: -0.4deg;
}

.visible .about-card {
  animation: cardStagger 0.62s ease forwards;
}

.visible .about-card:nth-child(2) {
  animation-delay: 0.12s;
}

.visible .about-card:nth-child(3) {
  animation-delay: 0.24s;
}

.about-card:hover {
  transform: translateY(-8px) rotate(0deg);
  border-color: rgba(255, 143, 163, 0.82);
  box-shadow:
    0 22px 42px rgba(240, 109, 127, 0.16),
    0 0 0 5px rgba(255, 232, 235, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.about-card:hover::before {
  opacity: 1;
}

.about-card span {
  display: inline-block;
  margin-bottom: 8px;
  color: #f06d7f;
  font-family: "Outfit", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  animation: numberPulse 2.4s ease-in-out infinite;
}

.about-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@keyframes cardStagger {
  to {
    opacity: 1;
    transform: translateY(0) rotate(var(--card-rotate, 0deg));
  }
}

@keyframes numberPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 0 rgba(240, 109, 127, 0);
  }
  50% {
    transform: translateY(-2px) scale(1.06);
    text-shadow: 0 7px 16px rgba(240, 109, 127, 0.26);
  }
}

.life-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.life-strip span {
  border-radius: 999px;
  padding: 8px 13px;
  background: linear-gradient(120deg, rgba(255, 244, 232, 0.72), rgba(237, 248, 255, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.54);
  color: #5c5250;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 10px 22px rgba(47, 39, 38, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.life-strip span:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(174, 225, 255, 0.2);
}

.project-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  background: rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 16px 34px rgba(47, 39, 38, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 184, 108, 0.95);
  box-shadow: 0 24px 50px rgba(232, 141, 83, 0.16), 0 0 0 6px rgba(255, 244, 232, 0.75);
}

.project-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  min-height: 230px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 143, 163, 0.22), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(174, 225, 255, 0.38), transparent 30%),
    linear-gradient(150deg, #f7f8fb, #fff0f4, #e6f5ff);
  border: 1px solid rgba(217, 223, 230, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.project-window {
  position: absolute;
  inset: 28px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 30px rgba(47, 39, 38, 0.1);
  padding: 18px;
}

.project-window span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: #ff8fa3;
}

.project-window span:nth-child(2) {
  background: #ffb86c;
}

.project-window span:nth-child(3) {
  background: #aee1ff;
}

.project-lines {
  margin-top: 22px;
  height: 130px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(240, 109, 127, 0.16) 0 36%, transparent 36% 100%),
    repeating-linear-gradient(180deg, rgba(111, 103, 101, 0.18) 0 8px, transparent 8px 23px);
  animation: scanLines 4s ease-in-out infinite;
}

.project-content p {
  color: var(--muted);
  line-height: 1.8;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chips span {
  font-size: 0.86rem;
  background: rgba(255, 243, 232, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: #87542d;
  border-radius: 999px;
  padding: 6px 10px;
  transition: transform 0.24s ease, background 0.24s ease;
}

.chips span:hover {
  transform: translateY(-3px);
  background: #ffe4ce;
}

.btn {
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(120deg, #ffb86c, #ee7f63);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 11px 18px;
  box-shadow: 0 12px 24px rgba(238, 127, 99, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease;
}

.btn:hover {
  box-shadow: 0 16px 28px rgba(238, 127, 99, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.52);
  filter: saturate(1.04);
}

.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: center;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.post-list li {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(1.14);
  -webkit-backdrop-filter: blur(12px) saturate(1.14);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 12px 24px rgba(47, 39, 38, 0.05);
  opacity: 0;
  transform: translateX(-18px);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.visible .post-list li {
  animation: listStagger 0.55s ease forwards;
}

.visible .post-list li:nth-child(2) {
  animation-delay: 0.08s;
}

.visible .post-list li:nth-child(3) {
  animation-delay: 0.16s;
}

.visible .post-list li:nth-child(4) {
  animation-delay: 0.24s;
}

.post-list li:hover {
  transform: translateX(8px);
  box-shadow: 0 18px 32px rgba(240, 109, 127, 0.12);
}

.post-list em {
  color: #eb6783;
  font-style: normal;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.post-list em::before {
  content: "❤";
  color: #f15f78;
  font-size: 0.78em;
  line-height: 1;
}

.phone {
  display: grid;
  place-items: center;
  animation: phoneFloat 4.2s ease-in-out infinite;
}

.phone-screen {
  width: 250px;
  height: 430px;
  border-radius: 35px;
  border: 7px solid rgba(43, 40, 39, 0.86);
  background:
    radial-gradient(circle at 82% 18%, rgba(174, 225, 255, 0.42), transparent 34%),
    linear-gradient(160deg, #fff4f6, #ecf8ff);
  padding: 24px 20px 58px;
  box-shadow: 0 20px 40px rgba(40, 40, 40, 0.15), 0 0 0 10px rgba(255, 255, 255, 0.24);
  position: relative;
  overflow: hidden;
}

.phone-screen::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 62px;
  height: 104px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 22% 26%, rgba(255, 143, 163, 0.55) 0 7px, transparent 8px),
    radial-gradient(circle at 76% 30%, rgba(174, 225, 255, 0.76) 0 9px, transparent 10px),
    linear-gradient(to top, rgba(255, 184, 108, 0.34) 0 28%, transparent 28% 100%) 26px 48px / 18px 44px no-repeat,
    linear-gradient(to top, rgba(255, 143, 163, 0.28) 0 54%, transparent 54% 100%) 72px 48px / 18px 44px no-repeat,
    linear-gradient(to top, rgba(174, 225, 255, 0.5) 0 72%, transparent 72% 100%) 118px 48px / 18px 44px no-repeat,
    rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 14px 28px rgba(174, 225, 255, 0.13);
  pointer-events: none;
  z-index: 0;
}

.phone-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0 38%, rgba(255, 255, 255, 0.45) 44%, transparent 52%);
  transform: translateX(-100%);
  animation: phoneShine 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}

.like-btn {
  position: absolute;
  right: 18px;
  bottom: 18px;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.82);
  color: #e95675;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(240, 109, 127, 0.16);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  z-index: 4;
}

.phone-kicker {
  margin: 0 0 10px;
  color: #e65f76;
  font-size: 0.78rem;
  font-weight: 800;
  position: relative;
  z-index: 2;
  will-change: transform;
}

.phone-screen h4 {
  margin: 0 0 14px;
  font-size: 1.08rem;
  line-height: 1.42;
  position: relative;
  z-index: 2;
  will-change: transform;
}

.phone-article {
  color: #554c4a;
  font-size: 0.78rem;
  line-height: 1.65;
  position: relative;
  z-index: 2;
  will-change: transform;
}

.phone.in-view .phone-kicker,
.phone.in-view .phone-screen h4,
.phone.in-view .phone-article,
.visible .phone .phone-kicker,
.visible .phone .phone-screen h4,
.visible .phone .phone-article {
  animation: phoneContentScroll 18s ease-in-out infinite alternate;
}

.phone:hover .phone-kicker,
.phone:hover .phone-screen h4,
.phone:hover .phone-article {
  animation-play-state: paused;
}

.phone-article p {
  margin: 0 0 10px;
}

.phone-article ul {
  margin: 0;
  padding-left: 16px;
}

.phone-article li {
  margin-bottom: 7px;
}

.card-area {
  min-height: 300px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 244, 232, 0.86), transparent 52%),
    radial-gradient(circle at 64% 42%, rgba(174, 225, 255, 0.28), transparent 42%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 22px;
}

.deck {
  position: relative;
  width: min(640px, 100%);
  height: 285px;
}

.skill-card {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 148px;
  height: 218px;
  border-radius: 18px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  perspective: 900px;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.card-inner {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.58s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.skill-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  backface-visibility: hidden;
  border: 3px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 34px rgba(47, 39, 38, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.card-back {
  background:
    radial-gradient(circle at 32px 42px, rgba(255, 255, 255, 0.85) 0 3px, transparent 4px),
    radial-gradient(circle at 110px 64px, rgba(255, 255, 255, 0.75) 0 2px, transparent 3px),
    radial-gradient(circle at 98px 158px, rgba(255, 255, 255, 0.72) 0 2px, transparent 3px),
    linear-gradient(150deg, #ffd99b, #ffb8bd 48%, #b9e8ff);
}

.card-back::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 14px;
}

.card-back::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 68% 36%, rgba(255, 255, 255, 0) 0 19px, rgba(255, 246, 185, 0.95) 20px 24px, transparent 25px),
    linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.85) 41% 46%, transparent 47%),
    linear-gradient(-45deg, transparent 40%, rgba(255, 255, 255, 0.85) 41% 46%, transparent 47%);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 3px 5px rgba(121, 78, 60, 0.18));
}

.card-front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: left;
  color: #332a29;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 240, 244, 0.9)),
    radial-gradient(circle at 100% 0, rgba(174, 225, 255, 0.35), transparent 42%);
  transform: rotateY(180deg);
}

.card-front strong {
  font-size: 1.12rem;
  line-height: 1.25;
  color: #e65f76;
}

.card-front em {
  font-style: normal;
  font-size: 0.78rem;
  line-height: 1.65;
  color: #5f5654;
}

.card-front small {
  font-size: 0.68rem;
  line-height: 1.45;
  color: #8a6a4d;
  background: #fff4e8;
  border-radius: 10px;
  padding: 7px;
}

.skill-card:nth-child(1) {
  transform: translate(-315px, 34px) rotate(-18deg);
}

.skill-card:nth-child(2) {
  transform: translate(-170px, 8px) rotate(-8deg);
}

.skill-card:nth-child(3) {
  transform: translate(-24px, 8px) rotate(8deg);
}

.skill-card:nth-child(4) {
  transform: translate(120px, 34px) rotate(18deg);
}

.skill-card.active,
.skill-card:hover {
  filter: saturate(1.08);
  z-index: 3;
}

.skill-card.active .card-face,
.skill-card:hover .card-face {
  box-shadow: 0 24px 40px rgba(240, 109, 127, 0.22);
}

.skill-card:nth-child(1).active,
.skill-card:nth-child(1):hover {
  transform: translate(-315px, 2px) rotate(-12deg) scale(1.04);
}

.skill-card:nth-child(2).active,
.skill-card:nth-child(2):hover {
  transform: translate(-170px, -20px) rotate(-4deg) scale(1.04);
}

.skill-card:nth-child(3).active,
.skill-card:nth-child(3):hover {
  transform: translate(-24px, -20px) rotate(4deg) scale(1.04);
}

.skill-card:nth-child(4).active,
.skill-card:nth-child(4):hover {
  transform: translate(120px, 2px) rotate(12deg) scale(1.04);
}

.deck[data-hover="1"] .skill-card:nth-child(1) {
  transform: translate(-315px, -4px) rotate(-3deg) scale(1.06);
}

.deck[data-hover="1"] .skill-card:nth-child(2) {
  transform: translate(-150px, 12px) rotate(-7deg);
}

.deck[data-hover="2"] .skill-card:nth-child(1) {
  transform: translate(-335px, 38px) rotate(-18deg);
}

.deck[data-hover="2"] .skill-card:nth-child(2) {
  transform: translate(-170px, -24px) rotate(-2deg) scale(1.06);
}

.deck[data-hover="2"] .skill-card:nth-child(3) {
  transform: translate(-4px, 12px) rotate(8deg);
}

.deck[data-hover="3"] .skill-card:nth-child(2) {
  transform: translate(-190px, 12px) rotate(-8deg);
}

.deck[data-hover="3"] .skill-card:nth-child(3) {
  transform: translate(-24px, -24px) rotate(2deg) scale(1.06);
}

.deck[data-hover="3"] .skill-card:nth-child(4) {
  transform: translate(140px, 38px) rotate(18deg);
}

.deck[data-hover="4"] .skill-card:nth-child(3) {
  transform: translate(-44px, 12px) rotate(7deg);
}

.deck[data-hover="4"] .skill-card:nth-child(4) {
  transform: translate(120px, -4px) rotate(3deg) scale(1.06);
}

.site-footer {
  width: min(1120px, 92vw);
  margin: 0 auto 50px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid var(--glass-border);
  padding: 28px;
  box-shadow: 0 18px 38px rgba(47, 39, 38, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  scroll-margin-top: 124px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-footer:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(174, 225, 255, 0.24);
}

.site-footer h3 {
  margin: 0;
  font-size: 1.6rem;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.contact-list a,
.contact-list span {
  color: #514845;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.48);
  padding: 10px 14px;
  box-shadow: 0 10px 22px rgba(47, 39, 38, 0.06);
  transition: transform 0.24s ease, background 0.24s ease;
}

.contact-list a:hover,
.contact-list span:hover {
  transform: translateY(-3px);
  background: #fff4ea;
}

@keyframes scanLines {
  50% {
    transform: translateY(-6px);
    filter: saturate(1.08);
  }
}

@keyframes listStagger {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes phoneFloat {
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes phoneShine {
  40%,
  100% {
    transform: translateX(110%);
  }
}

@keyframes phoneContentScroll {
  0%,
  18% {
    transform: translateY(0);
  }
  82%,
  100% {
    transform: translateY(-16px);
  }
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

@keyframes meshDrift {
  0% {
    transform: translate3d(-1%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(1.5%, 1%, 0) scale(1.04);
  }
}

@keyframes orbBreath {
  0% {
    transform: translate3d(0, 0, 0) scale(0.96);
  }
  100% {
    transform: translate3d(18px, -12px, 0) scale(1.04);
  }
}

@keyframes shapeFloat {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(14px, -22px, 0) rotate(8deg);
  }
}

@keyframes shapeFloatReverse {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(-18px, 18px, 0) rotate(-6deg);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

::selection {
  background: rgba(255, 184, 108, 0.34);
  color: var(--heading);
}

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

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
    top: 0;
    margin-top: 12px;
  }

  .hero,
  .panel,
  .site-footer {
    scroll-margin-top: 218px;
  }

  .top-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .project-card,
  .lab-grid,
  .card-area,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .section-head,
  .site-footer {
    display: block;
  }

  .section-head p {
    margin-top: 10px;
    max-width: none;
  }

  .project-cover {
    min-height: 190px;
  }

  .lab-grid {
    gap: 18px;
  }

  .contact-list {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 24px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-visual {
    justify-self: center;
    height: 300px;
    margin-top: 8px;
  }

  .floating-tag {
    font-size: 0.82rem;
    padding: 7px 10px;
  }

  .ip-character {
    height: 285px;
  }
}

@media (max-width: 560px) {
  .hero,
  .panel {
    padding: 24px 20px;
  }

  .typing-line {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  h2 {
    font-size: 1.55rem;
  }

  .site-header {
    width: min(100% - 24px, 1120px);
  }

  .top-nav a {
    padding: 7px 10px;
    font-size: 0.86rem;
  }

  .card-area {
    min-height: 245px;
  }

  .deck {
    height: 235px;
  }

  .skill-card {
    width: 116px;
    height: 174px;
  }

  .skill-card:nth-child(1) {
    transform: translate(-168px, 30px) rotate(-18deg);
  }

  .skill-card:nth-child(2) {
    transform: translate(-78px, 8px) rotate(-8deg);
  }

  .skill-card:nth-child(3) {
    transform: translate(12px, 8px) rotate(8deg);
  }

  .skill-card:nth-child(4) {
    transform: translate(55px, 30px) rotate(18deg);
  }

  .skill-card:nth-child(1).active,
  .skill-card:nth-child(1):hover {
    transform: translate(-168px, 2px) rotate(-12deg) scale(1.04);
  }

  .skill-card:nth-child(2).active,
  .skill-card:nth-child(2):hover {
    transform: translate(-78px, -16px) rotate(-4deg) scale(1.04);
  }

  .skill-card:nth-child(3).active,
  .skill-card:nth-child(3):hover {
    transform: translate(12px, -16px) rotate(4deg) scale(1.04);
  }

  .skill-card:nth-child(4).active,
  .skill-card:nth-child(4):hover {
    transform: translate(52px, 2px) rotate(12deg) scale(1.04);
  }

  .deck[data-hover="1"] .skill-card:nth-child(1) {
    transform: translate(-168px, 0) rotate(-3deg) scale(1.05);
  }

  .deck[data-hover="1"] .skill-card:nth-child(2) {
    transform: translate(-62px, 12px) rotate(-7deg);
  }

  .deck[data-hover="2"] .skill-card:nth-child(1) {
    transform: translate(-184px, 32px) rotate(-18deg);
  }

  .deck[data-hover="2"] .skill-card:nth-child(2) {
    transform: translate(-78px, -18px) rotate(-2deg) scale(1.05);
  }

  .deck[data-hover="2"] .skill-card:nth-child(3) {
    transform: translate(28px, 12px) rotate(8deg);
  }

  .deck[data-hover="3"] .skill-card:nth-child(2) {
    transform: translate(-94px, 12px) rotate(-8deg);
  }

  .deck[data-hover="3"] .skill-card:nth-child(3) {
    transform: translate(12px, -18px) rotate(2deg) scale(1.05);
  }

  .deck[data-hover="3"] .skill-card:nth-child(4) {
    transform: translate(68px, 32px) rotate(18deg);
  }

  .deck[data-hover="4"] .skill-card:nth-child(3) {
    transform: translate(-4px, 12px) rotate(7deg);
  }

  .deck[data-hover="4"] .skill-card:nth-child(4) {
    transform: translate(52px, 0) rotate(3deg) scale(1.05);
  }
}
