
  /*
    SHARED STYLES for every page. Page-specific styles live in
    modelling.css, japanese.css, about.css (also used by experience.html)
    and bunnies.css.

    IMAGES used here (smaller web copies live in images/web/):
      images/web/hero.jpg     big character art at the top of the home page
      images/web/chibi.png    chibi in the home page About section
      images/web/banner.jpg   cherry blossom banner (home page, Experience, Japanese)
      Portfolio tiles: 1 = school outfit, 2 = picture straight from Booth,
      3 & 4 = gradient placeholders (a big glowing character until a picture is added)
  */
  :root {
    --bg: #1d1530;
    --bg2: #2a1f45;
    --panel: rgba(46, 33, 73, 0.5);
    --line: rgba(216, 180, 254, 0.45);
    --pink: #f0abfc;
    --pink-soft: #f5d0fe;
    --text: #f6eeff;
    --muted: #d9c8f0;

    /* Motion tokens (from Emil Kowalski's design-engineering skills) */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* strong ease-out for UI */
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* on-screen movement */
    --dur-press: 160ms;                              /* press feedback */
    --dur-ui: 200ms;                                 /* menus, hovers, small UI */
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { background: var(--bg); }
  body {
    font-family: "Quicksand", "Zen Maru Gothic", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 20% 10%, #3b2a63 0%, var(--bg) 60%) fixed;
    min-height: 100vh;
  }
  a { color: inherit; text-decoration: none; }
  .hand { font-family: "Caveat", "Zen Maru Gothic", cursive; }
  .jp { font-family: "Zen Maru Gothic", sans-serif; }

  /* ---------- NAV ---------- */
  .nav {
    position: absolute; top: 0; left: 0; right: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 5vw;
  }
  .logo { display: flex; align-items: center; gap: 10px; font-size: 2rem; font-weight: 700; letter-spacing: .5px; }
  .logo .heart { color: var(--pink); font-size: 1.2rem; }
  .menu {
    display: flex; gap: 6px; padding: 6px;
    background: rgba(50, 36, 80, 0.7); border-radius: 999px;
    backdrop-filter: blur(6px);
  }
  .menu a { padding: 10px 24px; border-radius: 999px; font-weight: 600; transition: background var(--dur-ui) ease, transform var(--dur-press) var(--ease-out); }
  @media (hover: hover) and (pointer: fine) { .menu a:hover { background: rgba(240, 171, 252, .2); } }
  .menu a.active { background: var(--pink); color: #3b1a55; }
  .connect {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 24px; border-radius: 999px;
    border: 1.5px solid var(--line); font-weight: 600;
    background: rgba(46, 33, 73, .5);
  }
  .connect img, .socials img { width: 22px; height: 22px; }

  /* ---------- HERO ---------- */
  .hero { position: relative; min-height: 640px; height: 62vh; overflow: hidden; }
  .hero-art {
    position: absolute;
    /* PARALLAX (CSS change 1 of 2): was "inset: 0;". The layer is now 50px bigger on every
       side, so when the JS shifts it a few pixels the edges never show a gap.
       Keep this number bigger than STRENGTH in the script at the bottom of the page. */
    inset: -50px;
    /* PARALLAX (CSS change 2 of 2): tells the browser this element will move,
       so it animates smoothly on the GPU. */
    will-change: transform;
    background:
      linear-gradient(90deg, rgba(29,21,48,.95) 0%, rgba(29,21,48,.55) 40%, rgba(29,21,48,0) 65%),
      url("images/web/hero.jpg") right center / cover no-repeat,
      linear-gradient(135deg, #3a2a63, #7c4a9e 60%, #d79bd9);
  }
  .hero-text { position: absolute; left: 5vw; top: 150px; z-index: 5; max-width: 560px; }
  .hero-text h1 { font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 100; line-height: 1.1; }
  .hero-text h1 span { color: var(--pink); }
  .roles { margin-top: 12px; font-size: 1.25rem; font-weight: 600; }
  .roles i { font-style: normal; color: var(--pink); margin: 0 8px; }
  .tagline { margin-top: 22px; font-size: 2rem; line-height: 1.15; color: var(--pink-soft); transform: rotate(-3deg); transform-origin: left; }

  .tagline::after {
    content: ""; display: block; width: 70%; height: 2px; margin-top: 4px;
    background: var(--pink); box-shadow: 0 0 4px var(--pink), 0 0 10px var(--pink), 0 0 20px var(--pink);
  }
  .cta { display: flex; gap: 16px; margin-top: 34px; }
  .btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 28px; border-radius: 999px; font-weight: 700;
    border: 1.5px solid var(--line); transition: transform var(--dur-press) var(--ease-out);
  }
  @media (hover: hover) and (pointer: fine) { .btn:hover { transform: translateY(-2px); } }
  .btn:active { transform: scale(0.97); }
  .btn.primary { background: var(--pink); color: #3b1a55; border-color: var(--pink); }
  .yoroshiku {
    position: absolute; right: 5vw; top: 170px; z-index: 5;
    font-size: 2.4rem; line-height: 1.05; text-align: left; color: var(--pink-soft);
    transform: rotate(-6deg);
  }
  .yoroshiku::after {
    content: ""; display: block; width: 100%; height: 2px; margin-top: 6px;
    background: var(--pink); box-shadow: 0 0 4px var(--pink), 0 0 10px var(--pink), 0 0 20px var(--pink);
  }

  /* ---------- PANELS ---------- */
  .panels { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; padding: 0 3vw; margin-top: -30px; position: relative; z-index: 6; }
  .card { background: var(--panel); border: 1.5px solid var(--line); border-radius: 28px; padding: 20px; backdrop-filter: blur(8px); }
  .card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
  .card-head h2 { font-size: 1.6rem; display: flex; align-items: center; gap: 10px; }
  .card-head small { display: block; font-size: .9rem; font-weight: 500; color: var(--muted); }
  .viewall { font-weight: 600; font-size: .95rem; }
  .works { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .work {
    position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden;
    border: 1.5px solid var(--line);
    background-size: cover; background-position: center;
    display: flex; align-items: flex-end;
  }
  .work:nth-child(1) { background-image: url("images/Outfit_school/web/unity.jpg"), linear-gradient(160deg, #6b3fa0, #e9a8e8); }
  .work:nth-child(2) { background-image: url("https://booth.pximg.net/c/620x620/5d8b291b-ea41-475c-9529-f46e7002c089/i/8328730/9c66c037-5ed9-4a6a-9c4d-e09ffa7e8132_base_resized.jpg"), linear-gradient(160deg, #3d2a66, #a56bc9); }
  .work:nth-child(3) { background-image: linear-gradient(160deg, #4a3178, #c58ad8); } /* placeholder */
  .work:nth-child(4) { background-image: linear-gradient(160deg, #5b3a8c, #f0b3ef); } /* placeholder */
  .work:nth-child(3)::before, .work:nth-child(4)::before {
    position: absolute; inset: 0 0 40px; display: grid; place-items: center;
    font-family: "Zen Maru Gothic", sans-serif; font-size: 4rem; font-weight: 700; color: #fff;
    text-shadow: 0 0 12px #fff, 0 0 24px #ff9ad5, 0 0 40px #ff5cb8; opacity: .9;
  }
  .work:nth-child(3)::before { content: "あ"; }
  .work:nth-child(4)::before { content: "♡"; }
  .work > span {
    width: 100%; display: flex; justify-content: space-between;
    padding: 10px 12px; font-weight: 600; font-size: .95rem;
    background: linear-gradient(transparent, rgba(20, 12, 36, .85));
  }
  .skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .skill {
    border: 1.5px solid var(--line); border-radius: 20px; padding: 50px 4px;
    text-align: center; background: rgba(60, 44, 96, .55);
  }
  .skill h3 { font-size: 1.15rem; margin-bottom: 14px; }
  .skill li { list-style: none; font-size: .9rem; color: var(--muted); margin: 5px 0; text-align: left; padding-left: 20px;}
  .skill li::before { content: "✓ "; color: var(--pink-soft); }

  /* ---------- BOTTOM ---------- */
  .bottom { display: grid; grid-template-columns: 1fr 1.25fr; gap: 24px; padding: 24px 3vw 0; align-items: stretch; }
  .about { position: relative; padding: 10px 10px 24px; min-height: 240px; }
  .about h2 { font-size: 1.6rem; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .about p { max-width: 340px; line-height: 1.6; color: var(--muted); }
  .about .btn { margin-top: 16px; padding: 8px 20px; }
  .chibi {
    position: absolute; right: 0; bottom: 0; width: 230px; height: 230px;
    background: url("images/web/chibi.png") center / contain no-repeat;
  }
  .banner {
    border-radius: 28px; min-height: 220px; padding: 34px 40px;
    background:
      linear-gradient(90deg, rgba(88, 52, 140, .75), rgba(88, 52, 140, .1)),
      url("images/web/banner.jpg") center / cover no-repeat,
      linear-gradient(135deg, #7b4bb0, #d6a0ec);
    display: flex; flex-direction: column; justify-content: center;
  }
  .banner .big { font-size: 2.1rem; font-weight: 700; line-height: 1.35; transform: rotate(-3deg); transform-origin: left; }
  .banner .big b { color: var(--pink-soft); }
  .banner .small { margin-top: 14px; font-size: 1.4rem; transform: rotate(-3deg); transform-origin: left; color: var(--pink-soft); }

  /* ---------- FOOTER ---------- */
  footer {
    margin-top: 24px; padding: 14px 5vw;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(35, 25, 58, .95); border-top: 1.5px solid var(--line);
  }
  footer .logo { font-size: 1.4rem; gap: 6px; }
  footer .copyright { font-size: .9rem; opacity: .7; }
  .socials { display: flex; gap: 22px; }
  .socials img { width: 28px; height: 28px; opacity: .9; }

  /* Keep menu items on one line; tighten spacing on smaller laptop screens */
  .menu a, .connect, .lang-switch button { white-space: nowrap; }
  @media (max-width: 1280px) {
    .nav { gap: 10px; padding-left: 3vw; padding-right: 3vw; }
    .menu a { padding: 10px 14px; }
    .connect { padding: 10px 16px; }
  }
  @media (max-width: 1100px) and (min-width: 901px) {
    .connect span { display: none; }
  }

  /* ---------- PRESS FEEDBACK & TOUCH (from Emil Kowalski's skills) ----------
     Everything you can press shrinks slightly while pressed, so the site
     feels like it's listening. Taps don't flash grey/blue on phones, don't
     lag, and long-pressing a button doesn't select its text. */
  html { -webkit-tap-highlight-color: transparent; }
  button, a, .work, .node, .do-item { touch-action: manipulation; }
  button, .btn, .menu a, .connect, .lang-switch button, .burger, .work, .node, .stage-btn, .do-item, .viewall, .socials a {
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  }
  .connect, .lang-switch button, .burger, .work, .viewall, .socials a { transition: transform var(--dur-press) var(--ease-out); }
  .menu a:active, .connect:active, .lang-switch button:active, .burger:active, .viewall:active, .socials a:active { transform: scale(0.97); }
  .work:active { transform: scale(0.98); }

  /* ---------- PAGE TRANSITIONS (works with transitions.js) ----------
     Only the page content fades: the menu bar and background stay put,
     so the screen never goes blank between pages.
     The "reduce motion" check was removed so the effect always runs
     (same as the parallax). */
  html { scroll-behavior: smooth; }
  @keyframes page-in  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes page-out { from { opacity: 1; } to { opacity: .0; } }
  body > :not(.nav):not(script):not(dialog) { animation: page-in .4s var(--ease-out) both; }
  body.page-out > :not(.nav):not(script):not(dialog) { animation: page-out .16s var(--ease-out) forwards; }

  /* ---------- MOBILE ---------- */
  @media (max-width: 900px) {
    .hero { height: auto; min-height: 720px; }
    .hero-text { top: 60px; }
    .yoroshiku { top: auto; bottom: 200px; }
    .panels, .bottom { grid-template-columns: 1fr; }
    .works { grid-template-columns: repeat(2, 1fr); }
    .skills { grid-template-columns: 1fr; }
  }

  /* ---------- MOBILE HEADER & FOOTER ----------
     On phones the header becomes one slim bar that stays at the top:
     language toggle on the left, Discord icon + menu button (☰) on the right.
     The menu opens as a dropdown (toggled in transitions.js). */
  .burger { display: none; }
  @media (max-width: 900px) {
    .nav {
      position: sticky; top: 0; z-index: 50;
      display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px;
      padding: 12px 16px;
      background: rgba(29, 21, 48, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(216, 180, 254, .18);
    }
    .lang-switch { grid-column: 1; grid-row: 1; }
    .lang-switch button { padding: 6px 12px; font-size: .85rem; }
    .connect { grid-column: 3; grid-row: 1; width: 40px; height: 40px; padding: 0; justify-content: center; }
    .connect span { display: none; }
    .burger {
      grid-column: 4; grid-row: 1;
      display: grid; place-content: center; gap: 5px;
      width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
      border: 1.5px solid var(--line); background: rgba(46, 33, 73, .5);
    }
    .burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform var(--dur-ui) var(--ease-out), opacity var(--dur-ui) ease; }
    .nav.open .burger { background: var(--pink); border-color: var(--pink); }
    .nav.open .burger span { background: #3b1a55; }
    .nav.open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav.open .burger span:nth-child(2) { opacity: 0; }
    .nav.open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .menu {
      grid-column: 1 / -1; grid-row: 2;
      display: none; flex-direction: column; gap: 4px;
      padding: 8px; margin-top: 4px; border-radius: 20px;
      background: rgba(50, 36, 80, .96);
      transform-origin: top right; /* grows from the ☰ button */
    }
    .nav.open .menu { display: flex; animation: menu-in var(--dur-ui) var(--ease-out); }
    .menu a { padding: 12px 18px; }
    @keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.97); } to { opacity: 1; transform: none; } }

    footer { flex-direction: column; gap: 16px; padding: 24px 16px; text-align: center; }
    footer .logo { flex-direction: column; gap: 2px; font-size: 1rem; font-weight: 600; }
    footer .logo .heart { font-size: 1.1rem; }
    .socials { gap: 14px; }
    .socials a {
      width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
      border: 1.5px solid var(--line); background: rgba(46, 33, 73, .5);
    }
    .socials img { width: 22px; height: 22px; }
  }

  /* ---------- SUB-PAGES (every page except the home page) ----------
     Each page sets its own background picture on the hero with
     style="--hero-img: url('...')" in the HTML. */
  .page-hero {
    position: relative; isolation: isolate;
    padding: 150px 5vw 70px;
  }
  .page-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
      linear-gradient(90deg, rgba(29,21,48,.97) 0%, rgba(29,21,48,.8) 45%, rgba(29,21,48,.35) 100%),
      linear-gradient(transparent 60%, var(--bg)),
      var(--hero-img, none) var(--hero-pos, center) / cover no-repeat;
  }
  .back { display: inline-block; margin-bottom: 18px; font-weight: 600; color: var(--pink-soft); }
  @media (hover: hover) and (pointer: fine) { .back:hover { color: var(--pink); } }
  .page-hero h1 { font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 100; line-height: 1.1; color: var(--pink); }
  .page-sub { margin-top: 12px; font-size: 1.2rem; font-weight: 600; max-width: 560px; }
  .sub-main { padding: 0 3vw; display: flex; flex-direction: column; gap: 24px; }
  @media (max-width: 900px) { .page-hero { padding-top: 30px; } }

  /* ---------- LANGUAGE SWITCH ---------- */
  .lang-switch { display: flex; gap: 4px; }
  .lang-switch button {
    background: rgba(46, 33, 73, .5); color: var(--text);
    border: 1.5px solid var(--line); border-radius: 999px;
    padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer;
  }
  .lang-switch button.active { background: var(--pink); color: #3b1a55; border-color: var(--pink); }

  /* ---------- NEON GLOW TEXT ---------- */
  .glow      { color: #fff; text-shadow: 0 0 4px #fff, 0 0 10px #ff9ad5, 0 0 20px #ff9ad5, 0 0 40px #ff5cb8; }
  .glow-soft { color: #fff; text-shadow: 0 0 10px #fff, 0 0 100px #ff9ad5, 0 0 20px #ff9ad5, 0 0 40px #ff5cb8; }
