:root {
    --ink: #172126;
    --muted: #69767b;
    --paper: #f7f3ec;
    --surface: #fffaf2;
    --line: #e2d7c9;
    --forest: #274d45;
    --sea: #366b7f;
    --coral: #c86f55;
    --gold: #dba84d;
    --shadow: 0 20px 60px rgba(23, 33, 38, .12);
    --future-bg: #070914;
    --future-panel: rgba(13, 19, 34, .78);
    --future-text: #eef8ff;
    --future-muted: #9db0bf;
    --future-cyan: #70f5d7;
    --future-blue: #6f9dff;
    --future-pink: #ff6fb1;
    --future-amber: #efb75c;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
    line-height: 1.65;
}

body.home-page {
    background:
        linear-gradient(180deg, var(--future-bg) 0 720px, var(--paper) 720px 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 5vw, 72px);
    background: rgba(7, 9, 20, .76);
    border-bottom: 1px solid rgba(112, 245, 215, .18);
    backdrop-filter: blur(16px);
}

.brand {
    color: var(--future-text);
    font-family: var(--title-font);
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: 0;
}

nav {
    display: flex;
    gap: 8px;
}

nav a,
.button,
button {
    min-height: 42px;
    border: 1px solid var(--ink);
    border-radius: 8px;
    padding: 9px 16px;
    background: var(--ink);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

nav a {
    background: transparent;
    color: var(--future-text);
    border-color: rgba(112, 245, 215, .28);
}

main {
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
    gap: clamp(28px, 5vw, 70px);
    align-items: center;
    min-height: calc(100vh - 86px);
    padding: 48px 0;
}

.hero-future {
    color: var(--future-text);
    isolation: isolate;
}

.hero-future::before,
.hero-future::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.hero-future::before {
    inset: -86px calc(50% - 50vw) -80px;
    background:
        radial-gradient(circle at 18% 18%, rgba(112, 245, 215, .22), transparent 28%),
        radial-gradient(circle at 88% 28%, rgba(255, 111, 177, .18), transparent 26%),
        radial-gradient(circle at 62% 78%, rgba(239, 183, 92, .14), transparent 24%),
        linear-gradient(135deg, #070914 0%, #111b30 48%, #080a15 100%);
}

.hero-future::after {
    inset: 0 calc(50% - 50vw);
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .65), transparent 82%);
}

.kicker {
    margin: 0 0 14px;
    color: var(--future-cyan);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero h1 {
    max-width: 720px;
    margin: 0 0 22px;
    font-family: var(--title-font);
    font-size: clamp(42px, 6.4vw, 86px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: 0;
    text-shadow: 0 0 42px rgba(112, 245, 215, .24);
}

.hero-lead {
    max-width: 540px;
    margin: 0;
    color: var(--future-muted);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.glow-button {
    border-color: rgba(112, 245, 215, .75);
    background: linear-gradient(135deg, var(--future-cyan), var(--future-blue));
    color: #061018;
    box-shadow: 0 0 34px rgba(112, 245, 215, .34);
}

.ghost-button {
    min-height: 42px;
    border: 1px solid rgba(238, 248, 255, .22);
    border-radius: 8px;
    padding: 9px 16px;
    background: rgba(255, 255, 255, .06);
    color: var(--future-text);
    font-weight: 800;
}

.signal-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 620px;
    margin-top: 28px;
}

.signal-row span {
    min-height: 70px;
    border: 1px solid rgba(112, 245, 215, .2);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, .055);
    color: var(--future-muted);
    font-size: 13px;
}

.signal-row strong {
    display: block;
    color: var(--future-text);
    font-size: clamp(18px, 2vw, 25px);
    line-height: 1.2;
}

.hero-visual {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(112, 245, 215, .25);
    background: var(--future-panel);
    box-shadow: 0 32px 90px rgba(0, 0, 0, .36), 0 0 60px rgba(111, 157, 255, .16);
}

.hero-visual::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(120deg, rgba(255, 255, 255, .18), transparent 34%, rgba(112, 245, 215, .12));
    mix-blend-mode: screen;
    pointer-events: none;
}

.hero-visual img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.featured {
    margin: 18px 0 44px;
    border-block: 1px solid rgba(112, 245, 215, .22);
    padding: 30px 0;
}

.featured-link {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

.featured img,
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured img {
    aspect-ratio: 16 / 10;
    border-radius: 8px;
}

.featured span,
time {
    color: var(--sea);
    font-size: 14px;
    font-weight: 800;
}

.featured h2,
.post-card h2,
.post-detail h1,
.admin-panel h1,
.admin-panel h2,
.empty-state h1,
.empty-state h2 {
    margin: 6px 0 10px;
    font-family: var(--title-font);
    line-height: 1.16;
    letter-spacing: 0;
}

.featured h2 {
    font-size: clamp(30px, 4vw, 54px);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding: 18px 0 64px;
}

.post-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    transition: transform .18s ease, box-shadow .18s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.thumb {
    aspect-ratio: 4 / 3;
    background: #dfe9e7;
}

.card-body {
    padding: 18px;
}

.card-body h2 {
    font-size: 24px;
}

.card-body p,
.featured p,
.empty-state p {
    margin: 0;
    color: var(--muted);
}

.comment-count {
    display: inline-block;
    margin-top: 12px;
    color: var(--sea);
    font-size: 13px;
    font-weight: 800;
}

.empty-state {
    grid-column: 1 / -1;
    min-height: 300px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.post-detail {
    max-width: 820px;
    margin: 64px auto 84px;
}

.post-detail h1 {
    font-size: clamp(38px, 6vw, 72px);
}

.post-detail figure {
    margin: 32px 0;
}

.post-detail figure img {
    width: 100%;
    max-height: 720px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.content {
    font-size: 19px;
}

.content p {
    margin: 0 0 1.35em;
}

.comments {
    max-width: 820px;
    margin: -42px auto 84px;
    border-top: 1px solid var(--line);
    padding-top: 34px;
}

.comments h2 {
    margin: 0 0 16px;
    font-family: var(--title-font);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.comment-form {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: clamp(18px, 4vw, 28px);
}

.comment-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.comment-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.comment-item header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-item p,
.comments-admin p {
    margin: 0;
    color: var(--muted);
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 24px;
    padding: 54px 0;
}

.admin-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: clamp(20px, 4vw, 34px);
}

.admin-panel.narrow {
    grid-column: 1 / -1;
    max-width: 480px;
    margin: 60px auto;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.font-preview {
    margin: 0 0 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #fff;
    color: var(--ink);
    font-family: var(--title-font);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

textarea {
    resize: vertical;
}

.preview {
    max-height: 220px;
    border-radius: 8px;
    margin: 0 0 18px;
    object-fit: cover;
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    font-weight: 800;
}

.alert.error {
    background: #ffe8df;
    color: #7d2d1d;
}

.alert.success {
    background: #e1f2e9;
    color: #1e5a3d;
}

.hint {
    color: var(--muted);
    font-size: 14px;
}

.admin-list {
    display: grid;
    gap: 12px;
}

.admin-list article {
    display: grid;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.admin-list span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.row-actions a,
.link-button {
    min-height: auto;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--sea);
    font-size: 14px;
    font-weight: 800;
}

footer {
    border-top: 1px solid var(--line);
    padding: 26px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 900px) {
    .hero,
    .featured-link,
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding-top: 34px;
    }

    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        width: 100%;
    }

    nav a {
        flex: 1;
        text-align: center;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }
}
