/* ============================================================
   PORTFOLIO SHARED CSS — style.css
   Covers: reset, header, nav, footer, common utilities, mobile
   All sub-pages link this. Add page-specific styles inline.
   ============================================================ */

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    overflow-x: hidden;
    min-height: 100vh;
}
img { max-width: 100%; display: block; }

/* CONTAINER */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER & NAV ===== */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo {
    font-size: 24px; font-weight: 700; text-decoration: none;
    color: #f8fafc; font-family: 'Montserrat', sans-serif; flex-shrink: 0;
}
.logo span { color: #3b82f6; }
.nav-links { display: flex; list-style: none; gap: 25px; }
.nav-links a {
    text-decoration: none; color: #cbd5e1; font-weight: 500;
    font-size: 15px; transition: color 0.3s ease;
    position: relative; padding: 5px 0;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 2px; background: #3b82f6; transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: #3b82f6; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* HAMBURGER */
.hamburger {
    display: none; font-size: 22px; cursor: pointer;
    color: #f8fafc; padding: 5px; z-index: 1001;
}

/* ===== FOOTER ===== */
footer {
    background: rgba(15, 23, 42, 0.97);
    padding: 35px 0 15px;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-content { text-align: center; padding-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 15px; }
.footer-content p { font-size: 1.1rem; color: #cbd5e1; margin-bottom: 20px; font-weight: 500; }
.footer-social-icons { display: flex; justify-content: center; gap: 20px; margin-bottom: 25px; }
.footer-social-icons a {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #f8fafc; font-size: 1.3rem;
    transition: all 0.3s ease; text-decoration: none;
    border: 2px solid #3b82f6;
}
.footer-social-icons a:hover {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 10px 22px rgba(59,130,246,0.4);
}
.copyright { text-align: center; color: #64748b; font-size: 0.85rem; padding-top: 15px; }

/* ===== COMMON UTILITIES ===== */
.section-title {
    text-align: center; font-size: 2.6rem; margin-bottom: 45px;
    color: #f8fafc; font-family: 'Montserrat', sans-serif; position: relative;
}
.section-title::after {
    content: ''; position: absolute; bottom: -12px; left: 50%;
    transform: translateX(-50%); width: 70px; height: 4px;
    background: #3b82f6; border-radius: 2px;
}
.back-button {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 10px; background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white; padding: 12px 28px; border-radius: 28px;
    text-decoration: none; font-weight: 600; font-size: 0.95rem;
    transition: all 0.3s ease; margin: 35px auto;
    box-shadow: 0 5px 15px rgba(59,130,246,0.3);
}
.back-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59,130,246,0.45);
}

/* ===== MOBILE — 768px ===== */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-links {
        position: fixed; top: 0; left: -100%; width: 75%; max-width: 300px;
        height: 100vh; background: rgba(15,23,42,0.99);
        flex-direction: column; align-items: flex-start;
        padding: 80px 30px 30px; gap: 20px;
        transition: left 0.3s ease; z-index: 999;
        box-shadow: 5px 0 30px rgba(0,0,0,0.5);
    }
    .nav-links.active { left: 0; }
    .nav-links a { font-size: 16px; }
    .section-title { font-size: 2rem; margin-bottom: 35px; }
    .footer-social-icons a { width: 46px; height: 46px; font-size: 1.2rem; }
}

/* ===== MOBILE — 480px ===== */
@media (max-width: 480px) {
    .logo { font-size: 20px; }
    .section-title { font-size: 1.7rem; }
    .footer-social-icons { gap: 12px; }
    .footer-social-icons a { width: 42px; height: 42px; font-size: 1.1rem; }
    .container { padding: 0 15px; }
}

/* ===== WIKIPEDIA API COMPONENT ===== */
.wiki-overview-card {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 20px;
    padding: 28px;
    margin: 35px auto 45px;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.wiki-overview-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.15);
}
.wiki-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 22px;
}
.wiki-brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
}
.wiki-icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #f8fafc;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
    flex-shrink: 0;
}
.wiki-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.wiki-live-dot {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: wikiPulse 1.8s infinite;
}
@keyframes wikiPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}
.wiki-title {
    font-size: 1.6rem;
    font-family: 'Montserrat', sans-serif;
    color: #f8fafc;
    font-weight: 700;
    line-height: 1.2;
}
.wiki-description {
    font-size: 0.92rem;
    color: #94a3b8;
    margin-top: 3px;
    font-weight: 400;
}
.wiki-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.wiki-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.wiki-read-btn:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.wiki-card-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 25px;
    align-items: start;
}
.wiki-image-wrap {
    width: 100%;
    height: 170px;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.wiki-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.wiki-image-wrap:hover .wiki-image {
    transform: scale(1.06);
}
.wiki-text-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.wiki-extract {
    font-size: 1.02rem;
    line-height: 1.75;
    color: #cbd5e1;
}
.wiki-footer-meta {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}
.wiki-interactive-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed rgba(59, 130, 246, 0.2);
}
.wiki-chip-btn {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #cbd5e1;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}
.wiki-chip-btn:hover, .wiki-chip-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transform: translateY(-2px);
}
.wiki-search-box {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    margin-left: auto;
}
.wiki-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-size: 0.85rem;
    padding: 5px;
    width: 140px;
    transition: width 0.3s ease;
    font-family: 'Poppins', sans-serif;
}
.wiki-search-input:focus {
    width: 190px;
}
.wiki-search-btn {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
}

@media (max-width: 768px) {
    .wiki-card-body {
        grid-template-columns: 1fr;
    }
    .wiki-image-wrap {
        height: 200px;
    }
    .wiki-search-box {
        margin-left: 0;
        width: 100%;
    }
    .wiki-search-input {
        width: 100%;
    }
    .wiki-search-input:focus {
        width: 100%;
    }
}

