:root {
  color-scheme: light;
  --ink: #1f1e1a;
  --muted: #6a655f;
  --paper: #fffdf8;
  --paper-soft: rgba(255, 253, 248, 0.86);
  --line: rgba(31, 30, 26, 0.1);
  --lavender: #7f62d6;
  --mint: #65d1b7;
  --yellow: #f8e3a8;
  --shadow: 0 18px 42px rgba(55, 48, 40, 0.09);
  --shadow-soft: 0 10px 24px rgba(55, 48, 40, 0.07);
  --max: 1180px;
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

@media (max-width: 700px) {
  .hero.hero--photo-background {
    min-height: max(760px, calc(100svh - 100px));
    align-items: flex-end;
    padding: 48px 16px 88px;
    background-image:
      linear-gradient(180deg, rgba(7, 12, 16, 0.08) 0%, rgba(7, 12, 16, 0.24) 42%, rgba(27, 26, 28, 0.91) 100%),
      url("../assets/images/optimized/home.webp");
    background-position: 39% center;
    background-size: cover;
  }

  .hero.hero--photo-background .hero-copy {
    width: 100%;
    padding: 20px 18px;
    border-radius: 20px;
    background: rgba(11, 16, 19, 0.5);
  }

}

/* Friend space refinements: account controls, location lookup, pet responses and river bottles. */
.auth-remember { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.78rem; cursor: pointer; }
.auth-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--lavender); }

body[data-site-mode="friend"] .topbar { display: none; }
.friend-map-point-status[data-state="loading"] { color: #8f651e; }
.friend-map-point-status[data-state="error"] { color: #ae4855; }
.friend-location-button { min-height: 36px; margin-top: -4px; border: 1px dashed rgba(29, 36, 32, 0.28); border-radius: 11px; background: transparent; color: #477644; font-size: 0.7rem; font-weight: 900; cursor: pointer; }
.friend-location-button:hover, .friend-location-button:focus-visible { border-style: solid; background: #dcebba; outline: none; }

.friend-pet-reaction { position: absolute; top: 28px; right: max(16px, 15%); z-index: 3; padding: 8px 11px; border-radius: 999px; background: #f3d98b; color: #1d2420; font-size: 0.72rem; font-weight: 900; animation: friend-reaction-pop 1.25s ease both; }
.friend-pet-avatar.is-reacting--pet { animation: friend-pet-nuzzle 0.65s ease-in-out 2; }
.friend-pet-avatar.is-reacting--train, .friend-pet-avatar.is-reacting--feed { animation: friend-pet-bounce 0.55s ease-in-out 2; }
.friend-pet-avatar.is-reacting--walk { animation: friend-pet-walk 0.75s ease-in-out 2; }
.friend-pet-avatar.is-reacting--clean { animation: friend-pet-shine 0.72s ease-in-out 2; }
@keyframes friend-reaction-pop { 0% { opacity: 0; transform: translateY(12px) scale(0.78); } 20%, 78% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-12px) scale(0.92); } }
@keyframes friend-pet-nuzzle { 0%, 100% { transform: translateX(0) rotate(0); } 35% { transform: translateX(-13px) rotate(-8deg); } 70% { transform: translateX(9px) rotate(6deg); } }
@keyframes friend-pet-bounce { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-15px) scale(1.05); } }
@keyframes friend-pet-walk { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-18px) rotate(-6deg); } 75% { transform: translateX(18px) rotate(6deg); } }
@keyframes friend-pet-shine { 0%, 100% { box-shadow: 0 0 0 12px rgba(183, 220, 85, 0.09); } 50% { box-shadow: 0 0 0 18px rgba(243, 217, 139, 0.55), 0 0 30px rgba(243, 217, 139, 0.72); } }

.friend-inline-form, .friend-name-form { display: flex; align-items: end; gap: 7px; margin-top: 14px; }
.friend-inline-form label { display: grid; flex: 1; gap: 6px; color: rgba(29, 36, 32, 0.6); font-size: 0.68rem; font-weight: 900; }
.friend-inline-form input, .friend-name-form input { min-width: 0; min-height: 35px; padding: 0 10px; border: 1px solid rgba(29, 36, 32, 0.14); border-radius: 10px; background: rgba(255, 255, 255, 0.54); color: #1d2420; font: inherit; }
.friend-inline-form .friend-secondary-button { min-height: 35px; flex: 0 0 auto; }
.friend-name-form { align-items: center; margin-top: 9px; }
.friend-name-form input { width: min(190px, 100%); min-height: 30px; color: rgba(242, 239, 210, 0.88); border-color: rgba(242, 239, 210, 0.2); background: rgba(242, 239, 210, 0.08); font-size: 0.7rem; }
.friend-name-form button { min-height: 30px; padding: 0 8px; border: 0; border-radius: 9px; background: #b7dc55; color: #1d2420; font-size: 0.66rem; font-weight: 900; cursor: pointer; }
.friend-custom-wish, .friend-recipient-name { display: none !important; }
.friend-custom-wish.is-visible, .friend-recipient-name.is-visible { display: grid !important; }

.friend-bottle-scene { display: grid; gap: 14px; }
.friend-river-illustration { position: relative; height: 156px; overflow: hidden; border-radius: 20px; background: linear-gradient(180deg, #b9d7c0 0 50%, #86c5ca 50% 100%); }
.friend-river-mountain { position: absolute; bottom: 56px; width: 0; height: 0; border-right: 88px solid transparent; border-bottom: 105px solid #62866b; border-left: 88px solid transparent; }
.friend-river-mountain--one { left: -20px; }
.friend-river-mountain--two { right: -36px; border-right-width: 112px; border-bottom-color: #78965f; border-left-width: 112px; }
.friend-river-flow { position: absolute; right: 24%; bottom: -24px; left: 27%; height: 118px; border-radius: 48% 52% 0 0; background: rgba(242, 239, 210, 0.68); transform: rotate(-9deg); }
.friend-river-flow::after { content: ""; position: absolute; inset: 10px 16% 0; border-radius: inherit; background: rgba(134, 197, 202, 0.82); }
.friend-river-boat { position: absolute; z-index: 2; right: 39%; bottom: 36px; color: #1d2420; font-size: 2.4rem; font-weight: 900; transform: rotate(-10deg); }
.friend-bottle small { display: block; margin-top: 4px; color: #477644; font-size: 0.68rem; font-weight: 900; }

@media (max-width: 700px) {
  .friend-content { margin: -150px -8px -96px; padding: 48px 12px 112px; }
  .friend-name-form { flex-wrap: wrap; }
  .friend-name-form input { flex: 1 1 150px; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(118deg, #f8cfdb 0%, #f7efe4 38%, #f2efc1 67%, #d4efe4 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

.page {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 96px;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  min-height: 94px;
  padding: 16px 22px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 0 0 auto;
}

.brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(31, 30, 26, 0.1);
}

.brand-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.brand-name {
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: rgba(31, 30, 26, 0.06);
  transform: translateY(-1px);
  outline: none;
}

.nav a.is-active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 20px rgba(31, 30, 26, 0.16);
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border: 1px solid rgba(31, 30, 26, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
}

.download-link::after {
  content: "↗";
  font-size: 1rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid rgba(31, 30, 26, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.mode-switch:hover,
.mode-switch:focus-visible {
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 20px rgba(31, 30, 26, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.mode-switch__arrow {
  color: var(--lavender);
  font-size: 1rem;
}

.friend-content[hidden],
.auth-modal[hidden] {
  display: none;
}

.friend-content {
  min-height: calc(100vh - 180px);
  padding: 104px 22px 48px;
}

.friend-content__intro {
  width: min(100%, 940px);
  margin: 0 auto;
  padding: 44px clamp(24px, 6vw, 72px) 48px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.64);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.friend-content__intro h1 {
  max-width: 12ch;
  margin: 18px 0 0;
  color: var(--ink);
  font-size: clamp(3.2rem, 8vw, 7.2rem);
  line-height: 0.94;
  letter-spacing: -0.08em;
}

.friend-content__intro > p:not(.section-kicker) {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.friend-logout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 12px 16px;
  border: 1px solid rgba(31, 30, 26, 0.12);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.friend-logout:hover,
.friend-logout:focus-visible {
  background: #fff;
  outline: none;
  transform: translateY(-1px);
}

.friend-content__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(100%, 940px);
  margin: 24px auto 0;
}

.friend-card {
  min-height: 260px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow-soft);
}

.friend-card__kicker {
  margin: 0;
  color: var(--lavender);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.friend-card h2 {
  margin: 38px 0 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.friend-card p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 30, 26, 0.28);
  backdrop-filter: blur(8px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(31, 30, 26, 0.22);
}

.auth-dialog__close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 30, 26, 0.06);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.auth-dialog__close:hover,
.auth-dialog__close:focus-visible {
  background: rgba(31, 30, 26, 0.12);
  outline: none;
}

.auth-dialog h2 {
  margin: 16px 0 0;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.auth-dialog__intro {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 24px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(31, 30, 26, 0.06);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
}

.auth-tab.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 5px 12px rgba(31, 30, 26, 0.08);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.auth-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(31, 30, 26, 0.14);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.auth-field input:focus {
  border-color: var(--lavender);
  box-shadow: 0 0 0 4px rgba(127, 98, 214, 0.14);
}

.auth-submit {
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 15px;
  background: var(--ink);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.auth-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.auth-status[data-state="error"] {
  color: #b64255;
}

.auth-status[data-state="notice"] {
  color: #9a651e;
}

.auth-status[data-state="loading"] {
  color: var(--lavender);
}

.auth-mode-hint {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.auth-mode-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--lavender);
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-mode-link:hover,
.auth-mode-link:focus-visible {
  color: var(--lavender);
  outline: none;
}

.auth-resend {
  display: block;
  margin: 12px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-resend:hover,
.auth-resend:focus-visible {
  color: var(--ink);
  outline: none;
}

.auth-resend:disabled {
  cursor: wait;
  opacity: 0.55;
}

.auth-security-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

body.is-auth-open {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: calc(100vh - 100px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.94fr);
  gap: 36px;
  align-items: center;
  padding: 58px 22px 50px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 690px;
  min-width: 0;
}

.hero--photo-background {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: max(780px, calc(100vh - 100px));
  padding: clamp(28px, 5vw, 78px) clamp(22px, 5vw, 82px);
  padding-right: clamp(16px, 1.5vw, 24px);
  border-radius: 30px 30px 0 0;
  isolation: isolate;
  background-image:
    linear-gradient(90deg, rgba(7, 12, 16, 0) 0%, rgba(7, 12, 16, 0.06) 49%, rgba(27, 26, 28, 0.92) 55%, rgba(27, 26, 28, 0.98) 100%),
    url("../assets/images/optimized/home.webp");
  background-position: 100% center;
  background-size: 115% auto;
}

.hero--photo-background .hero-copy {
  width: min(38vw, 520px);
  max-width: 520px;
  margin-left: auto;
  padding: clamp(8px, 1.6vw, 24px) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fffdf8;
}

.hero--photo-background .hero-copy > * {
  position: relative;
  z-index: 1;
}

.hero--photo-background > .typographic-wall {
  position: absolute;
  top: 33%;
  right: 3%;
  bottom: 1.5%;
  z-index: 3;
  width: 42%;
  min-height: 0;
  margin: 0;
  border-radius: 20px;
}

@media (min-width: 701px) {
  .hero--photo-background .hero-copy {
    position: absolute;
    top: clamp(28px, 5vw, 78px);
    right: 3%;
    left: 55%;
    width: auto;
    max-width: none;
    margin: 0;
  }
}

@media (min-width: 1041px) {
  .topbar {
    width: 100%;
    height: 76px;
    min-height: 0;
    margin-bottom: -76px;
    padding: 10px 16px;
    gap: 12px;
    border-radius: 38px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
  }

  .brand-name {
    font-size: 0.95rem;
    letter-spacing: 0.14em;
  }

  .nav {
    gap: 4px;
  }

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

  .mode-switch {
    min-height: 40px;
    padding: 0 11px;
    font-size: 0.8rem;
  }

  .download-link {
    padding: 10px 13px;
    font-size: 0.8rem;
  }

  .hero--photo-background {
    min-height: max(800px, calc(100vh - 24px));
    padding-top: 78px;
    border-radius: 38px 38px 0 0;
  }

  .hero--photo-background .hero-copy {
    top: 78px;
  }
}

.hero--photo-background .hero-copy h1 {
  color: #fffdf8;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.28);
}

.hero--photo-background .eyebrow {
  display: none;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(11, 16, 19, 0.46);
  color: rgba(255, 255, 255, 0.88);
}

.hero--photo-background .hero-copy h1 {
  margin-top: 0;
}

.hero--photo-background .hero-title {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.hero--photo-background .hero-title::after {
  display: none;
}

.hero--photo-background .file-line {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 253, 248, 0.9);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transform: translateY(-10px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.62);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(101, 209, 183, 0.14);
}

.hero h1 {
  position: relative;
  margin: 24px 0 0;
  max-width: 9ch;
  display: grid;
  gap: 0.16em;
  font-size: clamp(4.3rem, 9vw, 8.9rem);
  line-height: 0.86;
  letter-spacing: -0.09em;
  font-weight: 900;
}

.hero-greeting,
.hero-name {
  display: block;
}

.hero-greeting {
  font-size: 0.82rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-name {
  font-size: 0.82em;
  line-height: 0.95;
  letter-spacing: 0.01em;
  background: linear-gradient(105deg, #ac91ff 12%, #f3a0cd 88%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@media (min-width: 701px) {
  .hero--photo-background h1 {
    max-width: none;
    font-size: clamp(3.5rem, 7vw, 7rem);
  }
}

.hero-title {
  margin: 24px 0 0;
  display: inline-block;
  color: var(--lavender);
  font-size: clamp(1.45rem, 2.6vw, 2.3rem);
  font-weight: 850;
  line-height: 1.08;
}

.hero-title::after {
  content: "";
  display: block;
  height: 10px;
  margin-top: -6px;
  border-radius: 999px;
  background: rgba(255, 221, 146, 0.8);
}

.file-line {
  max-width: 640px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.64);
  color: #8b8176;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

.file-line-summary {
  display: block;
  color: var(--muted);
  line-height: 1.65;
  letter-spacing: 0;
}

.hero-file-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

.hero-file-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-file-list li::before {
  content: "·";
  font-weight: 900;
  color: var(--muted);
  line-height: 1.65;
}

.file-line strong {
  overflow: hidden;
  color: var(--lavender);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-copy > p {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.typographic-wall {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 300px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid rgba(184, 164, 255, 0.28);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(40, 28, 68, 0.9), rgba(18, 20, 31, 0.88));
  box-shadow: inset 0 0 35px rgba(127, 98, 214, 0.12);
}

.typographic-wall__noise {
  position: absolute;
  inset: 0;
  padding: 12px;
  overflow: hidden;
  color: rgba(184, 164, 255, 0.17);
  font: 500 14px/25px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  mask-image: radial-gradient(ellipse at center, #000 68%, transparent 100%);
  white-space: pre;
  pointer-events: none;
  user-select: none;
  animation: typographic-wall-shimmer 2.85s ease-in-out infinite alternate;
}

.typographic-wall[data-focused="true"] .typographic-wall__noise {
  opacity: 0.18;
  animation: none;
}

.typographic-wall__scan {
  position: absolute;
  z-index: 1;
  right: -12%;
  left: -12%;
  height: 58px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, transparent, rgba(184, 164, 255, 0.24), transparent);
  filter: blur(6px);
  pointer-events: none;
}

.typographic-wall__words {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.typographic-wall__word {
  position: absolute;
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 6px 7px;
  border: 0;
  background: transparent;
  color: #f4f1ff;
  font: 700 1.25rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(30, 18, 58, 0.55);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 180ms ease, color 180ms ease;
}

.typographic-wall__word.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.typographic-wall__word.is-dimmed {
  opacity: 0.3;
}

.typographic-wall__word:hover,
.typographic-wall__word:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #f8e3a8;
  text-underline-offset: 7px;
}

.typographic-wall__word:focus-visible {
  outline: 2px solid #f8e3a8;
  outline-offset: 3px;
}

@keyframes typographic-wall-shimmer {
  from { opacity: 0.62; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .typographic-wall__noise {
    animation: none;
  }

  .typographic-wall__word {
    transition: none;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.btn-primary {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 14px 24px rgba(31, 30, 26, 0.15);
}

.btn-secondary {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.74);
  border-color: rgba(31, 30, 26, 0.1);
}

.hero-visual {
  position: relative;
  min-width: 0;
  min-height: 660px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.portrait-frame {
  position: absolute;
  right: 4%;
  bottom: 4%;
  width: min(84%, 500px);
  height: 84%;
  border-radius: 48% 48% 26px 26px;
  background: rgba(255, 255, 255, 0.32);
  border: 2px solid rgba(127, 98, 214, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 18px 36px rgba(127, 98, 214, 0.12);
  transform: rotate(3deg);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 14% 9% 8% 9%;
  border: 2px solid rgba(127, 98, 214, 0.66);
  border-radius: 44% 44% 26px 26px;
  transform: rotate(-4deg);
}

.portrait {
  position: relative;
  z-index: 2;
  width: min(100%, 570px);
  max-height: 690px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 26px 30px rgba(54, 47, 39, 0.18));
}

@media (min-width: 701px) {
  .portrait {
    filter:
      drop-shadow(1.5px 0 0 rgba(246, 197, 74, 0.95))
      drop-shadow(-1.5px 0 0 rgba(246, 197, 74, 0.95))
      drop-shadow(0 1.5px 0 rgba(246, 197, 74, 0.95))
      drop-shadow(0 -1.5px 0 rgba(246, 197, 74, 0.95))
      drop-shadow(1.5px 1.5px 0 rgba(246, 197, 74, 0.95))
      drop-shadow(-1.5px -1.5px 0 rgba(246, 197, 74, 0.95))
      drop-shadow(1.5px -1.5px 0 rgba(246, 197, 74, 0.95))
      drop-shadow(-1.5px 1.5px 0 rgba(246, 197, 74, 0.95))
      drop-shadow(0 26px 30px rgba(54, 47, 39, 0.18));
  }
}

@media (max-width: 700px) {
  .portrait {
    filter: drop-shadow(0 26px 30px rgba(54, 47, 39, 0.18));
  }
}

.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 9px 9px 9px 17px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.58);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  align-self: auto;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(55, 48, 40, 0.12);
}

.scroll-cue::after {
  content: "↓";
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d8a34d;
  color: white;
  font-size: 1.1rem;
}

.scroll-cue[data-scroll-cue-state="top"]::after {
  content: "↑";
}

.section {
  scroll-margin-top: 100px;
  margin-top: 18px;
  padding: 76px 22px 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
  min-width: 0;
}

#education {
  padding-top: 28px;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--lavender);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.section-header p {
  max-width: 530px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

#aboutSummary {
  font-size: 0.92rem;
}

.section-hint {
  margin-top: 8px;
  color: var(--lavender);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.4;
}

.section-hint--mobile {
  display: none;
}

#contactSummary {
  white-space: pre-line;
}

.about-grid,
.work-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
}

.surface {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  background: var(--paper-soft);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.surface p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.fact {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.6);
}

.fact span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.fact strong {
  display: block;
  font-size: 1rem;
  line-height: 1.45;
}

.education-list,
.timeline,
.project-list,
.skill-list {
  display: grid;
  gap: 13px;
}

.education-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.education-card {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(220px, auto) auto;
  border: 1px solid rgba(31, 30, 26, 0.08);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

.education-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(55, 48, 40, 0.12);
}

.education-card__visual {
  position: relative;
  z-index: 2;
  min-height: 280px;
  padding: 24px 24px 26px;
  overflow: visible;
  display: flex;
  align-items: flex-start;
}

.education-card__visual::before,
.education-card__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.education-card__visual::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.78), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.55), transparent 20%),
    radial-gradient(circle at 70% 78%, rgba(255, 255, 255, 0.24), transparent 22%);
  opacity: 0.85;
}

.education-card__visual::after {
  inset: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.education-card__image {
  position: absolute;
  inset: 0 12% 0 12%;
  width: auto;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.72;
  filter: saturate(0.88) contrast(0.98);
  border-radius: 18px;
}

.education-card__image-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.18), rgba(255, 253, 248, 0.52)),
    linear-gradient(135deg, rgba(247, 225, 203, 0.22), rgba(225, 243, 232, 0.18));
}

.education-card--warm .education-card__visual {
  background: rgba(255, 253, 248, 0.92);
}

.education-card--fresh .education-card__visual {
  background: rgba(255, 253, 248, 0.92);
}

.education-card__year {
  color: rgba(31, 30, 26, 0.58);
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.education-card__title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.education-card__note {
  margin: 0;
  max-width: 30ch;
  color: rgba(31, 30, 26, 0.72);
  line-height: 1.75;
  font-size: 0.92rem;
}

.education-card__badge {
  position: absolute;
  right: 22px;
  bottom: -22px;
  z-index: 20;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 30, 26, 0.08);
  box-shadow: 0 14px 28px rgba(55, 48, 40, 0.12);
  color: var(--lavender);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.education-card__badge-image {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
}

.education-card__body {
  position: relative;
  z-index: 1;
  padding: 44px 22px 24px;
}

.education-card__meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  align-items: start;
}

.education-card__date {
  color: var(--lavender);
  font-size: 0.84rem;
  font-weight: 850;
  white-space: nowrap;
}

.education-card__degree-label {
  display: block;
  max-width: 100%;
  color: rgba(31, 30, 26, 0.6);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.education-card__body h3 {
  margin: 12px 0 0;
  font-size: 1.18rem;
  line-height: 1.4;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.education-card__body p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.education-card__bullets {
  margin: 10px 0 0;
  padding-left: 1.3em;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.education-card__bullets li::marker {
  color: var(--lavender);
}

.education-card__bullets li + li {
  margin-top: 10px;
}

.timeline-entry .timeline-marker { transition: background 1500ms ease, color 1500ms ease, box-shadow 1500ms ease; }
.timeline-entry.work-is-seen .timeline-marker { background: #7a5ce0; color: white; box-shadow: 0 0 0 7px rgba(122,92,224,.1); }
.timeline-entry::after { content: ""; position: absolute; left: 50%; top: 48px; bottom: -28px; width: 2px; background: #7a5ce0; transform: scaleY(0); transform-origin: top; transition: transform 1800ms ease; pointer-events: none; }
.timeline-entry.work-is-seen::after { transform: scaleY(1); }
.timeline-entry:last-child::after { bottom: 0; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .timeline-head .timeline-title { transition: transform 220ms ease; }
  .timeline-head:hover .timeline-title { transform: translateX(4px); }
}
@media (max-width: 760px) { .timeline-entry::after { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .timeline-entry::after, .timeline-entry .timeline-marker { transition: none; }
  .timeline-item.is-hovering { animation: none; }
}

.work-timeline {
  position: relative;
  gap: 28px;
  padding: 12px 0 18px;
}

.work-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(122, 92, 224, 0.18);
  transform: translateX(-50%);
}

.timeline-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  align-items: start;
  position: relative;
}

.timeline-entry--left .timeline-item {
  grid-column: 1;
  grid-row: 1;
}

.timeline-entry--right .timeline-item {
  grid-column: 3;
  grid-row: 1;
}

.timeline-marker {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  justify-self: center;
  position: relative;
  width: 34px;
  height: 34px;
  margin-top: 12px;
  border-radius: 50%;
  background: rgba(122, 92, 224, 0.12);
  border: 1px solid rgba(122, 92, 224, 0.2);
  display: grid;
  place-items: center;
  z-index: 1;
}

.timeline-marker span {
  color: #7a5ce0;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.education-item,
.timeline-item,
.project-item,
.skill-item {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(31, 30, 26, 0.09);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.76);
}

.education-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.education-item strong,
.timeline-item strong,
.project-item h3,
.skill-item strong {
  display: block;
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.education-item p,
.timeline-item p,
.project-item p,
.skill-item span {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.date {
  color: var(--lavender);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.timeline-item {
  overflow: hidden;
  display: grid;
  container-name: timeline-card;
  container-type: inline-size;
  gap: 0;
  border: 1px solid rgba(31, 30, 26, 0.09);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.76);
  transition: box-shadow 0.45s ease;
}

/* Compact closed experience cards without changing their width or expanded layout. */
.work-timeline .timeline-item:not(.is-open) {
  padding-top: 5px;
  padding-bottom: 5px;
}

.work-timeline .timeline-item:not(.is-open) .timeline-head {
  position: relative;
  padding-top: 3px;
  padding-bottom: 3px;
  row-gap: 4px;
}

.work-timeline .timeline-item:not(.is-open) .timeline-click-hint {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 0;
}

.timeline-item.is-hovering {
  animation: work-pop 1s ease;
  box-shadow: 0 20px 40px rgba(55, 48, 40, 0.12);
}

@keyframes work-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

.timeline-head {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px 10px;
  align-items: center;
  padding: 20px 12px 20px 20px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.timeline-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  padding-right: 0;
}

.timeline-title strong {
  display: inline;
  flex-shrink: 0;
  min-width: 0;
  margin: 0;
  font-size: clamp(0.68rem, 3vw, 0.88rem);
  line-height: 1.3;
  color: var(--ink);
  font-weight: 850;
  white-space: nowrap;
  overflow-wrap: normal;
}

.timeline-title span {
  display: inline;
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  margin-top: 0;
  color: var(--ink);
  line-height: 1.3;
  font-size: clamp(0.68rem, 3vw, 0.88rem);
  font-weight: 850;
  white-space: nowrap;
  overflow-wrap: normal;
}

.timeline-title strong {
  max-width: 100%;
}

.timeline-title span::before {
  content: "·";
  margin-right: 6px;
}

.timeline-role {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 850;
}

.timeline-year {
  grid-column: 1;
  grid-row: 1;
  color: var(--lavender);
  font-size: 0.84rem;
  font-weight: 850;
  white-space: nowrap;
}

.timeline-click-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  grid-column: 2;
  grid-row: 1;
  margin-left: auto;
  width: max-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(122, 92, 224, 0.1);
  border: 1px solid rgba(122, 92, 224, 0.14);
  color: var(--lavender);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.timeline-head:hover .timeline-click-hint,
.timeline-head:focus-visible .timeline-click-hint {
  background: var(--ink);
  border-color: var(--ink);
  color: #fffdf8;
}

.timeline-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  opacity: 0;
  transition: max-height 0.38s ease, opacity 0.28s ease, padding 0.28s ease;
}

.timeline-body--featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.timeline-body--featured > * {
  min-width: 0;
  max-width: 100%;
}

.timeline-entry--split .timeline-body--featured {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 12px;
}

.timeline-entry--split .timeline-highlights {
  grid-template-columns: 1fr;
}

.timeline-entry--split .timeline-feature__media {
  width: 100%;
  align-self: start;
}

.timeline-entry--split .timeline-gallery__stack {
  height: auto;
  min-height: 0;
  aspect-ratio: 1600 / 2133;
}

.timeline-entry--split .timeline-gallery__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  box-shadow: none;
  background: transparent;
}

@media (max-width: 900px) {
  .timeline-entry--split .timeline-body--featured {
    grid-template-columns: 1fr;
  }
}

.timeline-item.is-open .timeline-body {
  max-height: 1800px;
  padding: 0 20px 20px;
  opacity: 1;
}

.timeline-intro {
  max-width: 100%;
  min-width: 0;
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

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

.timeline-highlight {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.6);
}

.timeline-highlight span {
  display: block;
  margin-bottom: 8px;
  color: var(--lavender);
  font-size: 0.82rem;
  font-weight: 900;
}

.timeline-highlight strong {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.timeline-gallery {
  position: relative;
  width: 100%;
  margin-top: 0;
}

.timeline-gallery__stack {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  overflow: hidden;
  border-radius: 18px;
}

.timeline-feature__media {
  display: grid;
  width: min(100%, 560px);
  justify-items: center;
  gap: 10px;
  justify-self: center;
  margin-top: 0;
}

.timeline-gallery__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(31, 30, 26, 0.08);
  box-shadow: 0 16px 30px rgba(55, 48, 40, 0.12);
  transition: transform 0.55s ease, opacity 0.55s ease, filter 0.55s ease;
  opacity: 0;
  transform: translate(32px, 24px) scale(0.9);
  filter: saturate(0.96) contrast(0.98);
  pointer-events: none;
}

.timeline-gallery__image--contain {
  object-fit: contain;
  background: rgba(255, 253, 248, 0.82);
}

.timeline-gallery__image.is-active {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  filter: none;
}

.timeline-gallery__image.is-next {
  opacity: 0.9;
  transform: translate(14px, 12px) scale(0.96);
}

.timeline-gallery__image.is-back {
  opacity: 0.72;
  transform: translate(28px, 22px) scale(0.92);
}

.timeline-gallery:hover .timeline-gallery__image.is-active {
  box-shadow: 0 20px 36px rgba(55, 48, 40, 0.16);
}

.timeline-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.94rem;
}

.timeline-placeholder {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(122, 92, 224, 0.22);
  border-radius: 18px;
  background: rgba(122, 92, 224, 0.05);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-align: center;
}

.skill-item {
  overflow: hidden;
  display: grid;
  gap: 0;
  padding: 0;
  transition: box-shadow 0.45s ease;
}

.skill-item.is-hovering {
  animation: skill-pop 1s ease;
  box-shadow: 0 20px 40px rgba(55, 48, 40, 0.12);
}

@keyframes skill-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

.skill-head {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.skill-title {
  display: block;
  color: #7a5ce0;
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.skill-preview {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.skill-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  opacity: 0;
  transition: max-height 0.38s ease, opacity 0.28s ease, padding 0.28s ease;
}

.skill-item.is-open .skill-body {
  max-height: 1200px;
  padding: 0 20px 20px;
  opacity: 1;
}

.skill-role {
  display: block;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 850;
}

.skill-detail {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.94rem;
}

.skill-figure {
  min-width: 0;
}

.skill-image {
  width: 100%;
  min-height: 210px;
  max-height: 320px;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(31, 30, 26, 0.08);
  box-shadow: 0 14px 26px rgba(31, 30, 26, 0.08);
}

.skill-item--mbti .skill-figure {
  margin-top: 18px;
  width: min(100%, 260px);
  margin-left: auto;
  margin-right: auto;
}

.project-directory { position: relative; z-index: 2; margin: 0 0 -2px; }
.project-directory__tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; gap: clamp(4px, 1vw, 12px); padding: 0; }
.project-directory__tabs button { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: clamp(8px, 1.6vw, 20px); text-align: left; font: inherit; color: var(--ink); background: rgba(255,253,248,0.55); border: 1px solid rgba(31,30,26,0.12); border-radius: 18px; cursor: pointer; transition: background 200ms ease, border-color 200ms ease; }
.project-directory__tabs button strong { font-size: clamp(0.68rem, 1.6vw, 0.98rem); white-space: nowrap; }
.project-directory__tabs button[aria-selected="true"] { z-index: 1; background: var(--project-active-bg, #efe9db); border: 2px solid rgba(64, 65, 66, 0.72); box-shadow: 0 0 0 1px rgba(64, 65, 66, 0.12), 0 0 7px rgba(64, 65, 66, 0.14); }
.project-directory__tabs button[aria-selected="true"]::before { content: ""; position: absolute; inset: 4px; border: 1px dashed rgba(64, 65, 66, 0.24); border-radius: 13px; filter: blur(0.3px); pointer-events: none; }
.project-directory__tabs button::after { content: ""; height: 3px; border-radius: 2px; background: #8c7959; width: 100%; transform: scaleX(0); transform-origin: left; transition: transform 250ms ease; }
.project-directory__tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.project-directory__number { font-size: clamp(0.62rem, 0.85vw, 0.8rem); color: var(--muted); font-variant-numeric: tabular-nums; }
.project-directory button:focus-visible { outline: 2px solid #8c7959; outline-offset: 4px; }
#projectList > [hidden] { display: none; }
@media (max-width: 600px) {
  .project-directory__tabs { gap: 4px; padding: 0; }
  .project-directory__tabs button { padding: 9px 4px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-directory__tabs button, .project-directory__tabs button::after { transition: none; }
}

.project-list {
  grid-template-columns: 1fr;
  gap: 24px;
}

.project-item {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(31, 30, 26, 0.09);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.76);
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: stretch;
}

.project-directory + .project-list .project-item {
  position: relative;
  background: var(--project-active-bg, #efe9db);
  border: 2px solid rgba(64, 65, 66, 0.72);
  border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(64, 65, 66, 0.12), 0 0 8px rgba(64, 65, 66, 0.14);
  transition: background 200ms ease;
}

.project-directory + .project-list .project-item::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 3;
  border: 1px dashed rgba(64, 65, 66, 0.24);
  border-radius: 17px;
  filter: blur(0.3px);
  pointer-events: none;
}

.project-spotlight {
  position: relative;
  isolation: isolate;
}

.project-spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(340px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), rgba(255, 211, 132, 0.2), transparent 75%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-spotlight.has-spotlight::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .project-spotlight::after {
    display: none;
    transition: none;
  }
}

.project-item--showcase {
  overflow: hidden;
}

.project-visual {
  position: relative;
  min-height: 360px;
  padding: 24px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 233, 203, 0.55), rgba(230, 244, 238, 0.58)),
    rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(31, 30, 26, 0.07);
  overflow: hidden;
}

.project-visual--model {
  min-height: 440px;
  padding: 0;
}

.project-visual--placeholder {
  padding: 0;
}

.project-visual--gallery {
  height: clamp(260px, 38vw, 360px);
  min-height: 0;
  align-self: start;
}

.project-visual--gallery .project-placeholder-image {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
}

.project-visual::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)) padding-box,
    linear-gradient(135deg, rgba(122, 92, 224, 0.12), rgba(101, 209, 183, 0.16)) border-box;
  opacity: 0.72;
}

.project-visual--model::before {
  inset: 18px;
}

.project-visual--placeholder::before {
  display: none;
}

.project-placeholder-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border-radius: inherit;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-placeholder-image--contain {
  object-fit: contain;
  background: #f7f3ea;
}

.project-gallery__arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(31, 30, 26, 0.14);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink);
  font: inherit;
  font-size: 1.4rem;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 6px 20px rgba(31, 30, 26, 0.14);
}

.project-gallery__arrow--previous { left: 12px; }
.project-gallery__arrow--next { right: 12px; }

.project-gallery__arrow:hover { background: #fff; }
.project-gallery__arrow:focus-visible { outline: 3px solid var(--lavender); outline-offset: 2px; }

.project-gallery__count {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(31, 30, 26, 0.7);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .project-visual:hover .project-placeholder-image:not(.project-placeholder-image--contain) {
    transform: scale(1.03);
  }

  .timeline-gallery:hover .timeline-gallery__image.is-active {
    transform: translate(0, 0) scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-placeholder-image {
    transition: none;
  }
}

.project-visual__frame {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  align-content: start;
  max-width: 88%;
}

.project-visual__frame--model {
  position: absolute;
  inset: 24px 24px auto 24px;
  max-width: 56%;
  pointer-events: none;
}

.project-visual__frame--model-note {
  max-width: none;
  width: max-content;
}

.project-model-label {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(31, 30, 26, 0.08);
  color: rgba(31, 30, 26, 0.68);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(31, 30, 26, 0.06);
  backdrop-filter: blur(8px);
}

.project-model-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.72), rgba(255, 253, 248, 0.18) 42%, transparent 68%),
    linear-gradient(180deg, rgba(255, 248, 238, 0.96), rgba(224, 242, 236, 0.92));
}

.project-model-status {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid rgba(31, 30, 26, 0.08);
  color: rgba(31, 30, 26, 0.58);
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-visual--model-ready .project-model-status {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.project-visual--model-error .project-model-status {
  color: rgba(31, 30, 26, 0.72);
}

.project-visual__caption {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid rgba(31, 30, 26, 0.08);
  color: rgba(31, 30, 26, 0.66);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.project-visual__title {
  display: block;
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1.35;
  font-weight: 900;
}

.project-visual__lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.94rem;
}

.project-visual__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-visual__chips span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(31, 30, 26, 0.08);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.project-content {
  display: grid;
  gap: 18px;
  align-content: start;
}

.project-content--scroll {
  max-height: 440px;
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(122, 92, 224, 0.16);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.58);
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.project-content--scroll::-webkit-scrollbar {
  width: 8px;
}

.project-content--scroll::-webkit-scrollbar-track {
  background: rgba(31, 30, 26, 0.06);
  border-radius: 999px;
}

.project-content--scroll::-webkit-scrollbar-thumb {
  background: rgba(127, 98, 214, 0.42);
  border-radius: 999px;
}

.project-header {
  min-width: 0;
}

.project-header strong {
  display: block;
  margin-top: 0;
  font-size: 1.18rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.project-header strong.project-title--compact {
  font-size: clamp(0.7rem, 1.75vw, 1.1rem);
  white-space: nowrap;
  overflow-wrap: normal;
}

.project-header p,
.project-section p,
.project-section ul {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.project-emphasis {
  color: var(--lavender);
  font-weight: 800;
}

.project-header .project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  white-space: nowrap;
}

.project-header .project-meta--inline {
  flex-wrap: nowrap;
  gap: clamp(3px, 0.6vw, 10px);
  font-size: clamp(0.6rem, 1.1vw, 0.92rem);
  overflow-wrap: normal;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.project-meta--inline > span {
  flex-shrink: 0;
}

.project-website {
  color: var(--lavender);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-sections {
  display: grid;
  gap: 12px;
}

.project-section {
  padding-top: 12px;
  border-top: 1px solid rgba(31, 30, 26, 0.08);
}

.project-section__label {
  display: block;
  color: var(--lavender);
  font-size: 0.84rem;
  font-weight: 850;
}

.project-section p,
.project-section ul {
  margin-bottom: 0;
}

.project-section ul {
  padding-left: 1.25em;
}

.project-section li + li {
  margin-top: 4px;
}

.section-header--skills {
  display: grid;
  place-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 30px;
}

.section-header--skills > div {
  max-width: 820px;
  margin-inline: auto;
}

.section-header--skills p {
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
}

.section--skills .skill-list {
  display: block;
}

.skills-detail {
  position: relative;
  min-width: 0;
  border-radius: 22px;
}

.skills-detail__copy {
  min-width: 0;
}

.skills-detail--photo .skills-detail__copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  padding: 46px 0 46px 46px;
}

.skills-detail__copy--wide {
  grid-column: 1 / -1;
}

.skills-detail__kicker {
  display: block;
  color: #7f62d6;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skills-detail__eyebrow {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.skills-detail__title {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.55rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.skills-detail__role {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
  font-weight: 800;
}

.skills-detail__text {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.skills-detail__media {
  min-width: 0;
  display: grid;
  justify-items: end;
  align-content: start;
}

.skills-detail--photo .skills-detail__media {
  position: relative;
  min-height: 100%;
  align-content: stretch;
  justify-items: stretch;
  overflow: hidden;
}

.skills-detail--photo .skills-detail__media::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 34%;
  background: linear-gradient(90deg, rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.74), rgba(255, 253, 248, 0));
  pointer-events: none;
}

.skills-detail__image {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(31, 30, 26, 0.08);
  box-shadow: 0 16px 28px rgba(31, 30, 26, 0.08);
}

.skills-detail--photo .skills-detail__image {
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.skills-detail__image--mbti {
  max-width: 280px;
  object-fit: contain;
}

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

.mbti-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 24px;
  align-items: center;
}

.mbti-content {
  min-width: 0;
}

.mbti-type {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1;
}

.mbti-role {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 800;
}

.mbti-traits {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.mbti-trait__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.mbti-trait__header strong {
  color: var(--lavender);
  font-size: 0.9rem;
  line-height: 1;
}

.mbti-progress {
  height: 10px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 30, 26, 0.08);
}

.mbti-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lavender), var(--mint));
}

.mbti-image {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
}

.section--contact {
  padding-bottom: 0;
}

.contact-panel {
  position: relative;
  overflow: hidden;
  width: min(92%, 960px);
  margin-inline: auto;
  padding: 50px 58px 34px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(32, 46, 40, 0.98), rgba(16, 25, 22, 0.99) 58%, rgba(36, 54, 45, 0.98)),
    #15211c;
  box-shadow: 0 26px 60px rgba(18, 24, 20, 0.26);
}

.contact-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.06), transparent 34%),
    linear-gradient(155deg, transparent 58%, rgba(138, 189, 164, 0.08));
  opacity: 0.95;
}

.contact-panel__copy,
.contact-actions {
  position: relative;
  z-index: 1;
}

.section-kicker--contact {
  color: rgba(196, 229, 211, 0.82);
}

.contact-panel h2 {
  margin: 18px 0 0;
  max-width: 12ch;
  color: #f5f7f3;
  font-size: clamp(2.8rem, 5.2vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.08em;
  font-weight: 900;
}

.contact-panel h2 span {
  display: block;
  width: max-content;
}

.contact-panel h2 span + span {
  margin-top: 18px;
}

.contact-panel__copy p {
  max-width: 720px;
}

.contact-panel #contactSummary {
  margin-top: 22px;
  max-width: 940px;
  color: rgba(236, 242, 237, 0.54);
  line-height: 1.75;
  font-size: 0.94rem;
  white-space: normal;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-self: end;
  justify-self: center;
  width: min(100%, 820px);
  max-width: 820px;
  grid-column: 1 / -1;
}

.contact-action {
  min-width: 0;
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(220, 236, 226, 0.9);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(247, 251, 247, 0.98), rgba(236, 246, 240, 0.92)),
    rgba(255, 253, 248, 0.96);
  box-shadow: 0 18px 34px rgba(18, 24, 20, 0.16);
  display: grid;
  align-content: start;
  gap: 10px;
}

.contact-action__button {
  position: relative;
  margin-top: 8px;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(122, 92, 224, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, rgba(248, 250, 246, 0.96));
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  column-gap: 10px;
  box-shadow: 0 10px 22px rgba(31, 30, 26, 0.08);
}

.contact-action__button:hover,
.contact-action__button:focus-visible {
  background: linear-gradient(180deg, #fff, rgba(243, 248, 242, 0.98));
  border-color: rgba(127, 98, 214, 0.3);
  box-shadow: 0 14px 26px rgba(18, 24, 20, 0.12);
}

.contact-action__button.is-copied {
  color: var(--lavender);
  background: linear-gradient(180deg, #fff, rgba(246, 242, 255, 0.96));
  border-color: rgba(127, 98, 214, 0.24);
}

.contact-action__value {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  justify-self: stretch;
  padding-inline: 0 8px;
  text-align: center;
  font-size: clamp(0.86rem, 1.15vw, 1rem);
  font-weight: 850;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  overflow-wrap: normal;
  word-break: normal;
}

.contact-action__arrow {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  z-index: 1;
  color: rgba(31, 30, 26, 0.62);
  font-size: 1rem;
}

.contact-action .copy-widget__status {
  margin-top: 2px;
  width: 100%;
  justify-self: center;
  text-align: center;
  color: rgba(31, 30, 26, 0.58);
  line-height: 1.35;
}

.copy-widget__keyword {
  color: var(--lavender);
  font-weight: 850;
}

.link {
  color: var(--lavender);
  font-weight: 800;
}

.footer {
  padding: 52px 22px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
}

.copy-widget__label {
  display: block;
  color: var(--lavender);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.copy-widget__button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.contact-action__button {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: 10px;
}

.copy-widget__button.is-copied {
  color: var(--lavender);
}

.copy-widget__status {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Friend mode workspace */
body[data-site-mode="friend"] {
  background: #1d2420;
}

body[data-site-mode="friend"] .footer {
  color: rgba(242, 239, 210, 0.55);
}

.friend-content {
  width: calc(100% + 40px);
  min-height: calc(100vh - 120px);
  margin: -24px -20px -96px;
  padding: 64px 30px 120px;
  background:
    radial-gradient(circle at 12% 8%, rgba(183, 220, 85, 0.13), transparent 24rem),
    radial-gradient(circle at 88% 40%, rgba(223, 216, 152, 0.08), transparent 26rem),
    #1d2420;
  color: #f2efd2;
}

.friend-content__intro,
.friend-content__grid {
  display: none;
}

.friend-space {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.friend-space__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 4px 30px;
}

.friend-profile,
.friend-space__controls,
.friend-level,
.friend-coins {
  display: flex;
  align-items: center;
}

.friend-profile {
  gap: 16px;
  min-width: 0;
}

.friend-avatar {
  position: relative;
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #b7dc55;
  border-radius: 50%;
  background: #f2efd2;
  color: #1d2420;
  font-size: 1.7rem;
  font-weight: 900;
  cursor: pointer;
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-avatar input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.friend-avatar small {
  position: absolute;
  right: -10px;
  bottom: -2px;
  z-index: 3;
  padding: 4px 7px;
  border-radius: 999px;
  background: #b7dc55;
  color: #1d2420;
  font-size: 0.54rem;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
}

.friend-space__eyebrow,
.friend-mini-label {
  margin: 0;
  color: #b7dc55;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.friend-profile h1 {
  margin: 6px 0 0;
  color: #f2efd2;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.friend-profile p:last-child {
  margin: 7px 0 0;
  color: rgba(242, 239, 210, 0.57);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.friend-space__controls {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.friend-level,
.friend-coins {
  min-height: 58px;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(242, 239, 210, 0.15);
  border-radius: 18px;
  background: rgba(242, 239, 210, 0.08);
}

.friend-level__star {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #b7dc55;
  color: #1d2420;
  font-size: 1rem;
}

.friend-level small,
.friend-coins small {
  display: block;
  color: rgba(242, 239, 210, 0.56);
  font-size: 0.57rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.friend-level strong {
  display: block;
  margin-top: 1px;
  color: #f2efd2;
  font-size: 1rem;
}

.friend-coins {
  color: #f2efd2;
}

.friend-coins > span {
  color: #f3d98b;
  font-size: 1.35rem;
}

.friend-coins strong {
  font-size: 1.15rem;
}

.friend-coins small {
  letter-spacing: 0;
}

.friend-content .friend-logout {
  margin: 0;
  padding: 11px 14px;
  border-color: rgba(242, 239, 210, 0.16);
  background: transparent;
  color: rgba(242, 239, 210, 0.8);
}

.friend-content .friend-logout:hover,
.friend-content .friend-logout:focus-visible {
  background: #b7dc55;
  color: #1d2420;
}

.friend-toast {
  min-height: 1.2em;
  margin: 0 4px 18px;
  color: #f3d98b;
  font-size: 0.8rem;
  line-height: 1.5;
}

.friend-module {
  min-width: 0;
  margin-top: 18px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(242, 239, 210, 0.13);
  border-radius: 28px;
  background: #f2efd2;
  color: #1d2420;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.friend-module__heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.friend-module__heading h2 {
  margin: 8px 0 0;
  color: #1d2420;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.friend-module__heading p:last-child {
  max-width: 620px;
  margin: 12px 0 0;
  color: rgba(29, 36, 32, 0.61);
  font-size: 0.9rem;
  line-height: 1.7;
}

.friend-module__stamp {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(29, 36, 32, 0.15);
  border-radius: 999px;
  color: rgba(29, 36, 32, 0.6);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.friend-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(230px, 0.72fr);
  gap: 20px;
  align-items: start;
}

.friend-route-map {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 2px solid rgba(29, 36, 32, 0.14);
  border-radius: 22px;
  background: #dbe7bd;
  isolation: isolate;
}

.friend-route-map .leaflet-container {
  width: 100%;
  height: 100%;
  min-height: 430px;
  font-family: inherit;
  background: #dbe7bd;
}

.friend-route-map .leaflet-control-zoom a {
  color: #1d2420;
}

.friend-route-map .leaflet-popup-content-wrapper,
.friend-route-map .leaflet-popup-tip {
  background: #f2efd2;
  color: #1d2420;
}

.friend-route-map .leaflet-popup-content {
  margin: 12px 14px;
  line-height: 1.6;
}

.friend-map-loading,
.friend-map-error {
  display: grid;
  min-height: 430px;
  place-items: center;
  padding: 24px;
  color: rgba(29, 36, 32, 0.65);
  text-align: center;
}

.friend-map-piece-icon {
  display: grid;
  place-items: center;
  border: 3px solid #1d2420;
  border-radius: 50% 50% 50% 0;
  background: #b7dc55;
  box-shadow: 0 5px 12px rgba(29, 36, 32, 0.22);
  transform: rotate(-45deg);
}

.friend-map-piece-icon span {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  transform: rotate(45deg);
}

.friend-map-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: rgba(29, 36, 32, 0.58);
  font-size: 0.76rem;
  line-height: 1.5;
}

.friend-map-caption__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #7eaa31;
}

.friend-map-point-status {
  min-height: 1.4em;
  margin: 0;
  color: rgba(29, 36, 32, 0.54);
  font-size: 0.74rem;
  line-height: 1.5;
}

.friend-map-point-status[data-state="selected"] {
  color: #4f7511;
  font-weight: 800;
}

.friend-map-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(29, 36, 32, 0.6);
}

.friend-map-summary strong {
  color: #1d2420;
  font-size: 2.4rem;
  line-height: 1;
}

.friend-map-summary span {
  font-size: 0.78rem;
}

.friend-loading {
  margin: 0;
  padding: 80px 20px;
  color: #f2efd2;
  text-align: center;
}

.friend-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(110px, 1fr));
  gap: 10px;
  min-height: 365px;
  padding: 18px;
  overflow: hidden;
  border: 2px solid rgba(29, 36, 32, 0.82);
  border-radius: 24px;
  background:
    linear-gradient(140deg, rgba(183, 220, 85, 0.17), transparent 40%),
    #222a25;
}

.friend-board__path {
  position: absolute;
  z-index: 0;
  border: 2px dashed rgba(242, 239, 210, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.friend-board__path--one {
  inset: 17% 8% 12%;
  transform: rotate(-12deg);
}

.friend-board__path--two {
  inset: 8% 22% 20%;
  transform: rotate(22deg);
  border-color: rgba(183, 220, 85, 0.25);
}

.friend-board__cell {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 95px;
  padding: 10px;
  border: 1px solid rgba(242, 239, 210, 0.13);
  border-radius: 18px;
  background: rgba(242, 239, 210, 0.08);
}

.friend-board__cell.has-piece {
  border-color: rgba(183, 220, 85, 0.7);
  background: rgba(183, 220, 85, 0.14);
}

.friend-board__cell-number {
  color: rgba(242, 239, 210, 0.4);
  font-size: 0.64rem;
  font-weight: 900;
}

.friend-board__empty {
  color: rgba(242, 239, 210, 0.48);
  font-size: 0.66rem;
}

.friend-board__pieces {
  display: flex;
  align-items: end;
  gap: 5px;
  min-width: 0;
}

.friend-piece {
  display: inline-grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  color: #f2efd2;
  font-size: 1.6rem;
  line-height: 1;
}

.friend-piece small {
  max-width: 7ch;
  overflow: hidden;
  color: #b7dc55;
  font-size: 0.58rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-board__side {
  display: grid;
  gap: 14px;
}

.friend-alerts,
.friend-record-list {
  padding: 18px;
  border-radius: 20px;
  background: #222a25;
  color: #f2efd2;
}

.friend-alert {
  display: flex;
  align-items: start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(243, 217, 139, 0.3);
  border-radius: 14px;
  background: rgba(243, 217, 139, 0.1);
}

.friend-alert__icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f3d98b;
  color: #1d2420;
  font-size: 0.75rem;
  font-weight: 900;
}

.friend-alert p {
  margin: 0;
  color: rgba(242, 239, 210, 0.75);
  font-size: 0.78rem;
  line-height: 1.55;
}

.friend-alert strong {
  color: #f3d98b;
}

.friend-record {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(242, 239, 210, 0.1);
}

.friend-record strong {
  color: #f2efd2;
  font-size: 0.82rem;
}

.friend-record span {
  color: rgba(242, 239, 210, 0.54);
  font-size: 0.7rem;
}

.friend-empty-state {
  padding: 16px 0 2px;
  color: rgba(242, 239, 210, 0.5);
  font-size: 0.78rem;
  line-height: 1.6;
}

.friend-form {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(29, 36, 32, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.3);
}

.friend-form label {
  display: grid;
  gap: 6px;
  color: rgba(29, 36, 32, 0.7);
  font-size: 0.72rem;
  font-weight: 900;
}

.friend-form input,
.friend-form select,
.friend-form textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(29, 36, 32, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
  color: #1d2420;
  font-size: 0.82rem;
  outline: none;
  resize: vertical;
}

.friend-form input:focus,
.friend-form select:focus,
.friend-form textarea:focus {
  border-color: #7caa32;
  box-shadow: 0 0 0 3px rgba(183, 220, 85, 0.26);
}

.friend-form textarea {
  line-height: 1.55;
}

.friend-primary-button,
.friend-secondary-button,
.friend-action-button,
.friend-small-action,
.friend-pet-choice button {
  border: 0;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.friend-primary-button,
.friend-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 13px;
  background: #b7dc55;
  color: #1d2420;
  font-size: 0.78rem;
}

.friend-secondary-button {
  justify-content: center;
  border: 1px solid rgba(29, 36, 32, 0.15);
  background: transparent;
}

.friend-primary-button:hover,
.friend-primary-button:focus-visible,
.friend-secondary-button:hover,
.friend-secondary-button:focus-visible,
.friend-action-button:hover,
.friend-small-action:hover {
  transform: translateY(-1px);
  outline: none;
}

.friend-meet-layout,
.friend-bottle-layout,
.friend-farm-layout,
.friend-pet-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.72fr);
  gap: 20px;
  align-items: start;
}

.friend-meet-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.friend-meet-card {
  display: grid;
  gap: 7px;
  min-height: 140px;
  padding: 18px;
  border-radius: 17px;
  background: #dcebba;
}

.friend-meet-card span {
  color: rgba(29, 36, 32, 0.52);
  font-size: 0.68rem;
  font-weight: 900;
}

.friend-meet-card strong {
  color: #1d2420;
  font-size: 1.05rem;
}

.friend-meet-card p {
  margin: 0;
  color: rgba(29, 36, 32, 0.66);
  font-size: 0.78rem;
}

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

.friend-farm-layout,
.friend-pet-layout {
  grid-template-columns: minmax(0, 1fr);
}

.friend-farm-visual {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 20px;
  background: #dcebba;
}

.friend-farm-sky {
  position: relative;
  height: 132px;
  background: #b9d7c0;
}

.friend-sun {
  position: absolute;
  top: 20px;
  right: 28px;
  color: #f3d98b;
  font-size: 2.7rem;
}

.friend-cloud {
  position: absolute;
  width: 82px;
  height: 24px;
  border-radius: 999px;
  background: rgba(242, 239, 210, 0.7);
}

.friend-cloud::before,
.friend-cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}

.friend-cloud::before {
  left: 18px;
  width: 34px;
  height: 34px;
}

.friend-cloud::after {
  right: 12px;
  width: 28px;
  height: 28px;
}

.friend-cloud--one {
  top: 44px;
  left: 28px;
}

.friend-cloud--two {
  top: 82px;
  left: 50%;
  transform: scale(0.72);
}

.friend-farm-soil {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 102px;
  background:
    repeating-linear-gradient(170deg, rgba(29, 36, 32, 0.1) 0 3px, transparent 3px 16px),
    #8ea75a;
}

.friend-sprout {
  position: absolute;
  left: 50%;
  bottom: 56px;
  width: 70px;
  height: 80px;
  transform: translateX(-50%);
  transition: transform 0.3s ease;
}

.friend-sprout.is-growing {
  transform: translateX(-50%) scale(1.2);
}

.friend-sprout__stem {
  position: absolute;
  left: 33px;
  bottom: 0;
  width: 6px;
  height: 58px;
  border-radius: 999px;
  background: #477644;
}

.friend-sprout__leaf {
  position: absolute;
  bottom: 34px;
  width: 34px;
  height: 21px;
  border-radius: 100% 0 100% 0;
  background: #b7dc55;
}

.friend-sprout__leaf--left {
  left: 1px;
  transform: rotate(-28deg);
}

.friend-sprout__leaf--right {
  right: 1px;
  transform: rotate(118deg);
}

.friend-sprout__fruit {
  position: absolute;
  top: -4px;
  left: 25px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f3d98b;
  color: #e19a52;
  font-size: 0.9rem;
}

.friend-farm-copy h3,
.friend-pet-copy h3 {
  margin: 9px 0 0;
  color: #1d2420;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.05em;
}

.friend-farm-copy > p:not(.friend-mini-label),
.friend-pet-copy > p:not(.friend-mini-label) {
  margin: 10px 0 0;
  color: rgba(29, 36, 32, 0.6);
  font-size: 0.8rem;
  line-height: 1.6;
}

.friend-progress {
  margin-top: 18px;
}

.friend-progress__header {
  display: flex;
  justify-content: space-between;
  color: rgba(29, 36, 32, 0.56);
  font-size: 0.7rem;
  font-weight: 900;
}

.friend-progress__header strong {
  color: #477644;
}

.friend-progress__track {
  height: 9px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(29, 36, 32, 0.12);
}

.friend-progress__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #8ea75a;
  transition: width 0.3s ease;
}

.friend-farm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.friend-action-button {
  display: grid;
  gap: 3px;
  min-height: 52px;
  padding: 9px;
  border-radius: 13px;
  background: #b7dc55;
  color: #1d2420;
  font-size: 0.78rem;
}

.friend-action-button small {
  color: rgba(29, 36, 32, 0.58);
  font-size: 0.63rem;
}

.friend-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.friend-form--wish {
  margin-top: 14px;
}

.friend-pet-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 250px;
  overflow: hidden;
  border-radius: 20px;
  background: #222a25;
}

.friend-pet-orbit {
  position: absolute;
  border: 1px solid rgba(183, 220, 85, 0.3);
  border-radius: 50%;
}

.friend-pet-orbit--one {
  width: 210px;
  height: 120px;
  transform: rotate(28deg);
}

.friend-pet-orbit--two {
  width: 170px;
  height: 210px;
  transform: rotate(-30deg);
}

.friend-pet-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  border: 6px solid var(--pet-clothes);
  border-radius: 50%;
  background: #f2efd2;
  box-shadow: 0 0 0 12px rgba(183, 220, 85, 0.09);
}

.friend-pet-face {
  position: relative;
  z-index: 2;
  font-size: 5rem;
  line-height: 1;
}

.friend-pet-clothes {
  position: absolute;
  right: 13px;
  bottom: 8px;
  left: 13px;
  height: 28px;
  border-radius: 50% 50% 38% 38%;
  background: var(--pet-clothes);
  opacity: 0.9;
}

.friend-pet-status {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(242, 239, 210, 0.9);
  color: #1d2420;
  font-size: 0.65rem;
  font-weight: 900;
}

.friend-stat-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 18px;
}

.friend-stat-list div {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 10px;
  background: #dcebba;
  text-align: center;
}

.friend-stat-list span {
  color: rgba(29, 36, 32, 0.58);
  font-size: 0.58rem;
}

.friend-stat-list strong {
  color: #477644;
  font-size: 0.86rem;
}

.friend-pet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.friend-small-action {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 999px;
  background: #222a25;
  color: #f2efd2;
  font-size: 0.65rem;
}

.friend-clothes,
.friend-pet-choice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: rgba(29, 36, 32, 0.6);
  font-size: 0.68rem;
  font-weight: 900;
}

.friend-color-swatch {
  width: 24px;
  height: 24px;
  border: 3px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
}

.friend-color-swatch.is-active {
  border-color: #1d2420;
  box-shadow: 0 0 0 2px #f2efd2, 0 0 0 3px #1d2420;
}

.friend-pet-choice button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: #dcebba;
  color: #1d2420;
  font-size: 0.68rem;
}

.friend-pet-choice button.is-active {
  background: #b7dc55;
}

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

.friend-bottle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 104px;
  padding: 17px;
  border-radius: 18px;
  background: #dcebba;
}

.friend-bottle__cap {
  display: grid;
  place-items: center;
  width: 36px;
  height: 52px;
  border-radius: 48% 48% 43% 43%;
  background: #8ea75a;
  color: #f3d98b;
}

.friend-bottle strong {
  color: #1d2420;
  font-size: 0.82rem;
}

.friend-bottle p {
  margin: 8px 0 0;
  color: rgba(29, 36, 32, 0.62);
  font-size: 0.78rem;
  line-height: 1.6;
}

.friend-bottle:not(.is-open) p {
  color: rgba(29, 36, 32, 0.45);
}

@media (max-width: 1040px) {
  .friend-space__header {
    align-items: start;
    flex-direction: column;
  }

  .friend-space__controls {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  body[data-site-mode="friend"] .page {
    padding-bottom: 0;
  }

  .friend-content {
    width: calc(100% + 16px);
    min-height: calc(100vh - 160px);
    margin: -150px -8px -96px;
    padding: 48px 12px 112px;
  }

  .friend-space__header {
    gap: 18px;
    padding: 0 4px 22px;
  }

  .friend-profile {
    align-items: start;
  }

  .friend-avatar {
    width: 62px;
    height: 62px;
  }

  .friend-avatar small {
    right: -12px;
  }

  .friend-space__controls {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .friend-level,
  .friend-coins,
  .friend-content .friend-logout {
    justify-content: center;
  }

  .friend-content .friend-logout {
    grid-column: 1 / -1;
  }

  .friend-module {
    padding: 20px 16px;
    border-radius: 22px;
  }

  .friend-module__heading {
    display: block;
  }

  .friend-module__stamp {
    display: inline-flex;
    margin-top: 14px;
  }

  .friend-board-layout,
  .friend-meet-layout,
  .friend-bottle-layout,
  .friend-feature-grid {
    grid-template-columns: 1fr;
  }

  .friend-route-map,
  .friend-route-map .leaflet-container,
  .friend-map-loading,
  .friend-map-error {
    min-height: 330px;
  }

  .friend-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(82px, 1fr));
    min-height: 360px;
    padding: 10px;
    gap: 7px;
  }

  .friend-board__cell {
    min-height: 78px;
    padding: 7px;
    border-radius: 13px;
  }

  .friend-board__cell-number {
    font-size: 0.56rem;
  }

  .friend-piece {
    font-size: 1.2rem;
  }

  .friend-piece small {
    font-size: 0.5rem;
  }

  .friend-meet-cards {
    grid-template-columns: 1fr;
  }

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

  .friend-pet-actions {
    gap: 5px;
  }
}

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: auto 1fr;
    gap: 18px;
    border-radius: 30px;
  }

  .nav {
    order: 3;
    grid-column: 1 / -1;
    grid-auto-columns: minmax(120px, 1fr);
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .topbar-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 44px;
  }

  .hero-copy { max-width: 760px; }
  .hero-visual { min-height: 520px; }
  .about-grid { grid-template-columns: 1fr; }
  .project-list { grid-template-columns: 1fr; }

  .timeline-head {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 10px 14px;
    padding-right: 16px;
  }

  .timeline-year {
    grid-column: 1;
  }

  .timeline-title {
    grid-column: 1 / -1;
  }

  .timeline-click-hint {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin-left: 0;
  }

  .education-card__degree-label {
    font-size: 0.62rem;
  }

  .timeline-gallery__stack {
    display: grid;
    aspect-ratio: auto;
    min-height: 0;
    overflow: visible;
  }

  .timeline-gallery__image {
    position: relative;
    inset: auto;
    grid-area: 1 / 1;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    transform: none !important;
  }

  .timeline-gallery__image:not(.is-active) {
    display: none;
  }
}

@media (max-width: 700px) {
  .page {
    width: 100%;
    --mobile-topbar-space: 150px;
    padding: var(--mobile-topbar-space) 8px 96px;
    overflow: hidden;
  }

  .page,
  .topbar,
  .hero,
  .section,
  .hero-copy,
  .hero-title,
  .file-line,
  .surface,
  .education-list,
  .timeline,
  .skill-list,
  .contact-panel,
  .contact-actions,
  .education-item,
  .timeline-item,
  .skill-item,
  .contact-action {
    max-width: 100%;
    min-width: 0;
  }

  .topbar {
    position: fixed;
    left: 50%;
    grid-template-columns: minmax(0, 1fr) auto;
    top: 9px;
    width: calc(100% - 16px);
    margin: 0;
    padding: 10px 12px;
    min-height: auto;
    gap: 12px;
    transform: translateX(-50%);
  }

  #about-me,
  .section {
    scroll-margin-top: calc(var(--mobile-topbar-space) + 12px);
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }

  .brand-name {
    font-size: 0.84rem;
    letter-spacing: 0.12em;
  }

  .download-link {
    padding: 10px 12px;
    border-radius: 15px;
    font-size: 0.82rem;
  }

  .mode-switch {
    min-height: 44px;
    padding: 0 11px;
    border-radius: 15px;
    font-size: 0.78rem;
  }

  .mode-switch__arrow {
    font-size: 0.9rem;
  }

  .topbar-actions {
    gap: 5px;
  }

  .nav {
    grid-auto-columns: minmax(104px, 1fr);
    gap: 8px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 9px 11px;
  }

  .nav a:active {
    color: var(--ink);
    background: rgba(31, 30, 26, 0.08);
    transform: translateY(-1px);
  }

  .hero,
  .section {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .hero-copy,
  .section-header,
  .surface,
  .typographic-wall,
  .hero-actions {
    width: 100%;
  }

  .auth-modal {
    align-items: end;
    padding: 10px;
  }

  .auth-dialog {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    padding: 28px 20px 22px;
    border-radius: 24px;
  }

  .surface,
  .education-item,
  .timeline-item,
  .skill-item,
  .contact-action {
    overflow: hidden;
  }

  .file-line {
    width: 100%;
    font-size: 0.8rem;
    line-height: 1.7;
  }

  .file-line-summary,
  .section-header p,
  .education-item p,
  .timeline-item p,
  .skill-item span,
  .surface p,
  .contact-panel p {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
    overflow: visible;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(4rem, 18vw, 6rem);
  }

  .hero-visual {
    min-height: 410px;
    margin-top: 10px;
    flex-direction: column;
    align-items: center;
  }

  .portrait-frame {
    right: 7%;
    width: 78%;
    height: 86%;
  }

  .portrait {
    max-height: 470px;
  }

  .scroll-cue {
    left: 50%;
    bottom: 16px;
    width: min(calc(100vw - 32px), 420px);
    max-width: 420px;
    transform: translateX(-50%);
    justify-content: center;
  }

  .section {
    scroll-margin-top: 140px;
    padding-top: 62px;
  }

  .section-header {
    display: block;
  }

  .section-header p {
    margin-top: 14px;
  }

  .section-hint--desktop {
    display: none;
  }

  .section-hint--mobile {
    display: block;
    margin-top: 12px;
  }

  .about-grid,
  .project-list,
  .work-timeline,
  .education-list,
  .skill-list,
  .contact-actions {
    grid-template-columns: 1fr;
  }

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

  .project-visual {
    min-height: 260px;
    padding: 18px;
  }

  .project-visual--model {
    min-height: 320px;
  }

  .project-content--scroll {
    max-height: 380px;
    padding: 18px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .project-visual__frame {
    max-width: 100%;
  }

  .project-visual__frame--model {
    inset: 18px 18px auto 18px;
    max-width: 72%;
  }

  .project-visual__caption {
    left: 18px;
    bottom: 16px;
  }

  .project-model-status {
    left: 18px;
    right: auto;
    bottom: 50px;
  }

  .work-timeline::before,
  .timeline-marker {
    display: none;
  }

  .timeline-entry {
    grid-template-columns: 1fr;
  }

  .timeline-entry--left .timeline-item,
  .timeline-entry--right .timeline-item {
    grid-column: 1;
  }

  .skill-head {
    gap: 8px;
  }

  .skill-body {
    padding: 0 16px;
  }

  .skill-item.is-open .skill-body {
    padding: 0 16px 18px;
  }

  .skill-image {
    min-height: 200px;
    max-height: 260px;
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .date {
    white-space: normal;
  }

  .education-card {
    grid-template-rows: auto auto;
  }

  .education-card__visual {
    min-height: 220px;
    padding: 18px;
  }

  .education-card__image {
    inset: 0 8% 0 8%;
    border-radius: 16px;
  }

  .education-card__title {
    font-size: clamp(1.45rem, 8vw, 2rem);
  }

  .education-card__badge {
    right: 16px;
    bottom: -18px;
    width: 60px;
    height: 60px;
  }

  .education-card__body {
    padding: 38px 18px 20px;
  }

  .education-card__degree-label {
    font-size: 0.58rem;
  }

  .contact-panel {
    min-height: auto;
    padding: 28px 18px 20px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 16px;
    border-radius: 28px;
  }

  .contact-panel h2 {
    max-width: 100%;
    font-size: clamp(2.4rem, 11vw, 3.5rem);
  }

  .contact-panel h2 span {
    width: auto;
  }

  .contact-panel h2 span + span {
    margin-top: 12px;
  }

  .contact-panel #contactSummary {
    margin-top: 16px;
  }

  .contact-actions {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 14px;
  }

  .contact-action {
    min-height: auto;
    padding: 16px;
  }

  .contact-action__button {
    min-height: 48px;
    padding: 0 14px;
    grid-template-columns: minmax(0, 1fr) 18px;
    column-gap: 8px;
    border-radius: 16px;
  }

  .contact-action__value {
    padding-inline: 0 8px;
  }

  .contact-action .copy-widget__status {
    text-align: center;
  }

  .skills-detail__title {
    font-size: clamp(1.45rem, 8vw, 2rem);
  }

  .timeline-head {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 8px;
    padding: 20px;
  }

  .timeline-year {
    grid-column: 1;
  }

  .timeline-title {
    grid-column: 1 / -1;
    align-self: center;
  }

  .timeline-title strong,
  .timeline-title span {
    white-space: nowrap;
  }

  .timeline-click-hint {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin-left: 0;
    transform: none;
  }

  .timeline-highlights {
    grid-template-columns: 1fr;
  }

  .timeline-body--featured {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .timeline-intro {
    font-size: 0.84rem;
    line-height: 1.75;
  }

  .timeline-gallery__stack {
    aspect-ratio: auto;
  }

  .timeline-gallery {
    margin-top: 0;
  }

  .timeline-gallery__image {
    background: rgba(255, 253, 248, 0.72);
  }

  .skill-preview {
    font-size: 0.96rem;
  }

  .skill-item--mbti .skill-figure {
    width: min(100%, 260px);
  }

}

/* Shared 3D flip surfaces for the selectable skill cards. */
.skills-detail__shadow {
  position: absolute;
  inset: 12% 9% -5%;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.45);
  filter: blur(22px);
  pointer-events: none;
}

.skills-detail__rotor {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.skills-detail__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 22px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.skills-detail__face--front {
  display: grid;
  place-content: center;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #27272a;
  color: #f5f5f5;
  text-align: center;
}

.skills-detail__face--back {
  transform: rotateY(180deg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #27272a;
  color: #f5f5f5;
}

.skills-detail__back-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 250px);
  align-items: center;
  gap: 22px;
  width: 100%;
  height: 100%;
  padding: 38px;
  overflow: auto;
  user-select: text;
  -webkit-user-select: text;
}

.skills-detail--photo .skills-detail__back-content {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.skills-detail__glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle farthest-side at var(--skill-gx, 50%) var(--skill-gy, 50%),
    rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12) 28%, transparent 78%);
  opacity: var(--skill-sheen, 0);
  pointer-events: none;
}

.skills-detail__flip-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #71717a;
  border-radius: 50%;
  background: #3f3f46;
  color: #f5f5f5;
  font-size: 1.4rem;
  cursor: pointer;
}

.skills-detail__flip-toggle:focus-visible {
  outline: 3px solid var(--lavender);
  outline-offset: 3px;
}

.skills-detail[data-reduced-motion="true"] .skills-detail__rotor {
  transform: none !important;
}

.skills-detail[data-reduced-motion="true"] .skills-detail__face {
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
  transition: opacity 200ms ease;
}

.skills-detail[data-reduced-motion="true"] .skills-detail__face--back {
  transform: none;
  opacity: 0;
}

.skills-detail[data-reduced-motion="true"][data-flipped="true"] .skills-detail__face--front {
  opacity: 0;
}

.skills-detail[data-reduced-motion="true"][data-flipped="true"] .skills-detail__face--back {
  opacity: 1;
}

/* Keep the original portrait card shape while showing all cards together. */
.section--skills {
  padding-top: clamp(36px, 4vh, 56px);
  padding-bottom: 28px;
}

@media (min-width: 701px) {
  .section--skills {
    scroll-margin-top: 140px;
  }
}

.section-header--skills {
  margin-bottom: 14px;
}

.skill-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, auto);
  align-items: stretch;
  justify-items: stretch;
  gap: 24px 16px;
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 12px 8px 26px;
}

.skill-gallery .skills-detail {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.skill-gallery .skills-detail[data-dragging] {
  cursor: grabbing;
}

.skill-gallery .skills-detail__face--front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 14px;
  text-align: center;
  background: #0c0b13;
}

.skill-gallery .skills-detail__galaxy {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.skill-gallery__front-title {
  color: #b99aff;
  font-size: clamp(1.05rem, 1.55vw, 1.5rem);
  line-height: 1.28;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.skill-gallery__front-preview {
  color: #d4d4d8;
  font-size: 0.82rem;
  font-weight: 700;
}

.skill-gallery .skills-detail__flip-toggle {
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  font-size: 1.15rem;
}

.skill-gallery .skills-detail__back-content,
.skill-gallery .skills-detail--photo .skills-detail__back-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  height: 100%;
  padding: 14px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #71717a #27272a;
}

.skill-gallery .skills-detail__copy,
.skill-gallery .skills-detail--photo .skills-detail__copy {
  display: block;
  width: 100%;
  padding: 0;
}

.skill-gallery .skills-detail__title {
  margin: 0;
  color: #b99aff;
  font-size: 1.1rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.skill-gallery .skills-detail__text,
.skill-gallery .skills-detail__role,
.skill-gallery .skills-detail__eyebrow,
.skill-gallery .mbti-trait__header {
  color: #d4d4d8;
}

.skill-gallery .skills-detail__media,
.skill-gallery .skills-detail--photo .skills-detail__media {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
}

.skill-gallery .skills-detail__media::before {
  display: none;
}

.skill-gallery .skills-detail__image,
.skill-gallery .skills-detail--photo .skills-detail__image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: 190px;
  object-fit: cover;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
}

/* Photo-backed interest cards with a floating information panel. */
.skill-gallery .skills-detail--photo .skills-detail__back-content {
  position: relative;
  padding: 0;
  overflow: hidden;
  display: block;
  isolation: isolate;
}
.skill-gallery .skills-detail--photo .skills-detail__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}
.skill-gallery .skills-detail--photo .skills-detail__image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
}
.skill-gallery .skills-detail--photo .skills-detail__copy {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: calc(100% - 16px);
  box-sizing: border-box;
  padding: 14px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
  text-align: left;
}
.skill-gallery .skills-detail--photo .skills-detail__title {
  color: #282332;
  font-size: clamp(.86rem, 1.4vw, 1.1rem);
  line-height: 1.35;
  padding-right: 0;
}
.skill-gallery .skills-detail--photo .skills-detail__text {
  color: #625e69;
  font-size: .76rem;
  line-height: 1.55;
  margin: 7px 0 0;
}

.skill-gallery .skills-detail__image--mbti {
  max-height: 170px;
  object-fit: contain;
}

.skill-gallery .mbti-trait__header strong {
  color: #c4b5fd;
}

.skill-gallery .mbti-progress {
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 700px) {
  .skill-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, auto);
    gap: 16px 14px;
    padding: 8px 6px 24px;
  }

  .skill-gallery__front-title {
    font-size: 1.05rem;
  }

}

@media (max-width: 700px) {
  .hero.hero--photo-background {
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    min-height: max(820px, calc(100svh - 100px));
    overflow: hidden;
  }

  .hero--photo-background > .typographic-wall {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    min-height: 300px;
    margin-top: 16px;
    border: 1px solid rgba(184, 164, 255, 0.28);
    border-radius: 20px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .topbar {
    gap: 8px;
    padding: 8px 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  .mode-switch {
    min-height: 40px;
    padding: 0 9px;
    font-size: 0.74rem;
  }

  .download-link {
    padding: 9px 10px;
    font-size: 0.74rem;
  }
}

@media (max-width: 460px) {
  .brand-name {
    display: none;
  }
}

@container timeline-card (max-width: 360px) {
  .timeline-title {
    flex-wrap: wrap;
    white-space: normal;
  }
}

@media (min-width: 701px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    width: 100%;
    height: 48px;
    min-height: 0;
    gap: 10px;
    margin-top: 80px;
    margin-bottom: -48px;
    padding: 5px 10px;
    border-radius: 24px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    gap: 7px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-name {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .topbar-actions {
    grid-column: 3;
    grid-row: 1;
    gap: 3px;
  }

  .mode-switch {
    min-height: 32px;
    padding: 0 6px;
    border-radius: 11px;
    font-size: 0.66rem;
    gap: 3px;
  }

  .mode-switch__arrow,
  .download-link::after {
    font-size: 0.75rem;
  }

  .download-link {
    gap: 3px;
    padding: 6px 7px;
    border-radius: 11px;
    font-size: 0.66rem;
  }

  .nav {
    grid-column: 2;
    grid-row: 1;
    grid-auto-columns: minmax(0, 1fr);
    gap: 2px;
    overflow: hidden;
    padding: 0;
  }

  .nav a {
    min-height: 32px;
    padding: 4px 2px;
    font-size: 0.72rem;
  }
}

@media (min-width: 1041px) {
  .topbar {
    margin-top: 0;
  }

  .hero--photo-background {
    padding-top: 50px;
  }

  .hero--photo-background .hero-copy {
    top: clamp(88px, 8vw, 118px);
  }
}
