/*
Theme Name: 4DRON Grid
Theme URI: https://4dron.com
Author: 4DRON
Description: 게임과 게이밍 기어 최신 정보를 위한 빠르고 반응형인 다크 테크 블로그 테마입니다.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.2
Text Domain: 4dron-grid
*/

:root {
    --bg: #071018;
    --bg-soft: #0c1722;
    --surface: #101e2b;
    --surface-strong: #152637;
    --line: rgba(255, 255, 255, 0.1);
    --text: #f5f8fb;
    --muted: #9fb0bf;
    --accent: #63f5cf;
    --accent-2: #78a9ff;
    --danger: #ff7a90;
    --max-width: 1180px;
    --radius: 18px;
    --shadow: 0 22px 65px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 10% -10%, rgba(99, 245, 207, 0.11), transparent 36rem),
        radial-gradient(circle at 100% 0%, rgba(120, 169, 255, 0.11), transparent 34rem),
        var(--bg);
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
    font-size: 17px;
    line-height: 1.72;
    word-break: keep-all;
}

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

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--accent);
}

button,
input,
textarea,
select {
    font: inherit;
}

.screen-reader-text,
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    z-index: 10000;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    padding: 10px 14px;
    margin: 0;
    clip: auto;
    color: #06110f;
    background: var(--accent);
    border-radius: 10px;
}

.site-shell {
    width: min(calc(100% - 40px), var(--max-width));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 16, 24, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #06110f;
    background: linear-gradient(135deg, var(--accent), #c2ffe8);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -0.06em;
    box-shadow: 0 0 26px rgba(99, 245, 207, 0.22);
}

.site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.04em;
}

.site-title a {
    text-decoration: none;
}

.site-description {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
}

.custom-logo {
    max-width: 180px;
    max-height: 52px;
    object-fit: contain;
}

.primary-navigation ul,
.footer-navigation ul {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.primary-navigation a {
    display: block;
    padding: 9px 12px;
    color: #dbe6ee;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current-category-ancestor > a {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.site-main {
    min-height: 60vh;
    padding-block: 44px 72px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 6vw, 70px);
    margin-bottom: 34px;
    border: 1px solid var(--line);
    background:
        linear-gradient(125deg, rgba(99, 245, 207, 0.13), rgba(120, 169, 255, 0.07) 55%, transparent),
        var(--bg-soft);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero::after {
    position: absolute;
    right: -80px;
    bottom: -180px;
    width: 430px;
    height: 430px;
    content: "";
    background: radial-gradient(circle, rgba(99, 245, 207, 0.18), transparent 65%);
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 24px;
    height: 2px;
    content: "";
    background: currentColor;
}

.hero h1,
.archive-header h1,
.entry-header h1 {
    text-wrap: balance;
}

.hero h1 {
    max-width: 840px;
    margin: 0;
    font-size: clamp(36px, 7vw, 74px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.hero-copy {
    max-width: 660px;
    margin: 22px 0 0;
    color: #c0ced8;
    font-size: clamp(16px, 2.2vw, 20px);
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 46px;
}

.topic-card {
    position: relative;
    min-height: 132px;
    padding: 21px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.topic-card:hover {
    color: var(--text);
    border-color: rgba(99, 245, 207, 0.48);
    background: var(--surface-strong);
    transform: translateY(-3px);
}

.topic-index {
    display: block;
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.topic-label {
    display: block;
    font-size: 21px;
    font-weight: 850;
    line-height: 1.2;
}

.topic-description {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 20px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(25px, 4vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 28px;
}

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

.post-card {
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius);
    transition: transform 180ms ease, border-color 180ms ease;
}

.post-card:hover {
    border-color: rgba(120, 169, 255, 0.48);
    transform: translateY(-3px);
}

.card-thumbnail {
    display: block;
    aspect-ratio: 5 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(99, 245, 207, 0.13), rgba(120, 169, 255, 0.12)),
        var(--bg-soft);
    text-decoration: none;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 350ms ease;
}

.post-card:hover .card-thumbnail img {
    transform: scale(1.035);
}

.card-placeholder {
    display: grid;
    height: 100%;
    place-items: center;
    color: rgba(255, 255, 255, 0.48);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.card-body {
    padding: 22px;
}

.post-kicker,
.entry-category {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.post-kicker::before,
.entry-category::before {
    width: 6px;
    height: 6px;
    content: "";
    background: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.card-title {
    margin: 0;
    font-size: clamp(19px, 2.5vw, 24px);
    line-height: 1.35;
    letter-spacing: -0.025em;
}

.card-title a {
    text-decoration: none;
}

.card-excerpt {
    margin: 12px 0 0;
    color: #b0c0cc;
    font-size: 15px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 12px;
}

.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    padding: 22px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius);
}

.widget-title {
    margin: 0 0 14px;
    font-size: 17px;
}

.widget ul {
    padding-left: 20px;
    margin: 0;
}

.widget li + li {
    margin-top: 8px;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    min-width: 0;
    padding: 11px 13px;
    color: var(--text);
    border: 1px solid var(--line);
    background: var(--bg-soft);
    border-radius: 10px;
}

.search-submit,
button,
input[type="submit"] {
    padding: 11px 15px;
    color: #071018;
    border: 0;
    background: var(--accent);
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}

.archive-header,
.search-header {
    padding: 28px 30px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    border-radius: var(--radius);
}

.archive-header h1,
.search-header h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.15;
    letter-spacing: -0.045em;
}

.archive-description {
    max-width: 720px;
    margin-top: 12px;
    color: var(--muted);
}

.single-layout,
.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 780px) 300px;
    justify-content: center;
    align-items: start;
    gap: 32px;
}

.article-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.entry-header {
    padding: clamp(28px, 6vw, 58px);
}

.entry-header h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.12;
    letter-spacing: -0.05em;
}

.entry-summary {
    margin: 20px 0 0;
    color: #bfd0db;
    font-size: 19px;
}

.entry-featured-image {
    margin: 0;
    background: var(--bg-soft);
}

.entry-featured-image img {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
}

.entry-content {
    padding: 8px clamp(28px, 6vw, 58px) clamp(38px, 7vw, 70px);
}

.entry-content > * {
    max-width: 100%;
}

.entry-content > * + * {
    margin-top: 1.35em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 1.9em;
    margin-bottom: 0.55em;
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.entry-content h2 {
    padding-bottom: 0.45em;
    border-bottom: 1px solid var(--line);
    font-size: clamp(25px, 4vw, 34px);
}

.entry-content h3 {
    font-size: clamp(21px, 3vw, 27px);
}

.entry-content p,
.entry-content li {
    color: #d6e0e7;
}

.entry-content a {
    color: #9fc2ff;
}

.entry-content blockquote {
    padding: 18px 22px;
    margin-inline: 0;
    border-left: 4px solid var(--accent);
    background: rgba(99, 245, 207, 0.07);
    border-radius: 0 12px 12px 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.entry-content th,
.entry-content td {
    padding: 12px;
    border: 1px solid var(--line);
    text-align: left;
}

.entry-content th {
    background: var(--bg-soft);
}

.entry-content pre,
.entry-content code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.entry-content pre {
    max-width: 100%;
    padding: 18px;
    overflow-x: auto;
    background: #050b10;
    border-radius: 12px;
}

.fourdr-source-box,
.fourdr-update-notice {
    padding: 20px 22px;
    margin-top: 32px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    border-radius: 14px;
}

.fourdr-source-box h2 {
    padding: 0;
    margin: 0 0 12px;
    border: 0;
    font-size: 20px;
}

.fourdr-source-box ul {
    margin: 0;
}

.fourdr-update-notice {
    color: #bfccd5;
    font-size: 14px;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 clamp(28px, 6vw, 58px) 34px;
}

.entry-tags a {
    padding: 7px 10px;
    color: #c7d4dd;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    border-radius: 999px;
    font-size: 12px;
    text-decoration: none;
}

.content-footer-widget {
    margin-top: 24px;
}

.pagination,
.nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.page-numbers {
    display: grid;
    min-width: 40px;
    height: 40px;
    padding-inline: 10px;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 10px;
    text-decoration: none;
}

.page-numbers.current {
    color: #071018;
    border-color: var(--accent);
    background: var(--accent);
    font-weight: 900;
}

.empty-state {
    padding: 50px 28px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    background: var(--bg-soft);
    border-radius: var(--radius);
    text-align: center;
}

.empty-state h1,
.empty-state h2 {
    margin-top: 0;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #050c12;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
    padding-block: 34px;
}

.footer-copy {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.footer-navigation a {
    color: #aebdc8;
    font-size: 13px;
    text-decoration: none;
}

.alignwide {
    width: min(110%, 980px);
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.alignfull {
    width: calc(100% + clamp(56px, 12vw, 116px));
    max-width: none;
    margin-left: calc(clamp(28px, 6vw, 58px) * -1);
}

@media (max-width: 980px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding-block: 16px;
    }

    .site-header {
        position: relative;
    }

    .primary-navigation {
        width: 100%;
        overflow-x: auto;
    }

    .primary-navigation ul {
        width: max-content;
    }

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

    .content-layout,
    .single-layout,
    .page-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
        word-break: normal;
    }

    .site-shell {
        width: min(calc(100% - 24px), var(--max-width));
    }

    .site-main {
        padding-block: 24px 48px;
    }

    .hero {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .hero h1 {
        font-size: 39px;
    }

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

    .topic-card {
        min-height: 112px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .entry-header,
    .entry-content {
        padding-inline: 22px;
    }

    .entry-header h1 {
        font-size: 34px;
    }

    .entry-tags {
        padding-inline: 22px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-navigation ul {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
