/*
Theme Name: OKX Theme
Theme URI: https://okx.manna-plus.kr
Description: OKX - Dark professional theme
Version: 1.0
Author: Manna Plus
License: GPL v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: okx-theme
*/

/* CSS Variables */
:root {
    --color-primary: #000000;
    --color-secondary: #374151;
    --color-accent: #6b7280;
    --color-bg: #111827;
    --color-bg-light: #1f2937;
    --color-bg-card: #1f2937;
    --color-text: #f9fafb;
    --color-text-muted: #9ca3af;
    --color-border: #374151;
    --font-primary: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --border-radius: 4px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* SVG Pattern Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23374151' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Floating Bubbles Background */
.floating-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(55, 65, 81, 0.2) 0%, transparent 70%);
    animation: bubbleFloat 12s ease-in-out infinite;
}

.floating-bubble:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-bubble:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.floating-bubble:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 30%;
    animation-delay: 4s;
}

.floating-bubble:nth-child(4) {
    width: 250px;
    height: 250px;
    top: 40%;
    right: 30%;
    animation-delay: 6s;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    33% {
        transform: translate(30px, -40px) scale(1.1);
        opacity: 0.5;
    }
    66% {
        transform: translate(-20px, -60px) scale(0.9);
        opacity: 0.3;
    }
}

/* Anti-Gravity Floating Animation */
@keyframes antiGravityFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-12px) rotate(0.5deg);
    }
    50% {
        transform: translateY(-6px) rotate(-0.5deg);
    }
    75% {
        transform: translateY(-15px) rotate(0.3deg);
    }
}

.floating-element {
    animation: antiGravityFloat 6s ease-in-out infinite;
    will-change: transform;
}

.floating-element:nth-child(1) { animation-delay: 0s; animation-duration: 5s; }
.floating-element:nth-child(2) { animation-delay: 0.5s; animation-duration: 6s; }
.floating-element:nth-child(3) { animation-delay: 1s; animation-duration: 7s; }
.floating-element:nth-child(4) { animation-delay: 1.5s; animation-duration: 5.5s; }

/* Fixed Transparent Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

.site-header.scrolled {
    background: rgba(17, 24, 39, 0.98);
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.site-logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-text);
    transition: width 0.3s ease;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
    color: var(--color-text);
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after {
    width: 100%;
}

.header-cta .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* Angular Solid Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--color-text);
    color: var(--color-bg);
}

.btn-primary:hover {
    background: var(--color-text-muted);
    color: var(--color-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-border);
    border-color: var(--color-accent);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.read-more {
    color: var(--color-text);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.read-more:hover {
    color: var(--color-accent);
}

/* Hero Section */
.hero-section {
    padding: 10rem 0 6rem;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--color-text);
    position: relative;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Benefits Section */
.benefits-section {
    padding: 5rem 0;
    background: var(--color-bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--color-text-muted);
}

/* 3-Column Grid Layout */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Flat Cards with Hover Shadow */
.benefit-card {
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent);
}

.benefit-number {
    width: 48px;
    height: 48px;
    background: var(--color-secondary);
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.benefit-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.benefit-card p {
    color: var(--color-text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Latest Posts Section */
.latest-posts-section {
    padding: 5rem 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.post-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent);
}

.post-thumbnail {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-secondary);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.post-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    color: var(--color-accent);
    opacity: 0.5;
}

.post-content {
    padding: 1.5rem;
}

.entry-header {
    margin-bottom: 1rem;
}

.entry-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.entry-title a {
    color: var(--color-text);
}

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

.entry-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.entry-excerpt {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: var(--color-bg-light);
}

.cta-box {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.cta-box h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.cta-box p {
    margin-bottom: 2rem;
    color: var(--color-text-muted);
}

/* Footer */
.site-footer {
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.footer-section p,
.footer-section a {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-section a:hover {
    color: var(--color-text);
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* Blog Page */
.blog-listing {
    padding: 8rem 0 4rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Single Post */
.single-post {
    padding: 8rem 0 4rem;
}

.article-full {
    max-width: 800px;
    margin: 0 auto;
}

.article-full .entry-header {
    margin-bottom: 2rem;
    text-align: center;
}

.article-full .entry-title {
    font-size: 2.25rem;
}

.article-full .featured-image {
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.article-full .entry-content {
    line-height: 1.8;
}

.article-full .entry-content p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.article-full .entry-content h2,
.article-full .entry-content h3 {
    margin-top: 2rem;
}

/* Post Navigation */
.post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.nav-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

/* Page Content */
.page-content {
    padding: 8rem 0 4rem;
}

.page-full {
    max-width: 800px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.25rem;
}

/* Error 404 */
.error-404 {
    padding: 10rem 0;
    text-align: center;
}

.error-content {
    max-width: 500px;
    margin: 0 auto;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--color-secondary);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.error-description {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 992px) {
    .benefits-grid,
    .posts-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(17, 24, 39, 0.98);
        padding: 1rem;
        display: none;
        border-top: 1px solid var(--color-border);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav li {
        border-bottom: 1px solid var(--color-border);
    }

    .main-nav a {
        display: block;
        padding: 1rem 0;
    }

    .header-cta {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-section {
        padding: 8rem 0 4rem;
    }

    .benefits-grid,
    .posts-grid,
    .blog-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

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

/* Focus States */
a:focus,
button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
