:root {
    --ghost-white: #ffffff;
    --light-gray: #e5e5e5;
    --quick-silver: #666666;
    --raisin-black: #2e2e2e;
}

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

html,
body,
h1,
h2,
ul,
li {
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    width: 100%;
}

body {
    background: var(--ghost-white);
    color: var(--raisin-black);
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    font-size: 1.1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Fira Mono', monospace;
    font-weight: 700;
}

a {
    transition: color 0.2s ease;
}

#home {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

#card {
    margin: 0 auto;
    text-align: center;
    max-width: 680px;
    width: 100%;
}

#card-header {
    padding-bottom: 1.2rem;
}

#avatar {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    overflow: hidden;
    margin: 0 auto 0.8rem;
    box-shadow: 0px 2px 0 0px rgba(0, 0, 0, 0.6);
}

#avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transform-origin: center center;
}

#card-title {
    font-size: 2.2rem;
    text-transform: uppercase;
}

#card-subtitle {
    color: var(--quick-silver);
    font-weight: 400;
    white-space: nowrap;
    font-size: 0.95rem;
}

#card-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    width: 100%;
    margin: 0 auto;
}

.card-social-item {
    font-size: 2.4rem;
    padding: 0.5rem;
}

.custom-ico {
    font-family: 'Fira Mono', monospace;
    font-weight: 700;
    font-size: 1em;
    letter-spacing: -0.03em;
    line-height: 1;
}

.card-social-item a {
    color: var(--quick-silver);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.card-social-item a:hover {
    color: var(--raisin-black);
}

#posts {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

#posts h3 {
    font-size: 1.4rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--raisin-black);
}

#posts ul {
    list-style: none;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

#posts li {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

#posts a {
    color: var(--raisin-black);
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

#posts a:hover {
    color: var(--quick-silver);
}

#posts .post-date {
    color: var(--quick-silver);
    font-size: 0.9rem;
    white-space: nowrap;
    min-width: 140px;
    display: inline-block;
}

.post {
    max-width: 680px;
    margin: 2rem auto;
    padding: 2rem;
}

.post-header {
    margin-bottom: 3rem;
    text-align: left;
}

.post-back {
    display: inline-block;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--quick-silver);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.post-back:hover {
    color: var(--raisin-black);
}

.post-title {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.post-meta {
    color: var(--quick-silver);
    font-size: 0.9rem;
}

.post-content {
    line-height: 1.6;
    text-align: left;
}

.post-content {
    counter-reset: book;
}

.post-content h1 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h2 {
    counter-reset: book;
    margin-top: 5rem;
    margin-bottom: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--quick-silver);
}

.post-content h3 {
    counter-increment: book;
    margin-top: 3rem;
    margin-bottom: 0.25rem;
}

.post-content h3::before {
    content: counter(book, decimal-leading-zero);
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--quick-silver);
    margin-bottom: 0.4rem;
}

.post-content h3 + p > em {
    display: block;
    color: var(--quick-silver);
    font-size: 0.875em;
    margin-top: -0.1rem;
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content a {
    color: var(--raisin-black);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.post-content a:hover {
    color: var(--quick-silver);
}

.btn {
    display: inline-block;
    background: var(--raisin-black);
    color: var(--ghost-white) !important;
    padding: 0.65rem 1.4rem;
    border-radius: 4px;
    border: 2px solid var(--raisin-black);
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    margin-top: 0.5rem;
}

.btn:hover {
    background: transparent;
    color: var(--raisin-black) !important;
    transform: translateY(-2px);
}

hr {
    border: 0;
    border-top: 1px solid var(--light-gray);
    margin: 3rem auto;
    width: 100%;
    opacity: 0.6;
}

@media only screen and (max-width: 768px) {
    #card-title {
        font-size: 1.8rem;
    }

    #card-subtitle {
        font-size: 0.8rem;
    }

    #card-header {
        padding-bottom: 0.8rem;
    }

    #avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 0.6rem;
    }

    #avatar img {
        transform: scale(1.1);
    }

    .card-social-item {
        font-size: 2rem;
        padding: 0.25rem;
    }

    #posts {
        margin-top: 1.2rem;
        padding-top: 1.2rem;
    }

    #posts li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    #posts .post-date {
        min-width: auto;
        font-size: 0.85rem;
    }

    .post {
        padding: 1rem;
        margin: 1rem auto;
    }

    .post-title {
        font-size: 1.8rem;
    }
    
    hr {
        margin: 2rem auto;
        width: 100%;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background: var(--raisin-black);
        color: var(--light-gray);
    }

    #card-subtitle {
        color: var(--quick-silver);
    }

    .card-social-item a {
        color: var(--quick-silver);
    }

    .card-social-item a:hover {
        color: var(--ghost-white);
    }

    #posts h3 {
        color: var(--light-gray);
    }

    #posts a {
        color: var(--light-gray);
    }

    #posts a:hover {
        color: var(--ghost-white);
    }

    .post-content a {
        color: var(--light-gray);
    }

    .post-content a:hover {
        color: var(--ghost-white);
    }

    .btn {
        background: transparent;
        color: var(--light-gray) !important;
        border-color: rgba(255, 255, 255, 0.3);
    }

    .btn:hover {
        background: rgba(255, 255, 255, 0.08);
        color: var(--ghost-white) !important;
        border-color: rgba(255, 255, 255, 0.5);
    }

    .post-back {
        color: var(--quick-silver);
    }

    .post-back:hover {
        color: var(--light-gray);
    }

    hr {
        opacity: 0.15;
    }
}