/* ============================================
   SlykTech - Main Stylesheet
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --accent-primary: #00f5d4;
    --accent-secondary: #00d4aa;
    --accent-tertiary: #ff006e;
    --accent-purple: #9146ff;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --border-color: #2a2a3a;
    --font-display: 'Bebas Neue', sans-serif;
    --font-mono: 'Fira Mono', monospace;
    --font-body: 'Rajdhani', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --border-radius: 8px;
    --border-radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 245, 212, 0.01) 2px, rgba(0, 245, 212, 0.01) 4px);
    pointer-events: none;
    z-index: 1;
}

a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-tertiary); }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.05em; line-height: 1.2; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ============================================
   Navigation with Dropdowns
   ============================================ */
.navbar { backdrop-filter: none; }

.navbar-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  backdrop-filter: blur(20px);
  background: inherit;
  z-index: -1;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--text-primary);
    text-decoration: none;
    z-index: 1001;
}

.nav-logo svg { width: 40px; height: 40px; }

.nav-logo span {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
    background: rgba(10, 10, 15, 0.98);
    z-index: 99999;
}

.nav-links > li > a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-fast);
    border-radius: var(--border-radius);
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    color: var(--accent-primary);
    background: rgba(0, 245, 212, 0.1);
}

.nav-links .arrow {
    font-size: 0.6rem;
    transition: transform var(--transition-fast);
}

.nav-admin {
    border: 1px solid var(--border-color) !important;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: rgba(18, 18, 26, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-medium);
    list-style: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    margin-top: 0.5rem;
}

.dropdown-menu-wide {
    min-width: 280px;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-header {
    padding: 0.75rem 1rem 0.5rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.dropdown-menu li a:hover {
    background: rgba(0, 245, 212, 0.1);
    color: var(--accent-primary);
    padding-left: 1.25rem;
}

.dropdown-menu li a .icon,
.dropdown-menu li a i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    z-index: 10001;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* Hamburger animation */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Mobile Navigation Styles
   ============================================ */
@media (max-width: 1100px) {
    .nav-toggle { 
        display: flex;
        z-index: 10001;
        position: relative;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        background: var(--bg-primary);
        padding: 80px 1.5rem 2rem;
        gap: 0;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 10000;
    }
    
    .nav-links.active { 
        transform: translateX(0);
    }
    
    .nav-links > li { 
        width: 100%; 
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links > li > a {
        padding: 1rem 0.5rem;
        font-size: 0.9rem;
        border-radius: 0;
        justify-content: space-between;
    }
    
    /* Mobile dropdown styles */
    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: var(--bg-secondary);
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    .nav-dropdown.open .dropdown-menu {
        max-height: 500px;
        padding: 0.5rem;
    }
    
    .nav-dropdown.open .arrow {
        transform: rotate(180deg);
    }
    
    .dropdown-menu li a {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .dropdown-header {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Hide hover effects on mobile */
    .nav-dropdown:hover .dropdown-menu {
        max-height: 0;
        padding: 0;
    }
    
    .nav-dropdown.open:hover .dropdown-menu {
        max-height: 500px;
        padding: 0.5rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .nav-logo span {
        font-size: 1.25rem;
    }
    
    .nav-logo svg {
        width: 32px;
        height: 32px;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0, 245, 212, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content { text-align: center; position: relative; z-index: 1; }

.hero h1 { margin-bottom: 1rem; }
.hero h1 span {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.hero-categories span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.hero-categories span:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Page Hero (smaller) */
.page-hero {
    min-height: 35vh;
    padding-top: 120px;
}

.page-hero .hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--accent-primary); }
.breadcrumb .separator { color: var(--text-muted); }

/* ============================================
   Sections & Content
   ============================================ */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-secondary); }

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title a { color: var(--accent-primary); }
.section-title .icon { font-size: 1.3rem; }

/* ============================================
   Grid & Cards
   ============================================ */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-medium);
    text-decoration: none;
    display: block;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 245, 212, 0.1);
}

.card-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-secondary);
}

.card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

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

.card-content { padding: 1.25rem; }
.card-content h3 { color: var(--text-primary); margin-bottom: 0.5rem; font-size: 1.1rem; }
.card-content p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.75rem; }
.card-content .meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.card:hover .play-overlay { opacity: 1; }

.play-btn {
    width: 60px; height: 60px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn::after {
    content: '';
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent var(--bg-primary);
    margin-left: 4px;
}

/* Article Cards */
.article-card { padding: 1.5rem; }
.article-card h3 { margin-bottom: 0.75rem; }
.article-card h3 a { color: var(--text-primary); }
.article-card h3 a:hover { color: var(--accent-primary); }
.article-card .summary { color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }
.article-card .read-more {
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* Category Cards */
.category-card {
    padding: 2rem;
    text-align: center;
}

.category-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 { margin-bottom: 0.5rem; }
.category-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* ============================================
   Video Embeds
   ============================================ */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
}

.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.video-section {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.video-section h3 { margin-bottom: 1rem; }

/* Mobile video sections - FIXED for proper scaling */
@media (max-width: 900px) {
    .video-section {
        padding: 1rem;
    }
    
    .video-container {
        padding-bottom: 56.25%;
        min-height: 200px;
    }
}

@media (max-width: 600px) {
    .video-container {
        padding-bottom: 75%;
        min-height: 250px;
    }
    
    .video-section {
        padding: 0.75rem;
    }
    
    .video-section h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px dashed var(--border-color);
}

.empty-state .icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { color: var(--text-primary); margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); }

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .footer-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 1rem;
}

.footer-brand p { color: var(--text-secondary); }

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    padding: 0.4rem 0;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--accent-primary);
    padding-left: 0.5rem;
}

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

.footer-bottom p {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* Admin Gear in Navbar */
.admin-gear-nav {
    color: var(--text-muted) !important;
    transition: all 0.3s ease !important;
}
.admin-gear-nav:hover {
    color: var(--accent-primary) !important;
    transform: rotate(90deg);
}
.admin-gear-nav i {
    font-size: 1.1rem;
}

/* Body scroll lock when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* ============================================
   Article Images
   ============================================ */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.article-content .image-credit {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

/* Article Figure Images */
.article-image {
    margin: 1.5rem 0;
    padding: 0;
}

.article-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: block;
}

.article-image figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
}

/* ============================================
   Rotating Decorative Hexagons
   ============================================ */
.logo-hex {
    animation: hex-rotate 20s linear infinite;
    transform-origin: center;
}

@keyframes hex-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
