:root {
    --bg-base: #0a0c11;
    --blob-1: rgba(124,140,255,0.22);
    --blob-2: rgba(196,150,255,0.17);
    --blob-3: rgba(70,200,190,0.11);
    --surface: rgba(22,25,33,0.72);
    --rail-line: rgba(255,255,255,0.08);
    --ink: #edeff4;
    --muted: #8b909c;
    --faint: #5d626e;
    --accent: #8b9dff;
    --accent-2: #c4a5ff;
    --accent-soft: rgba(139,157,255,0.14);
    --hero-glow: rgba(139,157,255,0.16);
    --shadow: rgba(0,0,0,0.45);
    --ghost: rgba(255,255,255,0.055);
    --tip-bg: #1b1e27;
    --input-bg: rgba(255,255,255,0.04);
  }
  [data-theme="light"] {
    --bg-base: #f6f7fb;
    --blob-1: rgba(90,107,216,0.09);
    --blob-2: rgba(150,120,230,0.07);
    --blob-3: rgba(80,180,170,0.05);
    --surface: rgba(255,255,255,0.78);
    --rail-line: rgba(20,24,40,0.09);
    --ink: #1a1d26;
    --muted: #6a6f7d;
    --faint: #a3a8b4;
    --accent: #5a6bd8;
    --accent-2: #8f6fe0;
    --accent-soft: rgba(90,107,216,0.10);
    --hero-glow: rgba(90,107,216,0.10);
    --shadow: rgba(40,50,90,0.10);
    --ghost: rgba(26,29,38,0.06);
    --tip-bg: #ffffff;
    --input-bg: #ffffff;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }

  .site {
    font-family: 'Nunito', sans-serif;
    color: var(--ink);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    display: grid;
    grid-template-columns: 264px 1fr;
    min-height: 100vh;
    --rail-w: 264px; /* live sidebar width — used to position the sticky top bar */
    transition: grid-template-columns 0.38s cubic-bezier(.4,0,.2,1), background 0.5s ease, color 0.4s ease;
  }
  .site.nav-collapsed { grid-template-columns: 78px 1fr; --rail-w: 78px; }
  .site::before {
    content: "";
    position: fixed;
    inset: -25%;
    z-index: -1;
    background:
      radial-gradient(38% 44% at 20% 16%, var(--blob-1), transparent 60%),
      radial-gradient(44% 48% at 84% 82%, var(--blob-2), transparent 60%),
      radial-gradient(36% 40% at 90% 10%, var(--blob-3), transparent 60%);
    filter: blur(24px);
    animation: drift 20s ease-in-out infinite alternate;
  }
  @keyframes drift {
    from { transform: translate3d(0,0,0) scale(1); }
    to   { transform: translate3d(2.5%, -2.5%, 0) scale(1.1); }
  }

  /* ---------- Sidebar ---------- */
  .rail {
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: start;
    padding: 14px 26px 40px; /* top 14px aligns the menu button with the topbar icons */
    display: flex;
    flex-direction: column;
    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-right: 1px solid var(--rail-line);
    box-shadow: 1px 0 40px var(--shadow);
    transition: padding 0.38s cubic-bezier(.4,0,.2,1), background 0.5s ease, border-color 0.4s ease;
  }

  .brand { display: flex; align-items: center; gap: 13px; }
  .monogram {
    width: 44px; height: 44px;
    border-radius: 14px;
    display: grid; place-items: center;
    font-weight: 900; font-size: 18px;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 8px 22px -8px var(--accent);
    flex-shrink: 0;
  }
  .monogram svg { width: 23px; height: 23px; }
  .brand-name { line-height: 1.18; }
  .brand-name b { display: block; font-weight: 800; font-size: 16px; letter-spacing: 0.2px; }
  .brand-name small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); letter-spacing: 1.2px; text-transform: uppercase; margin-top: 2px; }

  .accent-line {
    height: 1px; margin: 30px 2px 26px;
    background: linear-gradient(90deg, var(--accent-soft), transparent);
  }

  .nav { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
  .nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 14.5px;
    letter-spacing: 0.2px;
    padding: 12px 16px;
    border-radius: 12px;
    transition: color 0.25s ease, background 0.3s ease, transform 0.25s ease;
  }
  .nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
  .nav a:hover { color: var(--ink); background: var(--accent-soft); transform: translateX(2px); }
  .nav a.active { color: var(--ink); background: var(--accent-soft); }
  .nav a .label {
    white-space: nowrap;
    transition: opacity 0.2s ease, max-width 0.35s ease;
    max-width: 160px; opacity: 1; overflow: hidden;
  }

  /* menu toggle */
  .nav-toggle {
    align-self: flex-start;
    width: 42px; height: 42px; margin-bottom: 22px;
    border-radius: 12px;
    border: 1px solid var(--rail-line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: grid; place-items: center;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, align-self 0.3s ease;
  }
  .nav-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
  .nav-toggle svg { width: 20px; height: 20px; }

  /* ---- Collapsed state ---- */
  .site.nav-collapsed .rail { padding-left: 16px; padding-right: 16px; align-items: center; }
  .site.nav-collapsed .nav { align-items: center; }
  .site.nav-collapsed .nav a { justify-content: center; gap: 0; padding: 12px; width: 46px; }
  .site.nav-collapsed .nav a:hover { transform: none; }
  .site.nav-collapsed .nav a .label { max-width: 0; opacity: 0; }
  .site.nav-collapsed .nav-toggle { align-self: center; }
  .site.nav-collapsed .rail-foot { align-items: center; }
  .site.nav-collapsed .socials { flex-direction: column; gap: 8px; }

  /* tooltip when collapsed */
  .site.nav-collapsed .nav a::after {
    content: attr(data-label);
    position: absolute; left: calc(100% + 16px); top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: var(--tip-bg); color: var(--ink);
    padding: 7px 11px; border-radius: 9px;
    font-size: 13px; font-weight: 700; white-space: nowrap;
    border: 1px solid var(--rail-line);
    box-shadow: 0 12px 30px -10px var(--shadow);
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 30;
  }
  .site.nav-collapsed .nav a:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

  .rail-foot {
    margin-top: auto; padding-top: 26px;
    border-top: 1px solid var(--rail-line);
    display: flex; flex-direction: column; gap: 16px;
  }
  .loc { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 12.5px; color: var(--muted); letter-spacing: 0.4px; }
  .dot { width: 7px; height: 7px; border-radius: 50%; background: #4ad6a4; box-shadow: 0 0 0 0 rgba(74,214,164,0.5); animation: pulse 2.4s infinite; }
  @keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(74,214,164,0.45);} 70%{box-shadow:0 0 0 7px rgba(74,214,164,0);} 100%{box-shadow:0 0 0 0 rgba(74,214,164,0);} }
  .socials { display: flex; gap: 10px; }
  .socials a {
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center;
    color: var(--muted);
    border: 1px solid var(--rail-line);
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
  }
  .socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); background: var(--accent-soft); }
  .socials svg { width: 17px; height: 17px; }

  /* ---------- Main / pages ---------- */
  /* flex column so the footer sticks to the viewport bottom on short pages */
  .main { position: relative; min-height: 100vh; display: flex; flex-direction: column; }

  .page { display: none; }
  .page.active { display: block; flex: 1 0 auto; animation: pageIn 0.55s ease both; }
  @keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

  .page.home.active {
    display: flex; align-items: center; justify-content: center;
    min-height: 0; flex: 1 0 auto; padding: 48px; position: relative; overflow: hidden;
  }
  .page.home::before {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 620px; height: 620px; border-radius: 50%;
    background: radial-gradient(circle, var(--hero-glow), transparent 68%);
    transform: translate(-50%,-50%);
    animation: breathe 9s ease-in-out infinite;
    pointer-events: none;
  }
  @keyframes breathe {
    0%,100% { transform: translate(-50%,-50%) scale(1); opacity: 0.85; }
    50%     { transform: translate(-50%,-50%) scale(1.12); opacity: 1; }
  }

  /* ---- Sticky top bar: hidden at page top, slides in on scroll (all pages with scrollable content) ---- */
  .tb-bar {
    position: fixed; top: 0; left: var(--rail-w); right: 0; height: 72px; z-index: 25;
    display: flex; align-items: center; padding: 0 36px;
    background: var(--surface); border-bottom: 1px solid var(--rail-line);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px -22px var(--shadow);
    opacity: 0; transform: translateY(-100%); pointer-events: none;
    transition: opacity .28s ease, transform .38s cubic-bezier(.4,0,.2,1), left .38s cubic-bezier(.4,0,.2,1);
  }
  .site.scrolled .tb-bar { opacity: 1; transform: none; pointer-events: auto; }
  .tb-bar-title {
    font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 220px);
    opacity: 0; transform: translateX(-10px);
    transition: opacity .3s ease .06s, transform .34s cubic-bezier(.4,0,.2,1) .06s;
  }
  .site.scrolled .tb-bar-title { opacity: 1; transform: none; }

  /* ---- top action bar (Call · Search · Save · Theme) ---- */
  .topbar {
    position: fixed; top: 14px; right: 36px; z-index: 30;
    display: flex; align-items: center; gap: 10px;
  }
  .tb-btn {
    width: 44px; height: 44px; border-radius: 13px;
    border: 1px solid var(--rail-line); background: var(--surface);
    backdrop-filter: blur(10px); color: var(--muted); cursor: pointer;
    display: grid; place-items: center; position: relative;
    transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
  }
  .tb-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
  .tb-btn svg { width: 19px; height: 19px; }
  .tb-badge {
    position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800;
    display: grid; place-items: center; line-height: 1; box-shadow: 0 4px 10px -3px var(--accent);
  }
  /* theme toggle keeps its sun/moon swap; positioned by .topbar now */
  .toggle { transition: color .25s ease, border-color .25s ease, background .25s, transform .5s ease; }
  .toggle:active { transform: rotate(180deg); }
  .toggle svg { width: 19px; height: 19px; }
  .toggle .moon { display: none; }
  [data-theme="light"] .toggle .sun { display: none; }
  [data-theme="light"] .toggle .moon { display: block; }

  .hero { position: relative; text-align: center; }
  .hero .name {
    font-weight: 200;
    font-size: clamp(46px, 8.5vw, 100px);
    line-height: 1.02;
    letter-spacing: -1px;
    color: var(--ink);
  }

  .role-wrap {
    margin-top: 30px; height: 2em;
    display: flex; align-items: center; justify-content: center;
  }
  .role {
    font-weight: 800;
    font-size: clamp(15px, 2.6vw, 21px);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--accent);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  /* ---------- About page (elegant, theme-matched) ---------- */
  .about { padding: 92px 60px 80px; }
  .about-wrap { max-width: 1000px; margin: 0 auto; }
  .about-head { text-align: center; margin-bottom: 60px; }
  .about-head .ghost {
    font-weight: 800; line-height: 0.9;
    font-size: clamp(56px, 11vw, 116px);
    letter-spacing: -2px;
    color: var(--ghost);
    user-select: none;
  }
  .about-head .pill {
    display: inline-block; position: relative; margin-top: -26px;
    padding: 11px 26px; border-radius: 999px;
    background: var(--accent);
    color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 0.3px;
    box-shadow: 0 16px 36px -12px var(--accent);
  }
  .about-grid {
    display: grid; grid-template-columns: 360px 1fr; gap: 50px;
    align-items: start;
  }
  /* photo — same size, sharp corners to match the site, subtle accent frame */
  .about-photo {
    border-radius: 0; overflow: hidden; position: relative;
    border: 1px solid var(--rail-line);
    box-shadow: 0 36px 70px -28px var(--shadow);
  }
  .about-photo::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
    background: var(--accent);
  }
  .about-photo img { display: block; width: 100%; height: auto; }
  .about-text { padding-top: 4px; }
  .about-text h3 {
    font-weight: 800; font-size: clamp(23px, 3vw, 30px);
    color: var(--ink); margin-bottom: 22px; letter-spacing: -0.4px;
    position: relative; padding-bottom: 18px; line-height: 1.2;
  }
  .about-text h3::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px;
    background: var(--accent);
  }
  .about-text p, .about-foot {
    color: var(--muted); font-weight: 500;
    font-size: 16px; line-height: 1.85; margin-bottom: 18px;
  }
  .about-foot {
    margin-top: 30px; padding: 0; position: relative; font-size: 15.5px;
  }
  .about-text p .hl { color: var(--accent); font-weight: 700; }

  /* small accent eyebrow used above section titles */
  .about .sec-eyebrow {
    display: inline-block; font-size: 12px; font-weight: 800;
    letter-spacing: 2.4px; text-transform: uppercase; color: var(--accent);
    margin-bottom: 9px;
  }

  /* ---------- Contact page ---------- */
  .contact { padding: 92px 60px 80px; }
  .contact-wrap { max-width: 1040px; margin: 0 auto; }
  .contact-intro {
    text-align: center; max-width: 640px; margin: 0 auto 52px;
    color: var(--muted); font-weight: 500; font-size: 16px; line-height: 1.7;
  }
  /* two lines on wider screens; on small screens the break collapses and the text flows */
  @media (max-width: 620px) { .contact-intro .ci-break { display: none; } }
  .contact-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch;
  }
  .contact-info { display: flex; }
  .contact-info .gt-card { width: 100%; display: flex; flex-direction: column; }
  .contact-info .gt-card .gt-list { flex: 1; justify-content: center; }

  .info-card {
    display: flex; align-items: center; gap: 15px;
    padding: 16px 18px; border-radius: 15px;
    border: 1px solid var(--rail-line); background: var(--surface);
    text-decoration: none; margin-bottom: 13px;
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
  }
  .info-card:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateX(3px); }
  .info-ico {
    width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent);
  }
  .info-ico svg { width: 21px; height: 21px; }
  .info-meta { display: flex; flex-direction: column; }
  .info-meta .k { font-size: 11.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
  .info-meta .v { font-size: 15.5px; font-weight: 700; color: var(--ink); margin-top: 3px; }

  .info-socials { display: flex; gap: 10px; margin-top: 20px; }
  .info-socials a {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; color: var(--muted);
    border: 1px solid var(--rail-line); background: var(--surface);
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
  }
  .info-socials a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
  .info-socials svg { width: 19px; height: 19px; }

  /* ---- "Get in touch" card (Phone / WhatsApp / Email) ---- */
  .gt-card {
    position: relative; overflow: hidden;
    background:
      radial-gradient(120% 80% at 0% 0%, var(--accent-soft), transparent 55%),
      var(--surface);
    border: 1px solid var(--rail-line);
    border-radius: 20px; padding: 34px 30px;
    box-shadow: 0 30px 60px -38px var(--shadow);
  }
  .gt-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #fff)); }
  .gt-title { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
  .gt-sub { color: var(--muted); font-weight: 500; font-size: 14.5px; line-height: 1.65; margin: 10px 0 26px; }
  .gt-list { display: flex; flex-direction: column; gap: 14px; }
  .gt-item {
    display: flex; align-items: center; gap: 15px; text-decoration: none;
    padding: 12px 14px; border-radius: 14px; border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
  }
  .gt-item:hover { background: var(--surface); border-color: var(--rail-line); transform: translateX(4px); }
  .gt-ico {
    width: 46px; height: 46px; border-radius: 50%; flex: 0 0 46px;
    display: grid; place-items: center; background: var(--accent); color: #fff;
    box-shadow: 0 10px 22px -12px var(--accent); transition: transform .2s ease;
  }
  .gt-ico svg { width: 21px; height: 21px; }
  .gt-item:hover .gt-ico { transform: scale(1.08) rotate(-4deg); }
  .gt-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .gt-meta b { font-size: 15.5px; font-weight: 800; color: var(--ink); }
  .gt-meta span { font-size: 14px; color: var(--muted); font-weight: 600; word-break: break-word; }
  .gt-item:hover .gt-meta span { color: var(--accent); }
  .gt-socials { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--rail-line); }

  .contact-form {
    background: var(--surface); border: 1px solid var(--rail-line);
    border-radius: 20px; padding: 30px;
    box-shadow: 0 30px 60px -34px var(--shadow);
  }
  .field { margin-bottom: 18px; }
  .field.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .field label {
    display: block; font-size: 12px; font-weight: 700;
    letter-spacing: 0.5px; text-transform: uppercase;
    color: var(--muted); margin-bottom: 8px;
  }
  .field input, .field textarea {
    width: 100%; padding: 13px 15px; border-radius: 12px;
    background: var(--input-bg); border: 1px solid var(--rail-line);
    color: var(--ink); font-family: inherit; font-size: 15px; font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .field input::placeholder, .field textarea::placeholder { color: var(--faint); font-weight: 500; }
  .field input:focus, .field textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
  }
  .field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
  .form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  /* outlined style to match the Book page "Post a Review" button (same size, different look) */
  .send-btn {
    width: 100%; margin-top: 4px; padding: 14px 26px;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    border: 1px solid var(--rail-line); border-radius: 0; cursor: pointer;
    background: var(--surface);
    color: var(--accent); font-family: inherit; font-weight: 800; font-size: 15px; letter-spacing: 0.3px;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  }
  .send-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
  .send-btn:active { background: var(--accent-soft); }
  .form-status { margin-top: 14px; text-align: center; font-size: 14px; font-weight: 700; color: var(--accent); min-height: 18px; opacity: 0; transition: opacity 0.3s ease; }
  .form-status.show { opacity: 1; }

  /* ---------- Placeholder pages ---------- */
  .placeholder {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; padding: 48px;
  }
  .placeholder .ph-title {
    font-weight: 800; font-size: clamp(34px, 6vw, 56px);
    color: var(--ink); letter-spacing: -1px;
  }
  .placeholder .ph-sub { margin-top: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0.5px; }

  /* entrance */
  .reveal { opacity: 0; transform: translateY(18px); }
  .reveal.in { animation: rise 0.85s cubic-bezier(.2,.7,.2,1) both; }
  .reveal.in.d1 { animation-delay: 0.10s; }
  .reveal.in.d2 { animation-delay: 0.22s; }
  .reveal.in.d3 { animation-delay: 0.34s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

  /* ---------- Mobile ---------- */
  /* desktop: hamburger + backdrop hidden */
  .mobile-menu-btn { display: none; }
  .nav-backdrop { display: none; }

  @media (max-width: 900px) {
    .site, .site.nav-collapsed { grid-template-columns: 1fr; --rail-w: 0px; }
    .nav-toggle { display: none; }
    /* sticky bar spans full width; title clears the hamburger button */
    .tb-bar { height: 60px; padding: 0 12px 0 66px; }
    .tb-bar-title { font-size: 16px; max-width: calc(100% - 150px); }
    /* off-canvas drawer sidebar (left-based, robust) */
    .rail, .site.nav-collapsed .rail {
      position: fixed; top: 0; bottom: 0; height: 100vh; width: 268px; max-width: 84vw; left: -300px; right: auto;
      flex-direction: column; align-items: stretch; padding: 26px 20px; overflow-y: auto;
      transition: left .34s cubic-bezier(.4,0,.2,1); z-index: 200; box-shadow: none; transform: none;
    }
    .site.nav-open .rail, .site.nav-open.nav-collapsed .rail { left: 0 !important; box-shadow: 0 0 80px -10px rgba(0,0,0,.55); }
    .rail-foot { display: flex; }
    .nav, .site.nav-collapsed .nav { flex-direction: column; align-items: stretch; gap: 5px; margin-top: 10px; }
    .nav a, .site.nav-collapsed .nav a { padding: 12px 16px; font-size: 15px; width: auto; gap: 14px; justify-content: flex-start; transform: none; }
    .nav a svg { width: 19px; height: 19px; }
    .nav a .label, .site.nav-collapsed .nav a .label { max-width: 220px; opacity: 1; }
    .site.nav-collapsed .nav a::after { display: none; }

    /* hamburger button (top-left) */
    .mobile-menu-btn {
      display: grid; position: fixed; top: 13px; left: 14px; z-index: 60;
      width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--rail-line);
      background: var(--surface); backdrop-filter: blur(12px); color: var(--ink); place-items: center; cursor: pointer;
      transition: color .2s, border-color .2s, background .2s;
    }
    .mobile-menu-btn:hover { color: var(--accent); border-color: var(--accent); }
    .mobile-menu-btn svg { width: 22px; height: 22px; }
    .site.nav-open .mobile-menu-btn { opacity: 0; pointer-events: none; }

    /* backdrop */
    .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(8,10,15,.5); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 150; }
    .site.nav-open .nav-backdrop { opacity: 1 !important; pointer-events: auto !important; }

    /* page paddings clear the fixed top buttons */
    .main { min-height: 100dvh; }
    .page.home.active { padding: 40px 22px; }
    .about, .contact, .resume, .legal { padding: 74px 20px 70px; }
    .about-grid { grid-template-columns: 1fr; gap: 28px; }
    .about-photo { max-width: 320px; margin: 0 auto; }
    .contact-grid { grid-template-columns: 1fr; gap: 22px; }
    .contact-info { display: block; }
    .form-row2 { grid-template-columns: 1fr; }
    .contact-form { padding: 22px; }
    .topbar { top: 12px; right: 12px; gap: 6px; }
    .tb-btn { width: 38px; height: 38px; border-radius: 11px; }
    /* search bar drops full-width below the topbar on phones */
    .tb-searchbar { top: 58px; right: 12px; left: 12px; width: auto; transform-origin: top right; transform: translateY(-10px) scale(.99); }
    .tb-searchbar.open { transform: none; }
    .site-footer { position: static; }
  }

  /* ---- Fine phone tuning for inner pages ---- */
  @media (max-width: 560px) {
    .about, .contact, .resume, .legal { padding: 58px 16px 54px; }
    .about-head { margin-bottom: 38px; }
    .about-head .ghost { font-size: clamp(42px, 15vw, 66px); letter-spacing: -1px; }
    .about-head .pill { margin-top: -14px; padding: 9px 20px; font-size: 13.5px; }
    .about-text h3 { font-size: 21px; margin-bottom: 16px; padding-bottom: 14px; }
    .about-text p, .about-foot { font-size: 15px; line-height: 1.75; margin-bottom: 15px; }
    .contact-intro { font-size: 15px; margin-bottom: 30px; }
    .contact-form { padding: 18px; }
    .field input, .field textarea, .send-btn { font-size: 15px; }
    .gt-title { font-size: 20px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .reveal, .reveal.in, .page.active { animation: none; opacity: 1; transform: none; }
    .page.home::before, .dot, .site::before { animation: none; }
    .role { transition: none; }
  }

  /* ====== Rotating beam border on hover — boxes, images & buttons ====== */
  @property --beam-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
  }

  .site .bcard,
  .site .svc-card,
  .site .hof-img,
  .site .award-img,
  .site .about-photo,
  .site .rv-post-btn,
  .site .svc-side-btn,
  .site .book-contact-btn,
  .site .socials a,
  .site .info-socials a,
  .site .blog-pager button { position: relative; }

  .site .socials a::before,
  .site .info-socials a::before,
  .site .bcard::before,
  .site .svc-card::before,
  .site .hof-img::before,
  .site .award-img::before,
  .site .about-photo::before,
  .site .rv-post-btn::before,
  .site .svc-side-btn::before,
  .site .book-contact-btn::before,
  .site .blog-pager button::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;                       /* border thickness */
    background: conic-gradient(from var(--beam-angle),
      transparent 0deg, transparent 210deg,
      var(--beam-color, var(--accent)) 285deg, #ffffff 320deg, var(--beam-color, var(--accent)) 350deg,
      transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
    z-index: 3;
  }

  .site .bcard:hover::before,
  .site .svc-card:hover::before,
  .site .hof-img:hover::before,
  .site .award-img:hover::before,
  .site .about-photo:hover::before,
  .site .rv-post-btn:hover::before,
  .site .svc-side-btn:hover::before,
  .site .book-contact-btn:hover::before,
  .site .socials a:hover::before,
  .site .info-socials a:hover::before,
  .site .blog-pager button:hover::before {
    opacity: 1;
    animation: beam-spin 2.2s linear infinite;
  }

  /* per-platform beam colours (all other beams stay accent) */
  .site .socials a[aria-label="LinkedIn"], .site .info-socials a[aria-label="LinkedIn"] { --beam-color: #0077b5; }
  .site .socials a[aria-label="Instagram"], .site .info-socials a[aria-label="Instagram"] { --beam-color: #fd1d1d; }

  @keyframes beam-spin { to { --beam-angle: 360deg; } }

  @media (prefers-reduced-motion: reduce) {
    .site .bcard:hover::before,
    .site .svc-card:hover::before,
    .site .hof-img:hover::before,
    .site .award-img:hover::before,
    .site .about-photo:hover::before,
    .site .rv-post-btn:hover::before,
    .site .svc-side-btn:hover::before,
    .site .book-contact-btn:hover::before,
    .site .hof-arrow:hover::before,
    .site .blog-pager button:hover::before { animation: none; }
  }

  /* ====== Search bar — appears inline at the topbar level, next to the icons ====== */
  .tb-searchbar {
    position: fixed; top: 14px; right: 200px; z-index: 36; width: min(440px, calc(100vw - 260px));
    opacity: 0; transform: translateX(28px); transform-origin: right center; pointer-events: none;
    transition: opacity .22s ease, transform .34s cubic-bezier(.34,1.2,.45,1);
  }
  [data-search="open"] .tb-searchbar { opacity: 1; transform: none; pointer-events: auto; }
  .tb-searchbar-in {
    display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 18px;
    background: var(--surface); border: 1px solid var(--accent); border-radius: 13px;
    box-shadow: 0 0 0 3px var(--accent-soft), 0 22px 48px -26px var(--shadow); backdrop-filter: blur(18px);
  }
  .tb-sb-ic { width: 19px; height: 19px; color: var(--muted); flex: 0 0 19px; }
  .tb-search-input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink); }
  .tb-search-input::placeholder { color: var(--faint); font-weight: 500; }
  [data-search="open"] .tb-search-btn { opacity: 0; pointer-events: none; }
  .tb-search-btn { transition: opacity .2s ease, color .25s, border-color .25s, background .25s; }
  .tb-results {
    position: absolute; top: calc(100% + 9px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--rail-line); border-radius: 15px;
    box-shadow: 0 34px 70px -30px rgba(0,0,0,.55); overflow: hidden auto; max-height: 58vh; padding: 6px;
    backdrop-filter: blur(22px); z-index: 40;
  }
  .tb-results:empty { display: none; }
  .ss-group { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); padding: 12px 12px 6px; }
  .ss-row { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; border: none; background: none; cursor: pointer; padding: 11px 12px; border-radius: 12px; font-family: inherit; }
  .ss-row:hover { background: var(--accent-soft); }
  .ss-row-ic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: grid; place-items: center; background: var(--input-bg); color: var(--accent); }
  .ss-row-ic svg { width: 19px; height: 19px; }
  .ss-row-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .ss-row-tx b { font-size: 14.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ss-row-tx small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
  .ss-rm { margin-left: auto; flex: 0 0 26px; color: var(--faint); font-size: 13px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; cursor: pointer; }
  .ss-rm:hover { background: var(--accent-soft); color: var(--accent); }
  .ss-empty { color: var(--muted); font-weight: 600; padding: 30px 16px; text-align: center; }
