:root {
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --accent-color: #ff006e;
    --bg-dark: #050505;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-dim: #b0b0b0;
    --nav-blur: rgba(5, 5, 5, 0.8);
    --gradient-ai: linear-gradient(135deg, #3a86ff 0%, #8338ec 100%);
    --gradient-space: linear-gradient(135deg, #8338ec 0%, #ff006e 100%);
    --gradient-uam: linear-gradient(135deg, #00f5d4 0%, #00bbf9 100%);
    --header-height: 80px;
}

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

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Glow */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(58, 134, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(131, 56, 236, 0.08) 0%, transparent 40%);
    z-index: -1;
}

/* Universal Header Layout */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: var(--nav-blur);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}

.navbar {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    cursor: pointer;
}

.logo-text span {
    color: var(--primary-color);
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 3rem;
}

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

.nav-item {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Standard Styled Lang Selector */
.lang-selector {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.4rem;
    cursor: pointer;
}

/* Hero Section Refinement */
.hero-section {
    padding: 180px 8% 120px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 60px;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(58, 134, 255, 0.15);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(58, 134, 255, 0.3);
}

.hero-section h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(90deg, #3a86ff, #8338ec, #ff006e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    color: var(--text-dim);
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

/* Floating Visuals Recovery */
.hero-visual {
    position: relative;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    animation: float 6s infinite ease-in-out;
    white-space: nowrap;
}

.floating-card i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.floating-card span {
    font-weight: 600;
    font-size: 1.1rem;
}

.card-1 { top: 10%; right: 5%; animation-delay: 0s; }
.card-2 { top: 40%; left: -5%; animation-delay: 2s; border-color: rgba(131, 56, 236, 0.3); }
.card-3 { bottom: 10%; right: 15%; animation-delay: 4s; border-color: rgba(0, 245, 212, 0.3); }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-25px) rotate(2deg); }
}

/* Feed & Newsletter Spacing */
.feed-section, .newsletter-section {
    padding: 120px 8%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Mobile Responsive - Universal Fix */
@media (max-width: 1024px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .hero-section { grid-template-columns: 1fr; text-align: center; padding-top: 150px; }
    .hero-section h1 { font-size: 3.2rem; }
}

@media (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .nav-right-group { gap: 1rem; }
    .lang-selector { 
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Mobile Menu Logic */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: #0a0a0a;
    z-index: 2000;
    padding: 2rem;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.active { right: 0; }

/* News Grid & Card Styles */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.news-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeUp 0.6s forwards;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(5,5,5,0.8), transparent);
}

.card-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.tag-ai { color: #3a86ff; border-color: rgba(58, 134, 255, 0.3); }
.tag-space { color: #8338ec; border-color: rgba(131, 56, 236, 0.3); }
.tag-uam { color: #00f5d4; border-color: rgba(0, 245, 212, 0.3); }

.card-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    font-weight: 700;
    transition: color 0.3s;
}

.news-card:hover .card-content h3 {
    color: var(--primary-color);
}

.card-content p {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.card-footer i {
    margin-right: 5px;
    color: var(--primary-color);
}

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

/* Newsletter Section Styles */
.newsletter-container {
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

.newsletter-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(58, 134, 255, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.newsletter-content {
    flex: 1;
    z-index: 1;
}

.newsletter-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.newsletter-content p {
    color: var(--text-dim);
    font-size: 1.1rem;
    max-width: 90%;
}

.newsletter-form {
    flex: 1;
    display: flex;
    gap: 1rem;
    z-index: 1;
}

.newsletter-form input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.newsletter-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
}

.btn-subscribe-main {
    background: var(--gradient-ai);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.3s;
}

.btn-subscribe-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(58, 134, 255, 0.3);
}

/* Footer Styles */
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 8% 40px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-info p {
    color: var(--text-dim);
    margin-top: 1.5rem;
    max-width: 300px;
}

.footer-links h4, .footer-social h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: white;
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: 0.3s;
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-container {
        flex-direction: column;
        padding: 2rem;
        gap: 2rem;
        text-align: center;
    }

    .newsletter-form {
        width: 100%;
        flex-direction: column;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-info p {
        margin: 1rem auto 0;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* Section Header & Filter Controls */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.filter-btn.active {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(58, 134, 255, 0.3);
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-controls {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem; /* Space for scrollbar if needed */
    }
    
    .filter-btn {
        white-space: nowrap;
    }
}
