/* ===== Fonts ===== */
@font-face {
  font-family: 'Selawik';
  src: url('assets/fonts/selawik-light.woff2') format('woff2'),
       url('assets/fonts/selawik-light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Selawik';
  src: url('assets/fonts/selawik-regular.woff2') format('woff2'),
       url('assets/fonts/selawik-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Selawik';
  src: url('assets/fonts/selawik-semibold.woff2') format('woff2'),
       url('assets/fonts/selawik-semibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Selawik';
  src: url('assets/fonts/selawik-bold.woff2') format('woff2'),
       url('assets/fonts/selawik-bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 19px;
  /* Render the whole site at 80% scale (same effect as browser zoom-out) */
  zoom: 0.8;
}

html, body {
  min-height: 100%;
}

body {
  font-family: 'Selawik', 'Corbel', 'Segoe UI', 'Poppins', Arial, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  color: #ffffff;
  text-shadow: 0 0 3px rgba(255,255,255,0.45), 0 0 8px rgba(255,255,255,0.25);
  background-image: url('assets/bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 150px;
}

a { color: inherit; }
/* links.js removes the email link's href, which drops the default link underline; restore it */
:where(a[data-href]) { cursor: pointer; text-decoration: underline; }

/* ===== Glass panel base ===== */
.glass {
  background: linear-gradient(180deg, rgba(15,45,65,0.72) 0%, rgba(8,30,50,0.68) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 22px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

/* ===== Page shell (floating sidebar + panel group) ===== */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.bg-orb.top {
  top: -120px;
  left: -100px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(140,240,210,0.35), transparent 70%);
}

.bg-orb.bottom {
  bottom: -140px;
  right: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(90,190,230,0.3), transparent 70%);
}

.page-shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 1440px;
  margin: 48px auto;
  padding: 0 24px;
}

.sidebar-col {
  flex: 0 0 300px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px 28px;
  border-radius: 32px;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.sidebar-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.6);
}

.sidebar-brand span {
  font-weight: 700;
  font-size: 1.15rem;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(25,60,85,0.6) 0%, rgba(15,45,65,0.5) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.sidebar-nav a svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.sidebar-nav a:hover {
  background: linear-gradient(180deg, rgba(35,75,100,0.7) 0%, rgba(20,55,80,0.6) 100%);
}

.sidebar-nav a.active {
  background: linear-gradient(180deg, rgba(90,190,230,0.6) 0%, rgba(50,140,190,0.55) 100%);
  border-color: rgba(255,255,255,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 0 0 2px rgba(140,220,255,0.35);
}

.sidebar .divider {
  margin: 0;
}

/* Flex-wrap (not grid) so an odd tile left over on the last row is centered */
.utility-grid {
  --tile-cols: 2;
  --tile-gap: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--tile-gap);
}

.utility-tile {
  flex: 0 0 calc((100% - (var(--tile-cols) - 1) * var(--tile-gap)) / var(--tile-cols));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(25,60,85,0.6) 0%, rgba(15,45,65,0.5) 100%);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
  color: #ffffff;
  text-decoration: none;
}

.utility-tile .tile-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.1;
}

.utility-tile:hover {
  background: linear-gradient(180deg, rgba(35,75,100,0.7) 0%, rgba(20,55,80,0.6) 100%);
}

.utility-tile.active {
  background: linear-gradient(180deg, rgba(90,190,230,0.6) 0%, rgba(50,140,190,0.55) 100%);
  border-color: rgba(255,255,255,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 0 0 2px rgba(140,220,255,0.35);
}

.utility-tile svg {
  width: 32px;
  height: 32px;
}

.utility-tile .li-mark {
  font-weight: 700;
  font-size: 1.1rem;
}

.sidebar-footer {
  margin-top: auto;
  text-align: center;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.main-content {
  flex: 1;
  min-width: 0;
}

@media (min-width: 901px) {
  .main-content {
    padding-right: 130px;
  }
}

/* ===== Narrow screens: sidebar collapses into a compact nav above the content ===== */
@media (max-width: 900px) {
  .page-shell {
    flex-direction: column;
    /* stretch so the content column matches the screen width instead of its widest child */
    align-items: stretch;
    margin: 20px auto;
    padding: 0 16px;
    gap: 16px;
  }

  .sidebar-col {
    width: 100%;
    max-width: 560px;
    flex: 0 0 auto;
    position: static;
    align-self: center;
    gap: 12px;
  }

  .sidebar-brand {
    flex-direction: row;
    justify-content: center;
    gap: 14px;
  }

  .sidebar-avatar {
    width: 56px;
    height: 56px;
  }

  .sidebar {
    padding: 16px;
    gap: 12px;
    border-radius: 24px;
  }

  .sidebar .divider {
    display: none;
  }

  .sidebar-footer {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
  }

  /* Main pages: 2x2 pills */
  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .sidebar-nav a {
    padding: 10px 12px;
    font-size: 0.9rem;
    gap: 8px;
  }

  .sidebar-nav a svg {
    width: 18px;
    height: 18px;
  }

  /* Secondary pages: small 3-column tiles */
  .utility-grid {
    --tile-cols: 3;
    --tile-gap: 8px;
  }

  .utility-tile {
    padding: 8px 4px;
    border-radius: 12px;
  }

  .utility-tile svg {
    width: 22px;
    height: 22px;
  }

  .utility-tile .li-mark {
    font-size: 0.9rem;
    line-height: 22px;
  }

  .utility-tile .tile-label {
    font-size: 0.58rem;
  }

  .wrapper {
    padding-bottom: 24px;
  }
}

/* ===== Gallery (temporarily disabled) =====
   Hides every link to gallery.html site-wide. gallery.html and assets/gallery/
   are untouched. To relaunch the gallery, delete this rule. */
.gallery-link {
  display: none !important;
}

/* ===== Hero ===== */
.hero {
  padding: 56px 40px 40px;
  margin: 24px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 12px;
  color: #ffffff;
}

.hero p {
  font-size: 1.25rem;
  color: #ffffff;
  max-width: 680px;
  margin: 0 auto;
}

/* ===== CTA buttons (solid, hard shadow) ===== */
.cta-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #06263f;
  text-shadow: none;
  background: linear-gradient(180deg, #8ff0d0 0%, #3ecf8e 100%);
  border: 1px solid rgba(6,38,63,0.15);
  box-shadow: 3px 3px 0 rgba(6,38,63,0.35);
}

.cta-btn:hover {
  background: linear-gradient(180deg, #9ff7db 0%, #4bdf9d 100%);
}

/* ===== Bubble (glass panel behind hero text) ===== */
.bubble {
  padding: 36px 48px;
  border-radius: 44px;
}

/* ===== Stacked layout (photo on top, single-column text below) ===== */
.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.hero .hero-text {
  max-width: 480px;
  margin: 0 auto;
}

.panel .stack {
  margin-top: 4px;
}

.panel .stack .hero-text {
  max-width: 560px;
}

.photo-placeholder {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(25,60,85,0.5) 0%, rgba(10,35,55,0.45) 100%);
  border: 2px dashed rgba(255,255,255,0.35);
  font-size: 0.85rem;
  font-weight: 600;
}

.photo-placeholder.circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
}

.photo-placeholder.square {
  width: 240px;
  height: 240px;
  border-radius: 24px;
}

img.photo-placeholder {
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.85);
  box-shadow:
    0 0 0 3px rgba(90,220,255,0.6),
    0 0 16px rgba(90,220,255,0.55),
    0 6px 20px rgba(0,0,0,0.35);
}

/* ===== About page (portrait carousel + text columns) ===== */
.about-columns {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
}

.about-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.about-text .greeting {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.about-text p {
  margin-bottom: 4px;
  line-height: 1.45;
}

.photo-carousel.portrait {
  width: 300px;
  aspect-ratio: 3 / 4;
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .about-columns {
    flex-direction: column;
    align-items: center;
  }

  .about-text {
    text-align: center;
  }
}

/* ===== Gadget stack (clock / calendar / weather, top-right) ===== */
.gadget-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.gadget-tile {
  width: 90px;
  border-radius: 14px;
  padding: 9px;
  background: rgba(215,230,242,0.7);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.85);
}

.gadget-clock {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e4edf3 55%, #c7d6e0 100%);
  box-shadow:
    0 0 0 2px #f4f7fa,
    0 0 0 3px #b9c4cc,
    0 4px 10px rgba(0,0,0,0.35);
}

.gadget-clock .ticks {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #2a2a2a 0deg 2deg, transparent 2deg 30deg);
  -webkit-mask-image: radial-gradient(circle, transparent 60%, black 61%, black 67%, transparent 68%);
  mask-image: radial-gradient(circle, transparent 60%, black 61%, black 67%, transparent 68%);
}

.gadget-clock .sheen {
  position: absolute;
  top: 8%;
  left: 15%;
  width: 70%;
  height: 32%;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0));
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.gadget-clock .hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: bottom center;
  background: #1a1a1a;
  border-radius: 2px;
}

.gadget-clock .clock-hour {
  width: 3px;
  height: 22px;
}

.gadget-clock .clock-min {
  width: 2px;
  height: 31px;
}

.gadget-clock .clock-sec {
  width: 1px;
  height: 35px;
  background: #d5322c;
}

.gadget-clock .clock-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1a1a1a;
  transform: translate(-50%, -50%);
}

.gadget-calendar {
  padding-top: 9px;
  text-align: center;
  background: linear-gradient(180deg, #ff8a3d 0%, #e2551c 100%);
  position: relative;
}

.gadget-calendar .cal-day {
  display: block;
  color: #fff;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: none;
}

.gadget-calendar .cal-date {
  display: block;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  padding: 1px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gadget-calendar .cal-month {
  display: block;
  color: #fff;
  font-size: 0.42rem;
  font-weight: 700;
  padding-bottom: 2px;
  text-transform: uppercase;
  opacity: 0.9;
  line-height: 1;
  text-shadow: none;
}

.gadget-weather {
  background: linear-gradient(160deg, #6cbdf0 0%, #2d74b8 100%);
}

.weather-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.gadget-weather svg {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.gadget-weather .weather-temp {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.weather-bar {
  margin-top: 5px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.55);
  overflow: hidden;
}

.weather-bar-fill {
  height: 100%;
  width: 62%;
  background: #ffffff;
}

.gadget-weather .weather-loc {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 0.46rem;
  opacity: 0.85;
  text-shadow: none;
}

@media (max-width: 900px) {
  .gadget-stack {
    display: none;
  }
}

/* ===== Media player (bottom-right, site-wide) ===== */
.media-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 340px;
}

.mp-now-playing {
  width: 100%;
  font-size: 0.62rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  white-space: normal;
  overflow: visible;
  line-height: 1.3;
}

.mp-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(205,228,245,0.78) 100%);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 8px 20px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.9);
  overflow: visible;
}

.mp-flat-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  color: #1a6fc4;
  cursor: pointer;
}

.mp-flat-icon.mp-active {
  color: #0a4a8f;
}

.mp-flat-icon.mp-active svg {
  filter: drop-shadow(0 0 3px rgba(26,111,196,0.7));
}

.mp-flat-icon svg {
  width: 17px;
  height: 17px;
}

.mp-stop-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: none;
  border: none;
  color: #8a97a3;
  cursor: pointer;
}

.mp-stop-icon svg {
  width: 14px;
  height: 14px;
}

.mp-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 18px;
  background: rgba(6,38,63,0.25);
}

.mp-transport {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-rect-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.75);
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(200,220,235,0.65) 100%);
  color: #1a4a6e;
  cursor: pointer;
}

.mp-rect-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, rgba(210,230,245,0.85) 100%);
}

.mp-rect-btn svg {
  width: 14px;
  height: 14px;
}

.mp-play {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-top: -8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: radial-gradient(circle at 30% 25%, #d6f0ff 0%, #bfe6ff 18%, #4fa6e8 55%, #123a5e 100%);
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.85),
    0 0 0 4px rgba(214,232,247,0.85),
    0 3px 8px rgba(0,0,0,0.35),
    inset 0 1px 2px rgba(255,255,255,0.9);
  color: #ffffff;
  cursor: pointer;
}

.mp-play svg {
  width: 12px;
  height: 12px;
}

.mp-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 64px;
  height: 4px;
  background: rgba(6,38,63,0.25);
  border-radius: 2px;
  outline: none;
}

.mp-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #d6f0ff 0%, #bfe6ff 30%, #1665b0 100%);
  border: 1px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  cursor: pointer;
}

.mp-volume::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #d6f0ff 0%, #bfe6ff 30%, #1665b0 100%);
  border: 1px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  cursor: pointer;
}

/* Hidden on narrow screens (must come after the base .media-player rule to win) */
@media (max-width: 900px) {
  .media-player {
    display: none;
  }
}

/* ===== Journey (chronological story with marginal carousels) ===== */
.journey {
  display: flex;
  flex-direction: column;
  gap: 36px;
  text-align: left;
}

.journey-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}

.journey-row.reverse {
  flex-direction: row-reverse;
}

.journey-row.center {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.journey-row.center .journey-text {
  text-align: center;
}

.journey-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  flex: 0 0 auto;
  border: 3px solid rgba(255,255,255,0.85);
  box-shadow:
    0 0 0 3px rgba(90,220,255,0.6),
    0 0 16px rgba(90,220,255,0.55),
    0 6px 20px rgba(0,0,0,0.35);
}

.journey-carousel.landscape {
  width: 220px;
  aspect-ratio: 16 / 9;
}

.journey-carousel.portrait {
  width: 150px;
  aspect-ratio: 3 / 4;
}

.journey-carousel.wide {
  width: 100%;
  aspect-ratio: 16 / 7;
}

.journey-text {
  flex: 1;
  min-width: 0;
}

.journey-text p {
  margin: 0;
  line-height: 1.5;
}

/* ===== Photo carousel (About section) ===== */
.photo-carousel {
  position: relative;
  overflow: hidden;
  width: 560px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  flex: 0 0 auto;
  border: 3px solid rgba(255,255,255,0.85);
  box-shadow:
    0 0 0 3px rgba(90,220,255,0.6),
    0 0 16px rgba(90,220,255,0.55),
    0 6px 20px rgba(0,0,0,0.35);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.carousel-slide.active {
  opacity: 1;
}

/* ===== Sections ===== */
section.panel {
  padding: 48px;
  margin: 0 0 28px;
}

section.panel h2 {
  font-size: 1.7rem;
  margin-bottom: 20px;
  color: #ffffff;
}

section.panel p {
  margin-bottom: 12px;
}

/* ===== Main box (title / mascot+text) ===== */
.main-title {
  text-align: center;
  margin-bottom: 28px;
}

.main-title h1 {
  font-size: 2.6rem;
}

.main-title p {
  margin-top: 8px;
  font-size: 1.05rem;
  opacity: 0.9;
}

.divider {
  height: 1px;
  margin: 28px 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.main-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.main-text p {
  margin-bottom: 4px;
}

.welcome-span {
  font-weight: 700;
  font-size: 1.2rem;
}

.mascot-row {
  display: flex;
  justify-content: center;
  margin: 0 0 32px;
}

.mascot-image-container {
  position: relative;
  display: inline-block;
  /* Let the 560px carousel shrink on narrow screens instead of overflowing */
  min-width: 0;
  max-width: 100%;
}

.speech-bubble-container {
  position: absolute;
  top: -16px;
  right: -16px;
  max-width: 220px;
  z-index: 2;
}

.speech-bubble {
  background: rgba(255,255,255,0.95);
  color: #06263f;
  text-shadow: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  position: relative;
}

.speech-bubble:after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -8px;
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: rgba(255,255,255,0.95) transparent transparent transparent;
}

@media (max-width: 700px) {
  .speech-bubble-container {
    position: static;
    max-width: none;
    margin-bottom: 10px;
  }

  .speech-bubble:after {
    display: none;
  }

  .mascot-row {
    flex-direction: column;
    align-items: center;
  }
}

/* ===== Dictionary-style definition block ===== */
.dictionary-entry {
  text-align: left;
}

.word-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.word-row .word {
  font-size: 1.6rem;
  font-weight: 700;
  font-style: italic;
}

.word-row .pos {
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.8;
}

.pronunciation {
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.85;
  margin: 6px 0 16px;
}

.definition-list {
  margin: 0 0 16px 20px;
}

.definition-list li {
  margin-bottom: 8px;
}

.examples {
  margin: 8px 0 0 20px;
  font-style: italic;
  opacity: 0.85;
  font-size: 0.92rem;
}

.examples li {
  margin-bottom: 4px;
}

.dictionary-note {
  border-top: 1px solid rgba(255,255,255,0.25);
  padding-top: 16px;
  margin-top: 4px;
  font-size: 0.95rem;
}

/* ===== Resume page ===== */
.resume-content {
  text-align: left;
}

.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}

.resume-header h2 {
  font-size: 1.4rem;
}

.resume-header p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.resume-section {
  margin-top: 28px;
}

.resume-content > .resume-section:first-child {
  margin-top: 0;
}

.resume-section h3 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

.resume-entry {
  margin-bottom: 16px;
}

.resume-entry-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-entry-row .date {
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.85;
}

.resume-entry .org {
  font-style: italic;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 6px;
}

.resume-entry ul {
  margin: 0;
  padding-left: 20px;
}

.resume-entry ul li {
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.awards-list {
  padding-left: 20px;
}

.awards-list li {
  margin-bottom: 6px;
}

.skills-list p {
  margin-bottom: 8px;
}

.testimonial {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.testimonial:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.testimonial .quote {
  margin-top: 8px;
  font-style: italic;
  line-height: 1.65;
}

.download-btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #06263f;
  text-shadow: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(130,215,220,0.55) 100%);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow:
    0 6px 16px rgba(10,60,90,0.25),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.download-btn:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(110,205,215,0.65) 100%);
}

/* ===== Content page: category filters ===== */
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.7);
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(170,220,240,0.35) 100%);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0a2540;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.filter-btn.active {
  background: linear-gradient(180deg, rgba(120,225,235,0.9) 0%, rgba(60,170,200,0.85) 100%);
  color: #06263f;
  border-color: rgba(255,255,255,0.9);
}

/* ===== Content grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
  align-items: start;
}

.card {
  text-decoration: none;
  color: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15,45,65,0.7) 0%, rgba(8,30,50,0.6) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow:
    0 6px 18px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

.card .instagram-media {
  margin: 0 auto !important;
  width: 100% !important;
  border-radius: 0 0 18px 18px;
}

.card .video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.card .video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0 0 18px 18px;
}

.card .title {
  padding: 12px 14px 14px;
  font-size: 0.95rem;
  font-weight: 600;
}

.card .category-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  padding: 12px 14px 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===== Gallery (masonry grid + lightbox) ===== */
.masonry-grid {
  column-count: 3;
  column-gap: 16px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.masonry-item img {
  display: block;
  width: 100%;
}

@media (max-width: 900px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 560px) {
  .masonry-grid {
    column-count: 1;
  }
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,15,25,0.92);
  z-index: 50;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-img {
  max-width: 88vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.lightbox-caption {
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ffffff;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(15,45,65,0.7);
  border: 1px solid rgba(255,255,255,0.3);
  color: #ffffff;
  cursor: pointer;
}

.lightbox-close {
  top: 24px;
  right: 28px;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* ===== Empty-state placeholder ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  opacity: 0.85;
}

@media (max-width: 700px) {
  section.panel.main-box {
    padding: 32px 20px;
  }
}

@media (max-width: 900px) {
  /* About journey: stack each row and show photos full width */
  .journey-row,
  .journey-row.reverse {
    flex-direction: column;
    align-items: center;
  }

  .journey-text {
    text-align: center;
  }

  .journey-carousel.landscape,
  .journey-carousel.portrait {
    width: 100%;
  }

  .journey-carousel.portrait {
    max-width: 420px;
  }
}

/* ===== Desktop: page is fixed; only the right-hand content column scrolls ===== */
@media (min-width: 901px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .page-shell {
    position: fixed;
    inset: 0;
    margin: 0 auto;
    align-items: stretch;
  }

  /* Sized to always fit (see assets/js/fit-scale.js), so no scrolling here */
  .sidebar-col {
    position: static;
    padding: 32px 0 16px;
    gap: 14px;
  }

  .sidebar {
    gap: 22px;
    padding: 30px 26px;
  }

  .fit-screen .wrapper {
    padding-bottom: 72px;
  }

  .main-content {
    padding-top: 48px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.35) transparent;
  }

  .main-content.fit-screen {
    padding-top: 32px;
  }
}

/* ===== Language toggle (EN / ES, next to the name; see assets/js/i18n.js) ===== */
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: linear-gradient(180deg, rgba(25,60,85,0.6) 0%, rgba(15,45,65,0.5) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
  font: inherit;
  cursor: pointer;
}

.lang-toggle span {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #ffffff;
  opacity: 0.65;
}

html:not([lang="es"]) .lang-toggle [data-lang="en"],
html[lang="es"] .lang-toggle [data-lang="es"] {
  opacity: 1;
  background: linear-gradient(180deg, rgba(90,190,230,0.85) 0%, rgba(50,140,190,0.8) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.lang-toggle:hover span {
  opacity: 1;
}
