/* The portfolio's translucent surfaces share a readable solid fallback. */
.liquid-portfolio {
  --liquid-surface: rgba(23, 38, 61, .94);
  --liquid-inset: rgba(255, 255, 255, .18);
  --liquid-shadow: 0 18px 45px rgba(0, 5, 18, .28), inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
:root[data-theme="light"] .liquid-portfolio {
  --liquid-surface: rgba(237, 246, 255, .97);
  --liquid-inset: rgba(255, 255, 255, .9);
  --liquid-shadow: 0 16px 40px rgba(35, 78, 134, .16), inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(64, 118, 180, .12);
}
.liquid-portfolio *, .liquid-portfolio *::before, .liquid-portfolio *::after { box-sizing: border-box; }
.liquid-portfolio :is(a, button, textarea, input):focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.liquid-portfolio .textEffect,
.liquid-portfolio .sheet,
.liquid-portfolio .breadcrumb {
  background: var(--liquid-surface);
  border: 1px solid var(--glass-card-border);
  box-shadow: var(--liquid-shadow);
}
.liquid-portfolio .textEffect { border-radius: 28px; }
.liquid-portfolio .textEffect::before { background: linear-gradient(155deg, var(--liquid-inset), transparent 28%, transparent 72%, rgba(120, 183, 255, .06)); opacity: .65; }
.liquid-portfolio .textEffect:hover { background: var(--liquid-surface); border-color: var(--control-border-hover); }
.liquid-portfolio .profile-banner { min-height: clamp(190px, 35vw, 390px); }
.liquid-portfolio .profile-banner__image { opacity: .58; }
.liquid-portfolio .profile-content { margin-top: calc(var(--profile-photo-height) * -.42); }
.liquid-portfolio .profile img { object-fit: cover; box-shadow: 0 12px 36px rgba(0, 0, 0, .28), 0 0 0 1px var(--liquid-inset); }
.liquid-portfolio .nameBackground p { font-size: clamp(1.4rem, 3vw, 2.25rem); font-weight: 650; line-height: 1.3; letter-spacing: -.025em; }
.liquid-portfolio .collections { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); width: min(100%, 920px); margin: 1rem auto 3rem; gap: 1rem; }
.liquid-portfolio .collections > div { min-width: 0; }
.liquid-portfolio .collections .textEffect { max-width: none; height: 100%; margin: 0; padding: 1.25rem; }
.liquid-portfolio .textEffect p { max-width: 100%; overflow-wrap: anywhere; }
.liquid-portfolio .textEffect a { min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.liquid-portfolio .top-controls { z-index: 10; }
.liquid-portfolio :is(.theme-toggle, .menu-trigger, .sheet__close-button, .sheet__back-button) { box-shadow: 0 6px 20px rgba(0, 0, 0, .15), inset 0 1px 0 var(--liquid-inset); }
.liquid-portfolio .sheet-overlay { background: rgba(3, 10, 22, .55); backdrop-filter: none; -webkit-backdrop-filter: none; }
:root[data-theme="light"] .liquid-portfolio .sheet-overlay { background: rgba(32, 55, 84, .32); }
.liquid-portfolio .sheet { background: var(--liquid-surface); border-radius: 32px; touch-action: pan-y; max-height: min(85vh, calc(100dvh - 2rem)); }
.liquid-portfolio .sheet__drag-handle { touch-action: none; flex-shrink: 0; min-height: 32px; }
.liquid-portfolio .sheet__header { flex-shrink: 0; }
.liquid-portfolio .sheet__content { overscroll-behavior: contain; touch-action: pan-y; }
.liquid-portfolio :is(.sheet-menu__item, .sheet-project-card, .about-sheet__card, .contact-sheet__social-link) { border-radius: 20px; box-shadow: inset 0 1px 0 var(--liquid-inset); }
.liquid-portfolio .projects-page__main { width: min(100%, 960px); padding-bottom: 3rem; }
.liquid-portfolio .breadcrumb { max-width: 100%; flex-wrap: wrap; font-size: .95rem; }
.liquid-portfolio .projects-page__hero { box-shadow: var(--liquid-shadow); }
.liquid-portfolio .projects-page__hero-panel.textEffect { background: var(--liquid-surface); }
.liquid-portfolio .projects-page__title { font-size: clamp(2rem, 5vw, 3.5rem); }
.liquid-portfolio .projects-page__hero-panel.textEffect p.projects-page__intro,
.liquid-portfolio .project-card.textEffect p.project-card__description { font-size: 1rem; line-height: 1.6; }
.liquid-portfolio .project-card__title { font-size: clamp(1.3rem, 2.5vw, 1.65rem); }
.liquid-portfolio .project-card.textEffect p.project-card__period { font-size: .9rem; }
.liquid-portfolio .project-card.textEffect a.project-card__btn { min-height: 44px; font-size: .95rem; }
.liquid-portfolio .post-container { width: 100%; max-width: 800px; padding: clamp(1rem, 3vw, 2rem); }
.liquid-portfolio .post-header { padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
.liquid-portfolio .post-meta { flex-wrap: wrap; font-size: .95rem; }
.liquid-portfolio .post-content { overflow-wrap: anywhere; }
.liquid-portfolio .post-content img { max-width: 100%; height: auto; }
.liquid-portfolio .post-content pre { max-width: 100%; overflow-x: auto; }
.liquid-about .profile { margin: 0; }
.liquid-about .timeline-container { padding: clamp(1rem, 4vw, 2rem); }
.liquid-about .timeline-content h3 { font-size: clamp(1.1rem, 3vw, 1.6rem); }
.liquid-about .timeline-content h4, .liquid-about .timeline-content .date { font-size: 1rem; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .liquid-portfolio { --liquid-surface: rgba(29, 47, 75, .63); }
  :root[data-theme="light"] .liquid-portfolio { --liquid-surface: rgba(240, 248, 255, .75); }
  .liquid-portfolio :is(.textEffect, .sheet, .breadcrumb) { -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%); }
  .liquid-portfolio .sheet-overlay { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}
@media (max-width: 600px) {
  .liquid-portfolio .collections { grid-template-columns: 1fr; }
  .liquid-portfolio .profile-banner { min-height: 180px; }
  .liquid-portfolio .sheet { max-height: calc(100dvh - max(1rem, env(safe-area-inset-top)) - max(.75rem, env(safe-area-inset-bottom))); border-radius: 28px; }
  .liquid-portfolio .breadcrumb { justify-content: center; padding: .7rem 1rem; }
  .liquid-about .timeline-container { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .liquid-portfolio *, .liquid-portfolio *::before, .liquid-portfolio *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.liquid-portfolio .sheet-overlay[hidden] { display: none; }

/* Liquid glass: luminous edges over a tinted, frosted core. */
.liquid-portfolio {
  --liquid-ease: cubic-bezier(.22, 1, .36, 1);
  --liquid-spring: cubic-bezier(.22, 1.18, .38, 1);
  --liquid-edge: rgba(226, 242, 255, .3);
  --liquid-glow: rgba(141, 198, 255, .16);
}
:root[data-theme="light"] .liquid-portfolio {
  --liquid-edge: rgba(255, 255, 255, .85);
  --liquid-glow: rgba(255, 255, 255, .52);
}
.liquid-portfolio :is(.textEffect, .sheet, .breadcrumb) {
  border-color: var(--liquid-edge);
  background-image: linear-gradient(155deg, var(--liquid-glow), transparent 38%, rgba(105, 171, 255, .045) 100%);
  background-color: var(--liquid-surface);
}
.liquid-portfolio .textEffect::before {
  background: radial-gradient(ellipse at 18% -30%, var(--liquid-inset), transparent 54%), linear-gradient(160deg, rgba(255,255,255,.12), transparent 24%, transparent 78%, rgba(145,200,255,.08));
  opacity: .7;
  transition: opacity .4s var(--liquid-ease);
}
.liquid-portfolio .sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 85% 25% at 50% -8%, var(--liquid-inset), transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.liquid-portfolio .sheet > * { position: relative; }
.liquid-portfolio .sheet__close-button { position: absolute; }
.liquid-portfolio .sheet-overlay { transition: opacity .38s var(--liquid-ease); }
.liquid-portfolio .sheet { transition: transform .42s var(--liquid-spring); }
.liquid-portfolio .sheet--dragging { transition: none; }
.liquid-portfolio .sheet-screen, .liquid-portfolio .sheet-menu { animation: liquid-screen-in .35s var(--liquid-ease) both; }
.liquid-portfolio .profile-content { animation: liquid-arrive .7s var(--liquid-ease) both; }
.liquid-portfolio .collections > div { animation: liquid-arrive .65s var(--liquid-ease) both; }
.liquid-portfolio .collections > div:nth-child(2) { animation-delay: .045s; }
.liquid-portfolio .collections > div:nth-child(3) { animation-delay: .09s; }
.liquid-portfolio .collections > div:nth-child(4) { animation-delay: .135s; }
.liquid-portfolio .collections > div:nth-child(5) { animation-delay: .18s; }
.liquid-portfolio .collections > div:nth-child(n+6) { animation-delay: .225s; }
.liquid-portfolio :is(.textEffect, .theme-toggle, .menu-trigger, .sheet__back-button, .sheet__close-button, .sheet-menu__item, .sheet-project-card, .about-sheet__card, .contact-sheet__social-link, .project-card__btn) {
  transition: transform .36s var(--liquid-spring), background-color .3s ease, border-color .3s ease, box-shadow .36s var(--liquid-ease);
}
@media (hover: hover) {
  .liquid-portfolio .textEffect:hover { transform: translateY(-4px); box-shadow: 0 24px 55px rgba(0, 10, 30, .26), inset 0 1px 0 var(--liquid-inset), inset 0 0 0 1px rgba(255,255,255,.08); }
  .liquid-portfolio .textEffect:hover::before { opacity: 1; }
  .liquid-portfolio :is(.theme-toggle, .menu-trigger, .sheet__back-button, .sheet__close-button):hover { transform: translateY(-2px) scale(1.04); }
  .liquid-portfolio :is(.sheet-menu__item, .sheet-project-card, .about-sheet__card, .contact-sheet__social-link):hover { transform: translateY(-2px); }
}
.liquid-portfolio :is(.theme-toggle, .menu-trigger, .sheet__back-button, .sheet__close-button, .sheet-menu__item, .contact-sheet__send, .project-card__btn):active { transform: scale(.97); }
@keyframes liquid-arrive { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes liquid-screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .liquid-portfolio *, .liquid-portfolio *::before, .liquid-portfolio *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.liquid-portfolio .sheet > .sheet__header { position: static; }
.liquid-portfolio .collections { overflow: visible; }

/* Home: a quiet optical field and light that follows the pointer across glass. */
html[data-page="home"] .liquid-portfolio {
  --home-ray: rgba(150, 207, 255, .23);
  --home-grid: rgba(161, 208, 255, .16);
}
html[data-page="home"][data-theme="light"] .liquid-portfolio {
  --home-ray: rgba(63, 136, 227, .18);
  --home-grid: rgba(37, 106, 185, .13);
}
html[data-page="home"] .profile-banner__mesh {
  background:
    radial-gradient(ellipse at 50% 24%, var(--home-ray), transparent 50%),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(12.5% - 1px), var(--home-grid) 12.5%);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, transparent 95%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, transparent 95%);
  opacity: .5;
  animation: home-field-drift 18s ease-in-out infinite alternate;
}
html[data-page="home"] .profile-avatar-link { position: relative; isolation: isolate; }
html[data-page="home"] .profile-avatar-link::before,
html[data-page="home"] .profile-avatar-link::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  pointer-events: none;
}
html[data-page="home"] .profile-avatar-link::before {
  border: 1px solid rgba(160, 213, 255, .26);
  box-shadow: 0 0 22px rgba(102, 175, 255, .16), inset 0 0 12px rgba(126, 192, 255, .1);
  animation: home-halo 5s ease-in-out infinite alternate;
}
html[data-page="home"] .profile-avatar-link::after {
  inset: -15px;
  border: 1px solid transparent;
  border-top-color: rgba(196, 231, 255, .72);
  border-right-color: rgba(136, 200, 255, .15);
  animation: home-orbit 16s linear infinite;
}
html[data-page="home"] .profile-avatar-link img { transition: transform .6s var(--liquid-ease), box-shadow .6s var(--liquid-ease); }
html[data-page="home"] .nameBackground p { text-wrap: balance; }
html[data-page="home"] .collections .textEffect {
  --light-x: 50%;
  --light-y: 0%;
  isolation: isolate;
}
html[data-page="home"] .collections .textEffect::before {
  background:
    radial-gradient(240px circle at var(--light-x) var(--light-y), rgba(171, 219, 255, .28), transparent 70%),
    linear-gradient(155deg, var(--liquid-inset), transparent 33%, rgba(106, 174, 255, .08));
  opacity: .48;
  transition: opacity .5s var(--liquid-ease);
}
html[data-page="home"][data-theme="light"] .collections .textEffect::before {
  background:
    radial-gradient(240px circle at var(--light-x) var(--light-y), rgba(255, 255, 255, .9), transparent 70%),
    linear-gradient(155deg, rgba(255,255,255,.9), transparent 42%, rgba(105, 174, 255, .1));
}
html[data-page="home"] .textEffect__badge-icon { transition: transform .5s var(--liquid-spring), box-shadow .5s var(--liquid-ease); }
@media (hover: hover) and (pointer: fine) {
  html[data-page="home"] .profile-avatar-link:hover img { transform: scale(1.035); box-shadow: 0 14px 38px rgba(0, 0, 0, .3), 0 0 30px rgba(127, 190, 255, .25); }
  html[data-page="home"] .collections .textEffect:hover::before { opacity: 1; }
  html[data-page="home"] .collections .textEffect:hover .textEffect__badge-icon { transform: scale(1.08); box-shadow: 0 0 20px rgba(128, 194, 255, .22); }
}
@keyframes home-field-drift { from { transform: scale(1.04) translateX(-1.5%); } to { transform: scale(1.1) translateX(1.5%); } }
@keyframes home-halo { from { opacity: .55; transform: scale(.985); } to { opacity: 1; transform: scale(1.025); } }
@keyframes home-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  html[data-page="home"] .liquid-portfolio *, html[data-page="home"] .liquid-portfolio *::before, html[data-page="home"] .liquid-portfolio *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* Keep the complete supplied artwork legible at every viewport width. */
html[data-page="home"] .liquid-portfolio .profile-banner {
  aspect-ratio: 3 / 1;
  min-height: 0;
  background: #102a49;
}
html[data-page="home"] .liquid-portfolio .profile-banner__image {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  transform: none;
  opacity: 1;
}
html[data-page="home"] .liquid-portfolio .profile-banner::before,
html[data-page="home"] .liquid-portfolio .profile-hero::after,
html[data-page="home"] .liquid-portfolio .profile-banner__glow,
html[data-page="home"] .liquid-portfolio .profile-banner__mesh { display: none; }
html[data-page="home"] .liquid-portfolio .profile-content { margin-top: 1.5rem; }
html[data-page="home"] .liquid-portfolio .top-controls { top: calc(100vw / 3 + 1rem); }
html[data-page="home"] .liquid-portfolio .profile .profile-banner__image {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 400px) {
  html[data-page="home"] .liquid-portfolio .profile-content { margin-top: 5rem; }
}

/* Let the profile sit in the soft transition below the artwork. */
html[data-page="home"] .liquid-portfolio .profile-banner {
  aspect-ratio: auto;
  padding-bottom: clamp(48px, 7vw, 84px);
  background: var(--hero-blend-bottom);
}
html[data-page="home"] .liquid-portfolio .profile-banner__image { height: auto; }
html[data-page="home"] .liquid-portfolio .profile-banner::before {
  display: block;
  background: linear-gradient(to bottom, transparent 46%, transparent 58%, var(--hero-blend-bottom) 100%);
}
html[data-page="home"] .liquid-portfolio .profile-content {
  margin-top: calc(var(--profile-photo-height) * -.42);
}
html[data-page="home"] .liquid-portfolio .top-controls { top: 20px; }
@media (max-width: 600px) {
  html[data-page="home"] .liquid-portfolio .top-controls { top: 16px; }
}
html[data-page="home"] .liquid-portfolio .profile-banner { background: transparent; }
html[data-page="home"] .liquid-portfolio .profile-banner::before { display: none; }
html[data-page="home"] .liquid-portfolio .profile-banner__image {
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

/* Compact profile and the existing controls come together after the hero. */
html[data-page="home"] .home-sticky-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 999;
  min-height: 72px;
  padding: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  background: var(--liquid-surface);
  border-bottom: 1px solid var(--liquid-edge);
  box-shadow: 0 8px 30px rgba(0, 8, 25, .15), inset 0 -1px 0 rgba(255, 255, 255, .08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
  pointer-events: none;
  transition: transform .45s var(--liquid-ease), opacity .3s ease, visibility 0s linear .45s;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-page="home"] .home-sticky-header { -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%); }
}
html[data-page="home"] .home-header-visible .home-sticky-header {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}
html[data-page="home"] .home-sticky-profile {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  max-width: calc(100% - 135px);
  color: var(--text-primary);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}
html[data-page="home"] .home-sticky-profile img {
  flex: none;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--liquid-edge);
  box-shadow: 0 0 0 3px var(--control-surface);
}
html[data-page="home"] .home-sticky-profile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-page="home"] .liquid-portfolio.home-header-visible .top-controls {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  gap: 8px;
  animation: home-controls-in .4s var(--liquid-ease) both;
}
html[data-page="home"] .home-header-visible :is(.theme-toggle, .menu-trigger) { width: 48px; height: 48px; }
@keyframes home-controls-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  html[data-page="home"] .home-sticky-header { min-height: 68px; padding-left: max(16px, env(safe-area-inset-left)); }
  html[data-page="home"] .liquid-portfolio.home-header-visible .top-controls { top: max(10px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
}

/* The original avatar and controls move between the hero and the bar. */
html[data-page="home"] .home-sticky-header {
  transform: none;
  transition: opacity .35s var(--liquid-ease), visibility 0s linear .35s;
}
html[data-page="home"] .home-header-visible .home-sticky-header { transition-delay: 0s; }
html[data-page="home"] .home-avatar-placeholder { display: inline-block; flex: none; }
html[data-page="home"] .home-sticky-header .profile-avatar-link { display: inline-flex; flex: none; }
html[data-page="home"] .home-sticky-header .profile-avatar-link img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--liquid-edge);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--control-surface);
}
html[data-page="home"] .home-sticky-header .profile-avatar-link::before { inset: -3px; animation: none; }
html[data-page="home"] .home-sticky-header .profile-avatar-link::after { display: none; }
html[data-page="home"] .home-sticky-name {
  margin-left: .75rem;
  overflow: hidden;
  color: var(--text-primary);
  font-size: .95rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-page="home"] .liquid-portfolio.home-header-visible .home-sticky-header .top-controls {
  position: static;
  flex: none;
  margin-left: auto;
  padding-left: .75rem;
  animation: none;
}
/* Fade the glass separately, so the moving controls remain visible throughout. */
html[data-page="home"] .home-sticky-header {
  isolation: isolate;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 1;
  transition: visibility 0s linear .35s;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-page="home"] .home-sticky-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--liquid-surface);
  border-bottom: 1px solid var(--liquid-edge);
  box-shadow: 0 8px 30px rgba(0, 8, 25, .15), inset 0 -1px 0 rgba(255, 255, 255, .08);
  opacity: 0;
  transition: opacity .35s var(--liquid-ease);
}
html[data-page="home"] .home-header-visible .home-sticky-header::before { opacity: 1; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-page="home"] .home-sticky-header::before { -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%); }
}

/* The same elements track scroll continuously, with no timed hand-off. */
html[data-page="home"] .home-avatar-placeholder {
  width: var(--profile-photo-width);
  height: var(--profile-photo-height);
}
html[data-page="home"] .liquid-portfolio .home-floating-avatar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  margin: 0;
  will-change: transform, width, height;
}
html[data-page="home"] .liquid-portfolio .home-floating-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid var(--profile-avatar-ring);
  border-radius: 50%;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .28), 0 0 0 1px var(--liquid-inset);
}
html[data-page="home"] .liquid-portfolio .home-floating-controls,
html[data-page="home"] .liquid-portfolio.home-header-visible .home-floating-controls {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 1001;
  margin: 0;
  animation: none;
  will-change: transform;
}
html[data-page="home"] .home-header-visible :is(.theme-toggle, .menu-trigger) { width: 56px; height: 56px; }
html[data-page="home"] .home-sticky-header {
  visibility: visible;
  pointer-events: none;
}
html[data-page="home"] .home-sticky-header::before { opacity: var(--header-progress, 0); transition: none; }
html[data-page="home"] .home-sticky-name {
  margin-left: 52px;
  opacity: var(--header-progress, 0);
}
@media (max-width: 600px) {
  html[data-page="home"] .home-header-visible :is(.theme-toggle, .menu-trigger) { width: 50px; height: 50px; }
}
/* The halo and rim contract with the avatar as it settles into the header. */
html[data-page="home"] .liquid-portfolio .home-floating-avatar::before {
  inset: var(--avatar-halo-inset, -10px);
}
html[data-page="home"] .liquid-portfolio .home-floating-avatar::after {
  opacity: var(--avatar-orbit-opacity, 1);
}
html[data-page="home"] .liquid-portfolio .home-floating-avatar img {
  border-width: var(--avatar-border-width, 4px);
}

/* A quiet landscape closes the home page, with room for the image to drift. */
html[data-page="home"] .home-footer-art {
  position: relative;
  isolation: isolate;
  width: calc(100% + 2 * var(--horizontal-spacing));
  height: clamp(260px, 38vw, 500px);
  margin: 2rem calc(-1 * var(--horizontal-spacing)) calc(-1 * var(--horizontal-spacing));
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32%);
  mask-image: linear-gradient(to bottom, transparent, #000 32%);
}
html[data-page="home"] .home-footer-art img {
  position: absolute;
  top: -20%;
  left: 0;
  display: block;
  width: 100%;
  height: 140%;
  object-fit: cover;
  object-position: center 55%;
  transform: translate3d(0, var(--parallax-offset, 0px), 0);
  will-change: transform;
}
html[data-page="home"][data-theme="light"] .home-footer-art img { opacity: .8; }
@media (prefers-reduced-motion: reduce) {
  html[data-page="home"] .home-footer-art img { transform: none !important; will-change: auto; }
}
/* Let the landscape rise behind the final links while keeping them interactive. */
html[data-page="home"] .liquid-portfolio .collections { position: relative; z-index: 1; }
html[data-page="home"] .liquid-portfolio .home-footer-art {
  z-index: 0;
  margin-top: calc(-1 * clamp(150px, 20vw, 230px));
}

/* Decorative space lives behind the home content and never intercepts input. */
html[data-page="home"] .home-space {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .65;
}
html[data-page="home"] .liquid-portfolio > .profile { position: relative; z-index: 1; }
html[data-page="home"] .home-space__stars {
  position: absolute;
  inset: -10%;
  background-image:
    radial-gradient(circle, rgba(210, 235, 255, .72) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(145, 196, 255, .6) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(204, 232, 255, .48) 0 1px, transparent 1.5px);
  background-size: 193px 173px, 257px 223px, 331px 291px;
  background-position: 14px 32px, 102px 14px, 41px 110px;
  animation: home-stars-drift 65s linear infinite alternate;
}
html[data-page="home"] .home-space__planet {
  position: absolute;
  width: clamp(52px, 9vw, 100px);
  aspect-ratio: 1;
  right: 7%;
  top: 66%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, rgba(191, 222, 255, .6), rgba(79, 143, 219, .28) 32%, rgba(18, 40, 84, .3) 67%, transparent 72%);
  box-shadow: inset -9px -8px 16px rgba(0, 8, 30, .32), 0 0 30px rgba(96, 159, 237, .12);
  opacity: .5;
  animation: home-planet-drift 22s ease-in-out infinite alternate;
}
html[data-page="home"] .home-space__planet::after {
  content: "";
  position: absolute;
  inset: 34% -34%;
  border: 1px solid rgba(176, 215, 255, .48);
  border-radius: 50%;
  transform: rotate(-24deg);
}
html[data-page="home"] .home-space__rocket {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(114, 189, 255, .45));
  animation: home-rocket-flight 26s linear -5s infinite;
}
html[data-page="home"] .home-space__rocket svg { position: relative; display: block; }
html[data-page="home"] .home-space__trail {
  position: absolute;
  width: 95px;
  height: 2px;
  left: -77px;
  top: 52px;
  transform: rotate(-45deg);
  transform-origin: right center;
  background: linear-gradient(90deg, transparent, rgba(147, 214, 255, .8));
  filter: blur(1px);
}
html[data-page="home"][data-theme="light"] .home-space { opacity: .38; }
@keyframes home-stars-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-18px, 24px, 0); } }
@keyframes home-planet-drift { from { transform: translate3d(0, -8px, 0) rotate(-5deg); } to { transform: translate3d(-12px, 10px, 0) rotate(5deg); } }
@keyframes home-rocket-flight {
  0% { transform: translate3d(-70px, 83vh, 0); opacity: 0; }
  8%, 65% { opacity: .8; }
  74%, 100% { transform: translate3d(calc(100vw + 70px), 8vh, 0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-page="home"] .home-space__stars,
  html[data-page="home"] .home-space__planet { animation: none; }
  html[data-page="home"] .home-space__rocket { display: none; }
}
/* Reserve room for the avatar's outer halo before the profile text. */
html[data-page="home"] .home-avatar-placeholder { margin-bottom: 1rem; }
/* Keep long social handles inside their pills without wrapping the icon. */
html[data-page="home"] .collections .textEffect p:last-child { min-width: 0; max-width: 100%; }
html[data-page="home"] .collections .textEffect a { min-width: 0; max-width: 100%; font-size: clamp(1rem, 2vw, 1.125rem); }
html[data-page="home"] .social-handle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-page="home"] .collections .textEffect a i { flex: none; }

/* Clear glass navigation: the page supplies the color, the rim catches light. */
html[data-page="home"] .home-dock {
  --dock-ink: #f4f9ff;
  --dock-hover: rgba(255, 255, 255, .09);
  position: fixed;
  z-index: 1050;
  inset-inline: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  margin-inline: auto;
  width: 212px;
  max-width: calc(100% - 24px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 4px;
  padding: 5px;
  isolation: isolate;
  border: 1px solid rgba(235, 248, 255, .48);
  border-radius: 9999px;
  background: rgba(18, 30, 46, .92);
  box-shadow: 0 8px 24px rgba(0, 8, 20, .18), inset 0 1px 1px rgba(255, 255, 255, .7), inset 0 -1px 1px rgba(255, 255, 255, .22);
  transition: opacity .25s ease, transform .35s var(--liquid-ease), visibility 0s linear;
}
html[data-page="home"][data-theme="light"] .home-dock {
  --dock-ink: #102c49;
  --dock-hover: rgba(255, 255, 255, .24);
  background: rgba(239, 247, 255, .94);
  border-color: rgba(255, 255, 255, .78);
}
html[data-page="home"] .home-dock::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(165deg, rgba(255, 255, 255, .14), transparent 24%, transparent 76%, rgba(255, 255, 255, .06));
  box-shadow: inset 2px 0 2px rgba(255, 255, 255, .2), inset -2px 0 2px rgba(255, 255, 255, .12);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-page="home"] .home-dock {
    background: rgba(255, 255, 255, .025);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    backdrop-filter: blur(8px) saturate(150%);
  }
  html[data-page="home"][data-theme="light"] .home-dock { background: rgba(255, 255, 255, .06); }
}
html[data-page="home"] .home-dock__item {
  appearance: none;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9999px;
  color: var(--dock-ink);
  background: transparent;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .25s ease, transform .25s var(--liquid-spring), border-color .25s ease, box-shadow .25s ease;
}
html[data-page="home"] .home-dock__icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: inherit;
  filter: drop-shadow(0 1px 2px rgba(0, 10, 24, .18));
  transition: transform .35s var(--liquid-spring), filter .25s ease;
}
html[data-page="home"] .home-dock__icon svg { display: block; width: 24px; height: 24px; }
html[data-page="home"] .home-dock__item:focus-visible { background: var(--dock-hover); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  html[data-page="home"] .home-dock__item:hover {
    background: var(--dock-hover);
    border-color: rgba(255, 255, 255, .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 12px rgba(120, 198, 255, .12);
  }
  html[data-page="home"] .home-dock__item:hover .home-dock__icon { transform: translateY(-2px) scale(1.12); filter: drop-shadow(0 2px 5px rgba(120, 198, 255, .5)); }
  html[data-page="home"] .home-dock__item[data-destination="projects"]:hover .home-dock__icon { transform: rotate(-8deg) scale(1.12); }
  html[data-page="home"] .home-dock__item[data-destination="blog"]:hover .home-dock__icon { transform: rotate(8deg) scale(1.12); }
  html[data-page="home"] .home-dock__item[data-destination="contact"]:hover .home-dock__icon { transform: translate(2px, -3px) rotate(-8deg) scale(1.1); }
}
html[data-page="home"] .home-dock__item:active { transform: scale(.9); background: var(--dock-hover); }
html[data-page="home"] .sheet-open .home-dock { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(12px); transition: opacity .2s ease, transform .3s var(--liquid-ease), visibility 0s linear .3s; }
@media (prefers-reduced-motion: reduce) {
  html[data-page="home"] .home-dock, html[data-page="home"] .home-dock * { transition-duration: .01ms !important; animation: none !important; }
}
