:root {
  --bg: #f4f6ff;
  --bg-elevated: #ffffff;
  --accent: #3b82f6;
  --accent2: #ec4899;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --text: #0f172a;
  --text-soft: #64748b;
  --text-mute: #94a3b8;
  --border-subtle: rgba(148, 163, 184, 0.6);
  --border-strong: rgba(148, 163, 184, 0.8);
  --glass: rgba(255, 255, 255, 0.9);
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.16);
  --radius-lg: 18px;
  --radius-md: 12px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body, body * {
  -webkit-user-select: none !important;
  user-select: none !important;
  caret-color: transparent !important;
}

::selection {
  background: transparent;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at 12% 10%, rgba(59, 130, 246, 0.18) 0, transparent 38%),
    radial-gradient(circle at 86% 18%, rgba(236, 72, 153, 0.16) 0, transparent 40%),
    radial-gradient(circle at 50% 120%, rgba(34, 197, 94, 0.12) 0, transparent 52%),
    linear-gradient(180deg, #f6f7ff 0%, #f1f5ff 40%, #f7f8ff 100%);
  color: var(--text);
  min-height: 100vh;
}

.page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 46%),
    radial-gradient(circle at 70% 12%, rgba(255, 255, 255, 0.4), transparent 50%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: auto, auto, 80px 80px, 80px 80px;
  mix-blend-mode: multiply;
  opacity: 0.9;
}

.page::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg,
      rgba(15, 23, 42, 0.025) 0,
      rgba(15, 23, 42, 0.025) 1px,
      transparent 1px,
      transparent 2px),
    repeating-linear-gradient(90deg,
      rgba(15, 23, 42, 0.02) 0,
      rgba(15, 23, 42, 0.02) 1px,
      transparent 1px,
      transparent 3px);
  mix-blend-mode: overlay;
  opacity: 0.25;
}

.page {
  max-width: 1120px;
  margin: 24px auto 40px;
  padding: 0 16px;
  position: relative;
}

.page {
  isolation: isolate;
}

.page>* {
  position: relative;
  z-index: 2;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(22px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 13px;
  text-transform: uppercase;
}

.pixel-square {
  width: 18px;
  height: 18px;
  background: conic-gradient(from 180deg, #3b82f6, #ec4899, #f97316, #3b82f6);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.7);
  image-rendering: pixelated;
  animation: logo-rotate 10s linear infinite;
  position: relative;
  cursor: pointer;
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out), filter 0.28s var(--ease-out);
}

.pixel-square::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.4) 50%, transparent 55%);
  background-size: 250% 250%;
  animation: shimmer 3s infinite;
}

.logo:hover .pixel-square,
.pixel-square:hover {
  transform: rotate(12deg) scale(1.08);
  box-shadow: 0 0 24px rgba(95, 151, 255, 0.78), 0 0 36px rgba(242, 114, 160, 0.22);
  filter: saturate(1.12) brightness(1.05);
}

@keyframes logo-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -120% -120%;
  }

  100% {
    background-position: 120% 120%;
  }
}

/* Apple Style Narrative Layout */
.narrative-section {
  padding: var(--section-padding) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.narrative-hero {
  height: 90vh;
  justify-content: center;
  text-align: center;
}

.narrative-title {
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #fff 0%, #a1a1a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.narrative-subtitle {
  font-size: 1.5rem;
  color: var(--text-dim);
  max-width: 600px;
  line-height: 1.5;
}

.narrative-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
  margin-top: 100px;
}

.narrative-column {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.narrative-media {
  width: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
}

.narrative-text-block {
  max-width: 800px;
  text-align: center;
}

.narrative-h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: #fff;
}

.narrative-p {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.fade-slide-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s var(--apple-ease);
}

.fade-slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
}

.nav-link {
  color: var(--text-soft);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
}

.nav-link.active {
  color: var(--text);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.18s var(--ease-out);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 999px;
  transition: background 0.15s ease-out, color 0.15s ease-out;
}

.lang-btn.active {
  background: rgba(79, 209, 255, 0.16);
  color: var(--accent);
}

.divider {
  color: rgba(163, 176, 216, 0.5);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.glass {
  background: var(--glass);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  /* Backdrop-filter looks premium but is expensive. Keep it, but slightly lighter by default. */
  backdrop-filter: blur(18px) saturate(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.06);
}

.glass {
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background: radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.12), transparent 40%),
    radial-gradient(circle at 80% 0, rgba(236, 72, 153, 0.12), transparent 42%),
    radial-gradient(circle at 50% 110%, rgba(34, 197, 94, 0.08), transparent 45%);
  opacity: 0.9;
}

/* Performance-friendly glass fallback (no backdrop-filter). */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(255, 255, 255, 0.78);
  }
}

.glass>* {
  position: relative;
  z-index: 1;
}

.intro-card {
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.intro-main {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-placeholder {
  width: 70px;
  height: 70px;
  border-radius: 22%;
  border: 1px solid rgba(180, 200, 255, 0.7);
  padding: 2px;
  background: radial-gradient(circle at 10% 0, #3b82f6 0, #0f172a 45%, #ec4899 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 18%;
  background: rgba(3, 6, 22, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 15px;
}

.title {
  margin: 0 0 6px;
  font-size: 22px;
}

.subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}

.intro-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(76, 98, 180, 0.5);
}

.meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(148, 166, 230, 0.9);
  margin-bottom: 3px;
}

.meta-text {
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: flex-start;
}

.panel {
  padding: 16px 18px 14px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.item {
  padding: 9px 0;
  border-top: 1px solid rgba(76, 98, 180, 0.4);
}

.item:first-of-type {
  border-top: none;
}

.item-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.item-title {
  font-size: 14px;
  font-weight: 600;
}

.item-subtitle {
  font-size: 12px;
  color: var(--text-soft);
}

.item-meta {
  font-size: 11px;
  color: rgba(156, 174, 232, 0.85);
  white-space: nowrap;
}

.dot {
  margin: 0 4px;
}

.bullet-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.6;
}

.tag-group {
  margin-top: 8px;
}

.tag-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(149, 170, 233, 0.9);
  margin-bottom: 4px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(99, 129, 220, 0.7);
  background: radial-gradient(circle at 0 0, rgba(79, 209, 255, 0.28), transparent 55%);
}

.highlight {
  padding: 8px 0;
  border-top: 1px dashed rgba(76, 98, 180, 0.5);
}

.highlight:first-of-type {
  border-top: none;
}

.highlight-title {
  font-size: 13px;
  font-weight: 500;
}

.highlight-text {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.6;
}

.footer {
  margin-top: 20px;
  padding: 10px 4px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  color: rgba(150, 168, 230, 0.9);
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 11px;
}

.footer-link:hover {
  text-decoration: underline;
}

@media (max-width: 840px) {
  .top-bar {
    flex-wrap: wrap;
    gap: 8px;
    border-radius: 18px;
  }

  .nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    order: 3;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .intro-main {
    align-items: flex-start;
  }
}

/* Home hero & project grid */

.hero {
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-light {
  background: radial-gradient(circle at 14% 14%, rgba(191, 219, 254, 0.56) 0, rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at 86% 18%, rgba(244, 208, 255, 0.4) 0, rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 50% 100%, rgba(187, 247, 208, 0.28) 0, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(250, 251, 255, 0.98) 0%, rgba(246, 249, 255, 0.96) 100%);
}

.hero-main {
  display: flex;
  flex-direction: column;
}

.hero-home {
  position: relative;
  min-height: calc(100vh - 132px);
  align-items: center;
  justify-content: center;
  padding: 84px 28px 48px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 30px 80px rgba(148, 163, 184, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.hero-home::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.8) 0, rgba(255, 255, 255, 0.18) 26%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 0;
}

.hero-main-centered {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  align-items: center;
  text-align: center;
  transform: translateY(34px);
}

.hero-text-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.86);
  max-width: 920px;
  line-height: 1.7;
  text-wrap: balance;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.45rem, 5.25vw, 4.3rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 700;
  color: #20242d;
}

.hero-title-typed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.2em;
  text-wrap: balance;
  font-family: "Space Grotesk", "Segoe UI", Arial, sans-serif;
}

.hero-typing {
  display: inline-block;
  position: relative;
  color: #1d2638;
  background: linear-gradient(105deg, #151d2d 8%, #3157b7 35%, #8057a7 58%, #d04b86 78%, #202a3d 96%);
  background-size: 220% 100%;
  background-position: 10% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(70, 88, 145, 0.12);
  animation: hero-title-shimmer 7.5s ease-in-out infinite alternate;
}

.hero-typing::after {
  content: '';
  position: absolute;
  left: 1%;
  right: 2%;
  bottom: -0.1em;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(72, 112, 202, 0.54), rgba(204, 79, 143, 0.44), transparent);
  box-shadow: 0 0 12px rgba(91, 117, 201, 0.18);
  opacity: 0.8;
  z-index: -1;
}

@keyframes hero-title-shimmer {
  from { background-position: 10% 50%; }
  to { background-position: 90% 50%; }
}

.hero-caret {
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.08em;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(108, 132, 208, 0.84), rgba(184, 137, 204, 0.72));
  box-shadow: 0 0 18px rgba(135, 163, 231, 0.26);
  animation: hero-caret-blink 1.05s step-end infinite;
}

.hero-caret-soft {
  width: 0.075em;
  height: 1em;
  margin-left: 0.12em;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.55), rgba(167, 139, 250, 0.42));
  box-shadow: 0 0 16px rgba(147, 197, 253, 0.12);
}

.hero-focus-line {
  margin: -2px 0 0;
  min-height: 1.28em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 1120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.45rem, 2.65vw, 2.2rem);
  line-height: 1.02;
  color: #20242d;
  letter-spacing: -0.035em;
  font-weight: 490;
  text-shadow:
    1px 0 0 rgba(255, 255, 255, 0.12),
    0 1px 0 rgba(32, 36, 45, 0.14),
    2px 0 0 rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.hero-focus-typing {
  display: inline-block;
  color: #20242d;
}

.hero-action-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.hero-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  justify-content: center;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 560px;
}

.hero-link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(15, 23, 42, 0.84);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), background 0.22s var(--ease-out);
}

.hero-link-pill:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 30px rgba(148, 163, 184, 0.2);
}

.hero-about {
  width: min(1080px, 100%);
  padding: 14px 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 40px rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-about-label {
  margin: 0 0 6px;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(109, 123, 152, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.hero-about-text {
  margin: 0;
  font-size: clamp(0.84rem, 0.94vw, 0.9rem);
  line-height: 1.55;
  color: rgba(99, 109, 130, 0.66);
  letter-spacing: -0.003em;
}

.hero-scroll-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  text-decoration: none;
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.hero-scroll-link::after {
  content: '';
  width: 18px;
  height: 18px;
  border-right: 1.5px solid rgba(71, 85, 105, 0.56);
  border-bottom: 1.5px solid rgba(71, 85, 105, 0.56);
  transform: rotate(45deg) translateY(-1px);
  animation: hero-scroll-float 2.4s ease-in-out infinite;
}

.hero-squares,
.hero-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-squares {
  z-index: 1;
  overflow: hidden;
  opacity: 0.9;
}

.hero-square {
  position: absolute;
  top: -12%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.16)),
    var(--square-fill, rgba(96, 165, 250, 0.16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 18px 34px rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translate3d(0, 0, 0) rotate(0deg);
  animation: hero-square-fall linear infinite;
}

.hero-orbit-a,
.hero-orbit-b {
  z-index: 0;
  filter: blur(10px);
  opacity: 0.5;
}

.hero-orbit-a::before,
.hero-orbit-b::before {
  content: '';
  position: absolute;
  inset: auto;
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  max-height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.18), rgba(255, 255, 255, 0));
}

.hero-orbit-a::before {
  left: -12%;
  top: -14%;
  animation: hero-orbit 18s ease-in-out infinite alternate;
}

.hero-orbit-b::before {
  right: -10%;
  bottom: -18%;
  background: radial-gradient(circle, rgba(244, 208, 255, 0.18), rgba(255, 255, 255, 0));
  animation: hero-orbit 22s ease-in-out infinite alternate-reverse;
}

@keyframes hero-caret-blink {
  0%, 46% {
    opacity: 1;
  }

  47%, 100% {
    opacity: 0.1;
  }
}

@keyframes hero-scroll-float {
  0%, 100% {
    transform: rotate(45deg) translateY(-2px);
  }

  50% {
    transform: rotate(45deg) translateY(4px);
  }
}

@keyframes hero-square-fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 0;
  }

  12% {
    opacity: 1;
  }

  100% {
    transform: translate3d(var(--drift, 0px), 120vh, 0) rotate(var(--rotate, 160deg));
    opacity: 0;
  }
}

@keyframes hero-orbit {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(2%, -1.5%, 0) scale(1.05);
  }

  100% {
    transform: translate3d(-2%, 2%, 0) scale(0.98);
  }
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease-out, color 0.15s ease-out, box-shadow 0.15s ease-out,
    transform 0.08s ease-out;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ec4899, var(--accent2));
  background-size: 200% auto;
  color: white;
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.32);
  transition: all 0.3s var(--ease-out);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  background-position: right center;
  box-shadow: 0 22px 54px rgba(124, 58, 237, 0.45);
}

.btn-ghost {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-ghost::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: -1;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.82);
  transform: translateY(-2px);
  color: var(--accent);
}

.btn-ghost:hover::before {
  transform: translateX(100%);
}

.hero-meta {
  margin-top: 8px;
  font-size: 11px;
  color: #6b7280;
}

.portfolio-panel {
  padding: 20px 20px 18px;
  margin-top: 22px;
}

@media (max-width: 820px) {
  .hero-home {
    min-height: calc(100vh - 116px);
    padding: 56px 18px 30px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 11vw, 4rem);
  }

  .hero-main-centered {
    transform: translateY(18px);
  }

  .hero-focus-line {
    font-size: clamp(1.05rem, 4.8vw, 1.5rem);
    min-height: 1.45em;
    white-space: normal;
    text-align: center;
  }

  .hero-about {
    padding: 14px 16px 16px;
    border-radius: 22px;
  }

  .hero-about-text {
    font-size: 0.88rem;
    line-height: 1.7;
  }

  .hero-links,
  .hero-actions {
    gap: 8px;
  }

  .hero-link-pill,
  .btn-primary,
  .btn-ghost {
    width: 100%;
  }
}

.portfolio-header {
  margin-bottom: 10px;
}

.portfolio-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}

.project-grid {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.project-grid-large {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.28);
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out);
  position: relative;
}

/* Premium, lightweight highlight sweep (driven by existing hover vars). */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
  background:
    radial-gradient(420px circle at var(--hover-x, 40%) var(--hover-y, 20%),
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.18) 26%,
      rgba(255, 255, 255, 0) 60%);
  mix-blend-mode: soft-light;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(148, 163, 184, 0.45);
  border-color: rgba(59, 130, 246, 0.8);
}

.project-card:hover::after {
  opacity: 1;
}

.project-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e5e7eb;
}

.project-visual-placeholder {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 16px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.38), transparent 32%),
    linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(30, 64, 175, 0.92), rgba(59, 130, 246, 0.78));
}

.project-visual-eco {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.38), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(22, 101, 52, 0.92), rgba(110, 231, 183, 0.72));
}

.project-placeholder-text {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.94);
  text-transform: uppercase;
  text-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.6s var(--ease-out), filter 0.6s var(--ease-out);
  filter: saturate(1.05) contrast(1.02);
}

.project-card:hover .project-image {
  transform: scale(1.06);
}

.project-body {
  padding: 10px 11px 11px;
}

.project-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #6b7280;
  margin-bottom: 4px;
}

.project-title {
  margin: 0 0 4px;
  font-size: 14px;
}

.project-text {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
}

/* Project detail page */

.proj-hero {
  padding: 32px 24px 28px;
}

.proj-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
}

.proj-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  text-decoration: none;
  color: var(--text-soft);
  width: fit-content;
  font-weight: 500;
  transition: color 0.2s ease;
}

.proj-back:hover {
  color: var(--text);
}

.proj-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-pill {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(100, 116, 139, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  border-radius: 999px;
}

.proj-title {
  margin: 0;
  font-size: 42px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.proj-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 88ch;
}



.proj-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.architecture-hero,
.architecture-layout,
.proj-gallery-plain {
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.architecture-hero .proj-hero-inner {
  max-width: none;
}

.proj-main {
  padding: 16px 18px 14px;
}

.proj-section+.proj-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.proj-h2 {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.proj-p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.75;
}

.proj-side {
  padding: 14px 14px 12px;
  position: sticky;
  top: 18px;
}

.side-code {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 11px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.7);
  color: rgba(15, 23, 42, 0.9);
  overflow: auto;
}

.side-cover-box {
  margin-top: 24px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.1), 0 0 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.6);
  padding: 6px;
}

.side-cover-box img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.15) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  padding: 6px 14px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.tag:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.25) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
  color: #2563eb;
}
.proj-gallery {
  padding: 22px 24px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.46));
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow:
    0 20px 42px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14);
  /* Large areas are the most expensive; keep the feel but reduce the cost. */
  backdrop-filter: blur(18px) saturate(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.06);
  /* Render heavy sections only when needed (huge win on long project pages). */
  content-visibility: auto;
  contain-intrinsic-size: 1200px;
}

.proj-gallery.proj-gallery-plain.glass {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}

.proj-gallery.proj-gallery-plain.glass::before {
  display: none !important;
}

.proj-gallery.proj-gallery-plain .gallery-head {
  max-width: 860px;
  margin: 0 auto 16px;
  padding: 2px 0 0;
  overflow: visible;
}

.proj-gallery.proj-gallery-plain .section-title {
  overflow: visible;
}

.gallery-head {
  margin-bottom: 12px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.proj-gallery .gallery-grid .gallery-grid {
  content-visibility: visible;
  contain-intrinsic-size: unset;
}

.proj-gallery .gallery-grid:not(.gallery-grid-architecture) {
  max-width: 920px;
  margin: 0 auto;
  gap: 24px;
}

.gallery-grid-architecture {
  grid-template-columns: 1fr;
  max-width: 860px;
  margin: 0 auto;
  align-items: start;
}

.gallery-grid-cure {
  grid-template-columns: 1fr;
}

.gallery-grid-triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.respire-unity-pair {
  align-items: stretch;
}

.respire-unity-pair .shot {
  display: flex;
  flex-direction: column;
}

.respire-unity-pair .shot-img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
}

.mr-english-cafe-pair {
  align-items: stretch;
}

.mr-english-cafe-pair .shot {
  display: flex;
  flex-direction: column;
}

.mr-english-cafe-pair .shot-img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
}

.mr-english-presentation-pair {
  align-items: stretch;
}

.mr-english-presentation-pair .shot {
  display: flex;
  flex-direction: column;
}

.mr-english-presentation-pair .shot-img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
}

.gallery-grid-coastal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.shot {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18)),
    rgba(255, 255, 255, 0.16);
  padding: 7px;
  box-shadow:
    0 18px 34px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  /* Reduce the cost of layout/paint churn for image-heavy pages. */
  contain: content;
}

.shot-wide {
  grid-column: 1 / -1;
}

.shot-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
  cursor: zoom-in;
}

.gallery-grid-architecture .shot {
  display: block;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.18)),
    rgba(255, 255, 255, 0.14);
  box-shadow:
    0 18px 34px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.06);
  overflow: hidden;
}

.gallery-grid-architecture .shot-img {
  display: block;
  width: 100%;
  border-radius: 15px;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.16);
}

.gallery-grid-coastal .shot-img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.shot-cap {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-soft);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  margin-top: 10px;
}

/* Smooth interactions */

html {
  scroll-behavior: smooth;
}

.reveal {
  opacity: 0;
  translate: 0 10px;
  transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-typing,
  .hero-caret {
    animation: none;
  }

  .reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }

  .project-card,
  .project-image,
  .btn-primary,
  .btn-ghost {
    transition: none;
  }
}

@media (max-width: 840px) {
  .hero {
    padding: 18px 14px 14px;
  }

  .proj-layout {
    grid-template-columns: 1fr;
  }

  .proj-side {
    position: static;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid-architecture {
  grid-template-columns: 1fr;
  max-width: 860px;
  margin: 0 auto;
  align-items: start;
}

  .gallery-grid-triple,
  .gallery-grid-coastal {
    grid-template-columns: 1fr;
  }

  .shot-wide {
    grid-column: auto;
  }

}

/* Resume (art-directed layout) */

.resume-hero {
  padding: 18px 18px 14px;
}

.resume-hero-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.resume-name-main {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.resume-name-sub {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.resume-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.7);
}

.resume-contact {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s ease-out;
}

.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
  border-color: rgba(59, 130, 246, 0.75);
}

.pill-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(100, 116, 139, 0.9);
}

.pill-value {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.92);
}

.resume-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.6fr);
  gap: 18px;
  align-items: start;
}

.resume-side {
  padding: 14px 14px 12px;
  position: sticky;
  top: 18px;
}

.side-block+.side-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.6);
}

.side-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.68);
  margin-bottom: 6px;
}

.side-text {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.7;
}

.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resume-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.resume-section {
  padding: 16px 18px 14px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.6);
  margin-bottom: 12px;
}

.section-note {
  font-size: 11px;
  color: rgba(100, 116, 139, 0.9);
  letter-spacing: 0.02em;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.t-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.t-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.t-meta {
  font-size: 11px;
  color: rgba(100, 116, 139, 0.95);
  line-height: 1.5;
}

.t-time {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.75);
}

.t-place {
  margin-top: 3px;
}

.t-title {
  font-weight: 650;
  font-size: 13px;
}

.t-sub {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.t-text {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.7;
}

.pub-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.7;
}

.pub-list a {
  color: var(--accent);
  text-decoration: none;
}

.pub-list a:hover {
  text-decoration: underline;
}

.pub-title {
  color: rgba(15, 23, 42, 0.88);
  font-weight: 600;
}

.pub-venue {
  color: rgba(15, 23, 42, 0.72);
}

.proj-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.proj {
  padding: 10px 0;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.proj:first-of-type {
  border-top: none;
  padding-top: 0;
}

.proj-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.resume-section .proj-title {
  font-weight: 650;
  font-size: 13px;
}

.proj-meta {
  font-size: 11px;
  color: rgba(100, 116, 139, 0.95);
  white-space: nowrap;
}

.proj-text {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.7;
}

.skill-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.skill-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.skill-k {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.72);
}

.skill-v {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .resume-layout {
    grid-template-columns: 1fr;
  }

  .resume-side {
    position: static;
  }

  .t-item {
    grid-template-columns: 1fr;
  }

  .skill-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .gallery-grid-two {
    grid-template-columns: 1fr;
  }
}

/* Photography page */

.page-photo {
  max-width: 1320px;
}

.photo-content {
  gap: 16px;
}

.photo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.75fr);
  gap: 18px;
  padding: 22px;
  align-items: end;
}

.photo-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.56);
}

.photo-title {
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 800;
  max-width: 10ch;
  color: #0f172a;
}

.photo-subtitle {
  margin: 18px 0 0;
  max-width: 68ch;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-soft);
}

.photo-hero-meta {
  justify-self: end;
  width: min(100%, 340px);
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.photo-meta-label {
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.54);
}

.photo-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.photo-stage,
.photo-wall,
.photo-ribbon {
  position: relative;
}

/* Photography pages can be long; render sections only when needed. */
.photo-stage,
.photo-wall,
.photo-ribbon {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.photo-stage-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.78fr;
  grid-template-rows: minmax(240px, 0.82fr) minmax(200px, 0.58fr);
  gap: 14px;
}

.photo-wall-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}

.photo-card {
  margin: 0;
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.16));
  padding: 8px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}

.photo-card-feature {
  grid-row: 1 / span 2;
  aspect-ratio: 16 / 10;
}

.photo-card-tall {
  grid-row: span 2;
  aspect-ratio: 4 / 5;
}

.photo-card-wide {
  grid-column: span 6;
  aspect-ratio: 16 / 9;
}

.photo-wall-grid .photo-card {
  grid-column: span 4;
  aspect-ratio: 4 / 3;
}

.photo-wall-grid .photo-card:nth-child(1) {
  grid-column: span 4;
  grid-row: span 2;
  aspect-ratio: 4 / 5;
}

.photo-wall-grid .photo-card:nth-child(2) {
  grid-column: span 4;
  aspect-ratio: 4 / 3;
  transform: translateY(8px);
}

.photo-wall-grid .photo-card:nth-child(3) {
  grid-column: span 4;
  aspect-ratio: 4 / 3;
}

.photo-wall-grid .photo-card:nth-child(4) {
  grid-column: span 3;
  aspect-ratio: 3 / 4;
  transform: translateY(-8px);
}

.photo-wall-grid .photo-card:nth-child(5) {
  grid-column: span 5;
  aspect-ratio: 5 / 4;
}

.photo-wall-grid .photo-card:nth-child(6) {
  grid-column: span 3;
  aspect-ratio: 3 / 4;
  transform: translateY(6px);
}

.photo-wall-grid .photo-card:nth-child(7) {
  grid-column: span 4;
  aspect-ratio: 4 / 3;
}

.photo-img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
}

.photo-ribbon {
  padding: 4px 0 2px;
}

.photo-ribbon-text {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.16));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.58);
}

@media (max-width: 980px) {
  .photo-hero {
    grid-template-columns: 1fr;
  }

  .photo-hero-meta {
    justify-self: start;
  }

  .photo-stage-grid,
  .photo-wall-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .photo-card-feature,
  .photo-card-tall,
  .photo-card-wide,
  .photo-wall-grid .photo-card {
    grid-column: auto;
    grid-row: auto;
  }

  .photo-card {
    padding: 7px;
  }
  .photo-wall-grid .photo-card:nth-child(1),
  .photo-wall-grid .photo-card:nth-child(2),
  .photo-wall-grid .photo-card:nth-child(3),
  .photo-wall-grid .photo-card:nth-child(4),
  .photo-wall-grid .photo-card:nth-child(5),
  .photo-wall-grid .photo-card:nth-child(6),
  .photo-wall-grid .photo-card:nth-child(7) {
    grid-column: auto;
    grid-row: auto;
    transform: none;
  }
}
.photo-lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 12, 20, 0.72);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 1200;
}


.photo-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.photo-lightbox-frame {
  margin: 0;
  max-width: min(96vw, 1280px);
  max-height: 92vh;
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: center;
}

.photo-lightbox.is-shot {
  place-items: center;
}

.photo-lightbox.is-architecture {
  place-items: start center;
  overflow-y: auto;
}

.photo-lightbox.is-architecture .photo-lightbox-frame {
  margin-top: 18px;
  max-height: none;
  align-items: start;
}

.photo-lightbox.is-architecture .photo-lightbox-img {
  width: min(94vw, 1240px);
  max-height: none;
  border-radius: 6px;
}

.photo-lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.photo-lightbox-caption {
  max-width: 90vw;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.photo-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

body.photo-lightbox-open {
  overflow: hidden;
}

body.page-loader-active {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.52s ease, visibility 0.52s ease;
}

.page-loader-filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.page-loader.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.page-loader-bg,
.page-loader-inner {
  position: absolute;
  inset: 0;
}

.page-loader-bg {
  background:
    radial-gradient(circle at 12% 16%, rgba(128, 186, 255, 0.18) 0%, rgba(128, 186, 255, 0) 34%),
    radial-gradient(circle at 84% 16%, rgba(217, 166, 255, 0.16) 0%, rgba(217, 166, 255, 0) 38%),
    radial-gradient(circle at 50% 86%, rgba(124, 220, 215, 0.13) 0%, rgba(124, 220, 215, 0) 42%),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.92) 0%, rgba(243, 247, 255, 0.88) 26%, rgba(226, 236, 250, 0.36) 52%, rgba(226, 236, 250, 0) 76%),
    linear-gradient(180deg, #f7f8ff 0%, #eef3ff 44%, #f7f8ff 100%);
}

.page-loader-aurora,
.page-loader-conic,
.page-loader-wave,
.page-loader-mesh,
.page-loader-grain,
.page-loader-spotlight,
.page-loader-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-loader-aurora {
  filter: blur(96px);
  opacity: 0.28;
  mix-blend-mode: screen;
}

.page-loader-aurora-a {
  inset: -12% 42% 36% -16%;
  background: radial-gradient(circle, rgba(144, 195, 255, 0.28) 0%, rgba(144, 195, 255, 0.08) 40%, rgba(144, 195, 255, 0) 76%);
  animation: loader-aurora-drift-a 24s ease-in-out infinite alternate;
}

.page-loader-aurora-b {
  inset: 10% -8% 20% 48%;
  background: radial-gradient(circle, rgba(193, 170, 255, 0.24) 0%, rgba(193, 170, 255, 0.08) 42%, rgba(193, 170, 255, 0) 78%);
  animation: loader-aurora-drift-b 28s ease-in-out infinite alternate;
}

.page-loader-aurora-c {
  inset: 44% 18% -10% 18%;
  background: radial-gradient(circle, rgba(146, 219, 226, 0.16) 0%, rgba(146, 219, 226, 0.06) 42%, rgba(146, 219, 226, 0) 78%);
  animation: loader-aurora-drift-c 20s ease-in-out infinite alternate;
}

.page-loader-conic {
  left: 50%;
  top: 50%;
  width: 120vmax;
  height: 120vmax;
  translate: -50% -50%;
  border-radius: 999px;
  background: conic-gradient(from 0deg,
      rgba(152, 200, 255, 0) 0deg,
      rgba(152, 200, 255, 0.1) 56deg,
      rgba(198, 184, 255, 0.08) 132deg,
      rgba(214, 242, 255, 0.05) 204deg,
      rgba(152, 200, 255, 0.08) 282deg,
      rgba(152, 200, 255, 0) 360deg);
  filter: blur(108px);
  opacity: 0.18;
  animation: loader-conic-rotate 56s linear infinite;
}

.page-loader-wave {
  inset: 18% -8% -8%;
  opacity: 0.13;
  mix-blend-mode: screen;
}

.page-loader-wave-a {
  background: repeating-radial-gradient(circle at 50% 58%, rgba(176, 215, 255, 0.22) 0 1px, transparent 1px 32px);
  transform: scale(1.15);
  filter: blur(0.2px);
  animation: loader-wave-flow-a 18s linear infinite;
}

.page-loader-wave-b {
  background: repeating-radial-gradient(circle at 52% 54%, rgba(176, 188, 255, 0.16) 0 1px, transparent 1px 26px);
  transform: scale(1.22);
  opacity: 0.12;
  animation: loader-wave-flow-b 22s linear infinite;
}

.page-loader-wave-c {
  background: repeating-radial-gradient(circle at 48% 50%, rgba(212, 238, 255, 0.12) 0 1px, transparent 1px 20px);
  transform: scale(1.3);
  opacity: 0.08;
  animation: loader-wave-flow-c 14s linear infinite;
}

.page-loader-mesh {
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.03;
  mask-image: radial-gradient(circle at 50% 46%, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.34) 44%, rgba(0, 0, 0, 0) 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 46%, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.34) 44%, rgba(0, 0, 0, 0) 80%);
}

.page-loader-grain {
  opacity: 0.04;
  mix-blend-mode: soft-light;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.18) 0 0.8px, transparent 1px),
    radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.14) 0 0.8px, transparent 1px),
    radial-gradient(circle at 34% 72%, rgba(255, 255, 255, 0.16) 0 0.8px, transparent 1px),
    radial-gradient(circle at 62% 82%, rgba(255, 255, 255, 0.12) 0 0.8px, transparent 1px);
  background-size: 120px 120px, 140px 140px, 160px 160px, 180px 180px;
  animation: loader-grain-shift 12s steps(6) infinite;
}

.page-loader-spotlight {
  background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.62) 0%, rgba(236, 242, 252, 0.22) 26%, rgba(255, 255, 255, 0) 66%);
}

.page-loader-vignette {
  background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0) 30%, rgba(219, 228, 243, 0.08) 74%, rgba(205, 214, 230, 0.18) 100%);
}

.page-loader-inner {
  position: relative;
  width: min(46vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 2;
}

.page-loader-orb-shell {
  position: relative;
  width: clamp(220px, 26vw, 280px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: visible;
  animation: loader-orb-breathe 7.8s ease-in-out infinite;
}

.page-loader-orb-shell::before,
.page-loader-orb-shell::after {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 999px;
  pointer-events: none;
}

.page-loader-orb-shell::before {
  background:
    conic-gradient(from 160deg,
      rgba(255, 255, 255, 0) 0deg,
      rgba(170, 214, 255, 0.22) 42deg,
      rgba(255, 255, 255, 0) 94deg,
      rgba(163, 146, 255, 0.18) 166deg,
      rgba(255, 255, 255, 0) 240deg,
      rgba(140, 198, 255, 0.16) 308deg,
      rgba(255, 255, 255, 0) 360deg);
  filter: url(#loader-liquid-soft-distortion) blur(18px);
  mix-blend-mode: screen;
  opacity: 0.46;
  animation: loader-caustic-spin 14s linear infinite;
}

.page-loader-orb-shell::after {
  inset: 18%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 34%, rgba(255, 255, 255, 0) 68%),
    repeating-radial-gradient(circle at 50% 50%, rgba(168, 210, 255, 0.11) 0 2px, transparent 2px 16px);
  filter: url(#loader-liquid-soft-distortion) blur(12px);
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: loader-caustic-pulse 6.4s ease-in-out infinite alternate;
}

.page-loader-orb-halo,
.page-loader-orb-ring,
.page-loader-orb-glass,
.page-loader-orb-liquid,
.page-loader-orb-shimmer,
.page-loader-orb-highlight,
.page-loader-ripple,
.page-loader-core,
.page-loader-core-dot {
  position: absolute;
  border-radius: 999px;
}

.page-loader-orb-halo {
  inset: -18%;
  background: radial-gradient(circle, rgba(176, 210, 255, 0.24) 0%, rgba(176, 210, 255, 0.12) 24%, rgba(176, 210, 255, 0.03) 50%, rgba(176, 210, 255, 0) 82%);
  filter: blur(52px);
}

.page-loader-orb-ring {
  inset: 6%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 36px rgba(176, 203, 242, 0.08),
    0 18px 34px rgba(155, 171, 204, 0.08);
  backdrop-filter: blur(26px) saturate(1.06);
  -webkit-backdrop-filter: blur(26px) saturate(1.06);
  filter: blur(1.2px);
  opacity: 0.56;
}

.page-loader-orb-glass {
  inset: 10%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.08) 24%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 50% 62%, rgba(182, 216, 255, 0.14) 0%, rgba(182, 216, 255, 0) 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(144, 171, 210, 0.06) 58%, rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(26px) saturate(1.16);
  -webkit-backdrop-filter: blur(26px) saturate(1.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -24px 52px rgba(92, 130, 186, 0.18);
  mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.96) 62%, rgba(0, 0, 0, 0.64) 80%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.96) 62%, rgba(0, 0, 0, 0.64) 80%, rgba(0, 0, 0, 0) 100%);
  animation: loader-glass-shift 10.5s ease-in-out infinite alternate;
}

.page-loader-orb-liquid {
  inset: 15%;
  overflow: hidden;
  mix-blend-mode: screen;
  filter: url(#loader-liquid-distortion) blur(1.4px);
  mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.96) 58%, rgba(0, 0, 0, 0.52) 76%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.96) 58%, rgba(0, 0, 0, 0.52) 76%, rgba(0, 0, 0, 0) 100%);
}

.page-loader-orb-liquid::before {
  content: '';
  position: absolute;
  inset: -14%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.98) 0%, rgba(225, 239, 255, 0.92) 14%, rgba(172, 210, 255, 0.74) 34%, rgba(140, 176, 228, 0.52) 58%, rgba(183, 211, 244, 0.24) 76%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle at 68% 66%, rgba(255, 255, 255, 0.28) 0%, rgba(192, 215, 255, 0.14) 28%, rgba(192, 215, 255, 0) 58%);
  filter: blur(5px);
}

.page-loader-orb-liquid::after {
  content: '';
  position: absolute;
  inset: -8%;
  background: repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 18px);
  opacity: 0.18;
}

.page-loader-orb-liquid-a {
  animation: loader-liquid-swirl-a 18s linear infinite;
}

.page-loader-orb-liquid-b {
  inset: 18%;
  opacity: 0.58;
  animation: loader-liquid-swirl-b 16s linear infinite reverse;
}

.page-loader-orb-shimmer {
  inset: 14%;
  background: conic-gradient(from 90deg, rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, 0.16) 44deg, rgba(255, 255, 255, 0) 88deg, rgba(206, 232, 255, 0.12) 132deg, rgba(255, 255, 255, 0) 360deg);
  filter: url(#loader-liquid-soft-distortion) blur(10px);
  opacity: 0.36;
  animation: loader-highlight-rotate 12s linear infinite;
}

.page-loader-orb-highlight-a {
  inset: 20% 24% 46% 24%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0));
  filter: blur(8px);
  opacity: 0.48;
  transform: rotate(-18deg);
}

.page-loader-orb-highlight-b {
  inset: 48% 18% 18% 42%;
  background: radial-gradient(circle at 50% 50%, rgba(157, 204, 255, 0.24) 0%, rgba(157, 204, 255, 0) 72%);
  filter: blur(12px);
  opacity: 0.42;
  animation: loader-highlight-drift 10s ease-in-out infinite alternate;
}

.page-loader-ripple {
  inset: 18%;
  border: 1px solid rgba(209, 228, 255, 0.18);
  box-shadow: 0 0 18px rgba(130, 190, 255, 0.05);
}

.page-loader-ripple-a {
  animation: loader-ripple-orb 3.2s ease-out infinite;
}

.page-loader-ripple-b {
  animation: loader-ripple-orb 3.2s ease-out 1s infinite;
}

.page-loader-ripple-c {
  animation: loader-ripple-orb 3.2s ease-out 2s infinite;
}

.page-loader-core {
  inset: 34%;
  background:
    radial-gradient(circle at 36% 34%, rgba(255, 255, 255, 0.98) 0%, rgba(223, 238, 255, 0.94) 16%, rgba(155, 205, 255, 0.72) 40%, rgba(118, 171, 238, 0.42) 62%, rgba(118, 171, 238, 0) 82%),
    radial-gradient(circle at 66% 70%, rgba(255, 220, 194, 0.26) 0%, rgba(255, 220, 194, 0) 58%);
  filter: url(#loader-liquid-soft-distortion) blur(24px);
  opacity: 0.9;
  animation: loader-core-breathe 2.4s ease-in-out infinite;
}

.page-loader-core-dot {
  inset: 42%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98) 0%, rgba(210, 232, 255, 0.92) 36%, rgba(144, 193, 255, 0.18) 68%, rgba(144, 193, 255, 0) 100%);
  filter: blur(6px);
  box-shadow: 0 0 28px rgba(176, 218, 255, 0.26);
  animation: loader-core-pulse 2.6s ease-in-out infinite;
}

.page-loader-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}

.page-loader-title {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(72, 90, 122, 0.8);
  text-shadow: 0 0 10px rgba(186, 204, 234, 0.12);
}

.page-loader-subtitle {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: rgba(104, 124, 156, 0.68);
  animation: loader-copy-shimmer 6.5s ease-in-out infinite;
}

.page-loader-progress {
  position: relative;
  width: min(60vw, 260px);
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.page-loader-progress-track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(221, 230, 243, 0.34));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(182, 202, 225, 0.2),
    0 10px 20px rgba(162, 181, 214, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page-loader-progress-fill {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform: scaleX(0);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(106, 156, 255, 0.88), rgba(132, 208, 255, 0.86) 34%, rgba(197, 165, 255, 0.8) 68%, rgba(255, 255, 255, 0.72) 100%);
  box-shadow:
    0 0 18px rgba(129, 190, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.page-loader-progress-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.08) 28%, rgba(255, 255, 255, 0.34) 50%, rgba(255, 255, 255, 0.08) 66%, transparent 100%);
  transform: translateX(-120%);
  animation: loader-progress-sheen 1.8s linear infinite;
  mix-blend-mode: screen;
}

.page-loader-progress-text {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(101, 122, 156, 0.82);
}

.page-atmosphere {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(260px, 34vh, 440px);
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  opacity: 1;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.84) 48%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.84) 48%, rgba(0, 0, 0, 0) 100%);
}

.page-atmosphere-canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 1;
  filter: saturate(1.12) contrast(1.05);
}

.page-loader.is-fallback .page-loader-orb-shell {
  filter: brightness(1.08);
}

/* Minimal loader override */
.page-loader-bg {
  background:
    radial-gradient(circle at 12% 10%, rgba(59, 130, 246, 0.18) 0, transparent 38%),
    radial-gradient(circle at 86% 18%, rgba(236, 72, 153, 0.16) 0, transparent 40%),
    radial-gradient(circle at 50% 120%, rgba(34, 197, 94, 0.12) 0, transparent 52%),
    linear-gradient(180deg, #f6f7ff 0%, #f1f5ff 40%, #f7f8ff 100%);
}

.page-loader-inner {
  width: min(72vw, 360px);
  gap: 14px;
}

.page-loader-copy {
  gap: 4px;
}

.page-loader-title {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: rgba(74, 92, 124, 0.72);
  text-shadow: none;
}

.page-loader-progress {
  width: min(72vw, 320px);
  margin-top: 8px;
  gap: 8px;
}

.page-loader-progress-track {
  height: 3px;
  background: rgba(148, 163, 184, 0.18);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.34),
    0 8px 22px rgba(128, 150, 190, 0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.page-loader-progress-fill {
  background: linear-gradient(90deg, rgba(79, 139, 255, 0.92), rgba(111, 194, 255, 0.86) 54%, rgba(255, 255, 255, 0.88) 100%);
  box-shadow: 0 0 20px rgba(111, 194, 255, 0.26);
}

.page-loader-progress-sheen {
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.12) 28%, rgba(255, 255, 255, 0.44) 50%, rgba(255, 255, 255, 0.12) 66%, transparent 100%);
  animation-duration: 1.6s;
}

.page-loader-progress-text {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(110, 128, 156, 0.72);
}

@keyframes loader-aurora-drift-a {
  0% { transform: translate3d(-2%, 0, 0) scale(1); }
  100% { transform: translate3d(6%, -3%, 0) scale(1.08); }
}

@keyframes loader-aurora-drift-b {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-4%, 5%, 0) scale(1.1); }
}

@keyframes loader-aurora-drift-c {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(3%, -2%, 0) scale(1.06); }
}

@keyframes loader-caustic-spin {
  0% { transform: rotate(0deg) scale(0.98); }
  50% { transform: rotate(180deg) scale(1.03); }
  100% { transform: rotate(360deg) scale(0.98); }
}

@keyframes loader-caustic-pulse {
  0% { transform: scale(0.95); opacity: 0.9; }
  100% { transform: scale(1.06); opacity: 0.46; }
}

@keyframes loader-glass-shift {
  0% { transform: translate3d(-2%, -1%, 0) scale(0.99); }
  100% { transform: translate3d(2%, 2%, 0) scale(1.02); }
}

@keyframes loader-conic-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes loader-wave-flow-a {
  from { transform: scale(1.15) translateY(0); }
  to { transform: scale(1.18) translateY(12px); }
}

@keyframes loader-wave-flow-b {
  from { transform: scale(1.22) translateX(-12px); }
  to { transform: scale(1.25) translateX(12px); }
}

@keyframes loader-wave-flow-c {
  from { transform: scale(1.3) translateY(-8px); }
  to { transform: scale(1.34) translateY(10px); }
}

@keyframes loader-grain-shift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(18px, -14px, 0); }
}

@keyframes loader-orb-breathe {
  0%, 100% { transform: scale(0.98); }
  50% { transform: scale(1.03); }
}

@keyframes loader-liquid-swirl-a {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.05); }
}

@keyframes loader-liquid-swirl-b {
  from { transform: rotate(0deg) scale(1.04); }
  to { transform: rotate(360deg) scale(0.98); }
}

@keyframes loader-highlight-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes loader-highlight-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(8px, -8px, 0) scale(1.08); }
}

@keyframes loader-ripple-orb {
  0% {
    transform: scale(0.82);
    opacity: 0;
  }
  18% {
    opacity: 0.56;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@keyframes loader-core-breathe {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.62;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.86;
  }
}

@keyframes loader-core-pulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.92;
  }
}

@keyframes loader-copy-shimmer {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 0.94; }
}

@keyframes loader-progress-sheen {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}


.resume-section,
.proj-gallery,
.project-grid,
.gallery-grid,
.photo-stage,
.photo-wall,
.photo-ribbon {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

img[loading='lazy'] {
  content-visibility: auto;
}

.shot-img,
.photo-img,
.project-image {
  transform: translateZ(0);
}

/* Custom cursor, footer field, and logo burst */
body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor .nav-link,
body.has-custom-cursor .lang-btn,
body.has-custom-cursor .project-card,
body.has-custom-cursor .photo-card,
body.has-custom-cursor .shot,
body.has-custom-cursor video,
body.has-custom-cursor .side-cover-box,
body.has-custom-cursor .tag,
body.has-custom-cursor .logo,
body.has-custom-cursor .pixel-square {
  cursor: none;
}

.cursor-shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 180ms ease;
}

.cursor-shell.is-visible {
  opacity: 1;
}

.cursor-aura,
.cursor-ring,
.cursor-trail {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.cursor-aura {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(25, 39, 65, 0.2) 0%, rgba(76, 108, 166, 0.08) 52%, rgba(76, 108, 166, 0) 78%);
  opacity: 0.72;
  transition: width 180ms ease, height 180ms ease, opacity 180ms ease, background 180ms ease;
}

.cursor-ring {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(9, 16, 28, 0.72);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24), 0 0 12px rgba(53, 76, 119, 0.13);
  transition: width 180ms ease, height 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}


.cursor-trail {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(22, 34, 56, 0.22), rgba(22, 34, 56, 0));
  opacity: 0.22;
}

body[data-cursor='card'] .cursor-aura {
  width: 50px;
  height: 50px;
}

body[data-cursor='link'] .cursor-aura {
  width: 54px;
  height: 54px;
}

body[data-cursor='video'] .cursor-aura {
  width: 58px;
  height: 58px;
}

body[data-cursor='card'] .cursor-ring {
  width: 30px;
  height: 30px;
}

body[data-cursor='link'] .cursor-ring {
  width: 34px;
  height: 34px;
}

body[data-cursor='video'] .cursor-ring {
  width: 38px;
  height: 38px;
}

body[data-cursor-contrast='light'] .cursor-aura {
  background: radial-gradient(circle, rgba(14, 24, 41, 0.24) 0%, rgba(67, 96, 148, 0.08) 54%, rgba(67, 96, 148, 0) 80%);
  opacity: 0.76;
}

body[data-cursor-contrast='light'] .cursor-ring {
  border-color: rgba(6, 11, 19, 0.86);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(154, 178, 214, 0.1) 52%, rgba(154, 178, 214, 0) 78%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 0 13px rgba(36, 52, 83, 0.16);
}

body[data-cursor-contrast='dark'] .cursor-aura {
  background: radial-gradient(circle, rgba(244, 248, 255, 0.32) 0%, rgba(208, 224, 248, 0.1) 54%, rgba(208, 224, 248, 0) 78%);
  opacity: 0.8;
}

body[data-cursor-contrast='dark'] .cursor-ring {
  border-color: rgba(255, 255, 255, 0.4);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(196, 216, 246, 0.08) 52%, rgba(196, 216, 246, 0) 78%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 12px rgba(181, 204, 239, 0.14);
}

body[data-cursor-contrast='light'] .cursor-trail {
  background: radial-gradient(circle, rgba(12, 19, 32, 0.36), rgba(12, 19, 32, 0));
  opacity: 0.36;
}

body[data-cursor-contrast='dark'] .cursor-trail {
  background: radial-gradient(circle, rgba(220, 232, 252, 0.28), rgba(220, 232, 252, 0));
  opacity: 0.24;
}


.cursor-magnetic {
  transform: translate3d(var(--cursor-mx, 0), var(--cursor-my, 0), 0);
  transition: transform 180ms cubic-bezier(0.2, 0.75, 0.22, 1);
}

.footer {
  position: relative;
  z-index: 2;
}

.page > .footer-field {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 320px;
  z-index: 0;
  pointer-events: none;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.84) 40%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.84) 40%, rgba(0, 0, 0, 0) 100%);
}

.footer-field-canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.logo-three-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 64;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.34s ease-out;
  mix-blend-mode: normal;
}

.logo-three-layer.is-visible {
  opacity: 1;
}

.logo-three-canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  filter: saturate(1.2) contrast(1.08) brightness(1.08) drop-shadow(0 0 18px rgba(180, 216, 255, 0.16));
}

@media (max-width: 900px) {
  .page > .footer-field {
    height: 240px;
  }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-shell {
    display: none;
  }
}

/* Lightweight motion system */
@view-transition {
  navigation: auto;
}

.top-bar {
  view-transition-name: site-header;
}

.side-cover-box img {
  view-transition-name: project-cover;
}

.hero-home.is-motion-paused .hero-square,
.hero-home.is-motion-paused .hero-orbit-a::before,
.hero-home.is-motion-paused .hero-orbit-b::before {
  animation-play-state: paused;
}

.project-card {
  transform-style: flat;
  will-change: auto;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}

.project-card::after {
  opacity: 0;
  background: linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, 0.5) 47%, transparent 64%);
  transform: translateX(-115%);
  transition: opacity 160ms ease, transform 560ms var(--ease-out);
  mix-blend-mode: soft-light;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(112, 128, 160, 0.34);
}

.project-card:hover::after {
  opacity: 0.72;
  transform: translateX(115%);
}

.project-card:hover .project-image {
  transform: scale(1.045);
}

.page-loader {
  opacity: 0;
  visibility: hidden;
  background: #f5f7fc;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.page-loader.is-visible {
  opacity: 1;
  visibility: visible;
}

.page-loader.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.page-loader-bg {
  background:
    linear-gradient(rgba(86, 118, 178, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 118, 178, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.98), rgba(235, 241, 251, 0.9) 68%, #edf2fa 100%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}

.page-loader-inner {
  position: relative;
  inset: auto;
  width: min(78vw, 360px);
  gap: 13px;
  transform: translateY(8px) scale(0.985);
  opacity: 0;
  transition: transform 360ms var(--ease-out), opacity 260ms ease;
}

.page-loader.is-visible .page-loader-inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.page-loader-pixel-mark {
  width: 34px;
  height: 34px;
  display: grid;
  grid-template-columns: repeat(2, 12px);
  grid-template-rows: repeat(2, 12px);
  gap: 4px;
  transform: rotate(45deg);
}

.page-loader-pixel-mark span {
  background: #17233b;
  box-shadow: 0 0 14px rgba(56, 104, 190, 0.18);
  animation: loader-pixel-calibrate 900ms steps(2, end) infinite;
}

.page-loader-pixel-mark span:nth-child(2) { background: #4f8df7; animation-delay: 120ms; }
.page-loader-pixel-mark span:nth-child(3) { background: #e879b7; animation-delay: 240ms; }
.page-loader-pixel-mark span:nth-child(4) { background: #50b99d; animation-delay: 360ms; }

.page-loader-copy {
  gap: 5px;
}

.page-loader-title {
  color: #18243c;
  font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.page-loader-subtitle,
.page-loader-status {
  animation: none;
  color: rgba(57, 73, 103, 0.72);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-loader-scan {
  width: min(68vw, 250px);
  height: 2px;
  overflow: hidden;
  background: rgba(93, 116, 157, 0.14);
}

.page-loader-scan span {
  display: block;
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #4f8df7, #e879b7, transparent);
  animation: loader-scan 820ms var(--ease-out) infinite;
}

.logo-pixel-burst-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: hidden;
  pointer-events: none;
}

.logo-burst-pixel {
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: var(--burst-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--burst-color) 52%, transparent);
  animation: logo-pixel-burst 680ms cubic-bezier(0.16, 0.76, 0.24, 1) var(--burst-delay) both;
}

@keyframes loader-pixel-calibrate {
  0%, 100% { opacity: 0.38; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes loader-scan {
  from { transform: translateX(-110%); }
  to { transform: translateX(310%); }
}

@keyframes logo-pixel-burst {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0) scale(0.4); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--burst-x), var(--burst-y), 0) rotate(var(--burst-r)) scale(0.85); }
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(site-header) {
    animation-duration: 260ms;
  }

  ::view-transition-old(root) {
    animation: page-fade-out 180ms ease both;
  }

  ::view-transition-new(root) {
    animation: page-fade-in 260ms var(--ease-out) both;
  }

  ::view-transition-group(project-cover) {
    animation-duration: 360ms;
    animation-timing-function: var(--ease-out);
  }
}

@keyframes page-fade-out {
  to { opacity: 0.42; }
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader,
  .logo-pixel-burst-layer {
    display: none;
  }

  .project-card:hover,
  .project-card:hover .project-image,
  .project-card:hover::after {
    transform: none;
  }
}
