:root {
    --bg-color: #1f1a17;
    --container-bg: #2a2320;
    --text-color: #f2e6d8;
    --accent-color: #d7b596;
    --secondary-accent: #c68c66;
    --pop-color: #6fb5ad;
    --border-color: #5a4a3f;
    --font-stack: "Segoe UI", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-stack);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image:
        radial-gradient(1200px 600px at 10% -20%, rgba(198, 140, 102, 0.18), transparent 60%),
        radial-gradient(1000px 500px at 90% 0%, rgba(215, 181, 150, 0.12), transparent 60%),
        linear-gradient(180deg, #1b1715 0%, #201a17 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(111, 181, 173, 0.08);
    overflow: hidden;
    position: relative;
    border-radius: 10px;
}

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.015) 50%, rgba(0, 0, 0, 0.04) 50%);
    background-size: 100% 3px;
    pointer-events: none;
    z-index: 2;
}

header {
    position: relative;
    background: linear-gradient(180deg, #2e2622 0%, #28211e 100%);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 60px 40px;
    text-align: center;
}

header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--pop-color), transparent);
    opacity: 0.5;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.88;
    max-width: 70ch;
    margin: 10px auto 0;
    color: #d6c3b0;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
}

.site-nav a {
    color: #baaa9e;
    text-decoration: none;
    font-size: 0.92rem;
    padding: 4px 14px;
    border: 1px solid var(--border-color);
    background: rgba(215, 181, 150, 0.08);
    border-radius: 4px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    letter-spacing: 0.5px;
}

.site-nav a:hover {
    color: var(--accent-color);
    background: #302b21;
    border-color: var(--border-color);
    box-shadow: 0 0 0 1px rgba(215, 181, 150, 0.22);
}

.site-nav a:focus-visible,
.social-card:focus-visible,
.cta-link:focus-visible {
    outline: 2px solid var(--pop-color);
    outline-offset: 2px;
}

main {
    padding: 40px;
    position: relative;
    z-index: 1;
}

.section {
    margin-bottom: 50px;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--pop-color);
    padding-left: 15px;
    color: var(--accent-color);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.section-description {
    color: #cbb8a7;
    margin-bottom: 25px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.tech-item {
    background: #302824;
    border: 1px solid #59493d;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
    border-radius: 8px;
    padding: 18px;
}

.tech-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    opacity: 0.45;
    border-radius: 8px 0 0 8px;
}

.tech-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
}

.tech-item h3 {
    color: #fff7f0;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.tech-item p {
    color: #e0cfc1;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.social-card {
    display: flex;
    align-items: center;
    background: #302824;
    border: 1px solid #59493d;
    padding: 12px 18px;
    text-decoration: none;
    color: #fff7f0;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, background-color 0.3s;
    min-width: 200px;
    border-radius: 8px;
}

.social-card:hover {
    border-color: var(--pop-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(111, 181, 173, 0.2);
    background: #2b2f2e;
    transform: translateY(-2px);
}

.social-thumb {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #241d19;
    border-radius: 8px;
    color: var(--accent-color);
    border: 1px solid #5f4e42;
}

.social-title {
    font-weight: 700;
    display: block;
    font-size: 1rem;
    color: var(--accent-color);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(215, 181, 150, 0.1);
    border: 1px solid #8d7562;
    color: var(--accent-color);
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
}

.action-row {
    margin-top: 16px;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f5dec9;
    text-decoration: none;
    border: 1px solid #826b59;
    background: rgba(111, 181, 173, 0.08);
    padding: 9px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cta-link:hover {
    color: #fffaf5;
    background: rgba(111, 181, 173, 0.18);
    border-color: var(--pop-color);
    box-shadow: 0 0 0 1px rgba(111, 181, 173, 0.12);
}

.notes-shell {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.notes-sidebar,
.notes-view,
.embed-shell {
    background: #302824;
    border: 1px solid #59493d;
    border-radius: 8px;
    padding: 18px;
}

.note-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.note-list-empty,
.note-empty,
.note-error {
    color: #d6c3b0;
}

.note-error {
    color: #ffcfb8;
}

.note-item {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #5d4c40;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    padding: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.note-item:hover,
.note-item.active {
    transform: translateY(-2px);
    border-color: var(--pop-color);
    background: rgba(111, 181, 173, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.note-item-title {
    display: block;
    color: #fff7f0;
    font-weight: 700;
}

.note-item-meta {
    display: block;
    color: #cbb8a7;
    margin-top: 6px;
    font-size: 0.84rem;
}

.note-item-summary {
    color: #e0cfc1;
    margin-top: 10px;
    font-size: 0.9rem;
}

.note-article-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #59493d;
}

.note-article-kicker {
    color: var(--pop-color);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.note-article h3 {
    color: #fff7f0;
    font-size: 1.8rem;
    margin-top: 8px;
}

.note-article-meta {
    color: #cbb8a7;
    margin-top: 10px;
    font-size: 0.9rem;
    word-break: break-word;
}

.note-article p,
.note-article li {
    color: #f1e4d7;
}

.note-article p,
.note-article ul,
.note-article ol,
.note-article blockquote,
.note-article pre {
    margin-bottom: 16px;
}

.note-article ul,
.note-article ol {
    padding-left: 1.4rem;
}

.note-article h1,
.note-article h2,
.note-article h3,
.note-article h4 {
    color: var(--accent-color);
    margin: 28px 0 12px;
}

.note-article blockquote {
    border-left: 3px solid var(--pop-color);
    padding-left: 14px;
    color: #d8c5b4;
}

.note-article code,
kbd {
    font-family: Consolas, "Courier New", monospace;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 0.1em 0.35em;
}

.note-article pre {
    overflow-x: auto;
    padding: 14px;
    background: #241d19;
    border: 1px solid #59493d;
    border-radius: 8px;
}

.note-article pre code {
    background: transparent;
    border: 0;
    padding: 0;
}

.embed-shell {
    padding: 10px;
}

.embed-frame {
    width: 100%;
    min-height: 880px;
    border: 0;
    border-radius: 6px;
    background: #1b1715;
}

.embed-frame--compact {
    min-height: 460px;
}

.hint {
    color: #cbb8a7;
}

footer {
    border-top: 1px solid var(--border-color);
    color: #bca997;
    padding: 24px 40px;
    text-align: center;
}

@media (max-width: 860px) {
    body {
        padding: 12px;
    }

    header,
    main,
    footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .notes-shell {
        grid-template-columns: 1fr;
    }

    .social-card {
        min-width: 0;
        width: 100%;
    }

    .embed-frame {
        min-height: 720px;
    }
}

.social-thumb-bsky {
    color: #3b82f6;
}

.social-thumb-yt {
    color: #ef4444;
}

.social-thumb-x {
    color: #e7e7e7;
    font-style: normal;
    font-size: 1.2rem;
}

.social-thumb-steam {
    color: #c6d4df;
}

.action-row {
    margin-top: 12px;
}

.cta-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    border: 1px solid var(--accent-color);
    background: rgba(215, 181, 150, 0.12);
    padding: 6px 12px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border-radius: 999px;
}

.cta-link:hover {
    background: var(--accent-color);
    color: #2a1f19;
    box-shadow: 0 0 0 4px rgba(215, 181, 150, 0.2);
}

.embed-shell {
    border: 1px solid #59493d;
    background: #241d1a;
    padding: 10px;
    border-radius: 8px;
}

.embed-frame {
    width: 100%;
    min-height: 560px;
    border: 1px solid #4f4137;
    background: #1a1614;
    border-radius: 6px;
}

.embed-frame--compact {
    min-height: 100px;
}

footer {
    border-top: 1px solid var(--border-color);
    padding: 20px 40px;
    color: #9e8a7a;
    font-size: 0.82rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    header h1 {
        font-size: 2rem;
    }

    .container {
        border-radius: 0;
        border-width: 1px 0;
    }

    main {
        padding: 28px 18px;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        flex-direction: column;
    }

    .social-card {
        min-width: 0;
        width: 100%;
    }

    .embed-frame {
        min-height: 420px;
    }
}
