/* ══════════════════════════════════════════
   MyFanFolio — Shared Styles
   Used by: index.html, academy.html, article pages, feedback.html
   ══════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
    --rose:     #6366f1;
    --rose2:    #818cf8;
    --plum:     #8b5cf6;
    --plum2:    #a78bfa;
    --gold:     #ec4899;
    --gold2:    #f472b6;
    --bg:       #0e0e1a;
    --bg2:      #111120;
    --surface:  #141426;
    --surface2: #18182e;
    --surface3: #1e1e38;
    --border:   rgba(255,255,255,0.07);
    --border2:  rgba(255,255,255,0.12);
    --border3:  rgba(255,255,255,0.17);
    --text:     #f0ecff;
    --text2:    #d6d0f0;
    --muted:    #b3aed0;
    --muted2:   #9490b2;
}

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

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

/* ── Atmospheric Backgrounds ── */
.bg-mesh {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(ellipse 90% 70% at 5% -5%, rgba(99,102,241,0.13) 0%, transparent 60%),
        radial-gradient(ellipse 70% 60% at 95% 15%, rgba(139,92,246,0.10) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 50% 90%, rgba(236,72,153,0.07) 0%, transparent 50%);
}
.bg-grid {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 64px 64px;
}
.bg-vignette {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background: radial-gradient(ellipse 120% 100% at 50% 0%, transparent 40%, rgba(8,6,8,0.6) 100%);
}

/* ── Nav ── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 clamp(20px, 5vw, 80px);
    height: 72px;
    background: rgba(5,5,13,0.80);
    backdrop-filter: blur(28px) saturate(1.4);
    -webkit-backdrop-filter: blur(28px) saturate(1.4);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
nav::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(99,102,241,0.3) 30%, rgba(139,92,246,0.3) 70%, transparent 100%);
    opacity: 0.6;
}

.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-gem {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--rose), var(--plum));
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    box-shadow: 0 4px 16px rgba(99,102,241,0.4), 0 0 0 1px rgba(99,102,241,0.2);
}
.nav-logo-text {
    font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 800;
    color: var(--text); letter-spacing: -0.02em;
}

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
    padding: 7px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: var(--muted);
    text-decoration: none; transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text2); background: rgba(99,102,241,0.08); }
.nav-link.active { color: var(--rose2); background: rgba(99,102,241,0.10); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

/* ── Buttons ── */
.btn-ghost {
    padding: 8px 18px; border-radius: 9px; font-size: 13px; font-weight: 600;
    font-family: 'Instrument Sans', sans-serif;
    background: transparent; border: 1px solid var(--border2);
    color: var(--text2); cursor: pointer; transition: all 0.18s;
    text-decoration: none; display: inline-flex; align-items: center;
}
.btn-ghost:hover { border-color: var(--rose); color: var(--rose2); }

.btn-primary {
    padding: 9px 22px; border-radius: 9px; font-size: 13px; font-weight: 700;
    font-family: 'Instrument Sans', sans-serif;
    background: linear-gradient(135deg, var(--rose), var(--plum));
    border: none; color: #fff; cursor: pointer; transition: all 0.2s;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 3px 16px rgba(99,102,241,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(99,102,241,0.5), 0 0 0 1px rgba(99,102,241,0.2); }

/* ── Mobile Hamburger ── */
.nav-hamburger {
    display: none; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 38px; height: 38px;
    background: transparent; border: 1px solid var(--border2);
    border-radius: 9px; cursor: pointer; padding: 0; transition: border-color 0.18s;
}
.nav-hamburger:hover { border-color: var(--rose); }
.nav-hamburger span { display: block; width: 18px; height: 1.5px; background: var(--muted); border-radius: 2px; transition: all 0.25s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
    display: none; position: fixed; top: 68px; left: 0; right: 0; z-index: 99;
    background: rgba(10,8,12,0.97); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px; flex-direction: column; gap: 4px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    animation: slideDown 0.2s ease;
}
.mobile-menu.open { display: flex; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.mobile-menu a {
    padding: 11px 14px; border-radius: 9px; font-size: 15px; font-weight: 600;
    color: var(--muted); text-decoration: none; transition: all 0.15s;
}
.mobile-menu a:hover { background: rgba(99,102,241,0.07); color: var(--rose2); }
.mobile-menu .mobile-cta {
    margin-top: 8px; padding: 13px 14px; text-align: center;
    background: linear-gradient(135deg, var(--rose), var(--plum));
    color: #fff; border-radius: 10px; font-weight: 700;
}

/* ── Sections ── */
section { position: relative; z-index: 10; }

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

/* ── Footer (shared across landing + academy) ── */
footer {
    position: relative; z-index: 10;
    background: var(--bg2); border-top: 1px solid var(--border);
    padding: 48px clamp(20px, 5vw, 80px) 28px;
}
.footer-top {
    max-width: 1100px; margin: 0 auto;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px;
    padding-bottom: 36px; border-bottom: 1px solid var(--border);
}
.footer-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-logo-gem {
    width: 28px; height: 28px; border-radius: 7px;
    background: linear-gradient(135deg, var(--rose), var(--plum));
    display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.footer-logo-text { font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 14px; color: var(--text); }
.footer-tagline { font-size: 12.5px; color: var(--muted2); max-width: 220px; line-height: 1.65; margin-bottom: 14px; }
.footer-support { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-support a {
    font-size: 11px; font-weight: 600; color: var(--muted);
    text-decoration: none; padding: 6px 12px; border-radius: 7px;
    border: 1px solid var(--border); transition: all 0.18s;
}
.footer-support a:hover { border-color: rgba(99,102,241,0.3); color: var(--rose2); }
.footer-nav-group { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-nav-label {
    font-size: 10px; font-weight: 700; color: var(--muted2);
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px;
}
.footer-nav-links { display: flex; flex-direction: column; gap: 10px; }
.footer-nav-link { font-size: 13px; color: var(--muted2); text-decoration: none; transition: color 0.15s; }
.footer-nav-link:hover { color: var(--rose2); }
.footer-bottom {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    padding-top: 20px; font-size: 12px; color: var(--muted2);
}

/* ── Newsletter Signup (reusable) ── */
.newsletter-section {
    padding: 0 clamp(20px, 5vw, 80px);
    margin-bottom: 0;
    position: relative; z-index: 10;
}
.newsletter-card {
    max-width: 620px; margin: 0 auto;
    background: linear-gradient(145deg, rgba(22,20,42,0.95), rgba(14,14,26,0.98));
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 18px;
    padding: 36px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.newsletter-card::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.newsletter-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.2);
    border-radius: 100px; padding: 5px 14px;
    font-size: 10px; font-weight: 700; color: var(--rose2);
    letter-spacing: 0.1em; text-transform: uppercase;
    margin-bottom: 16px;
    position: relative;
}
.newsletter-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(20px, 3.5vw, 26px);
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 8px;
    position: relative;
}
.newsletter-sub {
    font-size: 14px; color: var(--muted); line-height: 1.7;
    max-width: 440px; margin: 0 auto 24px;
    position: relative;
}
.newsletter-form {
    display: flex; gap: 8px; max-width: 420px; margin: 0 auto;
    position: relative;
}
.newsletter-input {
    flex: 1; padding: 12px 16px; border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text); font-size: 14px; font-family: 'Instrument Sans', sans-serif;
    outline: none; transition: border-color 0.2s;
}
.newsletter-input::placeholder { color: var(--muted2); }
.newsletter-input:focus { border-color: rgba(99,102,241,0.4); }
.newsletter-btn {
    padding: 12px 24px; border-radius: 10px; font-size: 13px; font-weight: 700;
    font-family: 'Instrument Sans', sans-serif;
    background: linear-gradient(135deg, var(--rose), var(--plum));
    border: none; color: #fff; cursor: pointer; transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 3px 16px rgba(99,102,241,0.3);
}
.newsletter-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(99,102,241,0.5); }
.newsletter-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.newsletter-fine {
    font-size: 11px; color: var(--muted2); margin-top: 14px;
    position: relative;
}
.newsletter-success {
    display: none; padding: 12px 16px; border-radius: 10px;
    background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.2);
    color: #34d399; font-size: 13px; font-weight: 600;
    margin-top: 12px; position: relative;
}
.newsletter-success.show { display: block; }
.newsletter-error {
    display: none; padding: 10px 14px; border-radius: 8px;
    background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.2);
    color: #f87171; font-size: 12px; font-weight: 600;
    margin-top: 10px; position: relative;
}
.newsletter-error.show { display: block; }

/* ── Responsive: mobile ── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-actions .btn-ghost, .nav-actions .btn-primary { display: none; }
    .nav-hamburger { display: flex; }

    .footer-top { flex-direction: column; gap: 28px; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .newsletter-form { flex-direction: column; }
    .newsletter-btn { width: 100%; }
}
