:root {
    --bg: #f5f5f3;
    --panel: #ffffff;
    --panel-strong: #f0f0ed;
    --border: #111111;
    --text-main: #0f0f0f;
    --text-sub: #4a4a4a;
    --accent: #e7abf0;
    --accent-soft: #f6d9fb;
    --header-height: 60px;
    --font-en: 'Space Grotesk', 'Noto Sans JP', system-ui, sans-serif;
    --font-jp: 'Noto Sans JP', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: var(--font-en);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul { list-style: none; }

.background-glow { display: none; }

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(245, 245, 243, 0.9);
    border-bottom: 1px solid #111;
    min-height: var(--header-height);
}

body.dark-page {
    --bg: #0b0b0f;
    --panel: #11131a;
    --panel-strong: #161925;
    --border: #f5f5f5;
    --text-main: #f6f6f6;
    --text-sub: #c6c8ce;
}

.dark-page {
    background: var(--bg);
    color: var(--text-main);
}

.dark-page .site-header {
    background: rgba(11, 11, 15, 0.88);
    border-bottom: 1px solid #3a3d45;
}

.dark-page .hero,
.dark-page .section {
    background: var(--bg);
    color: var(--text-main);
}

.nav-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 18px;
    width: auto;
    display: block;
}

.site-header nav ul {
    display: flex;
    gap: 18px;
    font-size: 0.92rem;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    text-decoration: none;
}

.social-icon img {
    width: 18px;
    height: 18px;
    display: block;
}

.site-header nav li {
    position: relative;
}

.site-header nav a {
    color: var(--text-main);
    transition: color 0.25s ease, opacity 0.25s ease;
    position: relative;
    padding: 8px 12px;
    border-radius: 999px;
}

.site-header nav a:hover {
    opacity: 0.6;
}

.site-header nav a.active {
    color: #111;
    background: var(--accent-soft);
    border: 1.5px solid var(--accent);
    box-shadow: 0 4px 0 var(--accent);
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1.5px solid #111;
    border-radius: 12px;
    box-shadow: 8px 8px 0 #111;
    padding: 8px 10px;
    min-width: 160px;
    flex-direction: column;
    gap: 4px;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
    display: flex;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.nav-dropdown a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.nav-dropdown a:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: #111;
}

.dark-page .nav-dropdown {
    background: #181c29;
    border-color: #2c3040;
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}

.dark-page .nav-dropdown a {
    color: #e5e7ed;
}

.dark-page .nav-dropdown a:hover {
    background: #242a3a;
    border-color: #3b4254;
    color: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 600;
    border: 1.5px solid #111;
    color: var(--text-main);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    letter-spacing: 0.01em;
    background: var(--panel);
}

.btn.small {
    padding: 10px 14px;
    font-size: 0.85rem;
}

.btn.primary {
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
}

.btn.ghost {
    background: transparent;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--accent);
    background: var(--accent-soft);
    color: var(--text-main);
    font-size: 0.9rem;
}

.chip.ghost {
    background: transparent;
    color: var(--text-sub);
    border-color: #ddd;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--text-main);
    font-size: 0.85rem;
    border: 1px solid var(--accent);
}

.hero {
    padding: 60px 0 70px;
    position: relative;
}

.hero-page {
    padding-top: 30px;
}

.top-hero {
    padding-top: 0;
}

.top-hero .hero-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 fallback */
    background: #000;
    border: 1.5px solid #111;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 12px 12px 0 #111;
}

.top-hero .hero-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 36px;
    align-items: stretch;
}

.top-hero .hero-grid {
    margin-top: 28px;
}

.hero-copy h1 {
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-copy .lede {
    color: var(--text-sub);
    font-family: var(--font-jp);
}

.cta-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin: 6px 0 20px;
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    padding: 16px;
    margin-top: 6px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid #111;
}

.meta-label {
    font-size: 0.85rem;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.meta-value {
    font-weight: 600;
}

.hero-panel {
    background: var(--panel);
    border: 1.5px solid #111;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 12px 12px 0 #111;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-item {
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #111;
}

.panel-item .title {
    font-weight: 600;
}

.panel-item .desc {
    color: var(--text-sub);
    margin: 6px 0 8px;
    font-family: var(--font-jp);
}

.section {
    padding: 84px 0;
    border-bottom: 1px solid #111;
    background: var(--bg);
}

.section.about {
    padding: 50px 0 40px;
}

.categories {
    padding-top: 40px;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 36px;
}

.section-head h2 {
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    line-height: 1.2;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-sub);
    flex-wrap: wrap;
}

.hint {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.text-link {
    color: var(--text-main);
    font-weight: 600;
    border-bottom: 1px solid transparent;
}

.text-link:hover {
    border-color: rgba(255, 255, 255, 0.35);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.gallery-card {
    background: #fff;
    border: 1.5px solid #111;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.gallery-card:hover {
    transform: translateY(-4px);
}

.gallery-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    background: #f8f8f8;
    padding: 0;
}

.image-slider {
    position: relative;
    width: 100%;
    height: 260px;
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
}

.image-slider img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #111;
    background: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: 1.1rem;
    line-height: 1;
}

.image-slider:hover .slider-arrow {
    opacity: 1;
}

.slider-arrow:hover {
    transform: translateY(-50%) translateY(-1px);
    background: #fff;
}

.slider-arrow.prev {
    left: 10px;
}

.slider-arrow.next {
    right: 10px;
}

.video-embed iframe {
    pointer-events: none;
}

.video-carousel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    min-height: 240px;
}

.carousel-window {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1.5px solid #111;
    border-radius: 16px;
    background: #000;
}

.carousel-track {
    position: absolute;
    inset: 0;
    display: flex;
    transition: transform 0.6s ease;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.video-carousel .video-embed {
    position: absolute;
    inset: 0;
    padding-top: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #000;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.carousel-arrow {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1.5px solid #111;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    font-size: 1.2rem;
    line-height: 1;
}

.carousel-arrow:hover {
    transform: translateY(-1px);
    background: #f7f2fa;
}

.carousel-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1.5px solid #111;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active {
    background: var(--accent);
    transform: translateY(-1px);
}

.comment-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.comment-modal:not(.hidden) {
    display: flex;
}

.comment-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.comment-dialog {
    position: relative;
    background: #fff;
    border: 1.5px solid #111;
    border-radius: 12px;
    padding: 18px;
    width: min(90vw, 420px);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
}

.comment-title {
    font-weight: 700;
}

.comment-target {
    color: var(--text-sub);
}

.comment-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.comment-date {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    font-family: var(--font-jp);
}

.comment-input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    font-family: var(--font-jp);
}

.comment-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.list-card {
    background: var(--panel);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    display: grid;
    gap: 10px;
}

.list-card h3 {
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}

.list-card ul {
    list-style: none;
    display: grid;
    gap: 6px;
}

.list-card li {
    color: var(--text-main);
    font-family: var(--font-jp);
    line-height: 1.5;
}

.gallery-card figcaption {
    padding: 12px 12px 14px;
}

.gallery-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.gallery-card p {
    font-size: 0.9rem;
    color: var(--text-sub);
}

.video-card {
    background: var(--panel);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.video-card .video-embed {
    border-radius: 0;
    padding-top: 56.25%;
    height: auto;
}

.video-card .video-meta {
    padding: 12px 14px 14px;
    background: var(--panel);
    color: var(--text-main);
    display: grid;
    gap: 4px;
}

.video-card h3 {
    font-size: 1.05rem;
}

.video-meta .meta-line {
    color: var(--text-sub);
    font-family: var(--font-jp);
    font-size: 0.95rem;
}

.works-tabs {
    margin: 24px 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1.5px solid #111;
    background: #fff;
    font-weight: 600;
    color: var(--text-main);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tab:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #111;
}

.tab.active {
    background: var(--accent);
    color: #111;
}

.project-card {
    position: relative;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid #111;
    min-height: 200px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0 #111;
    background: #fdfdfc;
}

.project-tag {
    font-size: 0.85rem;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.project-card h3 {
    font-size: 1.3rem;
}

.project-card p {
    color: var(--text-sub);
    font-family: var(--font-jp);
}

.project-thumb {
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 10px;
    background: #f8f8f8;
}

.project-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.stacked-list {
    display: grid;
    gap: 40px;
}

.stack-item {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: center;
}

.stack-text h4 {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.stack-text .period {
    font-size: 0.9rem;
    color: var(--text-sub);
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.stack-text p {
    color: var(--text-sub);
    font-family: var(--font-jp);
    margin-bottom: 10px;
}

.stack-thumb {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    background: #f8f8f8;
}

.stack-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.profile-compact {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.profile-compact img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 14px;
    border: 1.5px solid #111;
    align-self: flex-start;
}

.profile-main h2 {
    margin-bottom: 6px;
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
}

.profile-main p {
    font-family: var(--font-jp);
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 8px;
}

.resume {
    display: grid;
    gap: 10px;
}

.resume-card {
    background: #fff;
    border: 1.5px solid #111;
    border-radius: 14px;
    padding: 12px 14px;
}

.resume-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.resume-card ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.resume-card li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-sub);
    font-family: var(--font-jp);
    font-size: 0.95rem;
}

.embed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.video-embed {
    position: relative;
    padding-top: 56.25%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.video-embed .placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    color: var(--text-sub);
    font-family: var(--font-jp);
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
}

.timeline-grid {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.timeline-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--accent);
    color: #111;
    border-radius: 12px;
    padding: 10px 18px;
    margin-bottom: 18px;
    font-weight: 700;
}

.timeline-bar span {
    text-align: center;
}

.timeline-grid::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: var(--accent);
    transform: translateX(-50%);
}

.year-row {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 16px;
    align-items: start;
    position: relative;
}

.axis-year {
    justify-self: center;
    background: #fff;
    border: 1.5px solid var(--accent);
    border-radius: 12px;
    padding: 6px 10px;
    font-weight: 700;
    color: var(--text-main);
    z-index: 1;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.entry-card {
    display: block;
    background: #fff;
    border: 1.5px solid #111;
    border-radius: 12px;
    padding: 12px 14px;
    color: inherit;
    transition: transform 0.2s ease;
}

.entry-card:hover {
    transform: translate(-3px, -3px);
}

.entry-card .period {
    font-weight: 700;
    color: var(--text-main);
}

.entry-card .role {
    margin: 4px 0;
    font-family: var(--font-jp);
}

.entry-card .desc,
.entry-card .meta {
    color: var(--text-sub);
    font-family: var(--font-jp);
    font-size: 0.95rem;
    margin-top: 2px;
}

.entry-card.placeholder {
    min-height: 10px;
}

@media (max-width: 900px) {
    .timeline-grid::before {
        left: 14px;
    }
    .year-row {
        grid-template-columns: 1fr;
        padding-left: 26px;
    }
    .axis-year {
        justify-self: flex-start;
        margin-left: -26px;
        margin-bottom: 6px;
    }
}

.contact-panel {
    background: #fff;
    border: 1.5px solid #111;
    border-radius: 14px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 12px 12px 0 #111;
}

.contact-panel h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.contact-panel p {
    color: var(--text-sub);
    font-family: var(--font-jp);
}

.contact-form-section {
    padding: 40px 0 80px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
}

.contact-card,
.contact-history {
    background: #fff;
    border: 1.5px solid #111;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 12px 12px 0 #111;
}

.contact-card .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.contact-card label {
    font-weight: 700;
    display: flex;
    gap: 4px;
    align-items: center;
}

.contact-card input,
.contact-card textarea {
    border: 1.5px solid #111;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: var(--font-jp);
    background: #f8f8f8;
}

.contact-card textarea {
    resize: vertical;
    min-height: 120px;
}

.req {
    color: var(--accent);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-history .history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-entry {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #fafafa;
}

.history-title {
    font-weight: 700;
}

.history-meta {
    color: var(--text-sub);
}

.history-desc {
    color: var(--text-main);
    margin-top: 4px;
    white-space: pre-wrap;
}

.personal-grid .gallery-card {
    display: flex;
    flex-direction: column;
}

.placeholder-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1.5px dashed var(--border);
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--text-sub);
    background: rgba(0,0,0,0.02);
    font-family: var(--font-jp);
}

.splash {
    position: fixed;
    inset: 0;
    background: #f6f6f6;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.6s ease;
}

.splash.hidden {
    display: none;
}

.splash.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    width: min(1100px, 96vw);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.splash-head h3 {
    margin: 4px 0;
}

.splash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    animation: flowY 8s linear infinite alternate;
}

.splash-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 6px 6px 0 #111;
}

.splash-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
}

.splash-meta {
    padding: 10px;
}

.splash-item-title {
    font-weight: 700;
}

.splash-item-desc {
    color: var(--text-sub);
    font-family: var(--font-jp);
    font-size: 0.9rem;
}

@keyframes flowY {
    0% { transform: translateY(-15%); }
    100% { transform: translateY(15%); }
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .contact-card,
    .contact-history {
        box-shadow: 8px 8px 0 #111;
    }
    .form-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

.dark-page .project-card,
.dark-page .gallery-card,
.dark-page .resume-card,
.dark-page .contact-panel,
.dark-page .entry-card,
.dark-page .tab,
.dark-page .comment-dialog,
.dark-page .timeline-bar {
    background: var(--panel);
    border-color: var(--border);
    color: var(--text-main);
    box-shadow: none;
}

.dark-page .tab.active {
    box-shadow: none;
}

.dark-page .project-card p,
.dark-page .gallery-card p,
.dark-page .resume-card p,
.dark-page .contact-panel p,
.dark-page .entry-card .desc,
.dark-page .entry-card .meta,
.dark-page .entry-card .role {
    color: var(--text-sub);
}

.dark-page .pill {
    background: rgba(255,255,255,0.08);
    color: var(--text-main);
}

.dark-page .chip,
.dark-page .chip.ghost {
    background: rgba(255,255,255,0.08);
    color: var(--text-main);
    border-color: var(--border);
}

.dark-page .comment-backdrop {
    background: rgba(0,0,0,0.65);
}

.dark-page .comment-dialog {
    background: #141824;
}

.site-footer {
    border-top: 1px solid #111;
    padding: 18px 0 24px;
    color: var(--text-sub);
    font-size: 0.95rem;
    background: var(--bg);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

@media (max-width: 960px) {
    .nav-layout {
        gap: 12px;
    }

    .site-header nav ul {
        gap: 14px;
        font-size: 0.9rem;
    }

    .section-head {
        flex-direction: column;
    }

    .contact-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        padding-top: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
