
:root {
    --radius: 12px; /* Sharper radius for tech feel */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace; /* Tech Mono Font */
    --ease-apple: cubic-bezier(0.16, 1, 0.3, 1); /* Snappier tech ease */
}

/* Default Dark Theme */
:root, [data-theme="dark"] {
    --bg-body: #000000;
    --bg-tech: #050505;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent: #ccff00; /* Neon Green */
    --accent-hover: #b3e600;
    --accent-secondary: #00f0ff; /* Cyber Cyan */
    --border: #424245;
    --card-bg: rgba(10, 10, 12, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-bg: rgba(20, 20, 24, 0.8);
    --grid-color: rgba(204, 255, 0, 0.05);
    --header-bg: rgba(0, 0, 0, 0.4);
    --header-border: rgba(204, 255, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --logo-filter: drop-shadow(0 0 8px rgba(204, 255, 0, 0.6));
    --particle-bg: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l25.98 15v30L30 60 4.02 45V15z' fill-opacity='0.03' fill='%23ccff00'/%3E%3C/svg%3E");
    --glow-opacity: 1;
    --hud-color: var(--accent);
    
    /* Abstract Shapes Colors */
    --shape-color-1: rgba(204, 255, 0, 0.15);
    --shape-color-2: rgba(0, 240, 255, 0.15);
    --shape-color-3: rgba(100, 100, 255, 0.1);
}

/* Light Theme - Warm Modular / Gallery Style */
[data-theme="light"] {
    --bg-body: #fbfbf9; /* Cleaner Warm White */
    --bg-tech: #f2f2f0;
    --text-primary: #1a1c18; /* Deep Ink Black */
    --text-secondary: #5c5f58; /* Muted Green-Grey */
    --accent: #4c8a00; /* Deep Tech Green - Professional & Readable */
    --accent-hover: #3a6b00;
    --accent-secondary: #ccff00; /* Logo Neon Green - Used for Highlights */
    --border: #e6e6e0;
    --card-bg: #ffffff;
    --card-border: rgba(76, 138, 0, 0.08); /* Subtle Green Tint Border */
    --card-hover-bg: #ffffff;
    --grid-color: rgba(76, 138, 0, 0.03);
    --header-bg: rgba(251, 251, 249, 0.85);
    --header-border: rgba(0, 0, 0, 0.02);
    --shadow-color: rgba(76, 138, 0, 0.08); /* Green-tinted Shadow (Ambient Light) */
    --logo-filter: none;
    --particle-bg: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='none'/%3E%3Ccircle cx='2' cy='2' r='1.5' fill='%23ccff00' fill-opacity='0.4'/%3E%3C/svg%3E");
    --glow-opacity: 0.4;
    --hud-color: #669900;

    /* Abstract Shapes Colors - Organic Tech Greens */
    --shape-color-1: rgba(204, 255, 0, 0.06); /* Neon Green Haze */
    --shape-color-2: rgba(76, 138, 0, 0.05); /* Deep Green Mist */
    --shape-color-3: rgba(0, 0, 0, 0.02); /* Shadow */
}

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

html {
    background-color: var(--bg-body);
    transition: background-color 0.3s var(--ease-apple);
}

body {
    background-color: transparent;
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    letter-spacing: -0.01em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    /* Removed z-index to avoid stacking context issues with fixed bg */
}

/* Tech Background System - Abstract Modernism */
.tech-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: var(--bg-tech);
    overflow: hidden;
    transition: background-color 0.5s var(--ease-apple);
}

/* Abstract Fluid Shapes */
.abstract-shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: float-shape 20s ease-in-out infinite alternate;
}

.shape-1 {
    top: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--shape-color-1) 0%, transparent 70%);
    animation-delay: 0s;
}

.shape-2 {
    bottom: -20%;
    left: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, var(--shape-color-2) 0%, transparent 70%);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--shape-color-3) 0%, transparent 70%);
    animation-delay: -10s;
    opacity: 0.4;
}

@keyframes float-shape {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* Noise Texture for Realism */
.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* Logo Image Styling */
.logo-img {
    height: 40px;
    width: auto;
    filter: var(--logo-filter);
    transition: filter 0.3s;
}

.logo-img:hover {
    filter: drop-shadow(0 0 12px var(--accent));
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--ease-apple);
}

ul {
    list-style: none;
}

.container {
    max-width: 980px; /* Apple's standard content width is often narrower for reading, or 1200 for grid */
    margin: 0 auto;
    padding: 0 22px;
}

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Header */
.site-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 999;
    height: 60px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--header-border);
    transition: background-color 0.3s, border-color 0.3s;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    font-family: var(--font-main);
    text-shadow: 0 0 20px rgba(204, 255, 0, 0.4); /* Neon Glow */
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: #e8e8ed;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
    transition: opacity 0.3s var(--ease-apple);
}

.nav-link:hover {
    opacity: 1;
    color: #fff;
}

.btn-text {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

/* Language Switcher */
select {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    outline: none;
    transition: color 0.3s;
}

select:hover {
    color: var(--text-primary);
}

/* Theme Toggle */
#theme-toggle {
    font-size: 1.2rem;
    line-height: 1;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    padding-bottom: 100px;
}

/* Hero Section (Custom Typography) */
.hero {
    padding: 140px 0 100px;
    text-align: center;
}

/* Glitch Effect for Title */
.section-title {
    font-size: 64px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-shadow: 2px 0 var(--accent-secondary), -2px 0 var(--accent);
    position: relative;
    
    /* Animation Initial State */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease-apple), transform 1s var(--ease-apple);
}

/* Card HUD Corners */
.resource-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(to right, var(--hud-color) 2px, transparent 2px) 0 0,
        linear-gradient(to bottom, var(--hud-color) 2px, transparent 2px) 0 0,
        linear-gradient(to left, var(--hud-color) 2px, transparent 2px) 100% 0,
        linear-gradient(to bottom, var(--hud-color) 2px, transparent 2px) 100% 0,
        linear-gradient(to right, var(--hud-color) 2px, transparent 2px) 0 100%,
        linear-gradient(to top, var(--hud-color) 2px, transparent 2px) 0 100%,
        linear-gradient(to left, var(--hud-color) 2px, transparent 2px) 100% 100%,
        linear-gradient(to top, var(--hud-color) 2px, transparent 2px) 100% 100%;
    background-size: 10px 10px;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.resource-card:hover::after {
    opacity: 1;
}

.hero p {
    font-size: 20px;
    line-height: 1.6;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-family: var(--font-mono); /* Tech mono font */
    
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease-apple) 0.2s, transform 1s var(--ease-apple) 0.2s; /* Delay */
}

/* Resource Grid */
.category-section {
    margin-bottom: 100px;
    background-color: var(--card-bg); /* Modular Section Background */
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.category-header {
    margin-bottom: 32px;
    border-bottom: 2px solid var(--bg-tech); /* Thicker divider */
    padding-bottom: 16px;
    display: flex;
    align-items: center;
    
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease-apple), transform 0.8s var(--ease-apple);
}

.category-title {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: initial;
    display: flex;
    align-items: center;
}

.category-title::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background-color: var(--accent);
    margin-right: 16px;
    border-radius: 3px;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.resource-card {
    background-color: var(--bg-tech); /* Slightly darker than section bg for contrast */
    border: 1px solid transparent;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    /* height: 100%;  Let content dictate height now that covers are gone */
    min-height: 200px; /* Minimum height for consistency */
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    
    /* Animation Initial State */
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: 
        opacity 0.6s var(--ease-apple), 
        transform 0.6s var(--ease-apple),
        background-color 0.3s var(--ease-apple),
        box-shadow 0.3s var(--ease-apple),
        border-color 0.3s var(--ease-apple);
}

.resource-card:hover {
    background-color: var(--card-hover-bg);
    border-color: var(--accent);
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 40px var(--shadow-color);
    z-index: 10;
}

/* 
.resource-cover-wrapper {
    overflow: hidden;
    height: 220px;
    width: 100%;
}

.resource-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-apple);
}

.resource-card:hover .resource-cover {
    transform: scale(1.05);
}
*/

.resource-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Space out content */
}

.resource-title {
    font-size: 20px; /* Slightly smaller for text-only cards */
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: .01em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.resource-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 24px;
    flex: 1;
}

.resource-btn {
    display: inline-block;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: auto;
    position: relative;
    padding: 8px 16px;
    background-color: rgba(76, 138, 0, 0.05); /* Light green tint background */
    border-radius: 8px;
    transition: all 0.3s var(--ease-apple);
    width: fit-content;
}

.resource-btn::after {
    content: '→';
    font-size: 1.1em;
    transition: transform 0.2s;
    display: inline-block;
    margin-left: 6px;
}

.resource-btn:hover {
    text-decoration: none;
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 138, 0, 0.25);
    transform: translateY(-1px);
}

.resource-btn:hover::after {
    transform: translateX(4px);
    text-decoration: none;
}

/* Visibility Class for Animation */
.visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* Auth Pages */
.auth-container {
    max-width: 460px;
    margin: 80px auto;
    text-align: center;
}

.auth-title {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 17px;
}

.form-group input {
    width: 100%;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 17px;
    transition: all 0.2s;
}

.form-group input:focus {
    background-color: rgba(255, 255, 255, 0.1);
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

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

/* Footer */
.site-footer {
    background-color: #111112;
    padding: 60px 0 40px;
    color: var(--text-secondary);
    font-size: 12px;
    border-top: 1px solid #333;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 30px;
}

.social-link {
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-apple);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
}

.social-link:hover {
    color: var(--bg-body);
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(94, 156, 0, 0.3);
}

.social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

