@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    --bg-color: #fafafa;
    --text-color: #111111;
    --muted-text: #666666;
    --separator-color: #cccccc;
    --icon-color: #111111;
    --card-border: #eaeaea;
    --card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

body.dark-theme {
    --bg-color: #080808;
    --text-color: #e6e6e6;
    --muted-text: #666666;
    --separator-color: #333333;
    --icon-color: #e6e6e6;
    --card-border: #1f1f1f;
    --card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    animation: fadeUp 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.header-link:hover {
    opacity: 0.7;
}

.logo-svg {
    width: 40px;
    height: 40px;
    stroke: var(--text-color);
    transition: stroke 0.5s ease;
}

.domain-name {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--muted-text);
    font-weight: 600;
    transition: color 0.5s ease;
}

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--icon-color);
    transition: transform 0.3s ease, color 0.5s ease;
    z-index: 10;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.moon-icon { display: none; }
body.dark-theme .moon-icon { display: block; }
body.dark-theme .sun-icon { display: none; }

.intro-link {
    display: inline-block;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--separator-color);
    padding-bottom: 0.2rem;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.intro-link:hover {
    color: var(--muted-text);
    border-color: var(--muted-text);
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid transparent;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--muted-text);
    font-family: 'Courier New', Courier, monospace;
    white-space: nowrap;
    flex-shrink: 0; 
    width: 100px;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.post-title:hover {
    color: var(--muted-text);
}

@media (max-width: 600px) {
    .post-item {
        flex-direction: column;
        gap: 0.3rem;
        padding: 0.8rem 0;
    }
    .post-meta {
        width: auto;
    }
}

article h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

article .post-date {
    display: block;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--separator-color);
    padding-bottom: 1.5rem;
}

article p {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

article h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

article a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: var(--muted-text);
    text-underline-offset: 4px;
    transition: color 0.3s, text-decoration-color 0.3s;
}

article a:hover {
    color: var(--muted-text);
    text-decoration-color: var(--text-color);
}

blockquote {
    margin: 2.5rem 0; 
    padding: 0.5rem 0 0.5rem 1.5rem; 
    border-left: 3px solid var(--text-color); 
    color: var(--muted-text); 
    font-style: italic;
    background: transparent;
}

blockquote p {
    margin: 0;
    line-height: 1.6;
}

blockquote strong {
    font-style: normal;
    font-size: 0.95rem;
    color: var(--text-color);
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .theme-toggle { top: 1.5rem; right: 1.5rem; }
    .container { padding: 2rem 1.5rem; }
    article h1 { font-size: 1.8rem; }
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.site-nav {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    margin-top: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    transition: color 0.3s ease;
}

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

.intro-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.page-intro {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--muted-text);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted-text);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.page-header-line {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--separator-color);
    padding-bottom: 1.5rem;
    display: block;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    font-family: inherit;
    background: transparent;
    border: 1px solid var(--separator-color);
    border-radius: 12px;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: var(--text-color);
}

.error-wrapper {
    text-align: center;
    padding: 10vh 0 15vh;
}

.error-title {
    font-size: 8rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 1rem;
    color: var(--text-color);
    letter-spacing: -0.05em;
}

.error-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--separator-color);
    padding-bottom: 0.2rem;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.error-link:hover {
    color: var(--muted-text);
    border-color: var(--muted-text);
}

.thanks-wrapper {
    padding-top: 2rem;
    text-align: center;
}

.thanks-btn {
    background: transparent;
    border: 1px solid var(--separator-color);
    color: var(--text-color);
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.thanks-btn:hover:not(:disabled) {
    border-color: var(--text-color);
    transform: translateY(-2px);
}

.thanks-btn:disabled {
    opacity: 0.5;
    cursor: default;
    border-color: var(--separator-color);
}

.thanks-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease, fill 0.3s ease;
}

.thanks-btn:hover:not(:disabled) .thanks-icon {
    transform: scale(1.1);
}

.thanks-btn.is-clicked .thanks-icon {
    fill: var(--text-color);
}

.thanks-count {
    background: var(--separator-color);
    color: var(--text-color);
    padding: 0.1rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

body.dark-theme .thanks-count {
    background: #333;
}