:root {
    --bg-color: #0c1210;
    --text-primary: #e6e6e6;
    --text-muted: #888888;
    --font-serif: 'EB Garamond', Georgia, serif;
    --font-mono: 'SF Mono', 'Roboto Mono', Consolas, monospace;
    --font-name: 'EB Garamond', Georgia, serif;
    --transition-speed: 0.4s;
}

body.light-theme {
    --bg-color: #f5f2eb;
    --text-primary: #000000;
    --text-muted: #666666;
    --font-name: 'Playfair Display', Georgia, serif;
}

body.navy-theme {
    --bg-color: #050b14;
    --text-primary: #e2e8f0;
    --text-muted: #718096;
    --font-name: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

h1 {
    font-family: var(--font-mono);
    font-weight: 400;
}

.name-cpa {
    font-size: 3.5rem;
    letter-spacing: 0;
}

button {
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    text-align: left;
    outline: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-primary);
}

ul {
    list-style: none;
}

/* Layout */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    padding: 2rem 2rem 3rem 2rem;
    position: relative;
}

.hint-container {
    position: fixed;
    top: 30px;
    right: 40px;
}

.hint-text {
    font-size: 13px;
    text-transform: lowercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.esc-hint-above-menus {
    position: absolute;
    top: -25px;
    left: 0;
    font-size: 13px;
    text-transform: lowercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

.menus-container.has-open .esc-hint-above-menus {
    opacity: 1;
}

/* Main Name */
.name-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.main-name {
    font-size: 6rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    cursor: default;
    display: inline-block;
}

.name-en {
    transition: opacity var(--transition-speed) ease;
}

/* Divider line under name */
.divider-line {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    margin-bottom: 2.5rem;
}

/* Two-column menus container */
.menus-container {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 4rem;
    align-items: start;
    width: 100%;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.accordion {
    width: 100%;
}

/* Category Headers */
.accordion-header {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-bottom: 0.5rem;
    white-space: nowrap;
}

/* Rotating arrow icon */
.accordion-header .icon {
    margin-left: 0.5rem;
    color: var(--text-muted);
    font-size: 12px;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.accordion.open .accordion-header .icon {
    transform: rotate(90deg);
}

/* Accordion content: fade + slide */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1),
                opacity 0.3s ease,
                transform 0.3s ease;
}

.accordion.open .accordion-content {
    max-height: 9999px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 1s ease-in-out,
                opacity 0.4s ease 0.05s,
                transform 0.35s ease;
}

.accordion-content p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.accordion-content a {
    text-decoration: underline;
}

/* Sub-items */
.item-list {
    margin-top: 1rem;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.item-list>li {
    position: relative;
}

.item-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    font-weight: bold;
    transition: color 0.2s ease;
}

.item-header:hover {
    color: var(--text-primary);
}

.item-name {
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: flex;
    align-items: center;
}

.dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: var(--text-primary);
    border-radius: 50%;
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.item-header:hover .dot,
.item-list>li.open .dot {
    opacity: 1;
}

/* Rotating arrow for sub-items */
.item-icon {
    font-size: 12px;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    color: var(--text-muted);
}

.item-list>li.open .item-icon {
    transform: rotate(90deg);
}

/* Sub-item details: fade + slide */
.item-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1),
                opacity 0.25s ease,
                transform 0.25s ease;
    color: var(--text-muted);
    padding-top: 0;
    margin-left: 20px;
}
.item-details p:first-child {
    text-decoration: underline;
    text-underline-offset: 3px;
    color: var(--text-primary);
}

.item-list>li.open .item-details {
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0);
    padding-top: 0.5rem;
    transition: max-height 0.6s ease-in-out,
                opacity 0.3s ease 0.05s,
                transform 0.3s ease;
}

.item-details p {
    margin-bottom: 0.5rem;
}

.item-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--text-primary);
    font-style: italic;
    font-family: var(--font-serif);
    font-size: 15px;
}

.item-reading {
    color: var(--text-muted);
    margin-left: 20px;
    line-height: 1.8;
}

.book-title {
    color: var(--text-primary);
    font-style: italic;
    font-family: var(--font-serif);
    font-size: 17px;
}

.book-author {
    margin-left: 8px;
    font-size: 13px;
}

/* Footer — inside container, naturally aligned with columns */
.footer {
    width: 100%;
    margin-top: 9rem;
    display: flex;
    justify-content: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 1px;
    align-items: center;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Animations */
.fade-in {
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0;
}

.hint-container.fade-in { animation-delay: 1.5s; }
.name-container.fade-in { animation-delay: 0.2s; }
.menus-container.fade-in { animation-delay: 0.8s; }
.footer.fade-in { animation-delay: 1.2s; }

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

/* Responsive */
@media (max-width: 768px) {
    .columns-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .main-name {
        font-size: 4rem;
    }

    .hint-container {
        top: 20px;
        right: 20px;
    }
}
