/* ============================================
   John Fraumeni — Brand Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep: #07080d;
    --bg-surface: #0f1117;
    --bg-card: #161820;
    --bg-card-hover: #1c1e2a;
    --accent: #00aeff;
    --accent-dim: rgba(0, 174, 255, 0.08);
    --accent-glow: rgba(0, 174, 255, 0.15);
    --accent-secondary: #6366f1;
    --accent-rose: #f43f5e;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(0, 174, 255, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', 'Spartan', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --nav-height: 64px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    padding-top: var(--nav-height);
    min-height: 100vh;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(7, 8, 13, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 4vw, 48px);
    transition: background var(--transition-smooth);
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-brand::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-smooth);
}

.nav-brand:hover {
    color: var(--accent);
}

.nav-brand:hover::after {
    width: 100%;
}

.nav-brand.active {
    color: var(--accent);
}

.nav-brand.active::after {
    width: 100%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--accent-dim);
}

.nav-links a.active {
    color: var(--accent);
    background: var(--accent-dim);
}

/* Genesis nav link — gold */
.nav-links a[href="/genesis"] {
    color: #d4a017;
    text-shadow: 0 0 10px rgba(212, 160, 23, 0.25);
}

.nav-links a[href="/genesis"]:hover {
    color: #e8b82e;
    background: rgba(212, 160, 23, 0.10);
}

.nav-links a[href="/genesis"].active {
    color: #d4a017;
    background: rgba(212, 160, 23, 0.10);
    text-shadow: 0 0 12px rgba(212, 160, 23, 0.3);
}

/* Donate nav link — red */
.nav-links a[href="/donate"] {
    color: #e53e3e;
    text-shadow: 0 0 10px rgba(229, 62, 62, 0.25);
}

.nav-links a[href="/donate"]:hover {
    color: #fc5c5c;
    background: rgba(229, 62, 62, 0.10);
}

.nav-links a[href="/donate"].active {
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.10);
    text-shadow: 0 0 12px rgba(229, 62, 62, 0.3);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* --- Layout --- */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px clamp(20px, 4vw, 40px);
}

/* --- Cards / Sections --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 32px);
    margin-bottom: 20px;
    transition: border-color var(--transition-smooth),
                box-shadow var(--transition-smooth),
                transform var(--transition-smooth);
}

.card:hover {
    border-color: var(--border-accent);
    box-shadow: 0 4px 24px -4px rgba(0, 174, 255, 0.06),
                0 0 0 1px rgba(0, 174, 255, 0.04);
    transform: translateY(-1px);
}

/* --- Profile Section --- */
.profile-row {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.headshot img {
    width: 140px;
    height: 210px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    transition: border-color var(--transition-smooth);
}

.card:hover .headshot img {
    border-color: var(--border-accent);
}

.about {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.about p {
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.8;
}

.about p span {
    display: block;
    margin-bottom: 0.4em;
}

/* --- Certifications --- */
.certs-section {
    /* inherits margin-bottom: 20px from .card */
}

.certs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.certs img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.certs img:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* --- Section Headings --- */
.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

/* --- Lists / Links --- */
ul {
    list-style: none;
}

ul li {
    margin-bottom: 6px;
}

ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

ul li a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.favicon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(56%) sepia(91%) saturate(2260%) hue-rotate(164deg) brightness(101%) contrast(101%);
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

ul li a:hover .favicon {
    opacity: 1;
}

.favicon.credly {
    filter: brightness(0.77) saturate(110%) invert(15%) sepia(90%) saturate(9550%) hue-rotate(180deg) brightness(115%) contrast(120%);
}

.favicon.linkedin {
    filter: brightness(0.77) saturate(100%) invert(10%) sepia(90%) saturate(10000%) hue-rotate(180deg) brightness(101%) contrast(120%);
}

/* --- Hero/Feature sections (Genesis, etc.) --- */
.hero {
    text-align: center;
    padding: clamp(48px, 8vw, 80px) clamp(20px, 4vw, 48px);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.5;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 16px;
    position: relative;
}

.hero .tagline {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
    position: relative;
}

.hero .accent-word {
    color: var(--accent);
    font-weight: 600;
}

/* --- Badges / Tags --- */
.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--border-accent);
}

/* --- Feature Grid --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color var(--transition-smooth),
                box-shadow var(--transition-smooth);
}

.feature-item:hover {
    border-color: var(--border-accent);
    box-shadow: 0 4px 20px -4px rgba(0, 174, 255, 0.06);
}

.feature-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Blog Preview --- */
.blog-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.blog-placeholder p {
    font-size: 0.95rem;
    margin-top: 12px;
    color: var(--text-muted);
}

/* --- Footer --- */
.footer {
    margin-top: 60px;
    padding: 24px 0;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer p {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* --- Subtle animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease-out both;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(7, 8, 13, 0.96);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-subtle);
        padding: 12px 0;
        gap: 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px clamp(20px, 4vw, 48px);
        border-radius: 0;
        width: 100%;
    }

    .nav-toggle {
        display: flex;
    }

    .profile-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .about h2 {
        font-size: 1.3rem;
    }

    .headshot img {
        margin: 0 auto;
    }

    .certs {
        justify-content: center;
    }

    .container {
        padding: 24px 16px;
    }
}

@media (max-width: 400px) {
    .certs img {
        width: 72px;
        height: 72px;
    }
}

/* ============================================
   Startup Flair — Gradient Accents & Polish
   ============================================ */

/* Subtle gradient line under nav on scroll */
.nav::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent-secondary) 50%, var(--accent-rose) 80%, transparent);
    opacity: 0.3;
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glow button — used for CTAs */
.btn-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -6px rgba(0, 174, 255, 0.3);
}

.btn-glow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Outline variant */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.btn-outline:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: var(--accent-dim);
}

/* Form inputs — startup style */
.form-input {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 174, 255, 0.12);
}

.form-input.error {
    border-color: var(--accent-rose);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.form-group {
    margin-bottom: 16px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--accent-rose);
    margin-top: 4px;
}

/* Pill badge */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--border-accent);
}

.pill.gold {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--border-accent);
}

.pill.rose {
    background: rgba(244, 63, 94, 0.10);
    color: var(--accent-rose);
    border-color: rgba(244, 63, 94, 0.18);
}

.pill.emerald {
    background: rgba(16, 185, 129, 0.10);
    color: var(--accent-emerald);
    border-color: rgba(16, 185, 129, 0.18);
}

/* TOS link in footer */
.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer a:hover {
    color: var(--accent);
}

/* Extra responsive polish */
@media (max-width: 480px) {
    :root {
        --nav-height: 56px;
    }

    .nav {
        padding: 0 16px;
    }

    .nav-brand {
        font-size: 1rem;
    }
}
