/* ==========================================================================
   KASOUMUSHI STUDIO — Yorimiya-inspired clean portfolio
   ========================================================================== */
:root,
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c0c0e;
    --bg-elevated: #141418;
    --bg-card: #16161b;
    --text: #f2f0ec;
    --text-soft: #b8b4ad;
    --text-muted: #7a7670;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent: #e8e2d6;
    --accent-warm: #c9a88a;
    --accent-cool: #9bb0c0;
    --header-bg: rgba(12, 12, 14, 0.88);
    --header-bg-scrolled: rgba(12, 12, 14, 0.92);
    --nav-panel-bg: rgba(12, 12, 14, 0.96);
    --surface: rgba(255, 255, 255, 0.02);
    --input-bg: rgba(0, 0, 0, 0.35);
    --input-bg-focus: rgba(0, 0, 0, 0.45);
    --toast-bg: rgba(20, 20, 24, 0.95);
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    --bg-image-filter: blur(40px) brightness(0.18) saturate(0.7);
    --bg-wash: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(30, 28, 26, 0.5) 0%, transparent 60%),
        linear-gradient(180deg, rgba(12, 12, 14, 0.4) 0%, var(--bg) 70%);
    --bg-vignette: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
    --overlay-text: #f2f0ec;
    --overlay-muted: rgba(242, 240, 236, 0.72);
    --overlay-grad: linear-gradient(to top, rgba(8, 8, 10, 0.88) 0%, rgba(8, 8, 10, 0.2) 42%, transparent 70%);
    --overlay-grad-hover: linear-gradient(to top, rgba(8, 8, 10, 0.95) 0%, rgba(8, 8, 10, 0.55) 50%, rgba(8, 8, 10, 0.2) 100%);
    --radius: 6px;
    --header-h: 68px;
    --site-pad: clamp(24px, 3.5vw, 64px);
    --font-display: 'Plus Jakarta Sans', 'Outfit', 'Noto Sans JP', sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Outfit', 'Noto Sans JP', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-body: 'Outfit', 'Noto Sans JP', sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 1280px) {
    :root,
    html[data-theme="dark"] {
        --site-pad: 108px;
    }
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f3ee;
    --bg-elevated: #fffcf8;
    --bg-card: #ffffff;
    --text: #1c1916;
    --text-soft: #4a4540;
    --text-muted: #7a736c;
    --line: rgba(28, 25, 22, 0.08);
    --line-strong: rgba(28, 25, 22, 0.16);
    --accent: #1c1916;
    --accent-warm: #9a6b45;
    --accent-cool: #4f6b7a;
    --header-bg: rgba(246, 243, 238, 0.9);
    --header-bg-scrolled: rgba(246, 243, 238, 0.96);
    --nav-panel-bg: rgba(246, 243, 238, 0.98);
    --surface: rgba(255, 255, 255, 0.72);
    --input-bg: rgba(255, 255, 255, 0.85);
    --input-bg-focus: #ffffff;
    --toast-bg: rgba(255, 252, 248, 0.96);
    --shadow: 0 16px 40px rgba(28, 25, 22, 0.1);
    --bg-image-filter: blur(48px) brightness(1.28) saturate(0.45);
    --bg-wash: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 250, 244, 0.7) 0%, transparent 60%),
        linear-gradient(180deg, rgba(246, 243, 238, 0.55) 0%, var(--bg) 72%);
    --bg-vignette: radial-gradient(ellipse at center, transparent 55%, rgba(246, 243, 238, 0.35) 100%);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    background: var(--bg);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 300;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.35s ease, color 0.35s ease;
}

html[data-theme="light"] body {
    font-weight: 400;
}

::selection {
    background: rgba(201, 168, 138, 0.35);
    color: #fff;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ==========================================================================
   Background
   ========================================================================== */
.bg-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-image {
    position: absolute;
    inset: -8%;
    background: url('image1 maybe for bg.jpg') center / cover no-repeat;
    filter: var(--bg-image-filter);
    transform: scale(1.08);
    transition: filter 0.4s ease;
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background: var(--bg-wash);
}

.bg-vignette {
    position: absolute;
    inset: 0;
    background: var(--bg-vignette);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--line);
    transition: background 0.35s ease, border-color 0.35s ease;
}

.site-header.scrolled {
    background: var(--header-bg-scrolled);
    border-bottom-color: var(--line);
}

.header-container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 var(--site-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-mark {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text);
}

.logo-sub {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: var(--accent-warm);
    text-transform: uppercase;
}

.header-end {
    display: flex;
    align-items: center;
    gap: 18px;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    flex-shrink: 0;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--surface);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun,
html:not([data-theme]) .theme-toggle .icon-sun {
    display: block;
}

html[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    position: relative;
    padding: 6px 0;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.35s var(--ease);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-toggle.open span:nth-child(1) {
    transform: translateY(7.25px) rotate(45deg);
}
.mobile-toggle.open span:nth-child(2) {
    opacity: 0;
}
.mobile-toggle.open span:nth-child(3) {
    transform: translateY(-7.25px) rotate(-45deg);
}

/* ==========================================================================
   Layout
   ========================================================================== */
.page-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 var(--site-pad);
}

.section {
    padding: 48px 0;
}

.section-label-block {
    text-align: center;
    margin-bottom: 24px;
}

.section-label-jp {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    color: var(--accent-warm);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1.15;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    background: var(--text);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: background 0.25s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.btn-primary:hover {
    background: var(--accent-warm);
    color: #1a1410;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

[hidden] {
    display: none !important;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 28px;
    border: 1px solid var(--line-strong);
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   Profile (landing)
   ========================================================================== */
.profile-section {
    padding-top: calc(var(--header-h) + 24px);
    padding-bottom: 24px;
}

.profile-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 20px;
}

.profile-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.profile-kicker {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    color: var(--accent-warm);
    line-height: 1.2;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.profile-kicker::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.profile-display-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 4.6rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.05;
    color: var(--text);
    background: linear-gradient(135deg, var(--text) 30%, rgba(242, 240, 236, 0.75) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .profile-display-name {
    background: linear-gradient(135deg, #1c1916 20%, #524c44 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-role {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--text-soft);
    text-transform: uppercase;
    margin-top: 4px;
}

.profile-avatar-col {
    display: flex;
    justify-content: center;
}

.profile-avatar-ring {
    width: 200px;
    height: 200px;
    border-radius: 14px;
    padding: 6px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    box-shadow: var(--shadow);
    position: relative;
}

.profile-avatar-ring::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 15px;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-warm), transparent 65%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.profile-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

.profile-name-en {
    font-size: 1rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.profile-aka {
    font-size: 0.82rem;
    color: var(--accent-warm);
    letter-spacing: 0.06em;
}

.profile-text {
    font-size: 0.92rem;
    color: var(--text-soft);
    line-height: 1.75;
    max-width: 62ch;
}

.profile-text.secondary {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}

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

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}

.social-icon:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--surface);
    transform: translateY(-2px);
}

/* ==========================================================================
   Works — 3-column image grid, title on hover
   ========================================================================== */
.works-section {
    padding-top: 36px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    align-items: stretch;
}

.work-item {
    position: relative;
    background: #0d0d10;
    border-radius: 16px;
    overflow: hidden;
    min-height: 0;
    isolation: isolate;
}

.work-thumb {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
}

.work-thumb:focus-visible {
    outline: 2px solid var(--accent-warm);
    outline-offset: 3px;
}

.work-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0d0d10;
}

.work-media-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.7s var(--ease);
}

.work-thumb:hover .work-media-img,
.work-item:focus-within .work-media-img {
    transform: scale(1.04);
}

.work-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px 28px;
    text-align: center;
    background: rgba(8, 8, 10, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    pointer-events: none;
}

.work-thumb:hover .work-overlay,
.work-item:focus-within .work-overlay {
    opacity: 1;
    visibility: visible;
}

.work-title {
    font-family: var(--font-display);
    font-size: clamp(1.02rem, 1.45vw, 1.32rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #f7f5f1;
    line-height: 1.45;
    max-width: 92%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.work-year {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: rgba(247, 245, 241, 0.78);
}

.work-item .procedural-meta {
    display: none;
}

@media (hover: none) {
    .work-overlay {
        opacity: 1;
        visibility: visible;
        align-items: flex-start;
        justify-content: flex-end;
        text-align: left;
        background: linear-gradient(
            to top,
            rgba(8, 8, 10, 0.82) 0%,
            rgba(8, 8, 10, 0.28) 42%,
            transparent 72%
        );
        padding: 18px 18px 16px;
    }

    .work-title {
        max-width: 100%;
        font-size: 0.95rem;
        -webkit-line-clamp: 2;
    }
}

/* Procedural CAD / Blueprint Patterns for works without cover */
.work-media-procedural {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #0d0e12;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

html[data-theme="light"] .work-media-procedural {
    background: #eae6df;
    color: #3b3733;
}

.work-media-procedural .procedural-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
}

html[data-theme="light"] .work-media-procedural .procedural-grid {
    background-image: 
        linear-gradient(to right, rgba(28, 25, 22, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(28, 25, 22, 0.08) 1px, transparent 1px);
}

.work-media-procedural .procedural-graphic {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    color: var(--accent-warm);
    transition: transform 0.5s var(--ease);
}

.work-thumb:hover .procedural-graphic {
    transform: scale(1.1) rotate(6deg);
}

.tech-svg {
    width: 100%;
    height: 100%;
}

.procedural-meta {
    position: absolute;
    bottom: 8px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.08em;
    z-index: 2;
}

html[data-theme="light"] .procedural-meta {
    color: rgba(28, 25, 22, 0.7);
}

.pattern-vmc {
    background: radial-gradient(circle at 50% 50%, #101622 0%, #080a0e 100%);
}
.pattern-vmc .procedural-graphic {
    color: #38bdf8;
}
html[data-theme="light"] .pattern-vmc {
    background: radial-gradient(circle at 50% 50%, #e0f2fe 0%, #f0f9ff 100%);
}
html[data-theme="light"] .pattern-vmc .procedural-graphic {
    color: #0284c7;
}

.pattern-invert {
    background: radial-gradient(circle at 50% 50%, #1a1219 0%, #0b070c 100%);
}
.pattern-invert .procedural-graphic {
    color: #f43f5e;
}
html[data-theme="light"] .pattern-invert {
    background: radial-gradient(circle at 50% 50%, #ffe4e6 0%, #fff1f2 100%);
}
html[data-theme="light"] .pattern-invert .procedural-graphic {
    color: #e11d48;
}

.pattern-pipeline {
    background: radial-gradient(circle at 50% 50%, #151812 0%, #080907 100%);
}
.pattern-pipeline .procedural-graphic {
    color: #a3e635;
}
html[data-theme="light"] .pattern-pipeline {
    background: radial-gradient(circle at 50% 50%, #ecfccb 0%, #f7fee7 100%);
}
html[data-theme="light"] .pattern-pipeline .procedural-graphic {
    color: #65a30d;
}

.pattern-default {
    background: radial-gradient(circle at 50% 50%, #181615 0%, #0b0a09 100%);
}
.pattern-default .procedural-graphic {
    color: var(--accent-warm);
}
html[data-theme="light"] .pattern-default {
    background: radial-gradient(circle at 50% 50%, #f5efe6 0%, #faf8f5 100%);
}
html[data-theme="light"] .pattern-default .procedural-graphic {
    color: var(--accent-warm);
}

.works-more {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    align-items: start;
    max-width: 920px;
    margin: 0 auto;
}

.contact-intro {
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.9;
}

.contact-mail-hint {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.inline-mail-btn {
    color: var(--accent-warm);
    font-weight: 500;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(201, 168, 138, 0.4);
    padding: 0 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.inline-mail-btn:hover {
    color: var(--text);
    border-bottom-color: var(--text);
}

.contact-status {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: var(--accent-cool);
    margin-top: 8px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 2px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 300;
    outline: none;
    transition: border-color 0.25s ease, background 0.25s ease;
    resize: vertical;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--accent-warm);
    background: var(--input-bg-focus);
}

.form-submit {
    width: 100%;
    margin-top: 4px;
}

.form-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 40px 0 56px;
    margin-top: 20px;
}

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

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.footer-tagline {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.footer-meta {
    display: flex;
    align-items: center;
    gap: 24px;
}

.copyright {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.back-to-top {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--text-soft);
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.back-to-top:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--toast-bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast-icon {
    color: var(--accent-warm);
    display: flex;
}

.toast-message {
    font-size: 0.88rem;
    color: var(--text);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.animate-fade-in {
    animation: fadeUp 1s var(--ease) both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .profile-head {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
        margin-bottom: 20px;
    }

    .profile-intro {
        align-items: center;
    }

    .profile-body {
        align-items: center;
        text-align: center;
    }

    .profile-text {
        max-width: none;
    }

    .profile-actions {
        justify-content: center;
        flex-direction: column;
    }

    .works-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .section {
        padding: 40px 0;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 0 20px;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 12px 0 24px;
        background: var(--nav-panel-bg);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--line);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s var(--ease), opacity 0.35s ease;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 14px 0;
    }

    .header-end {
        gap: 12px;
    }

    .mobile-toggle {
        display: flex;
    }

    .works-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-meta {
        flex-direction: column;
        gap: 12px;
    }

    .contact-form {
        padding: 24px 18px;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 0 18px;
    }

    .header-container {
        padding: 0 18px;
    }
}

/* ==========================================================================
   Home extras: filters, booth, detail page
   ========================================================================== */
.section-lead {
    margin-top: 8px;
    font-size: 0.86rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.inline-link {
    color: var(--accent-warm);
    border-bottom: 1px solid rgba(201, 168, 138, 0.45);
    transition: color 0.2s ease;
}

.inline-link:hover {
    color: var(--text);
}

.works-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 24px;
}

.filter-btn {
    padding: 8px 18px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 100px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-btn:hover {
    color: var(--text-soft);
    border-color: var(--line-strong);
}

.filter-btn.active {
    color: var(--bg);
    background: var(--text);
    border-color: var(--text);
}

.empty-works {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

/* BOOTH section */
.booth-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 920px;
    margin: 0 auto;
}

.booth-card {
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 0;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.35s var(--ease);
}

.booth-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.booth-card-media {
    display: block;
    min-height: 200px;
    background: var(--bg-card);
    overflow: hidden;
}

.booth-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.booth-card:hover .booth-card-media img {
    transform: scale(1.04);
}

.booth-card-body {
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.booth-badge {
    align-self: flex-start;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    color: var(--accent-warm);
    border: 1px solid rgba(201, 168, 138, 0.35);
    padding: 3px 10px;
    border-radius: 100px;
}

.booth-card-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.booth-card-title a:hover {
    color: var(--accent-warm);
}

.booth-card-desc {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.7;
    flex: 1;
}

.booth-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.booth-btn {
    padding: 10px 18px;
    font-size: 0.72rem;
}

.booth-tweet-link {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    margin-left: 4px;
}

.booth-tweet-link:hover {
    color: var(--accent-cool);
}

.booth-note {
    margin-top: 32px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.booth-note a {
    color: var(--accent-warm);
    border-bottom: 1px solid rgba(201, 168, 138, 0.35);
}

/* Work detail page */
.page-work .site-footer {
    margin-top: 0;
}

.work-detail-main {
    padding-top: calc(var(--header-h) + 36px);
    padding-bottom: 40px;
    min-height: 70vh;
}

.work-loading {
    color: var(--text-muted);
    padding: 80px 0;
    text-align: center;
}

.wd-article {
    width: min(1000px, 100%);
    margin: 0 auto 64px;
}

.wd-head {
    text-align: center;
    margin: 12px 0 48px;
}

.wd-title {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.25rem);
    font-weight: 300;
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: var(--text);
}

.wd-copy {
    margin: 0 0 40px;
}

.wd-date {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--text);
    margin-bottom: 10px;
}

.wd-summary,
.wd-para {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.85;
    margin-bottom: 12px;
}

.wd-link-line {
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 16px 0 0;
    color: var(--text);
    word-break: break-all;
}

.wd-link-line a {
    color: var(--accent-cool);
    border-bottom: 1px solid rgba(155, 176, 192, 0.4);
}

.wd-link-line a:hover {
    color: var(--text);
    border-bottom-color: var(--text);
}

.wd-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

.wd-image {
    width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #0a0a0c;
}

.wd-image img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.wd-hero {
    margin-bottom: 40px;
    border: 1px solid var(--line);
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    max-height: 480px;
}

.wd-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.wd-hero-fallback {
    width: 100%;
    height: 100%;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 40%, rgba(201, 168, 138, 0.2), transparent 50%),
        linear-gradient(145deg, #1a1a20, #0e0e12);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.wd-body {
    display: grid;
    grid-template-columns: 1.4fr 0.75fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 56px;
}

.wd-subhead {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 28px 0 14px;
    color: var(--text);
}

.wd-main .wd-subhead:first-child {
    margin-top: 0;
}

.wd-para {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.9;
    margin-bottom: 14px;
}

.wd-list {
    margin: 0 0 20px 1.1em;
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.85;
}

.wd-list li {
    margin-bottom: 6px;
}

.wd-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.wd-gallery-item {
    border: 1px solid var(--line);
    overflow: hidden;
    background: var(--bg-card);
    aspect-ratio: 16 / 9;
}

.wd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wd-aside {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wd-links {
    padding: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.wd-link-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wd-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    border: 1px solid var(--line-strong);
    color: var(--text-soft);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.wd-link-btn:hover {
    color: var(--text);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
}

.wd-link-btn.booth {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.wd-link-btn.booth:hover {
    background: var(--accent-warm);
    color: #1a1410;
    border-color: var(--accent-warm);
}

.wd-link-btn.tweet {
    border-color: rgba(155, 176, 192, 0.35);
}

.wd-aside-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.wd-aside-note a {
    color: var(--accent-cool);
}

.wd-aside-note .muted {
    margin-top: 8px;
    opacity: 0.85;
}

.wd-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 48px;
}

.wd-pager-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.wd-pager-link span {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.wd-pager-link:hover strong {
    color: var(--accent-warm);
}

.wd-pager-link.next {
    text-align: right;
}

.wd-pager-all {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 12px;
    border: 1px solid var(--line);
}

.wd-pager-all:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.wd-related-grid {
    margin-top: 8px;
}

.wd-missing {
    text-align: center;
    padding: 100px 20px;
}

.wd-missing h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 12px;
}

.wd-missing p {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.page-content-pad {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 var(--site-pad);
}

@media (max-width: 900px) {
    .booth-card {
        grid-template-columns: 1fr;
    }

    .booth-card-media {
        min-height: 200px;
        aspect-ratio: 16 / 10;
    }

    .wd-body {
        grid-template-columns: 1fr;
    }

    .wd-aside {
        position: static;
    }
}

@media (max-width: 768px) {
    .wd-pager {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .wd-pager-link.next {
        text-align: center;
    }
}
