/* Top utility line */
.top-utility {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border);
    z-index: 1100;
}

.utility-inner {
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 0 32px;
    box-sizing: border-box;
}

.site-nav {
    position: fixed;
    top: 30px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    box-sizing: border-box;
    z-index: 1000;
}

body {
    padding-top: 90px;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-left::after {
    content: none;
}

.nav-title {
    font-family: "Cinzel", serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-decoration: none;
    color: var(--text);
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
}

.nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 32px;
    min-width: 220px;
    display: none;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 12px;
}

.site-nav.nav-open .nav-menu {
    display: block;
}

.nav-center {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.nav-link {
    font-family: "Cinzel", serif;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--text);
    padding: 6px 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.85;
}

.nav-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    opacity: 1;}

.nav-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 34px;
    height: 28px;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon {
    width: 16px;
    height: 16px;
    display: block;
}

body.dark-mode .nav-icon--theme {
    filter: invert(1);
}

:root {
    --bg: #f4f1ec;
    --panel-bg: #ffffff;
    --border: #b8b2a8;
    --text: #2b2b2b;
    --accent: #6b5cff;
}

body.dark-mode {
    --bg: #0e1320;
    --panel-bg: #151c2f;
    --border: #2e3a5f;
    --text: #e6e9f0;
    --accent: #8aa2ff;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

/* Config Menu */
.config-menu {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 12px;
}

.config-btn,
.lang-switch {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
}

/* Header */
.main-header {
    text-align: center;
    padding: 80px 20px 30px;
}

.ff-title {
    font-family: "Cinzel", serif;
    letter-spacing: 3px;
    margin: 0;
}

.subtitle {
    opacity: 0.75;
    margin-top: 8px;
}

/* JRPG Menu */
.horizontal-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px;
}

.nav-item {
    padding: 10px 18px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    font-family: "Cinzel", serif;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.nav-item:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Content */
.content-area {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.glass-box {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 24px;
}
.cv-item {
    margin-bottom: 20px;
}

.cv-item h3 {
    margin: 0;
    font-size: 1rem;
}

.cv-date {
    font-size: 0.8rem;
    opacity: 0.7;
}

.cv-list {
    padding-left: 18px;
}

.cv-list li {
    margin-bottom: 8px;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.skill-grid span {
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    font-size: 0.85rem;
}

/* Blog */
.blog-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.blog-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.blog-sidebar {
    position: sticky;
    top: 116px;
}

.blog-search-box {
    margin-bottom: 0;
    width: min(100%, 420px);
}

.blog-search-box label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    opacity: 0.85;
}

.blog-search-box input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    color: var(--text);
    box-sizing: border-box;
}

.blog-search-feedback {
    margin: 10px 0 0;
    font-size: 0.85rem;
    opacity: 0.75;
}

.index-month {
    margin: 20px 0 8px;
    font-family: "Cinzel", serif;
    font-size: 0.9rem;
}

.index-list {
    margin: 0;
    padding-left: 18px;
}

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

.index-list a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px dotted transparent;
}

.index-list a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.index-empty {
    margin: 6px 0 0;
    font-size: 0.85rem;
    opacity: 0.75;
}

.post-card {
    margin-bottom: 16px;
}

.post-date {
    margin: 0 0 8px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
}

.post-tags span {
    border: 1px solid var(--border);
    padding: 4px 8px;
    font-size: 0.75rem;
}

.no-results {
    text-align: center;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.contact-list {
    margin: 0;
    padding-left: 18px;
}

.contact-list li {
    margin-bottom: 8px;
}

.contact-panel {
    display: grid;
    gap: 24px;
}

.contact-panel__intro h2 {
    margin-top: 0;
}

.contact-lead {
    margin: 8px 0 16px;
    opacity: 0.8;
}

.contact-highlights {
    margin: 0;
    padding-left: 18px;
}

.contact-highlights li {
    margin-bottom: 6px;
}

.contact-form {
    display: grid;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-field {
    display: grid;
    gap: 6px;
}

.form-field label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel-bg);
    color: var(--text);
    font-family: "Inter", sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(107, 92, 255, 0.2);
}

.field-hint {
    font-size: 0.78rem;
    opacity: 0.7;
}

.field-error {
    font-size: 0.78rem;
    color: #b42318;
    min-height: 16px;
}

.form-field.is-invalid .form-control {
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.form-field.is-valid .form-control {
    border-color: #067647;
    box-shadow: 0 0 0 3px rgba(6, 118, 71, 0.12);
}

.consent-field {
    margin-top: 6px;
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
}

.consent input {
    margin-top: 2px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

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

.btn-primary {
    border: 1px solid var(--border);
    background: var(--panel-bg);
    color: var(--text);
    padding: 12px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-family: "Cinzel", serif;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-primary.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-note {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.7;
}

.form-alert {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 0.88rem;
    display: none;
}

.form-alert.is-success {
    display: block;
    border-color: #067647;
    background: rgba(6, 118, 71, 0.08);
    color: #067647;
}

.form-alert.is-error {
    display: block;
    border-color: #b42318;
    background: rgba(180, 35, 24, 0.08);
    color: #b42318;
}

/* Footer */
.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.75;
}

.site-footer p {
    margin: 0 0 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.social-link {
    width: 34px;
    height: 34px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    text-decoration: none;
    font-family: "Cinzel", serif;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: lowercase;
    transition: all 0.2s ease;
}

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

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.scroll-top-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    color: var(--text);
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, border-color 0.2s ease;
    z-index: 1200;
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
    .top-utility .utility-inner {
        padding: 0 20px;
    }

    .site-nav {
        padding: 0 20px;
    }

    .nav-menu {
        right: 20px;
    }

    .content-area {
        margin: 28px auto;
    }

    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .blog-toolbar {
        justify-content: stretch;
    }

    .blog-search-box {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .top-utility {
        height: 28px;
    }

    .top-utility .utility-inner {
        padding: 0 14px;
    }

    .site-nav {
        top: 28px;
        height: 56px;
        padding: 0 14px;
    }

    body {
        padding-top: 84px;
    }

    .nav-left {
        max-width: calc(100% - 50px);
    }

    .nav-title {
        font-size: 0.8rem;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-menu {
        top: calc(100% + 6px);
        right: 14px;
        min-width: 200px;
        padding: 10px;
    }

    .nav-link {
        font-size: 0.72rem;
        padding: 6px 8px;
    }

    .nav-btn {
        width: 32px;
        height: 26px;
        font-size: 0.72rem;
    }

    .main-header {
        padding: 64px 16px 24px;
    }

    .ff-title {
        font-size: 1.3rem;
        letter-spacing: 2px;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .horizontal-nav {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
    }

    .content-area {
        margin: 20px auto;
        padding: 0 14px;
    }

    .glass-box {
        padding: 18px;
    }
}

@media (max-width: 420px) {
    body {
        padding-top: 84px;
    }

    .nav-title {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    .nav-link {
        font-size: 0.68rem;
    }

    .ff-title {
        font-size: 1.15rem;
    }

    .glass-box {
        padding: 16px;
    }
}


