/* ========================================= */
/* 1. DESIGN VARIABLES                       */
/* ========================================= */
:root {
    /* BRAND COLORS */
    --brand-color: #0071c5;    /* Intel Blue */

    /* BACKGROUNDS */
    --bg-body: #1e2a40;        /* Twilight Blue */
    --bg-card: #28354d;        /* Card Surface */
    --bg-footer: #020617;      /* Footer Navy */
    --bg-header: #0b1120;      /* Dark Header */
    
    /* TEXT */
    --text-main: #f8fafc;      /* Bright White */
    --text-muted: #cbd5e1;     /* Light Gray */
    
    /* FONTS - Added System Backups for better loading */
    --font-head: 'Orbitron', 'Trebuchet MS', sans-serif; 
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* UI SETTINGS */
    --container-width: 1200px;
    --radius: 8px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* ========================================= */
/* 2. GLOBAL RESET & BASE STYLES             */
/* ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }

/* Apply Tech Font to Headings */
h1, h2, h3, .logo-link {
    font-family: var(--font-head);
    letter-spacing: 0.5px;
}

/* ========================================= */
/* 3. HEADER & NAVIGATION                    */
/* ========================================= */
header {
    padding: 10px 0;
    position: sticky; 
    top: 0;
    /* Glassmorphism Effect */
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 1000;
}

.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 15px; 
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2rem;
    font-weight: 800; 
    color: var(--text-main); 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.logo-link:hover {
    transform: scale(1.03); 
    text-shadow: 0 0 15px rgba(0, 113, 197, 0.4); 
}
.logo-link span { color: var(--brand-color); } 

.nav-right {
    display: flex;
    align-items: center;
    gap: 25px; 
}

.header-email {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-email:hover { color: var(--brand-color); }

@media (max-width: 768px) {
    .header-email span { display: none; }
    .nav-right { gap: 15px; }
    .logo-img { height: 45px; }
    .logo-link { font-size: 1.5rem; }
}

.social-nav { display: flex; gap: 15px; flex-wrap: wrap; }
.social-nav a { color: var(--text-muted); font-size: 1.2rem; transition: all 0.3s ease; }
.social-nav a:hover { color: var(--brand-color); transform: translateY(-3px); }

/* ========================================= */
/* 4. HERO SECTION (Blueprint Grid)          */
/* ========================================= */
.hero { 
    text-align: center; 
    padding: 120px 0 100px; 
    position: relative;
    background-color: var(--bg-body);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    
    /* Safari Compatibility for Mask */
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

.hero h1 { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.1; font-weight: 800; }
.hero p { color: var(--text-muted); font-size: 1.25rem; max-width: 650px; margin: 0 auto 35px; }

.btn {
    background: #FF0000; 
    color: #ffffff !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.4); 
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:hover {
    background: #cc0000;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.6);
}

.btn i {
    font-size: 1.2rem; /* Makes the YouTube icon slightly larger */
}
/* ========================================= */
/* 5. VIDEO SECTION                          */
/* ========================================= */
.video-section { padding: 60px 0; }

.section-title { 
    font-size: 2.2rem; margin-bottom: 40px; 
    border-left: 6px solid var(--brand-color); 
    padding-left: 20px; font-weight: 700; 
}

#video-container {
    display: grid;
    /* Auto-fit handles different screen sizes better than fixed 3 columns */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px;
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-8px);
    border-color: var(--brand-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.thumb-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.85;
}

.video-card:hover .thumb-wrapper img { transform: scale(1.05); opacity: 1; }

.play-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem; color: #fff;
    opacity: 0; transition: all 0.3s ease;
    z-index: 2;
}

.video-card:hover .play-icon { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }

.video-card h3 {
    padding: 20px;
    font-size: 1.15rem;
    color: var(--text-main);
    font-family: var(--font-body);
}

/* ========================================= */
/* 6. GITHUB SECTION                         */
/* ========================================= */
.github-section { padding: 60px 0 100px; }

#github-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.repo-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.repo-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-color);
    box-shadow: 0 0 25px rgba(0, 113, 197, 0.2);
}

.repo-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
.repo-header i { font-size: 1.4rem; color: var(--text-muted); }

.repo-lang {
    font-size: 0.75rem;
    background: rgba(0, 113, 197, 0.15);
    color: var(--brand-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.repo-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.repo-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; }

.repo-footer {
    display: flex; justify-content: space-between;
    font-size: 0.85rem; color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 15px;
}

/* ========================================= */
/* 7. FOOTER                                 */
/* ========================================= */
footer {
    background: var(--bg-footer);
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; margin-bottom: 50px; }

.footer-brand-block { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.footer-logo-img { height: 50px; width: auto; }
.footer-brand h2 { color: var(--text-main); font-size: 1.6rem; }
.footer-brand h2 span { color: var(--brand-color); }

.email-link { color: var(--brand-color); font-weight: 600; display: block; margin-top: 15px; }

.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.mission-box h3 { border-bottom: 2px solid var(--brand-color); display: inline-block; margin-bottom: 15px; color: var(--text-main); }

.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 40px; }
.legal-links { margin-bottom: 20px; display: flex; justify-content: center; gap: 25px; flex-wrap: wrap; font-size: 0.9rem; }
.legal-links a:hover { color: var(--brand-color); }

.disclaimer { font-size: 0.85rem; opacity: 0.6; max-width: 850px; margin: 20px auto; }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero h1 { font-size: 2.8rem; }
}

@media (max-width: 600px) {
    .mission-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
}

/* ========================================= */
/* 8. LEGAL PAGES                            */
/* ========================================= */
.legal-content { max-width: 800px; margin: 60px auto; padding: 0 24px; }
.legal-section { margin-bottom: 50px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.legal-section h2 { margin-bottom: 20px; border-left: 4px solid var(--brand-color); padding-left: 15px; }
.legal-section p, .legal-section ul { color: var(--text-muted); margin-bottom: 15px; }


/* ========================================= */
/* 11. UNIFIED TRIPLE HUB                    */
/* ========================================= */
.triple-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 60px 0;
}

.hub-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 40px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Keeps buttons aligned at bottom */
    align-items: center;
    min-height: 380px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.hub-card:hover { transform: translateY(-8px); }

/* Accents on Hover */
.discord-card:hover { border-color: #5865F2; }
.thingiverse-card:hover { border-color: #248fb2; }
.amazon-card:hover { border-color: #FF9900; }

.hub-icon { font-size: 2.8rem; margin-bottom: 20px; }
.fa-cube { color: #248fb2; }
.fa-amazon { color: #FF9900; }

/* Buttons */
.thing-btn { background: #248fb2 !important; border: none; }
.amazon-btn { background: #FF9900 !important; color: #111 !important; border: none; }

.disclaimer-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 15px;
    font-style: italic;
}

/* Mobile Fix */
@media (max-width: 1000px) { .triple-grid { grid-template-columns: 1fr; } }

/* Specific fix for Discord centering */
#discord-status {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

/* Ensures the injected content fills the card and stays centered */
#discord-status .discord-content-wrapper, 
#discord-status > div {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Forces the button inside Discord to match the others */
#discord-status .btn, 
#discord-status a.btn {
    margin-left: auto;
    margin-right: auto;
    display: inline-flex;
}