@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --bg-deep: #091411;
  --felt-dark: #11352a;
  --felt-mid: #1c4d3f;
  --felt-soft: #2f6a5a;
  --slate-900: #12181c;
  --slate-800: #1a2228;
  --slate-700: #2a343c;
  --panel: rgba(16, 22, 26, 0.62);
  --panel-strong: rgba(12, 18, 22, 0.82);
  --text: #eef2f5;
  --text-muted: #a8b4be;
  --accent: #8dc3a6;
  --accent-2: #6b9fd4;
  --accent-glow: rgba(141, 195, 166, 0.35);
  --border: rgba(159, 168, 177, 0.22);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --scroll-y-percent: 0;
  --tx: 0px;
  --ty: 0px;
  --parallax-x: 0;
  --parallax-y: 0;
  --font-sans: "DM Sans", "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
}

body.quote-gate-open {
  overflow: hidden;
}

a {
  color: inherit;
}

/* —— Ambient background —— */
#ambient-bg {
  position: fixed;
  inset: -30px;
  z-index: -3;
  overflow: hidden;
  background: var(--bg-deep);
  will-change: filter, transform;
}

#ambient-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(9, 20, 17, 0.9), transparent),
    radial-gradient(circle at 50% 0%, rgba(141, 195, 166, 0.08), transparent 55%);
  pointer-events: none;
  z-index: 2;
}

#ambient-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.95;
}

.ambient-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.45;
  animation: orb-drift 14s ease-in-out infinite;
}

.ambient-orb-a {
  width: min(42vw, 380px);
  height: min(42vw, 380px);
  top: 8%;
  left: 6%;
  background: rgba(141, 195, 166, 0.5);
}

.ambient-orb-b {
  width: min(34vw, 300px);
  height: min(34vw, 300px);
  top: 14%;
  right: 10%;
  background: rgba(107, 159, 212, 0.42);
  animation-delay: -4s;
}

.ambient-orb-c {
  width: min(38vw, 340px);
  height: min(38vw, 340px);
  bottom: 8%;
  right: 22%;
  background: rgba(90, 52, 120, 0.32);
  animation-delay: -7s;
}

body:not(.is-static) #ambient-bg {
  transform: translate(
    calc(var(--tx, 0px) * 0.35),
    calc(var(--ty, 0px) * 0.35)
  );
}

html.scrolled #ambient-bg,
html.scrolled #ambient-canvas {
  filter: blur(calc(10px * var(--scroll-y-percent))) brightness(calc(1 - 0.28 * var(--scroll-y-percent)));
}

@keyframes orb-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -22px, 0) scale(1.06);
  }
}

/* —— Quote gate —— */
.quote-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  cursor: pointer;
  opacity: 1;
  transition: opacity 320ms ease;
}

.quote-gate.is-exiting {
  opacity: 0;
}

.quote-gate-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 22%, rgba(141, 195, 166, 0.2), transparent 38%),
    radial-gradient(circle at 82% 76%, rgba(107, 159, 212, 0.22), transparent 40%),
    linear-gradient(130deg, rgba(6, 14, 12, 0.98), rgba(13, 31, 25, 0.94) 52%, rgba(14, 20, 28, 0.96));
}

.quote-gate-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.34;
  animation: orb-drift 8s ease-in-out infinite;
}

.quote-gate-orb-a {
  width: min(38vw, 320px);
  height: min(38vw, 320px);
  top: 6%;
  left: 12%;
  background: rgba(141, 195, 166, 0.55);
}

.quote-gate-orb-b {
  width: min(30vw, 250px);
  height: min(30vw, 250px);
  right: 15%;
  top: 16%;
  background: rgba(107, 159, 212, 0.42);
  animation-delay: -2.5s;
}

.quote-gate-orb-c {
  width: min(34vw, 290px);
  height: min(34vw, 290px);
  right: 25%;
  bottom: 9%;
  background: rgba(45, 212, 191, 0.3);
  animation-delay: -4.2s;
}

.quote-gate-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(159, 168, 177, 0.35);
  background:
    linear-gradient(145deg, rgba(20, 28, 32, 0.82), rgba(14, 20, 24, 0.94)),
    radial-gradient(circle at top left, rgba(141, 195, 166, 0.14), transparent 60%);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: clamp(1.2rem, 3vw, 2.2rem);
  animation: quote-card-enter 560ms cubic-bezier(0.23, 1, 0.32, 1);
}

.quote-gate-kicker {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent);
}

.quote-gate-text {
  margin: 0;
  color: #f2f6f8;
  line-height: 1.45;
  font-size: clamp(1.35rem, 2.9vw, 2rem);
  font-weight: 600;
  text-wrap: balance;
}

.quote-gate-author {
  margin: 0.85rem 0 0;
  color: #d3dde3;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
}

.quote-gate-hint {
  margin: 1.45rem 0 0;
  color: #aab5bd;
  font-size: 0.87rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: quote-hint-pulse 1.9s ease-in-out infinite;
}

@keyframes quote-card-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes quote-hint-pulse {
  0%,
  100% {
    opacity: 0.54;
  }
  50% {
    opacity: 1;
  }
}

/* —— Shell & nav —— */
.site-shell {
  width: min(1180px, calc(100% - clamp(1.5rem, 5vw, 3.5rem)));
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 1.6rem) 0 4rem;
  position: relative;
  z-index: 1;
}

.nav-wrap {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  margin-bottom: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel-strong) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.top-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.1rem 0.15rem 0.25rem;
  scrollbar-width: none;
}

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

.nav-hint {
  text-align: center;
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* —— Playing card tabs —— */
.card-tab {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  width: 96px;
  height: 136px;
  border-radius: 14px;
  perspective: 1000px;
  flex: 0 0 auto;
  transition: transform 280ms ease;
}

.playing-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 380ms ease;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.card-tab.revealed .playing-card {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  overflow: hidden;
  border: 2px solid rgba(241, 245, 249, 0.98);
}

.card-back {
  background:
    linear-gradient(rgba(120, 14, 18, 0.1), rgba(120, 14, 18, 0.1)),
    url("assets/card-back.png");
  background-size: cover;
  background-position: center;
}

.card-back::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(241, 245, 249, 0.75);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.35);
}

.card-tab:hover {
  transform: translateY(-4px);
}

.card-tab:focus-visible {
  outline: 2px solid rgba(236, 239, 241, 0.9);
  outline-offset: 3px;
}

.card-front {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 18% 12%, rgba(141, 195, 166, 0.24), transparent 42%),
    linear-gradient(165deg, rgba(35, 42, 48, 0.98), rgba(14, 22, 26, 0.99));
  border-color: rgba(141, 195, 166, 0.42);
  color: var(--text);
}

.card-tab.is-current .card-front {
  border-color: rgba(141, 195, 166, 0.88);
  box-shadow: inset 0 0 0 1px rgba(141, 195, 166, 0.22), 0 0 24px var(--accent-glow);
}

.card-front-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.42rem;
  padding: 0.7rem 0.55rem;
  text-align: center;
}

.card-front::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(159, 168, 177, 0.28);
  border-radius: 10px;
  pointer-events: none;
}

.card-suit {
  font-size: 0.95rem;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 14px rgba(141, 195, 166, 0.45);
}

.card-title {
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
  color: #f3f6f8;
  line-height: 1.25;
}

.card-divider {
  width: 2.1rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(159, 168, 177, 0.2));
}

.card-subtitle {
  font-size: 0.56rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #dce4ea;
  border: 1px solid rgba(141, 195, 166, 0.38);
  background: rgba(141, 195, 166, 0.12);
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
}

.card-tab.is-current .card-subtitle {
  color: #132119;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

/* —— Hero —— */
.page-hero {
  min-height: clamp(52vh, 68vh, 78vh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4rem) 0 clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(0.5rem, 2vw, 1.5rem);
}

.hero-banner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 920px;
}

.hero-avatar {
  flex-shrink: 0;
  width: clamp(112px, 22vmin, 188px);
  height: clamp(112px, 22vmin, 188px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-style: italic;
  color: #e8f4ee;
  background:
    radial-gradient(circle at 30% 25%, rgba(141, 195, 166, 0.55), transparent 55%),
    linear-gradient(145deg, var(--felt-mid), var(--felt-dark));
  border: 2px solid rgba(141, 195, 166, 0.45);
  box-shadow:
    0 0 0 6px rgba(141, 195, 166, 0.08),
    0 20px 50px rgba(0, 0, 0, 0.35);
  animation: avatar-enter 900ms cubic-bezier(0.23, 1, 0.32, 1) 0.15s both;
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #f4faf7 0%, var(--accent) 55%, #c8dce8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-enter 1s cubic-bezier(0.23, 1, 0.32, 1) 0.35s both;
}

.hero-bio {
  margin: 1rem 0 0;
  max-width: 52ch;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.65;
  color: color-mix(in srgb, var(--text-muted) 85%, var(--accent) 15%);
  opacity: clamp(0.75, calc(0.75 + var(--scroll-y-percent) * 0.1), 0.92);
  animation: bio-mask 1.8s ease 0.9s both;
}

@keyframes avatar-enter {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes title-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bio-mask {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.scroll-cue {
  align-self: center;
  margin-top: auto;
  padding-top: 2rem;
  border: none;
  background: transparent;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: color-mix(in srgb, var(--accent) 70%, white 30%);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 250ms ease, transform 250ms ease;
  animation: scroll-bounce 2.2s ease-in-out infinite;
}

.scroll-cue:hover {
  opacity: 0.9;
}

html.scrolled .scroll-cue {
  opacity: 0;
  pointer-events: none;
}

@keyframes scroll-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* —— Content & bento —— */
.page-content {
  padding-bottom: 2rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(0.85rem, 2vw, 1.25rem);
}

.bento-card {
  grid-column: span var(--span, 6);
  min-height: 0;
}

.bento-card.span-12 {
  --span: 12;
}

.bento-card.span-8 {
  --span: 8;
}

.bento-card.span-7 {
  --span: 7;
}

.bento-card.span-6 {
  --span: 6;
}

.bento-card.span-5 {
  --span: 5;
}

.bento-card.span-4 {
  --span: 4;
}

.panel {
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(1.25);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.15rem, 2vw, 1.55rem);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.panel[data-tilt] {
  transform: perspective(720px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

.panel:hover {
  border-color: rgba(141, 195, 166, 0.38);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(141, 195, 166, 0.08);
}

.panel-accent {
  background:
    linear-gradient(145deg, rgba(28, 77, 63, 0.35), rgba(16, 22, 26, 0.75)),
    var(--panel);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 2.8rem);
}

h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

h3 {
  font-size: 1.05rem;
}

p {
  line-height: 1.7;
  color: var(--text-muted);
}

.kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

.tag-list,
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.pill {
  border-radius: 999px;
  border: 1px solid rgba(141, 195, 166, 0.35);
  padding: 0.4rem 0.72rem;
  font-size: 0.82rem;
  color: #dce8e4;
  background: rgba(141, 195, 166, 0.1);
  transition: background 200ms ease, border-color 200ms ease;
}

.pill:hover {
  background: rgba(141, 195, 166, 0.18);
  border-color: rgba(141, 195, 166, 0.55);
}

.list-clean {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.list-clean li + li {
  margin-top: 0.42rem;
}

.section-gap {
  margin-top: clamp(0.85rem, 2vw, 1.25rem);
}

/* —— Scroll reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms cubic-bezier(0.23, 1, 0.32, 1) var(--reveal-delay, 0ms),
    transform 700ms cubic-bezier(0.23, 1, 0.32, 1) var(--reveal-delay, 0ms);
}

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

/* —— Timeline —— */
.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  border-left: 3px solid rgba(141, 195, 166, 0.65);
  padding: 1rem 1rem 1rem 1.1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(12, 18, 22, 0.5);
  transition: background 220ms ease, border-color 220ms ease;
}

.timeline-item:hover {
  background: rgba(18, 28, 32, 0.65);
  border-left-color: var(--accent);
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.muted {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* —— Projects & gallery —— */
.project-grid,
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card,
.gallery-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  background: rgba(14, 20, 24, 0.55);
  transition:
    transform 280ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.project-card:hover,
.gallery-card:hover {
  transform: translateY(-4px);
  border-color: rgba(141, 195, 166, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.gallery-photo {
  height: 168px;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  background:
    linear-gradient(125deg, rgba(141, 195, 166, 0.45), rgba(34, 61, 52, 0.15)),
    linear-gradient(45deg, rgba(107, 159, 212, 0.25), rgba(12, 18, 22, 0.9));
  border: 1px solid rgba(159, 168, 177, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 250, 252, 0.85);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.gallery-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  animation: photo-shine 4s ease-in-out infinite;
}

@keyframes photo-shine {
  0%,
  70%,
  100% {
    transform: translateX(-120%);
  }
  85% {
    transform: translateX(120%);
  }
}

/* —— Contact —— */
.contact-card {
  display: grid;
  gap: 0.75rem;
}

.contact-link {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.78rem 0.9rem;
  background: rgba(18, 24, 28, 0.6);
  transition: border-color 200ms ease, transform 200ms ease, background 200ms ease;
}

.contact-link:hover {
  border-color: rgba(141, 195, 166, 0.75);
  background: rgba(28, 48, 42, 0.35);
  transform: translateX(4px);
}

.contact-form {
  display: grid;
  gap: 0.75rem;
}

input,
textarea,
select {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(159, 168, 177, 0.4);
  background: rgba(14, 20, 24, 0.72);
  color: var(--text);
  padding: 0.72rem 0.85rem;
  font: inherit;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(141, 195, 166, 0.7);
  box-shadow: 0 0 0 3px rgba(141, 195, 166, 0.15);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.72rem 1rem;
  font: inherit;
  font-weight: 700;
  color: #0f1a16;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  cursor: pointer;
  transition: filter 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 8px 24px rgba(141, 195, 166, 0.22);
}

.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* —— Weather —— */
.weather-panel {
  display: flex;
  flex-direction: column;
}

.weather-note {
  margin-top: 0.35rem;
  margin-bottom: 0.85rem;
}

.weather-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(12, 18, 22, 0.55);
  padding: 1rem;
  min-height: 175px;
}

.weather-status {
  margin: 0;
  color: var(--text-muted);
}

.weather-status.is-error {
  color: #fecaca;
}

.weather-content h3 {
  margin-bottom: 0.4rem;
}

.weather-temp {
  margin: 0.2rem 0 0.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  color: var(--text);
}

.weather-temp span:first-child {
  font-size: 2.2rem;
  font-weight: 700;
}

.weather-unit {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.weather-desc {
  margin: 0.2rem 0 0.55rem;
  color: #dce4ea;
}

.weather-meta {
  margin: 0.15rem 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.weather-btn {
  margin-top: 0.75rem;
  align-self: flex-start;
}

.timezone-card {
  margin-top: 0.75rem;
  border: 1px solid rgba(141, 195, 166, 0.24);
  border-radius: var(--radius-md);
  background: rgba(8, 14, 12, 0.55);
  padding: 0.8rem 1rem 0.9rem;
}

.timezone-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.74rem;
}

.timezone-time {
  margin: 0.15rem 0 0.1rem;
  color: var(--text);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.1;
  font-weight: 700;
}

.timezone-name {
  margin: 0;
}

/* —— Sticky wall —— */
.sticky-wall {
  display: grid;
  grid-template-columns: 1.65fr 0.7fr;
  gap: 1rem;
  width: 100%;
}

.panel .sticky-board-wrap,
.panel .sticky-panel {
  border: none;
  background: transparent;
  padding: 0;
}

.sticky-board-wrap,
.sticky-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: rgba(12, 18, 22, 0.55);
}

.sticky-panel {
  padding: 0.7rem;
  font-size: 0.875rem;
}

.sticky-panel h3 {
  font-size: 1.05rem;
}

.sticky-board-note,
.sticky-panel-copy {
  margin-top: 0.45rem;
  margin-bottom: 0.75rem;
}

.sticky-board-status {
  min-height: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.sticky-board-status.is-error {
  color: #fecaca;
}

.sticky-board {
  position: relative;
  width: 100%;
  min-height: 640px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(109px, 1fr));
  gap: 0.6rem;
  align-content: start;
  padding: 0.53rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(141, 195, 166, 0.22);
  overflow: auto;
  background-color: #0a100e;
  background-image:
    linear-gradient(rgba(8, 14, 12, 0.55), rgba(8, 14, 12, 0.55)),
    var(--sticky-board-pattern, none);
  background-size: auto, var(--sticky-board-pattern-size, 120px 120px);
}

.sticky-board[data-board-theme="grid"] {
  --sticky-board-pattern:
    repeating-linear-gradient(
      0deg,
      rgba(141, 195, 166, 0.08),
      rgba(141, 195, 166, 0.08) 1px,
      transparent 1px,
      transparent 20px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(141, 195, 166, 0.08),
      rgba(141, 195, 166, 0.08) 1px,
      transparent 1px,
      transparent 20px
    );
  --sticky-board-pattern-size: auto, auto;
}

.sticky-board[data-board-theme="flowers"] {
  --sticky-board-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23f3a9be' opacity='0.22'%3E%3Ccircle cx='20' cy='18' r='3'/%3E%3Ccircle cx='16' cy='14' r='2'/%3E%3Ccircle cx='24' cy='14' r='2'/%3E%3Ccircle cx='16' cy='22' r='2'/%3E%3Ccircle cx='24' cy='22' r='2'/%3E%3Ccircle cx='20' cy='10' r='2'/%3E%3Ccircle cx='60' cy='58' r='3'/%3E%3Ccircle cx='56' cy='54' r='2'/%3E%3Ccircle cx='64' cy='54' r='2'/%3E%3Ccircle cx='56' cy='62' r='2'/%3E%3Ccircle cx='64' cy='62' r='2'/%3E%3Ccircle cx='60' cy='50' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.sticky-board[data-board-theme="stars"] {
  --sticky-board-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath fill='%23fff59f' opacity='0.18' d='M36 8l2.6 8h8.5l-6.9 5 2.6 8-6.8-5.1-6.8 5.1 2.6-8-6.9-5h8.5z'/%3E%3Cpath fill='%23fff59f' opacity='0.14' d='M12 44l1.8 5.5h5.8l-4.7 3.4 1.8 5.5-4.7-3.5-4.7 3.5 1.8-5.5-4.7-3.4h5.8z'/%3E%3C/svg%3E");
}

.sticky-board[data-board-theme="dots"] {
  --sticky-board-pattern: radial-gradient(circle, rgba(141, 195, 166, 0.22) 1.5px, transparent 1.6px);
  --sticky-board-pattern-size: 18px 18px;
}

.sticky-board[data-board-theme="cork"] {
  background-color: #6b4f3a;
  --sticky-board-pattern:
    radial-gradient(circle at 20% 30%, rgba(255, 220, 170, 0.12) 0 1px, transparent 1.2px),
    radial-gradient(circle at 70% 60%, rgba(60, 35, 20, 0.18) 0 1px, transparent 1.2px),
    radial-gradient(circle at 45% 80%, rgba(255, 220, 170, 0.1) 0 1px, transparent 1.2px);
  --sticky-board-pattern-size: 14px 14px, 16px 16px, 12px 12px;
}

.sticky-board[data-board-theme="waves"] {
  --sticky-board-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cpath fill='none' stroke='%238dc3a6' stroke-opacity='0.2' stroke-width='2' d='M0 30c20-12 40 12 60 0s40 12 60 0'/%3E%3Cpath fill='none' stroke='%238dc3a6' stroke-opacity='0.12' stroke-width='2' d='M0 45c20-12 40 12 60 0s40 12 60 0'/%3E%3C/svg%3E");
  --sticky-board-pattern-size: 120px 60px;
}

.sticky-empty {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.sticky-note {
  position: relative;
  border-radius: 4px;
  min-height: 85px;
  width: 100%;
  max-width: 109px;
  padding: 0.45rem;
  box-shadow: 0 6px 9px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.18);
  transform: rotate(var(--note-rotation));
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  animation: sticky-pop 420ms cubic-bezier(0.23, 1, 0.32, 1) both;
  font-size: 0.78rem;
  touch-action: none;
  user-select: none;
  overflow: hidden;
}

.sticky-note::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0.22;
  background-image: var(--note-pattern, none);
  background-size: var(--note-pattern-size, 48px 48px);
}

.sticky-note[data-note-pattern="flowers"] {
  --note-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='8' cy='8' r='1.2'/%3E%3Ccircle cx='12' cy='8' r='1.2'/%3E%3Ccircle cx='8' cy='12' r='1.2'/%3E%3Ccircle cx='12' cy='12' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
}

.sticky-note[data-note-pattern="stars"] {
  --note-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath fill='%23ffffff' d='M18 4l1.8 5.5h5.8l-4.7 3.4 1.8 5.5-4.7-3.5-4.7 3.5 1.8-5.5-4.7-3.4h5.8z'/%3E%3C/svg%3E");
}

.sticky-note[data-note-pattern="dots"] {
  --note-pattern: radial-gradient(circle, rgba(255, 255, 255, 0.55) 1px, transparent 1.2px);
  --note-pattern-size: 10px 10px;
}

.sticky-note[data-note-pattern="stripes"] {
  --note-pattern: repeating-linear-gradient(
    -35deg,
    rgba(255, 255, 255, 0.28),
    rgba(255, 255, 255, 0.28) 2px,
    transparent 2px,
    transparent 8px
  );
  --note-pattern-size: auto;
}

.sticky-note[data-note-pattern="hearts"] {
  --note-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill='%23ffffff' d='M16 26s-8-5.2-8-10.4C8 12.2 10.8 10 14 10c1.8 0 3.4.9 4.2 2.2.8-1.3 2.4-2.2 4.2-2.2 3.2 0 6 2.2 6 5.6C28.6 20.8 16 26 16 26z'/%3E%3C/svg%3E");
}

.sticky-note.is-positioned {
  position: absolute;
  width: 109px;
  max-width: none;
  margin: 0;
  z-index: 1;
}

.sticky-note.is-draggable {
  cursor: grab;
}

.sticky-note.is-draggable.is-dragging {
  cursor: grabbing;
  z-index: 5;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

@keyframes sticky-pop {
  from {
    opacity: 0;
    transform: rotate(var(--note-rotation)) scale(0.92);
  }
  to {
    opacity: 1;
    transform: rotate(var(--note-rotation)) scale(1);
  }
}

.sticky-note[data-color="yellow"] {
  background: linear-gradient(145deg, #fff59f, #f8d978);
  color: #2f2500;
}

.sticky-note[data-color="blue"] {
  background: linear-gradient(145deg, #b3e5fc, #81d4fa);
  color: #083247;
}

.sticky-note[data-color="pink"] {
  background: linear-gradient(145deg, #f9c8d8, #f3a9be);
  color: #4a1b2d;
}

.sticky-note[data-color="mint"] {
  background: linear-gradient(145deg, #c9f7db, #98edc1);
  color: #123527;
}

.sticky-note-content {
  position: relative;
  z-index: 1;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  line-height: 1.45;
  color: inherit;
}

.sticky-note-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-size: 0.53rem;
  line-height: 1.35;
  color: inherit;
  opacity: 0.85;
}

.sticky-form {
  display: grid;
  gap: 0.35rem;
}

.sticky-form label {
  font-size: 0.8rem;
  color: #dce4ea;
}

.sticky-form input[type="text"],
.sticky-form textarea {
  font-size: 0.8rem;
  padding: 0.45rem 0.55rem;
}

.sticky-form textarea {
  min-height: 4.2rem;
}

.sticky-form .btn {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
}

.sticky-color-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sticky-color-row input[type="color"] {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.sticky-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sticky-swatch {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--swatch);
  cursor: pointer;
  padding: 0;
}

.sticky-swatch:hover,
.sticky-swatch:focus-visible {
  outline: 2px solid rgba(141, 195, 166, 0.65);
  outline-offset: 2px;
}

.sticky-swatch.is-active {
  outline: 2px solid #8dc3a6;
  outline-offset: 2px;
}

.sticky-theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.sticky-theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(8, 14, 12, 0.45);
  color: #dce4ea;
  font-size: 0.68rem;
  cursor: pointer;
}

.sticky-theme-option:hover,
.sticky-theme-option:focus-visible {
  border-color: rgba(141, 195, 166, 0.55);
  outline: none;
}

.sticky-theme-option.is-active {
  border-color: #8dc3a6;
  box-shadow: 0 0 0 1px rgba(141, 195, 166, 0.35);
}

.sticky-theme-preview {
  width: 100%;
  height: 1.6rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: #fff59f;
  background-image: var(--preview-pattern, none);
  background-size: var(--preview-pattern-size, 24px 24px);
}

.sticky-theme-preview-board {
  background-color: #0a100e;
}

.sticky-theme-preview-grid {
  --preview-pattern:
    repeating-linear-gradient(0deg, rgba(141, 195, 166, 0.35) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(90deg, rgba(141, 195, 166, 0.35) 0 1px, transparent 1px 6px);
  --preview-pattern-size: auto, auto;
}

.sticky-theme-preview-flowers {
  --preview-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cg fill='%23f3a9be' opacity='0.7'%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='8' cy='8' r='1.2'/%3E%3Ccircle cx='12' cy='8' r='1.2'/%3E%3Ccircle cx='8' cy='12' r='1.2'/%3E%3Ccircle cx='12' cy='12' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
}

.sticky-theme-preview-stars {
  --preview-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath fill='%23fff59f' opacity='0.75' d='M18 4l1.8 5.5h5.8l-4.7 3.4 1.8 5.5-4.7-3.5-4.7 3.5 1.8-5.5-4.7-3.4h5.8z'/%3E%3C/svg%3E");
}

.sticky-theme-preview-dots {
  --preview-pattern: radial-gradient(circle, rgba(141, 195, 166, 0.75) 1px, transparent 1.2px);
  --preview-pattern-size: 8px 8px;
}

.sticky-theme-preview-cork {
  background-color: #6b4f3a;
  --preview-pattern: radial-gradient(circle, rgba(255, 220, 170, 0.35) 0 1px, transparent 1.2px);
  --preview-pattern-size: 6px 6px;
}

.sticky-theme-preview-waves {
  --preview-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='30'%3E%3Cpath fill='none' stroke='%238dc3a6' stroke-opacity='0.65' stroke-width='2' d='M0 15c10-6 20 6 30 0s20 6 30 0'/%3E%3C/svg%3E");
  --preview-pattern-size: 60px 30px;
}

.sticky-theme-preview-plain {
  background-color: #fff59f;
}

.sticky-theme-preview-stripes {
  --preview-pattern: repeating-linear-gradient(
    -35deg,
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0.55) 2px,
    transparent 2px,
    transparent 7px
  );
  --preview-pattern-size: auto;
}

.sticky-theme-preview-hearts {
  --preview-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath fill='%23ffffff' opacity='0.75' d='M12 19s-6-3.9-6-7.8C6 9.1 7.9 7.5 10 7.5c1.3 0 2.5.7 3.1 1.7.6-1 1.8-1.7 3.1-1.7 2.1 0 4 1.6 4 3.7C18 15.1 12 19 12 19z'/%3E%3C/svg%3E");
}

footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.84rem;
  opacity: 0.75;
}

/* —— Legacy aliases —— */
.hero {
  display: contents;
}

.grid {
  display: contents;
}

.section-title {
  margin: 0;
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .bento-card,
  .bento-card.span-4,
  .bento-card.span-5,
  .bento-card.span-6,
  .bento-card.span-7,
  .bento-card.span-8 {
    --span: 12;
  }

  .hero-banner {
    flex-direction: column;
    align-items: flex-start;
    max-width: 520px;
  }

  .project-grid,
  .gallery-grid,
  .sticky-wall {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .nav-wrap {
    top: 0.35rem;
    border-radius: var(--radius-md);
  }

  .card-tab {
    width: 84px;
    height: 120px;
  }

  .page-hero {
    min-height: auto;
    padding-top: 1.5rem;
  }

  .scroll-cue {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ambient-orb,
  .scroll-cue,
  .gallery-photo::after,
  .hero-avatar,
  .hero-title,
  .hero-bio {
    animation: none;
  }

  #ambient-bg,
  #ambient-canvas {
    filter: none !important;
    transform: none !important;
  }
}
