/* =========================================================
   Ritsu Yamato - Personal Site (simple & friendly)
   ========================================================= */

/* ---------- Reset & Variables ---------- */
*, *::before, *::after { box-sizing: border-box; }

:root {
    /* ===== Light monochrome (day / default) — white base, ink text ===== */
    --bg-color: #FAFAF8;          /* near-white page */
    --paper-bg: #FFFFFF;          /* card/section surface */
    --primary-color: #141414;     /* ink — headings & key text */
    --accent-color: #141414;      /* decorative ink: dots, bars, active states, underlines */
    --accent-ink: #2B2B2B;        /* near-black for eyebrows, labels, links */
    --accent-soft: #F0F0EE;       /* pale grey chip background */
    --text-color: #1E1E1E;        /* body text */
    --text-mute: #6A6A6A;         /* muted labels */
    --line-color: #E2E2DE;        /* quiet hairline */
    --line-strong: #B8B8B3;       /* deliberate divider */
    --placeholder-color: #ECECE9; /* image placeholder while loading */
    --glow-1: rgba(124,139,255,0.55);  /* indigo glow (dark theme) */
    --glow-2: rgba(255,95,170,0.40);   /* magenta glow (dark theme) */
    --font-sans: "Zen Kaku Gothic New", sans-serif;   /* clean modern gothic — body & UI */
    --font-serif: "Zen Old Mincho", serif;             /* refined mincho — display headings */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.04);
    --shadow-mid: 0 8px 22px rgba(0, 0, 0, 0.07);
}

/* ===== Dark Spectrum (B / night) — immersive dark + luminous accent ===== */
html.theme-spectrum {
    --bg-color: #0C0D12;
    --paper-bg: #14151C;
    --primary-color: #F4F5FA;
    --accent-color: #7C8BFF;
    --accent-ink: #AEB4E8;
    --accent-soft: #1C1E2B;
    --text-color: #C7CAD8;
    --text-mute: #868AA0;
    --line-color: #23252F;
    --line-strong: #3A3D4B;
    --placeholder-color: #181A24;
    --shadow-soft: 0 2px 14px rgba(0, 0, 0, 0.45);
    --shadow-mid: 0 16px 40px rgba(0, 0, 0, 0.6);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    line-height: 1.85;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    opacity: 0;
    animation: pageFade 0.6s var(--ease) forwards;
}

@keyframes pageFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

h1, h2, h3, h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary-color);
}

/* Major display headings use the refined serif for editorial contrast */
.top-hero h1,
.page-hero h1,
section > h2,
section.section--cta > h2,
.motto-box .motto-text {
    font-family: var(--font-serif);
    font-weight: 700;
}

a { color: inherit; }

/* Keyboard accessibility: visible focus ring */
a:focus-visible,
button:focus-visible,
.card-link:focus-visible,
.gateway-card:focus-visible {
    outline: 2px solid var(--accent-ink);
    outline-offset: 3px;
    border-radius: 4px;
}
img {
    max-width: 100%;
    display: block;
    /* Image copy protection (basic visual layer) */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }
.reveal.delay-5 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.4s ease;
}
.navbar.is-scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom-color: var(--line-color);
}
html.theme-spectrum .navbar {
    background: rgba(12, 13, 18, 0.72);
}
html.theme-spectrum .navbar.is-scrolled {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}
.nav-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 0.12em;
    line-height: 1.2;
}
.nav-logo small {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    color: var(--text-mute);
    margin-top: 3px;
    font-weight: 500;
}
.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links li { margin: 0; padding: 0; }
.nav-links li::before { display: none; }
.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    position: relative;
    padding: 6px 0;
    transition: color 0.25s;
}
.nav-links a:hover { color: var(--accent-ink); }
.nav-links a.active {
    color: var(--primary-color);
    font-weight: 700;
}
.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    margin: 5px 0;
    transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--accent-color);
    z-index: 200;
    transition: width 0.1s linear;
}

/* ---------- Layout ---------- */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 68px);
    position: relative;
}

/* ---------- Page header ---------- */
.page-hero {
    background: var(--paper-bg);
    color: var(--primary-color);
    text-align: center;
    padding: 80px 24px 60px;
    border-bottom: 1px solid var(--line-color);
    margin-bottom: 50px;
}
.page-hero .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    color: var(--accent-ink);
    margin-bottom: 16px;
    opacity: 0;
    animation: heroIn 0.7s var(--ease) 0.1s forwards;
}
.page-hero h1 {
    font-size: clamp(2.4rem, 6.5vw, 4.2rem);
    margin: 0 0 18px;
    letter-spacing: 0.03em;
    line-height: 1.1;
    opacity: 0;
    animation: heroIn 0.7s var(--ease) 0.2s forwards;
}
.page-hero p.lead {
    font-size: 0.95rem;
    line-height: 1.95;
    max-width: 540px;
    margin: 0 auto;
    opacity: 0;
    animation: heroIn 0.7s var(--ease) 0.3s forwards;
    color: var(--text-color);
}
@keyframes heroIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Sections ---------- */
/* ---------- Sections (2-column wide layout via float) ---------- */
section {
    background: transparent;
    padding: clamp(44px, 6.5vw, 100px) 0;
    margin: 0;
    border: none;
    border-top: 1px solid var(--line-color);
    border-radius: 0;
    overflow: visible;
}
main.container > section:first-of-type {
    border-top: none;
    padding-top: clamp(28px, 4vw, 56px);
}

/* v3 editorial headings: full-width, large serif, hairline rule */
section > .section-eyebrow {
    display: block;
    margin: 0 0 16px;
    padding: 0;
}
section > h2 {
    display: block;
    margin: 0 0 clamp(26px, 4vw, 46px);
    padding-bottom: 18px;
    font-size: clamp(1.85rem, 4.4vw, 3rem);
    color: var(--primary-color);
    position: relative;
    line-height: 1.18;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--line-strong);
    word-break: keep-all;
    overflow-wrap: normal;
}
section > h2::after { display: none; }

section > *:not(.section-eyebrow):not(h2) {
    margin-left: 0;
}
section > *:not(.section-eyebrow):not(h2):first-of-type {
    margin-top: 0;
}

section h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 28px 0 14px;
    padding-left: 12px;
    border-left: 3px solid var(--accent-color);
}

/* Constrain plain text content for readability */
section > p {
    max-width: 820px;
}
section > ul {
    max-width: 820px;
}

/* CTA / next-chapter sections: single-column centered */
section.section--cta {
    text-align: center;
    overflow: visible;
}
section.section--cta > .section-eyebrow,
section.section--cta > h2 {
    float: none;
    width: auto;
    margin: 0 0 12px;
    text-align: center;
}
section.section--cta > h2 {
    display: inline-block;
    margin-bottom: 24px;
    padding-bottom: 10px;
}
section.section--cta > h2::after {
    left: 50%;
    transform: translateX(-50%);
}
section.section--cta > *:not(.section-eyebrow):not(h2) {
    margin-left: 0;
}

/* ---------- Profile ---------- */
.profile-flex {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}
.profile-image-large {
    flex: 0 0 260px;
}
.profile-image-large img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid var(--line-color);
}
.profile-info { flex: 1; }
.profile-table {
    width: 100%;
    border-collapse: collapse;
}
.profile-table th {
    text-align: left;
    padding: 12px 8px;
    color: var(--text-mute);
    font-weight: 700;
    width: 30%;
    vertical-align: top;
    border-bottom: 1px solid var(--line-color);
    font-size: 0.85rem;
}
.profile-table td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--line-color);
    color: var(--primary-color);
}

/* ---------- Grid & Cards ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}
.card {
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-mid);
}
.card .card-img,
.card iframe,
.card video {
    width: 100%;
    background-color: var(--placeholder-color);
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}
.card:hover .card-img {
    transform: scale(1.04);
}
.card > img.card-img {
    height: 190px;
}
.card-img-wrap {
    overflow: hidden;
    position: relative;
}
.youtube-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    overflow: hidden;
}
.youtube-container iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.card-content {
    padding: 20px 22px;
    flex-grow: 1;
}
.card-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-ink);
    background: var(--accent-soft);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}
.card h3 {
    margin: 4px 0 8px;
    font-size: 1.05rem;
    color: var(--primary-color);
    border-left: none;
    padding-left: 0;
}
.card p {
    font-size: 0.88rem;
    color: var(--text-color);
    line-height: 1.7;
    margin: 0;
}
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* ---------- Tags ---------- */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag {
    background-color: var(--paper-bg);
    color: var(--primary-color);
    border: 1px solid var(--line-strong);
    padding: 5px 14px;
    font-size: 0.82rem;
    border-radius: 999px;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.tag:hover {
    background-color: var(--accent-soft);
    border-color: var(--accent-ink);
    color: var(--accent-ink);
}

/* ---------- Lists ---------- */
ul {
    list-style: none;
    padding: 0;
}
li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}
li::before {
    content: "";
    width: 6px;
    height: 6px;
    background-color: var(--accent-ink);
    position: absolute;
    left: 0;
    top: 12px;
    border-radius: 50%;
}
strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* ---------- Trait pills ---------- */
.trait-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.trait-pill {
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
    transition: transform 0.3s var(--ease);
}
.trait-pill:hover {
    transform: translateY(-2px);
    border-color: var(--accent-ink);
}
.trait-pill .trait-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--text-mute);
    margin-bottom: 4px;
}
.trait-pill .trait-value {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* ---------- 3 axes ---------- */
.axis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.axis-card {
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    border-radius: 12px;
    padding: 24px 22px;
    transition: transform 0.4s var(--ease);
}
.axis-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-ink);
}
.axis-card .axis-num {
    font-size: 0.75rem;
    color: var(--accent-ink);
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}
.axis-card h4 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin: 0 0 10px;
}
.axis-card p {
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--text-color);
    margin: 0;
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    padding-left: 26px;
    margin-top: 18px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--line-strong);
}
.timeline-item {
    position: relative;
    padding-bottom: 22px;
    padding-left: 6px;
}
.timeline-item::before {
    content: "";
    position: absolute;
    left: -26px;
    top: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--paper-bg);
    border: 2px solid var(--accent-color);
    transition: background 0.25s, transform 0.25s;
}
.timeline-item:hover::before {
    background: var(--accent-color);
}
.timeline-year {
    font-size: 0.82rem;
    color: var(--accent-ink);
    font-weight: 700;
    margin-bottom: 2px;
}
.timeline-title {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 4px;
}
.timeline-desc {
    font-size: 0.88rem;
    color: var(--text-color);
    line-height: 1.75;
}

/* ---------- Favorites ---------- */
.fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.fav-card {
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    border-radius: 10px;
    padding: 20px 20px;
    transition: transform 0.3s var(--ease), border-color 0.3s;
}
.fav-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-ink);
}
.fav-card .fav-cat {
    display: block;
    font-size: 0.7rem;
    color: var(--accent-ink);
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    font-weight: 700;
}
.fav-card .fav-title {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 6px;
}
.fav-card .fav-note {
    font-size: 0.83rem;
    color: var(--text-color);
    line-height: 1.65;
}

/* ---------- Motto ---------- */
.motto-box {
    background: var(--accent-soft);
    color: var(--primary-color);
    padding: 32px 24px;
    text-align: center;
    margin: 22px 0 26px;
    border-radius: 12px;
}
.motto-box .motto-text {
    font-size: 1.2rem;
    line-height: 1.75;
    font-weight: 700;
}
.motto-box .motto-sub {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-mute);
    letter-spacing: 0.05em;
}

.values-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.values-list .value-item {
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    border-radius: 10px;
    padding: 22px 20px;
    transition: transform 0.3s var(--ease), border-color 0.3s;
}
.values-list .value-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-ink);
}
.values-list .value-num {
    font-size: 1.4rem;
    color: var(--accent-ink);
    line-height: 1;
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}
.values-list h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin: 0 0 6px;
}
.values-list p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0;
}

/* ---------- Vision ---------- */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.vision-card {
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    border-radius: 12px;
    padding: 24px 22px;
    text-align: center;
    transition: transform 0.4s var(--ease), border-color 0.3s;
}
.vision-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-ink);
}
.vision-card .vision-when {
    font-size: 0.85rem;
    color: var(--accent-ink);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    font-weight: 700;
}
.vision-card .vision-text {
    font-size: 0.92rem;
    color: var(--primary-color);
    line-height: 1.8;
}

/* ---------- Q&A ---------- */
.qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.qa-item {
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: border-color 0.25s;
}
.qa-item:hover {
    border-color: var(--accent-ink);
}
.qa-item .qa-q {
    color: var(--accent-ink);
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    line-height: 1.5;
    min-width: 26px;
}
.qa-item .qa-body {
    font-size: 0.88rem;
    line-height: 1.6;
    flex: 1;
}
.qa-item .qa-question {
    color: var(--text-mute);
    font-size: 0.78rem;
    display: block;
    margin-bottom: 2px;
}
.qa-item .qa-answer {
    color: var(--primary-color);
    font-weight: 700;
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.contact-item {
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    border-radius: 10px;
    padding: 18px 20px;
    transition: transform 0.25s var(--ease), border-color 0.25s;
}
.contact-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-ink);
}
.contact-item .contact-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-mute);
    margin-bottom: 4px;
    font-weight: 700;
}
.contact-item a, .contact-item span.contact-value {
    font-size: 0.95rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    word-break: break-all;
}
.contact-item a:hover { color: var(--accent-ink); }

/* ---------- Edit marker ---------- */
.edit-mark {
    display: inline-block;
    font-size: 0.68rem;
    background: #F0F0EE;
    color: #2B2B2B;
    border: 1px dashed #C9C9C4;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    letter-spacing: 0;
    font-weight: normal;
    vertical-align: middle;
}

/* ---------- Inline content links (proper-noun mentions, etc.) ---------- */
.timeline-desc a,
.fav-note a,
.axis-card p a,
.values-list p a,
section > p a,
section > ul li a {
    color: var(--accent-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    font-weight: 700;
    transition: color 0.2s;
}
.timeline-desc a:hover,
.fav-note a:hover,
.axis-card p a:hover,
.values-list p a:hover,
section > p a:hover,
section > ul li a:hover {
    color: var(--primary-color);
}

/* ---------- Research ---------- */
.research-item {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--line-color);
    display: flex;
    align-items: flex-start;
}
.research-icon {
    color: var(--accent-ink);
    margin-right: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.research-content strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--primary-color);
}
.research-content span {
    font-size: 0.88rem;
    color: var(--text-color);
    line-height: 1.7;
    display: block;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary-color);
    color: var(--bg-color);
    text-decoration: none;
    font-size: 0.88rem;
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: background 0.25s, transform 0.25s;
}
.btn-primary:hover {
    background: var(--accent-ink);
    transform: translateY(-1px);
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: 50px 20px 60px;
    color: var(--text-color);
    font-size: 0.85rem;
    background: transparent;
    margin-top: 30px;
    border-top: 1px solid var(--line-color);
}

/* ---------- Top page hero ---------- */
.top-hero {
    min-height: 78vh;
    background: var(--paper-bg);
    color: var(--primary-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--line-color);
}
.top-hero-inner {
    position: relative;
    z-index: 2;
    padding: 60px 24px;
    max-width: 720px;
}
.top-hero .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--accent-ink);
    margin-bottom: 22px;
    opacity: 0;
    animation: heroIn 0.8s var(--ease) 0.15s forwards;
    font-weight: 700;
}
.top-hero h1 {
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    margin: 0 0 16px;
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: var(--primary-color);
}
.top-hero h1 .char {
    display: inline-block;
    min-width: 0.2em;
    text-align: center;
}
.top-hero h1 .char.settled {
    animation: charSettle 0.45s var(--ease) both;
}
@keyframes charSettle {
    from { opacity: 0.35; filter: blur(3px); transform: translateY(3px); }
    to   { opacity: 1; filter: blur(0); transform: none; }
}
.top-hero .top-sub {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: var(--text-mute);
    margin-bottom: 28px;
    opacity: 0;
    animation: heroIn 0.7s var(--ease) 1.0s forwards;
}
.top-hero .top-tag {
    font-size: 0.95rem;
    line-height: 1.95;
    color: var(--text-color);
    max-width: 520px;
    margin: 0 auto 36px;
    opacity: 0;
    animation: heroIn 0.7s var(--ease) 1.2s forwards;
}
.scroll-down {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-mute);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-decoration: none;
    opacity: 0;
    animation: heroIn 0.7s var(--ease) 1.4s forwards;
    font-weight: 700;
}
.scroll-down::after {
    content: "";
    display: block;
    width: 1px;
    height: 36px;
    background: var(--line-strong);
    margin: 8px auto 0;
    animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
    0%, 100% { transform: scaleY(0.4); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
}

/* ---------- Top page gateways ---------- */
.gateway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.gateway-card {
    position: relative;
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s var(--ease), box-shadow 0.4s, border-color 0.3s;
}
.gateway-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-mid);
    border-color: var(--accent-ink);
}
.gateway-card .gw-bg {
    height: 160px;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s var(--ease);
}
.gateway-card:hover .gw-bg {
    transform: scale(1.04);
}
.gateway-card .gw-overlay { display: none; }
.gateway-card .gw-content {
    padding: 18px 20px 20px;
}
.gateway-card .gw-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    color: var(--accent-ink);
    margin-bottom: 6px;
    font-weight: 700;
}
.gateway-card .gw-title {
    font-size: 1.15rem;
    margin: 0 0 6px;
    color: var(--primary-color);
}
.gateway-card .gw-desc {
    font-size: 0.83rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 10px;
}
.gateway-card .gw-arrow {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--accent-ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s var(--ease);
    font-weight: 700;
}
.gateway-card:hover .gw-arrow {
    gap: 12px;
}

/* ---------- Top intro ---------- */
.intro-block {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 36px;
    align-items: center;
}
.intro-block .intro-photo img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--line-color);
}
.intro-block .intro-text p {
    font-size: 1rem;
    line-height: 1.95;
    color: var(--text-color);
    margin: 0;
}

/* Section eyebrow */
.section-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: var(--accent-ink);
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

/* ---------- Photo gallery ---------- */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 18px;
}
.photo-gallery .photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: var(--placeholder-color);
}
.photo-gallery .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.photo-gallery .photo:hover img {
    transform: scale(1.05);
}

/* ---------- Daily routine ---------- */
.routine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.routine-item {
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    border-radius: 10px;
    padding: 18px 18px;
    text-align: center;
    transition: transform 0.3s var(--ease), border-color 0.3s;
}
.routine-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-ink);
}
.routine-item .routine-time {
    color: var(--accent-ink);
    font-size: 1.2rem;
    margin-bottom: 6px;
    display: block;
    font-weight: 700;
}
.routine-item .routine-title {
    font-size: 0.92rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 4px;
}
.routine-item .routine-desc {
    font-size: 0.78rem;
    color: var(--text-mute);
    line-height: 1.5;
}

/* ---------- Skills bars ---------- */
.skill-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.skill-row {
    display: grid;
    grid-template-columns: 130px 1fr 48px;
    align-items: center;
    gap: 14px;
}
.skill-row .skill-name {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
}
.skill-row .skill-pct {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-ink);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.skill-row .skill-bar {
    background: var(--paper-bg);
    border: 1px solid var(--line-color);
    height: 8px;
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}
.skill-row .skill-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 99px;
    width: 0;
    transition: width 1.1s var(--ease);
}
.skill-row.is-visible .skill-fill {
    width: var(--skill-pct, 50%);
}

/* ---------- Catchphrase ---------- */
.catchphrase {
    margin-top: 24px;
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-color);
    letter-spacing: 0.02em;
}

/* ---------- Showcase blocks (themed photo collections) ---------- */
.showcase-block {
    margin-top: 28px;
}
.showcase-block + .showcase-block {
    margin-top: 36px;
}
.showcase-h {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 12px;
    padding: 0;
    border-left: none;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}
.showcase-h .sh-en {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--accent-ink);
}
.showcase-h .sh-ja {
    font-size: 1rem;
    color: var(--primary-color);
}
.showcase-h::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line-color);
    margin-left: 8px;
}
.sg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}
.sg-photo {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: var(--placeholder-color);
}
.sg-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.sg-photo:hover img {
    transform: scale(1.07);
}
@media (max-width: 540px) {
    .sg-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}

/* ---------- Value item with image ---------- */
.values-list .value-item.has-img {
    padding: 0;
    overflow: hidden;
}
.values-list .value-item.has-img .value-img {
    height: 100px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s var(--ease);
}
.values-list .value-item.has-img:hover .value-img {
    transform: scale(1.04);
}
.values-list .value-item.has-img .value-body {
    padding: 18px 20px 22px;
}

/* ---------- Hero with background image ---------- */
.page-hero.has-bg {
    position: relative;
    overflow: hidden;
    color: #fff;
    border-bottom: none;
}
.page-hero.has-bg .hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.page-hero.has-bg .hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(46,46,46,0.55) 0%, rgba(46,46,46,0.78) 100%);
}
.page-hero.has-bg > *:not(.hero-bg):not(.hero3d-canvas) {
    position: relative;
    z-index: 1;
}
.page-hero.has-bg h1,
.page-hero.has-bg .eyebrow,
.page-hero.has-bg p.lead {
    color: #fff;
}
.page-hero.has-bg .eyebrow { color: #EDE9E1; }
.page-hero.has-bg p.lead { color: rgba(255,255,255,0.92); }

/* ---------- Image band (full-width strip) ---------- */
.image-band {
    margin: 30px 0;
    border-radius: 14px;
    overflow: hidden;
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    box-shadow: var(--shadow-soft);
}
.image-band-text {
    position: absolute;
    bottom: 18px;
    left: 22px;
    right: 22px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    font-weight: 700;
    font-size: 1rem;
}

/* ---------- Image mosaic ---------- */
.mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 130px;
    gap: 10px;
    margin-top: 20px;
}
.mosaic .m-cell {
    overflow: hidden;
    border-radius: 8px;
    background: var(--placeholder-color);
}
.mosaic .m-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}
.mosaic .m-cell:hover img {
    transform: scale(1.06);
}
.mosaic .m-cell.span2 { grid-column: span 2; }
.mosaic .m-cell.row2  { grid-row: span 2; }
@media (max-width: 768px) {
    .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 100px; }
    .mosaic .m-cell.span2 { grid-column: span 2; }
}

/* ---------- Axis card with image ---------- */
.axis-card.has-img {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.axis-card.has-img .axis-img {
    height: 140px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s var(--ease);
}
.axis-card.has-img:hover .axis-img {
    transform: scale(1.04);
}
.axis-card.has-img .axis-body {
    padding: 22px 22px 24px;
}

/* ---------- Favorite card with image ---------- */
.fav-card.has-img {
    padding: 0;
    overflow: hidden;
}
.fav-card.has-img .fav-img {
    height: 110px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s var(--ease);
}
.fav-card.has-img:hover .fav-img {
    transform: scale(1.05);
}
.fav-card.has-img .fav-body {
    padding: 18px 20px 20px;
}

/* ---------- Routine item with image ---------- */
.routine-item.has-img {
    padding: 0;
    overflow: hidden;
}
.routine-item.has-img .routine-img {
    height: 100px;
    background-size: cover;
    background-position: center;
}
.routine-item.has-img .routine-body {
    padding: 14px 14px 18px;
}

/* ---------- Timeline with thumbnail ---------- */
.timeline-item.has-img {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 16px;
    align-items: flex-start;
}
.timeline-item.has-img .ti-thumb {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--line-color);
    flex-shrink: 0;
}
@media (max-width: 540px) {
    .timeline-item.has-img {
        grid-template-columns: 60px 1fr;
        gap: 12px;
    }
    .timeline-item.has-img .ti-thumb {
        width: 60px;
        height: 60px;
    }
}

/* ---------- Vision card with image ---------- */
.vision-card.has-img {
    padding: 0;
    overflow: hidden;
    text-align: left;
}
.vision-card.has-img .vision-img {
    height: 120px;
    background-size: cover;
    background-position: center;
}
.vision-card.has-img .vision-body {
    padding: 20px 22px 24px;
    text-align: center;
}

/* ---------- Tablet (collapse the floated heading into single column) ---------- */
@media (max-width: 1024px) {
    section {
        overflow: visible;
    }
    section > .section-eyebrow,
    section > h2 {
        float: none;
        clear: none;
        width: auto;
        margin: 0 0 12px;
    }
    section > h2 {
        margin: 0 0 22px;
    }
    section > *:not(.section-eyebrow):not(h2) {
        margin-left: 0;
    }
    section > p,
    section > ul {
        max-width: none;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--paper-bg);
        flex-direction: column;
        padding: 0 20px;
        gap: 16px;
        border-bottom: 1px solid var(--line-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s var(--ease), padding 0.3s ease;
    }
    .nav-links.is-open {
        max-height: 600px;
        padding-top: 18px;
        padding-bottom: 22px;
    }

    .intro-block {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .intro-block .intro-photo {
        max-width: 240px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    section { padding: clamp(36px, 8vw, 60px) 0; margin: 0; border-radius: 0; }
    .page-hero { padding: 56px 20px 40px; margin-bottom: 30px; }
    .page-hero h1 { font-size: 1.9rem; }
    .top-hero { min-height: 70vh; }

    .profile-flex { flex-direction: column; gap: 22px; }
    .profile-image-large { flex: none; width: 100%; max-width: 240px; margin: 0 auto; }

    .profile-table th, .profile-table td {
        padding: 10px 6px;
        font-size: 0.88rem;
    }

    .grid { gap: 16px; grid-template-columns: 1fr; }
    .gateway-grid { grid-template-columns: 1fr; }

    .skill-row { grid-template-columns: 100px 1fr 42px; }
}

/* =========================================================
   Interactive layer — tasteful & accessible
   ========================================================= */

/* ---- 3D tilt + glare on cards ---- */
.tilt { position: relative; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.tilt-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%),
        rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 50%);
    mix-blend-mode: soft-light;
    transition: opacity 0.35s var(--ease);
}
.tilt.is-tilting { box-shadow: 0 20px 44px rgba(0, 0, 0, 0.13); }
.tilt.is-tilting .tilt-glare { opacity: 1; }

/* ---- Custom cursor flourish (desktop only) ---- */
@media (hover: hover) and (pointer: fine) {
    .cursor-ring {
        position: fixed; top: 0; left: 0;
        width: 30px; height: 30px; margin: -15px 0 0 -15px;
        border: 1.5px solid var(--accent-color);
        border-radius: 50%;
        pointer-events: none; z-index: 9998;
        transition: width 0.25s var(--ease), height 0.25s var(--ease),
            margin 0.25s var(--ease), background 0.25s, border-color 0.25s, opacity 0.3s;
    }
    body.cursor-hover .cursor-ring {
        width: 54px; height: 54px; margin: -27px 0 0 -27px;
        background: rgba(0, 0, 0, 0.06);
        border-color: var(--accent-ink);
    }
}

/* ---- Back-to-top ---- */
.to-top {
    position: fixed; right: 22px; bottom: 22px;
    width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--paper-bg); color: var(--primary-color);
    font-size: 1.15rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
        background 0.25s, color 0.25s, border-color 0.25s;
    box-shadow: var(--shadow-mid); z-index: 120;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent-color); color: var(--bg-color); border-color: var(--accent-color); transform: translateY(-2px); }

/* ---- Nav underline draw on hover ---- */
.nav-links a::after {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 0; height: 2px; background: var(--accent-color); border-radius: 2px;
    transition: width 0.3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

/* ---- Motion-rich enhancements (skipped under reduced motion) ---- */
@media (prefers-reduced-motion: no-preference) {
    /* Reveal: soft blur-in */
    .reveal {
        filter: blur(8px);
        transition: opacity 0.85s var(--ease), transform 0.85s var(--ease), filter 0.85s var(--ease);
    }
    .reveal.is-visible { filter: blur(0); }

    /* Directional reveal variants */
    .reveal-left  { transform: translateX(-34px); }
    .reveal-right { transform: translateX(34px); }
    .reveal-left.is-visible,
    .reveal-right.is-visible { transform: none; }

    /* Top hero: drifting ambient light */
    .top-hero { isolation: isolate; }
    .top-hero::before, .top-hero::after {
        content: ""; position: absolute; border-radius: 50%;
        filter: blur(64px); opacity: 0.55; z-index: 0; pointer-events: none;
    }
    .top-hero::before {
        width: 380px; height: 380px; top: -80px; left: -60px;
        background: radial-gradient(circle, rgba(20, 20, 20, 0.05), rgba(20, 20, 20, 0) 70%);
        animation: blobDriftA 16s ease-in-out infinite alternate;
    }
    .top-hero::after {
        width: 320px; height: 320px; bottom: -70px; right: -50px;
        background: radial-gradient(circle, rgba(0, 0, 0, 0.035), rgba(0, 0, 0, 0) 70%);
        animation: blobDriftB 20s ease-in-out infinite alternate;
    }
    @keyframes blobDriftA { to { transform: translate(44px, 34px) scale(1.18); } }
    @keyframes blobDriftB { to { transform: translate(-34px, -22px) scale(1.12); } }

    /* Button shine sweep */
    .btn-primary { position: relative; overflow: hidden; }
    .btn-primary::after {
        content: ""; position: absolute; top: 0; left: -120%;
        width: 55%; height: 100%; transform: skewX(-20deg);
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
        transition: left 0.6s var(--ease);
        pointer-events: none;
    }
    .btn-primary:hover::after { left: 150%; }
}

/* =========================================================
   Advanced interactions — page transition, dot nav, count-up,
   heading char-split (all accessible & additive)
   ========================================================= */

/* ---- Page transition (.pgx-*) — theatrical wine/ink curtain ---- */
.pgx-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  pointer-events: none;
  display: block;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
  background: linear-gradient(
    180deg,
    #0E0E0E 0%,
    #1B1B1B 50%,
    #000000 100%
  );
  transform: translate3d(0, -100%, 0);
  transition: none;
}
.pgx-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0) 62%
  );
  opacity: 0;
  transition: opacity 320ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}
.pgx-overlay.pgx-active {
  pointer-events: auto;
  visibility: visible;
}
.pgx-overlay.pgx-exit {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition:
    transform 420ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    opacity 200ms linear;
}
.pgx-overlay.pgx-exit::after {
  opacity: 1;
  transition: opacity 360ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}
.pgx-overlay.pgx-enter {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}
.pgx-overlay.pgx-enter-active {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, -100%, 0);
  transition:
    transform 520ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    opacity 260ms linear 260ms;
}
@media (prefers-reduced-motion: reduce) {
  .pgx-overlay,
  .pgx-overlay.pgx-exit,
  .pgx-overlay.pgx-enter,
  .pgx-overlay.pgx-enter-active {
    transition: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translate3d(0, -100%, 0) !important;
  }
}

/* ---- Section scroll-spot dot navigation (.dotnav) ---- */
.dotnav-host main section[id] { scroll-margin-top: 80px; }
.dotnav {
  position: fixed;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.dotnav__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: auto;
}
.dotnav__dot {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--line-strong, #CFC8C9);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  outline: none;
  transition:
    background-color 0.3s var(--ease, ease),
    border-color 0.3s var(--ease, ease),
    transform 0.3s var(--ease, ease),
    box-shadow 0.3s var(--ease, ease);
}
.dotnav__dot:hover,
.dotnav__dot:focus-visible {
  border-color: var(--accent-color);
  transform: scale(1.25);
}
.dotnav__dot:focus-visible { box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.18); }
.dotnav__item.is-active .dotnav__dot {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: scale(1.45);
}
.dotnav__label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--paper-bg, #fff);
  color: var(--primary-color, #1A1718);
  border: 1px solid var(--line-strong, #CFC8C9);
  box-shadow: 0 6px 20px rgba(26, 23, 24, 0.12);
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s var(--ease, ease),
    transform 0.25s var(--ease, ease),
    visibility 0s linear 0.25s;
}
.dotnav__item:hover .dotnav__label,
.dotnav__dot:focus-visible + .dotnav__label,
.dotnav__dot:hover + .dotnav__label {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
  transition:
    opacity 0.25s var(--ease, ease),
    transform 0.25s var(--ease, ease),
    visibility 0s linear 0s;
}
@media (prefers-reduced-motion: reduce) {
  .dotnav__dot, .dotnav__label { transition: none; }
  .dotnav__dot:hover,
  .dotnav__dot:focus-visible,
  .dotnav__item.is-active .dotnav__dot { transform: none; }
}
@media (max-width: 1024px) { .dotnav { display: none !important; } }

/* ---- Count-up numbers ---- */
[data-count] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---- Heading char-split rise (section h2) ---- */
@media (prefers-reduced-motion: no-preference) {
  section > h2 .ch { display: inline-block; opacity: 0; transform: translateY(0.45em); }
  section > h2.chars-in .ch {
    animation: chRise 0.55s var(--ease) forwards;
    animation-delay: calc(var(--i) * 0.03s);
  }
  @keyframes chRise { to { opacity: 1; transform: none; } }
}

/* Prevent mid-word line breaks in large display headings */
.page-hero h1,
.top-hero h1 {
    word-break: keep-all;
    overflow-wrap: normal;
    line-break: strict;
}

/* =========================================================
   HERO WebGL STAGE + 3D DEPTH (structural — both themes)
   ========================================================= */

/* Page hero becomes a stage with a particle field behind the title */
.page-hero {
    position: relative;
    overflow: hidden;
    background: var(--bg-color);
    min-height: clamp(360px, 54vh, 600px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.motto-box { border: 1px solid var(--line-color); }
.card-tag { border: 1px solid var(--line-color); }

/* Shared WebGL canvas (injected as first child of each .page-hero) */
.hero3d-canvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none; display: block;
    opacity: 0; transition: opacity 1.4s var(--ease);
}
.hero3d-canvas.ready { opacity: 0.9; }
.page-hero > *:not(.hero3d-canvas):not(.hero-bg) { position: relative; z-index: 2; }
.page-hero.has-bg .hero3d-canvas { z-index: 1; mix-blend-mode: screen; opacity: 0.6; }
.page-hero.has-bg > *:not(.hero-bg):not(.hero3d-canvas) { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
    .hero3d-canvas { opacity: 0.7 !important; }
}

/* =========================================================
   DARK SPECTRUM (night) — luminous glow accents, gated
   ========================================================= */
html.theme-spectrum .hero3d-canvas.ready { opacity: 0.92; }

html.theme-spectrum .page-hero::before {
    content: "";
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(58% 52% at 50% 42%, var(--glow-1), transparent 70%),
        radial-gradient(42% 40% at 72% 74%, var(--glow-2), transparent 72%);
    opacity: 0.45;
}
html.theme-spectrum .page-hero h1 { text-shadow: 0 0 42px rgba(124, 139, 255, 0.28); }

/* has-bg heroes: darken the photo further only at night */
html.theme-spectrum .page-hero.has-bg .hero-bg::after {
    background: linear-gradient(180deg, rgba(8, 9, 14, 0.60) 0%, rgba(8, 9, 14, 0.90) 100%);
}

/* Neon hover on dark for all card families */
html.theme-spectrum .card:hover,
html.theme-spectrum .gateway-card:hover {
    box-shadow: 0 30px 70px -30px rgba(124, 139, 255, 0.45);
    border-color: rgba(124, 139, 255, 0.55);
}
html.theme-spectrum .axis-card:hover,
html.theme-spectrum .fav-card:hover,
html.theme-spectrum .vision-card:hover,
html.theme-spectrum .values-list .value-item:hover,
html.theme-spectrum .trait-pill:hover,
html.theme-spectrum .routine-item:hover,
html.theme-spectrum .qa-item:hover,
html.theme-spectrum .contact-item:hover {
    border-color: rgba(124, 139, 255, 0.55);
    box-shadow: 0 20px 50px -30px rgba(124, 139, 255, 0.40);
}

/* 3D tilt glare -> cool luminous sheen at night (light keeps white soft-light) */
html.theme-spectrum .tilt-glare {
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%),
        rgba(150, 170, 255, 0.32), rgba(150, 170, 255, 0) 55%);
    mix-blend-mode: screen;
}
html.theme-spectrum .tilt.is-tilting { box-shadow: 0 30px 60px -24px rgba(124, 139, 255, 0.45); }

/* Luminous accents (night only) */
html.theme-spectrum .skill-row .skill-fill {
    background: linear-gradient(90deg, #6E7BFF, #45E0FF);
    box-shadow: 0 0 14px rgba(110, 123, 255, 0.55);
}
html.theme-spectrum .timeline-item:hover::before { box-shadow: 0 0 12px var(--glow-1); }
html.theme-spectrum .btn-primary { box-shadow: 0 10px 26px -10px rgba(124, 139, 255, 0.5); }
html.theme-spectrum .to-top:hover { box-shadow: 0 0 18px var(--glow-1); }

html.theme-spectrum section > p a:hover,
html.theme-spectrum section > ul li a:hover,
html.theme-spectrum .timeline-desc a:hover,
html.theme-spectrum .fav-note a:hover,
html.theme-spectrum .axis-card p a:hover,
html.theme-spectrum .values-list p a:hover { text-shadow: 0 0 14px var(--glow-1); }

/* =========================================================
   余白・余韻パス — 情報量は変えず、間と余白を一段効かせる
   ========================================================= */

/* Wider side gutters -> a narrower, calmer content band */
.container { padding-inline: clamp(22px, 6vw, 104px); }

/* More air between sections (vertical rhythm) */
section { padding-block: clamp(60px, 9vw, 156px); }
main.container > section:first-of-type { padding-top: clamp(40px, 5.5vw, 84px); }

/* Heading breathes more before its content */
section > h2 { margin-bottom: clamp(36px, 5vw, 66px); padding-bottom: 22px; }
section > .section-eyebrow { margin-bottom: 22px; }

/* Body copy: calmer measure + looser rhythm */
section > p, section > ul { max-width: 720px; }
section > p { line-height: 2.0; margin-bottom: 1.5em; }
section h3 { margin-top: 40px; margin-bottom: 18px; }
li { margin-bottom: 16px; padding-left: 22px; line-height: 1.95; }

/* Grids: looser gaps + more lead-in space */
.grid { gap: 30px; }
.axis-grid { gap: 28px; margin-top: 30px; }
.fav-grid { gap: 22px; margin-top: 28px; }
.vision-grid { gap: 26px; margin-top: 28px; }
.values-list { gap: 22px; }
.gateway-grid { gap: 28px; margin-top: 30px; }
.contact-grid { gap: 20px; margin-top: 30px; }
.trait-grid { gap: 18px; margin-top: 28px; }
.routine-grid { gap: 20px; margin-top: 28px; }
.qa-grid { gap: 14px; margin-top: 28px; }
.skill-list { gap: 24px; margin-top: 28px; }
.tag-cloud { gap: 12px; margin-top: 24px; }
.photo-gallery { gap: 14px; margin-top: 28px; }
.sg-grid { gap: 12px; }
.showcase-block { margin-top: 44px; }
.showcase-block + .showcase-block { margin-top: 56px; }

/* Card interiors: more inner padding */
.axis-card { padding: 30px 28px; }
.fav-card { padding: 26px 24px; }
.vision-card { padding: 30px 26px; }
.values-list .value-item { padding: 28px 24px; }
.gateway-card .gw-content { padding: 24px 24px 26px; }
.card-content { padding: 26px 26px; }
.trait-pill { padding: 18px 18px; }
.contact-item { padding: 22px 24px; }
.routine-item { padding: 22px 18px; }
.qa-item { padding: 18px 20px; }
.motto-box { padding: 42px 30px; margin: 32px 0 36px; }

/* has-img card bodies keep generous padding (cards themselves stay padding:0) */
.axis-card.has-img .axis-body { padding: 26px 26px 30px; }
.fav-card.has-img .fav-body { padding: 22px 24px 26px; }
.vision-card.has-img .vision-body { padding: 26px 26px 30px; }
.values-list .value-item.has-img .value-body { padding: 24px 24px 28px; }
.gateway-card .gw-content { padding: 24px 24px 28px; }

/* Timeline: more pause between moments */
.timeline { padding-left: 30px; margin-top: 28px; }
.timeline-item { padding-bottom: 34px; }
.timeline-item.has-img { gap: 20px; }

/* Hero -> a longer beat before the first section */
.page-hero { margin-bottom: clamp(48px, 7vw, 80px); }

/* A touch slower reveal for more 余韻 (only when motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
    }
}

@media (max-width: 768px) {
    /* keep mobile breathable but not cavernous */
    section { padding-block: clamp(48px, 11vw, 90px); }
    section > p, section > ul { max-width: none; }
    .axis-card, .fav-card, .vision-card,
    .values-list .value-item, .contact-item { padding: 24px 22px; }
}
