/* ============================================
   Page-to-page transitions (native browser feature — no JS).
   Without this, every link tap is a hard reload/flash. With it,
   supporting browsers crossfade the whole page automatically, and any
   element sharing a view-transition-name (below) smoothly moves/resizes
   from its old position into its new one instead of just popping in.
   Unsupported browsers just ignore this — plain instant navigation,
   same as today. ============================================ */
@view-transition {
  navigation: auto;
}

/* ============================================
   T DESIGNS — design tokens
   ============================================ */
:root {
  --bg: #060607;
  --bg-alt: #0c0d0e;
  --surface: #111213;
  --green: #a6ff00;
  --cyan: #22e6e6;
  --teal-deep: #0aa6a6;
  --text: #f5f7f7;
  --muted: #9aa3a3;
  --card-bg: #eeeeee;
  --card-text: #111111;
  --border: #222525;
  --header-bg: rgba(6, 6, 7, 0.92);
  --radius: 6px;
  --max-width: 1400px;
  --font: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

/* Light mode — toggled via [data-theme] on <html>, persisted in
   localStorage (see js/main.js theme toggle). --card-bg/--card-text are
   deliberately left out here: product cards stay light-on-dark-or-light
   the same way in both themes. */
:root[data-theme="light"] {
  --bg: #f4f5f6;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --green: #5b8a00;
  --cyan: #0a8f8f;
  --text: #14171a;
  --muted: #55606a;
  --border: #dde1e3;
  --header-bg: rgba(244, 245, 246, 0.92);
}

/* Personaliza2 gets the T Designs accents swapped (set via [data-site]
   on <html>, see js/main.js) — same two colors, opposite roles, so its
   pages read as a related-but-distinct brand instead of a copy-paste of
   T Designs. Covers both themes since dark/light use different shades. */
:root[data-site="personaliza2"] {
  --green: #22e6e6;
  --cyan: #a6ff00;
}
:root[data-theme="light"][data-site="personaliza2"] {
  --green: #0a8f8f;
  --cyan: #5b8a00;
}

/* Dusheli's accent — a single flat cyan rather than a two-tone
   gradient like the other two brands. Light mode darkens it for
   contrast on a white background. */
:root[data-site="dusheli"] {
  --green: rgb(142, 251, 247);
  --cyan: rgb(142, 251, 247);
}
:root[data-theme="light"][data-site="dusheli"] {
  --green: #0a8f8f;
  --cyan: #0a8f8f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

section { padding: 72px 0; }

.section-heading {
  color: var(--cyan);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  margin: 0 0 40px;
  text-align: center;
}

.eyebrow {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }

.btn-white { background: var(--text); color: var(--bg); }
.btn-dark { background: #000; color: #fff; border: 1px solid var(--border); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--muted);
}
.btn-cyan { background: var(--cyan); color: #04211f; }
.btn-link {
  background: none;
  color: var(--cyan);
  padding: 0;
  font-weight: 600;
}

/* ============================================
   Header / nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.back-home {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.back-home:hover { color: var(--cyan); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  white-space: nowrap;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

/* Fallback for sites with no logo file yet (see brandLogoHtml in
   main.js) — styled text standing in for the wordmark. */
.brand-logo-text {
  font-family: var(--font);
  font-weight: 900;
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.3px;
  background: linear-gradient(100deg, var(--cyan) 0%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--cyan);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
  position: relative;
}
.nav-links a:hover { color: var(--green); }
.nav-links a.active { color: var(--green); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang-select {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cyan);
  font-size: 1.2rem;
  padding: 4px;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}
.theme-toggle:hover { color: var(--cyan); }
.theme-toggle svg { width: 20px; height: 20px; }

.cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--green);
  color: #04211f;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Mobile: hamburger + centered logo + cart, everything
   else (nav links, language, theme) lives in a slide-in sidebar. ---------- */
.nav-overlay,
.nav-drawer,
.nav-drawer-header,
.nav-drawer-links,
.nav-drawer-footer,
.nav-drawer-controls {
  display: none;
}

@media (max-width: 860px) {
  .nav-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
  .nav-toggle { display: block; }
  .nav-left { justify-content: center; }
  .back-home { display: none; }
  .nav-links { display: none; }
  .nav-right .lang-select,
  .nav-right .theme-toggle { display: none; }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .nav-overlay.open { opacity: 1; pointer-events: auto; }

  .nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 82%);
    background: var(--bg-alt);
    border-right: 1px solid var(--border);
    z-index: 201;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
  }
  .nav-drawer.open { transform: translateX(0); }

  .nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav-drawer-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
  }

  .nav-drawer-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 12px;
  }
  .nav-drawer-links a {
    color: var(--cyan);
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 12px;
    border-radius: 4px;
  }
  .nav-drawer-links a:hover,
  .nav-drawer-links a.active { background: var(--surface); color: var(--green); }

  .nav-drawer-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
    border-top: 1px solid var(--border);
  }
  .nav-drawer-back {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  .nav-drawer-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  padding: 60px 0 40px;
  text-align: center;
  overflow: hidden;
}

.hero-shop-now {
  display: inline-block;
  margin-top: 28px;
}

.hero-logo-img {
  width: min(560px, 80%);
  margin: 20px auto;
  /* Tied to --cyan instead of a fixed color so it follows the swapped
     accent palette on Personaliza2 (see [data-site] above) instead of
     always glowing cyan regardless of which brand's page it's on. */
  filter: drop-shadow(0 0 40px color-mix(in srgb, var(--cyan) 25%, transparent));
}

/* Matches the name on each brand's landing-page wedge logo (landing.css)
   — arriving from the landing page now morphs the big centered hero
   logo into place, not the small header one. Scoped per site via
   [data-site] (set in main.js) since both brands share .hero-logo-img. */
:root[data-site="tdesigns"] .hero-logo-img {
  view-transition-name: site-logo;
}
:root[data-site="personaliza2"] .hero-logo-img {
  view-transition-name: personaliza2-logo;
}
:root[data-site="dusheli"] .hero-logo-img {
  view-transition-name: dusheli-logo;
}

.hero-tagline {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--text);
  margin: 24px auto 0;
  max-width: 700px;
}

/* ============================================
   Ticker
   ============================================ */
.ticker-wrap {
  overflow: hidden;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  margin-top: 40px;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 77s linear infinite;
}

.ticker-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 40px;
  color: var(--cyan);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap;
}

.ticker-item::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 1.4rem;
  background: var(--green);
  opacity: 0.6;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   Services
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.service-card { text-align: center; display: block; transition: opacity 0.15s ease; }
.service-card:hover { opacity: 0.85; }

.service-img {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-img img { width: 100%; height: 100%; object-fit: cover; }

.service-caption {
  margin-top: 14px;
  color: var(--cyan);
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 760px) {
  .services-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================
   Placeholder image tiles (no photography yet)
   ============================================ */
.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.75rem;
  text-align: center;
  padding: 10px;
  background: linear-gradient(135deg, #14313a 0%, #0c1620 60%, #08181c 100%);
}
.placeholder-img.light {
  background: linear-gradient(135deg, #dedede 0%, #c9c9c9 100%);
  color: #444;
}
.placeholder-img svg { width: 34px; height: 34px; opacity: 0.85; }
.placeholder-label { font-weight: 600; letter-spacing: 0.02em; }

/* ============================================
   Summer sale / promo banner
   ============================================ */
.promo-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  border-top: 1px solid var(--teal-deep);
  padding-top: 40px;
}

.promo-copy h2 { color: var(--cyan); font-size: 2rem; margin: 0 0 16px; }
.promo-copy p { color: var(--muted); margin: 0 0 24px; }

.promo-img {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
}
.promo-img img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 760px) {
  .promo-banner { grid-template-columns: 1fr; }
}

/* ============================================
   Product grid / carousel
   ============================================ */
.shop-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 32px;
}
.shop-section-head h2 { color: var(--cyan); font-size: clamp(1.4rem, 4vw, 2rem); margin: 0; }

.category-label {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 20px;
}

.carousel-row {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: var(--bg);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.carousel-arrow.prev { left: -12px; }
.carousel-arrow.next { right: -12px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.product-card {
  flex: 0 0 250px;
  scroll-snap-align: start;
  background: var(--card-bg);
  color: var(--card-text);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-img-wrap { aspect-ratio: 1; overflow: hidden; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.product-info { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.product-name { font-weight: 600; font-size: 0.95rem; }
.product-price { color: #333; font-size: 0.95rem; }

.product-add {
  margin-top: 8px;
  background: var(--cyan);
  color: #04211f;
  border: none;
  border-radius: 4px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.product-add:hover { opacity: 0.9; }

/* ============================================
   Instagram carousel — continuously auto-scrolls,
   pauses on hover, loops seamlessly (track is rendered twice).
   ============================================ */
.insta-scroll {
  overflow: hidden;
}
.insta-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: insta-scroll 50s linear infinite;
}
/* Only pause-on-hover on devices that truly support hover (mouse) —
   on touchscreens :hover sticks after a tap with no matching "unhover"
   event, which would freeze the carousel permanently after one touch. */
@media (hover: hover) {
  .insta-scroll:hover .insta-track {
    animation-play-state: paused;
  }
}
@keyframes insta-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.insta-tile {
  flex: 0 0 340px;
  aspect-ratio: 1;
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.insta-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.insta-tile:hover img { transform: scale(1.05); }
@media (max-width: 760px) {
  .insta-tile { flex-basis: 260px; }
}

/* ============================================
   Crafted for quality band
   ============================================ */
.quality-band {
  background: linear-gradient(180deg, #06282b 0%, #0aa6a6 100%);
  padding: 64px 0;
}
.quality-band h2 { color: var(--cyan); font-size: 2.2rem; margin: 0 0 20px; }
.quality-band p.lead {
  color: #d7fbfb;
  max-width: 640px;
  font-size: 1.05rem;
  margin: 0 0 40px;
}
.quality-band-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 40px;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 24px;
}
.quality-band-bottom p {
  color: rgba(255,255,255,0.85);
  max-width: 420px;
  font-size: 0.9rem;
  margin: 0;
}
@media (max-width: 760px) {
  .quality-band-bottom { flex-direction: column; align-items: flex-start; gap: 20px; }
  .quality-band-bottom p { max-width: none; }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--bg);
  padding: 36px 0;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--cyan), #b6009e) 1;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-phone { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--cyan); }

/* ============================================
   Cart drawer
   ============================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100%);
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.cart-header h3 { margin: 0; color: var(--cyan); }
.cart-close { background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.cart-empty { color: var(--muted); text-align: center; margin-top: 40px; }

.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item-img { width: 60px; height: 60px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-info .name { font-size: 0.9rem; font-weight: 600; }
.cart-item-info .price { font-size: 0.85rem; color: var(--muted); }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 22px; height: 22px;
  border-radius: 4px;
  cursor: pointer;
}
.cart-item-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.8rem; }

.cart-footer { border-top: 1px solid var(--border); padding: 20px 24px; }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 16px; }
.cart-checkout { width: 100%; text-align: center; }
.cart-note { color: var(--muted); font-size: 0.78rem; margin-top: 10px; text-align: center; }

.sinpe-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.sinpe-label { color: var(--cyan); font-weight: 700; font-size: 0.85rem; margin: 0 0 10px; }
.sinpe-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
  padding: 4px 0;
}
.sinpe-row strong { color: var(--text); }
.sinpe-value { display: flex; align-items: center; gap: 8px; }
.sinpe-copy {
  background: none;
  border: 1px solid var(--border);
  color: var(--cyan);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.sinpe-copy:hover { border-color: var(--cyan); }
.sinpe-note { color: var(--muted); font-size: 0.76rem; margin: 10px 0 0; line-height: 1.4; }

/* ============================================
   Empty states (catalog not filled in yet)
   ============================================ */
.empty-state {
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state p { margin: 0 0 20px; }

/* ============================================
   Generic page hero (sub-pages)
   ============================================ */
.page-hero {
  padding: 60px 0 20px;
  text-align: center;
}
.page-hero h1 { color: var(--cyan); font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 12px; }
.page-hero p { color: var(--muted); max-width: 600px; margin: 0 auto; }

/* ============================================
   Service list page
   ============================================ */
.service-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.service-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.service-list-card h3 { color: var(--green); margin: 0 0 10px; font-size: 1.2rem; }
.service-list-card p { color: var(--muted); margin: 0 0 16px; font-size: 0.92rem; }
@media (max-width: 760px) {
  .service-list { grid-template-columns: 1fr; }
}

/* ============================================
   About page
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-grid img, .about-grid .placeholder-img { border-radius: var(--radius); }
.about-copy h2 { color: var(--cyan); margin-top: 0; }
.about-copy p { color: var(--muted); }
.tool-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.tool-chip {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
}
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Portfolio gallery
   ============================================ */
.portfolio-filters {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}
.filter-btn.active { border-color: var(--cyan); color: var(--cyan); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.portfolio-item { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.portfolio-item > img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.portfolio-item:hover > img { transform: scale(1.05); }
.portfolio-grid .empty-state { grid-column: 1 / -1; }

/* Hovering a grid tile pops the full, uncropped image up in the center
   of the screen — the grid itself always crops to a square. */
.portfolio-preview {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  background: rgba(3, 4, 5, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 500;
}
.portfolio-item:hover .portfolio-preview,
.portfolio-item.active .portfolio-preview {
  opacity: 1;
  pointer-events: auto;
}
.portfolio-preview img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.portfolio-preview-close {
  display: none;
}
@media (max-width: 760px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-preview-close {
    display: flex;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #fff;
    font-size: 1.3rem;
  }
}

/* ============================================
   Toast
   ============================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--cyan);
  color: #04211f;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
