:root {
  --sea: #0289c7;
  --sea-deep: #026195;
  --sea-light: #63d7f6;
  --sponge: #ffe35d;
  --sponge-deep: #f6bd16;
  --coral: #ff6b6b;
  --coral-dark: #ca3e44;
  --sand: #fff1ad;
  --foam: #f7fdff;
  --ink: #18334a;
  --muted: #5d7182;
  --line: rgba(24, 51, 74, 0.16);
  --shadow: 0 26px 70px rgba(2, 56, 92, 0.22);
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

html {
  width: 100%;
  overflow-x: hidden;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.7;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 227, 93, 0.45) 0 7px, transparent 8px 100px),
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.5) 0 9px, transparent 10px 100px),
    radial-gradient(circle at 70% 72%, rgba(255, 107, 107, 0.22) 0 13px, transparent 14px 110px),
    linear-gradient(180deg, #74dcf6 0%, #16a6dc 46%, #0479b4 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: 0.55;
  background-image:
    radial-gradient(circle, transparent 58%, rgba(255, 255, 255, 0.6) 59% 62%, transparent 63%),
    radial-gradient(circle, transparent 58%, rgba(255, 255, 255, 0.42) 59% 62%, transparent 63%);
  background-position: 8vw 14vh, 76vw 34vh;
  background-size: 96px 96px, 132px 132px;
}

body::after {
  top: auto;
  height: 180px;
  z-index: -1;
  background:
    radial-gradient(ellipse at 10% 100%, rgba(255, 241, 173, 0.95) 0 34%, transparent 35%),
    radial-gradient(ellipse at 42% 100%, rgba(255, 241, 173, 0.88) 0 38%, transparent 39%),
    radial-gradient(ellipse at 78% 100%, rgba(255, 241, 173, 0.92) 0 36%, transparent 37%),
    linear-gradient(180deg, transparent 0%, rgba(255, 241, 173, 0.94) 74%);
}

p,
li,
span,
strong,
a,
button,
h1,
h2,
h3 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  width: min(1160px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 10px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background: rgba(247, 253, 255, 0.86);
  box-shadow: 0 14px 34px rgba(2, 78, 122, 0.22);
  backdrop-filter: blur(16px);
}

.brand,
.quick-nav,
.quick-actions,
.hero-actions,
.portfolio-actions,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.brand {
  flex: 0 0 auto;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid #d7970b;
  border-radius: 7px;
  color: #673a13;
  font-size: 0.84rem;
  font-weight: 950;
  background:
    radial-gradient(circle at 22% 22%, rgba(193, 139, 16, 0.34) 0 4px, transparent 5px),
    radial-gradient(circle at 72% 68%, rgba(193, 139, 16, 0.3) 0 5px, transparent 6px),
    var(--sponge);
}

.quick-nav a,
.quick-actions a,
.quick-actions button,
.primary-link,
.ghost-link,
.tag-row span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 2px solid rgba(24, 51, 74, 0.16);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 760;
  background: rgba(255, 255, 255, 0.7);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.quick-nav a:hover,
.quick-nav a:focus-visible,
.quick-actions a:hover,
.quick-actions a:focus-visible,
.quick-actions button:hover,
.quick-actions button:focus-visible,
.primary-link:hover,
.primary-link:focus-visible,
.ghost-link:hover,
.ghost-link:focus-visible {
  border-color: rgba(255, 107, 107, 0.55);
  outline: none;
  background: #ffffff;
  box-shadow: 0 9px 18px rgba(2, 78, 122, 0.16);
  transform: translateY(-1px);
}

.quick-actions button {
  color: #ffffff;
  border-color: var(--coral-dark);
  background: var(--coral);
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.section-band,
.stats-strip {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--radius);
  background: rgba(247, 253, 255, 0.88);
  box-shadow: var(--shadow);
}

.section-band::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.32;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 227, 93, 0.8) 0 6px, transparent 7px),
    radial-gradient(circle at 94% 24%, rgba(255, 107, 107, 0.72) 0 7px, transparent 8px),
    radial-gradient(circle at 78% 84%, rgba(3, 137, 199, 0.52) 0 8px, transparent 9px);
  background-size: 88px 88px, 120px 120px, 108px 108px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.78fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: 560px;
  padding: clamp(28px, 6vw, 72px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(158, 234, 249, 0.82)),
    rgba(247, 253, 255, 0.9);
}

.hero-copy,
.hero-art,
.section-heading,
.timeline-list,
.portfolio-copy,
.poster-card,
.friend-grid,
.skill-layout,
.stats-strip article {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--coral-dark);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  color: #0d3754;
  font-size: clamp(3.4rem, 9vw, 7.8rem);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: 0 5px 0 rgba(255, 227, 93, 0.9), 0 13px 24px rgba(2, 78, 122, 0.18);
}

.hero-subtitle {
  max-width: 680px;
  margin-top: 24px;
  color: #254a61;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  font-weight: 680;
}

.hero-actions {
  margin-top: 28px;
}

.primary-link {
  color: #60390a;
  border-color: #d7970b;
  background: var(--sponge);
  box-shadow: inset 0 -3px 0 rgba(215, 151, 11, 0.42);
}

.ghost-link {
  color: var(--sea-deep);
  border-color: rgba(2, 137, 199, 0.28);
}

.hero-art {
  display: grid;
  min-height: 410px;
  place-items: center;
}

.logo-img {
  position: absolute;
  top: 0;
  right: 0;
  width: min(72%, 360px);
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(2, 56, 92, 0.22));
}

.sponge-character {
  position: relative;
  width: min(86%, 330px);
  aspect-ratio: 0.78;
  margin-top: 80px;
  border: 5px solid #c28a0f;
  border-radius: 18px 14px 22px 16px;
  background:
    radial-gradient(circle at 18% 22%, #c89514 0 12px, transparent 13px),
    radial-gradient(circle at 74% 18%, #c89514 0 17px, transparent 18px),
    radial-gradient(circle at 84% 48%, #c89514 0 10px, transparent 11px),
    radial-gradient(circle at 26% 66%, #c89514 0 16px, transparent 17px),
    var(--sponge);
  box-shadow: 0 22px 48px rgba(2, 78, 122, 0.28);
  transform: rotate(-3deg);
}

.sponge-character::before,
.sponge-character::after {
  position: absolute;
  z-index: -1;
  content: "";
  background: #ffe35d;
}

.sponge-character::before {
  left: -64px;
  top: 52%;
  width: 58px;
  height: 12px;
  border: 4px solid #c28a0f;
  border-right: 0;
  border-radius: 999px 0 0 999px;
  transform: rotate(18deg);
}

.sponge-character::after {
  right: -64px;
  top: 50%;
  width: 58px;
  height: 12px;
  border: 4px solid #c28a0f;
  border-left: 0;
  border-radius: 0 999px 999px 0;
  transform: rotate(-16deg);
}

.sponge-eye {
  position: absolute;
  top: 22%;
  width: 72px;
  height: 72px;
  border: 4px solid #153047;
  border-radius: 50%;
  background:
    radial-gradient(circle at 52% 54%, #153047 0 9px, #50b7f3 10px 20px, #ffffff 21px);
}

.eye-left {
  left: 23%;
}

.eye-right {
  right: 23%;
}

.sponge-smile {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 130px;
  height: 54px;
  border-bottom: 5px solid #7b361e;
  border-radius: 0 0 120px 120px;
  transform: translateX(-50%);
}

.sponge-smile::before,
.sponge-smile::after {
  position: absolute;
  top: 34px;
  width: 20px;
  height: 34px;
  content: "";
  border: 3px solid #7b361e;
  border-top: 0;
  background: #fffdf4;
}

.sponge-smile::before {
  left: 42px;
}

.sponge-smile::after {
  right: 42px;
}

.sponge-shirt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 52px;
  height: 54px;
  border-top: 4px solid #c28a0f;
  background: #fffdf4;
}

.sponge-tie {
  position: absolute;
  left: 50%;
  bottom: 36px;
  width: 34px;
  height: 66px;
  background: linear-gradient(180deg, #e53636 0 44%, #b91d26 45% 100%);
  clip-path: polygon(50% 0, 100% 24%, 72% 42%, 100% 100%, 50% 86%, 0 100%, 28% 42%, 0 24%);
  transform: translateX(-50%);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  background: rgba(255, 241, 173, 0.92);
}

.stats-strip article {
  padding: 16px;
  border: 2px solid rgba(215, 151, 11, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.stats-strip span,
.time {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.stats-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
}

.content-grid,
.friends,
.skills,
.portfolio-panel {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 40px);
}

.section-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.section-heading::after {
  flex: 1 1 auto;
  height: 3px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sponge), rgba(255, 255, 255, 0));
}

.section-index {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border: 3px solid #d7970b;
  border-radius: 50%;
  color: #61380a;
  font-size: 0.92rem;
  font-weight: 950;
  background: var(--sponge);
}

h2 {
  color: var(--ink);
  font-size: clamp(1.65rem, 3.1vw, 2.55rem);
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
}

.timeline-list {
  display: grid;
  gap: 16px;
}

.timeline-list.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline-card,
.friend-grid article,
.skill-block,
.poster-card {
  border: 2px solid rgba(24, 51, 74, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 28px rgba(2, 78, 122, 0.11);
}

.timeline-card {
  padding: 18px;
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
}

.entry-head strong {
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 950;
}

.timeline-card p,
.portfolio-copy p,
.poster-card p,
.friend-grid p,
.compact-list li,
.quote-card p {
  margin-top: 8px;
  color: #36566c;
  font-size: 0.98rem;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  min-height: 30px;
  padding: 5px 10px;
  color: #60390a;
  border-color: rgba(215, 151, 11, 0.32);
  font-size: 0.82rem;
  background: rgba(255, 227, 93, 0.52);
}

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

.result-grid span {
  display: block;
  padding: 10px 12px;
  border: 2px dashed rgba(2, 137, 199, 0.25);
  border-radius: var(--radius);
  color: var(--sea-deep);
  font-size: 0.9rem;
  font-weight: 780;
  background: rgba(99, 215, 246, 0.16);
}

.portfolio-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.76fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 241, 173, 0.94), rgba(247, 253, 255, 0.92)),
    rgba(247, 253, 255, 0.9);
}

.portfolio-actions {
  margin-top: 22px;
}

.poster-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 190px;
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(99, 215, 246, 0.22)),
    rgba(255, 255, 255, 0.78);
}

.poster-card strong {
  color: var(--ink);
  font-size: 1.24rem;
  font-weight: 950;
}

.pineapple-house {
  position: relative;
  width: 110px;
  height: 150px;
  border: 4px solid #c37416;
  border-radius: 52% 48% 18px 18px;
  background:
    linear-gradient(45deg, transparent 46%, rgba(133, 79, 13, 0.42) 47% 52%, transparent 53%),
    linear-gradient(-45deg, transparent 46%, rgba(133, 79, 13, 0.42) 47% 52%, transparent 53%),
    #f39b27;
  background-size: 32px 32px;
  box-shadow: inset 0 -14px 0 rgba(173, 89, 15, 0.18);
}

.pineapple-leaves {
  position: absolute;
  left: 50%;
  top: -48px;
  width: 88px;
  height: 70px;
  background: #38a64d;
  clip-path: polygon(50% 0, 62% 45%, 100% 12%, 76% 58%, 96% 96%, 55% 72%, 28% 100%, 36% 60%, 0 34%, 41% 42%);
  transform: translateX(-50%);
}

.pineapple-door {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 42px;
  height: 58px;
  border: 4px solid #81480e;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background: #3b91c2;
  transform: translateX(-50%);
}

.pineapple-window {
  position: absolute;
  left: 18px;
  top: 56px;
  width: 32px;
  height: 32px;
  border: 4px solid #81480e;
  border-radius: 50%;
  background: #9ceaff;
}

.friend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.friend-grid article {
  padding: 18px;
}

.avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 14px;
  border: 3px solid rgba(24, 51, 74, 0.16);
  border-radius: 50%;
  color: #ffffff;
  font-weight: 950;
}

.avatar.star {
  background: #ff8ea0;
}

.avatar.squid {
  background: #77c8bf;
}

.avatar.squirrel {
  background: #d28b48;
}

.avatar.snail {
  background: #6f97ff;
}

.skill-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.skill-block {
  padding: 20px;
}

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-list li {
  position: relative;
  padding-left: 20px;
}

.compact-list li::before {
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.16);
}

.skill-meter-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.skill-meter {
  display: grid;
  grid-template-columns: minmax(72px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.skill-meter span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 820;
}

.skill-meter i {
  position: relative;
  display: block;
  height: 12px;
  overflow: hidden;
  border: 2px solid rgba(2, 97, 149, 0.18);
  border-radius: 999px;
  background: rgba(99, 215, 246, 0.22);
}

.skill-meter i::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--level);
  content: "";
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sponge), var(--coral));
}

.quote-card {
  margin-top: 20px;
  padding: 18px;
  border: 2px dashed rgba(215, 151, 11, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 241, 173, 0.58);
}

.quote-card strong {
  color: #60390a;
  font-size: 1.26rem;
  font-weight: 950;
}

@media (max-width: 960px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-nav,
  .quick-actions {
    width: 100%;
  }

  .hero,
  .portfolio-panel,
  .timeline-list.two-col,
  .skill-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-art {
    min-height: 390px;
  }

  .stats-strip,
  .friend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  html {
    font-size: 15px;
  }

  body {
    background-attachment: scroll;
  }

  .topbar {
    position: static;
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 8px;
  }

  .brand {
    width: 100%;
  }

  .quick-nav,
  .quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .quick-nav a,
  .quick-actions a,
  .quick-actions button,
  .primary-link,
  .ghost-link {
    width: 100%;
  }

  .page-shell {
    width: calc(100% - 20px);
    padding: 14px 0 34px;
  }

  .hero,
  .content-grid,
  .friends,
  .skills,
  .portfolio-panel {
    padding: 20px 14px;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.8rem);
  }

  .hero-art {
    min-height: 330px;
  }

  .logo-img {
    width: min(92%, 320px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .sponge-character {
    width: min(74vw, 260px);
    margin-top: 86px;
  }

  .sponge-character::before,
  .sponge-character::after {
    display: none;
  }

  .sponge-eye {
    width: 54px;
    height: 54px;
  }

  .sponge-smile {
    width: 100px;
  }

  .stats-strip,
  .friend-grid,
  .result-grid,
  .poster-card {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading::after {
    display: none;
  }

  .poster-card {
    justify-items: center;
    text-align: center;
  }

  .skill-meter {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media print {
  body {
    color: #111111;
    background: #ffffff;
  }

  body::before,
  body::after,
  .topbar,
  .section-band::before {
    display: none;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .section-band,
  .stats-strip {
    break-inside: avoid;
    border-color: #cccccc;
    box-shadow: none;
  }
}
