/* ========================================
   BRYAN TOTTY — Hybrid Duality Theme
   Clean tech surface + dark artistic edge
   ======================================== */

html {
    scroll-behavior: smooth;
}

/* --- Animated Grid Background --- */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(200, 16, 46, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 16, 46, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    animation: grid-drift 20s linear infinite;
}

@keyframes grid-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* --- Scanline overlay --- */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* --- Ambient glow behind page --- */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(200, 16, 46, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(ellipse, rgba(30, 30, 80, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

main, section, footer, nav {
    position: relative;
    z-index: 2;
}

/* --- Text Gradient (Musician word) --- */
.text-gradient {
    background: linear-gradient(135deg, #c8102e 0%, #ff4466 50%, #c8102e 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* --- Glitch Text Effect --- */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-text:hover::before {
    opacity: 0.8;
    color: #c8102e;
    animation: glitch-1 0.3s ease-in-out;
    clip-path: inset(20% 0 30% 0);
}

.glitch-text:hover::after {
    opacity: 0.8;
    color: #4466ff;
    animation: glitch-2 0.3s ease-in-out;
    clip-path: inset(60% 0 10% 0);
}

@keyframes glitch-1 {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 2px); }
    40% { transform: translate(3px, -1px); }
    60% { transform: translate(-2px, 1px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes glitch-2 {
    0% { transform: translate(0); }
    20% { transform: translate(3px, -2px); }
    40% { transform: translate(-3px, 1px); }
    60% { transform: translate(2px, -1px); }
    80% { transform: translate(-2px, 2px); }
    100% { transform: translate(0); }
}

/* --- Typewriter cursor --- */
.typewriter::after {
    content: '█';
    animation: blink 1s step-end infinite;
    color: #c8102e;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Domain Pills --- */
.domain-pill {
    display: inline-block;
    padding: 4px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(200, 16, 46, 0.2);
    color: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    background: rgba(200, 16, 46, 0.03);
    transition: all 0.3s ease;
}

.domain-pill:hover {
    border-color: rgba(200, 16, 46, 0.5);
    color: rgba(255, 255, 255, 0.7);
    background: rgba(200, 16, 46, 0.08);
    box-shadow: 0 0 15px rgba(200, 16, 46, 0.1);
}

/* --- Hero Buttons --- */
.hero-btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: #c8102e;
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

.hero-btn-primary:hover {
    background: #e01030;
    box-shadow: 0 0 30px rgba(200, 16, 46, 0.3);
    transform: translateY(-1px);
}

.hero-btn-outline {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.hero-btn-outline:hover {
    border-color: rgba(200, 16, 46, 0.4);
    color: white;
    background: rgba(200, 16, 46, 0.05);
}

/* --- Hero Image --- */
.hero-image-wrapper {
    position: relative;
    width: 440px;
    height: 440px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    position: relative;
    z-index: 2;
    filter: grayscale(30%) contrast(1.1);
    transition: filter 0.5s ease;
}

.hero-image-wrapper:hover .hero-image {
    filter: grayscale(0%) contrast(1.05);
}

.hero-glow {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.3), rgba(139, 0, 0, 0.1));
    border-radius: 4px;
    z-index: 0;
    transition: all 0.5s ease;
}

.hero-image-wrapper:hover .hero-glow {
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.5), rgba(139, 0, 0, 0.2));
}

.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 60%, rgba(5, 5, 5, 0.8) 100%);
    z-index: 3;
    border-radius: 4px;
    pointer-events: none;
}

/* --- Scrolling Ticker --- */
.ticker {
    overflow: hidden;
    width: 100%;
}

.ticker-content {
    display: inline-block;
    animation: ticker-scroll 30s linear infinite;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Domain Cards --- */
.domain-card {
    display: block;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
}

.domain-card:hover {
    border-color: rgba(200, 16, 46, 0.2);
    background: rgba(200, 16, 46, 0.02);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(200, 16, 46, 0.05);
}

/* --- Career Timeline Cards --- */
.career-card {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s ease;
    position: relative;
}

.career-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(200, 16, 46, 0.3), transparent);
}

.career-card:hover {
    border-color: rgba(200, 16, 46, 0.15);
    background: rgba(200, 16, 46, 0.02);
    transform: translateY(-2px);
}

/* --- Certification Badge --- */
.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.cert-badge:hover {
    border-color: rgba(200, 16, 46, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.cert-badge .cert-icon {
    color: rgba(200, 16, 46, 0.6);
    font-size: 14px;
}

/* --- Tech Stack Pills --- */
.tech-pill {
    display: inline-block;
    padding: 6px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s ease;
}

.tech-pill:hover {
    border-color: rgba(200, 16, 46, 0.2);
    color: rgba(255, 255, 255, 0.6);
}

/* --- Press Cards --- */
.press-card {
    display: block;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s ease;
    text-decoration: none;
}

.press-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
}

/* --- General Card hover (blog, etc.) --- */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.3s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(200, 16, 46, 0.15) !important;
}

/* --- Section reveal animation --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Profile image styling --- */
.profile-img {
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .hero-image-wrapper {
        width: 320px;
        height: 320px;
    }

    .hero-glow {
        top: 12px;
        left: 12px;
    }

    .hero-cta-row {
        justify-content: center;
    }

    .hero-pills-row {
        justify-content: center;
    }

    .domain-card p {
        font-size: 0.9375rem;
    }
}
