:root {
    --bg-0: #05060c;
    --bg-1: #0b1020;
    --bg-2: #141a2e;

    --flame-core:   #e8f9ff;
    --flame-blue:   #4fc3f7;
    --flame-deep:   #1e88e5;
    --flame-teal:   #26c6da;

    --flame-yellow: #ffd54f;
    --flame-orange: #ff7043;
    --flame-red:    #e53935;

    --ember-purple: #5e35b1;
    --skin-grey:    #9fa8b8;

    --text:  #e4eaf4;
    --muted: #6b7285;

    --card-bg:     rgba(10, 18, 36, 0.65);
    --card-border: rgba(79, 195, 247, 0.22);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%,  rgba(79, 195, 247, 0.22)  0%, transparent 65%),
        radial-gradient(ellipse 60% 45% at 85% 90%, rgba(94, 53, 177, 0.25)   0%, transparent 60%),
        radial-gradient(ellipse 55% 40% at 10% 95%, rgba(30, 136, 229, 0.18)  0%, transparent 60%),
        linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 70%, #000 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Subtle smoke/fog layer */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(79, 195, 247, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(94, 53, 177, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(38, 198, 218, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: drift 20s ease-in-out infinite alternate;
}

@keyframes drift {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-2%, 2%) scale(1.05); }
}

header {
    text-align: center;
    padding: 5rem 1.5rem 2rem;
    position: relative;
    z-index: 1;
}

/* --- Avatar & flames --- */
.avatar-wrap {
    position: relative;
    display: inline-block;
    width: 150px;
    height: 150px;
    margin-bottom: 1.75rem;
}

.avatar {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--flame-blue);
    box-shadow:
        inset 0 0 15px rgba(79, 195, 247, 0.4),
        0 0 0 4px rgba(5, 6, 12, 0.9);
}

.flame {
    position: absolute;
    inset: -22px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(14px);
    opacity: 0.9;
    mix-blend-mode: screen;
    transition: background 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}

.flame.f1 {
    background:
        radial-gradient(circle at 30% 20%, var(--flame-core) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, var(--flame-blue) 0%, transparent 55%),
        radial-gradient(circle at 20% 80%, var(--flame-teal) 0%, transparent 55%);
    animation: flicker1 2.4s ease-in-out infinite;
    z-index: 1;
}

.flame.f2 {
    inset: -34px;
    background:
        radial-gradient(circle at 60% 30%, var(--flame-blue)   0%, transparent 50%),
        radial-gradient(circle at 30% 70%, var(--flame-deep)   0%, transparent 55%),
        radial-gradient(circle at 80% 60%, var(--ember-purple) 0%, transparent 60%);
    filter: blur(22px);
    opacity: 0.75;
    animation: flicker2 3.1s ease-in-out infinite;
    z-index: 0;
}

@keyframes flicker1 {
    0%, 100% { transform: scale(1)    rotate(0deg);   opacity: 0.9; }
    25%      { transform: scale(1.06) rotate(1deg);   opacity: 1;   }
    50%      { transform: scale(0.97) rotate(-1deg);  opacity: 0.8; }
    75%      { transform: scale(1.03) rotate(0.5deg); opacity: 0.95;}
}

@keyframes flicker2 {
    0%, 100% { transform: scale(1.02) rotate(0deg);   opacity: 0.75; }
    33%      { transform: scale(0.96) rotate(-1.5deg); opacity: 0.6;  }
    66%      { transform: scale(1.08) rotate(1.5deg);  opacity: 0.85; }
}

/* Angry Hades — flames turn yellow/orange on hover */
.avatar-wrap:hover .flame.f1 {
    background:
        radial-gradient(circle at 30% 20%, var(--flame-core)   0%, transparent 40%),
        radial-gradient(circle at 70% 80%, var(--flame-yellow) 0%, transparent 55%),
        radial-gradient(circle at 20% 80%, var(--flame-orange) 0%, transparent 55%);
}
.avatar-wrap:hover .flame.f2 {
    background:
        radial-gradient(circle at 60% 30%, var(--flame-orange) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, var(--flame-red)    0%, transparent 55%),
        radial-gradient(circle at 80% 60%, var(--flame-yellow) 0%, transparent 60%);
}
.avatar-wrap:hover .avatar {
    border-color: var(--flame-orange);
    box-shadow:
        inset 0 0 15px rgba(255, 112, 67, 0.5),
        0 0 0 4px rgba(5, 6, 12, 0.9);
    transition: border-color 0.6s ease, box-shadow 0.6s ease;
}

/* --- Title --- */
h1 {
    font-family: 'Cinzel', 'Trajan Pro', Georgia, serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin: 0;
    font-weight: 900;
    letter-spacing: 8px;
    background: linear-gradient(180deg, var(--flame-core) 0%, var(--flame-blue) 45%, var(--flame-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter:
        drop-shadow(0 0 12px rgba(79, 195, 247, 0.6))
        drop-shadow(0 0 30px rgba(30, 136, 229, 0.35));
    text-transform: uppercase;
}

.subtitle {
    color: var(--muted);
    font-family: 'Cinzel', Georgia, serif;
    font-size: 0.85rem;
    margin-top: 0.85rem;
    letter-spacing: 6px;
    text-transform: uppercase;
}

.subtitle::before,
.subtitle::after {
    content: '◆';
    margin: 0 0.75rem;
    color: var(--flame-blue);
    opacity: 0.6;
}

/* --- Main / Cards --- */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2rem;
    position: relative;
    z-index: 1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    display: block;
    padding: 2rem 1.75rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    transition:
        transform 0.35s ease,
        box-shadow 0.5s ease,
        border-color 0.5s ease,
        background 0.5s ease;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.08);
}

/* Flames rising from the bottom of the card */
.card::before {
    content: '';
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -40%;
    height: 140%;
    background:
        radial-gradient(ellipse 35% 45% at 20% 100%, var(--flame-orange) 0%, transparent 60%),
        radial-gradient(ellipse 30% 40% at 50% 105%, var(--flame-yellow) 0%, transparent 60%),
        radial-gradient(ellipse 35% 45% at 80% 100%, var(--flame-red)    0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 50% 115%, var(--flame-orange) 0%, transparent 70%);
    filter: blur(22px);
    opacity: 0;
    transform: translateY(15%) scale(0.9);
    transition: opacity 0.5s ease, transform 0.6s ease;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 0;
}

/* Inner content sits above the flames */
.card > * {
    position: relative;
    z-index: 1;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--flame-orange);
    background: rgba(22, 10, 6, 0.72);
    box-shadow:
        0 0 35px rgba(255, 112, 67, 0.45),
        0 10px 50px rgba(229, 57, 53, 0.25);
}

.card:hover::before {
    opacity: 0.95;
    transform: translateY(0) scale(1);
    animation: flameRise 2.2s ease-in-out infinite alternate;
}

@keyframes flameRise {
    0% {
        transform: translateY(0) scale(1);
        filter: blur(22px) hue-rotate(0deg);
    }
    50% {
        transform: translateY(-3%) scale(1.04);
        filter: blur(20px) hue-rotate(-8deg);
    }
    100% {
        transform: translateY(-6%) scale(1.02);
        filter: blur(24px) hue-rotate(6deg);
    }
}

.card .icon {
    font-size: 2.2rem;
    color: var(--flame-blue);
    display: block;
    margin-bottom: 0.75rem;
    text-shadow:
        0 0 12px rgba(79, 195, 247, 0.8),
        0 0 25px rgba(30, 136, 229, 0.4);
    line-height: 1;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.card:hover .icon {
    color: var(--flame-yellow);
    text-shadow:
        0 0 12px rgba(255, 213, 79, 0.9),
        0 0 25px rgba(255, 112, 67, 0.6);
}

.card h2 {
    margin: 0 0 0.35rem 0;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 1.2rem;
    color: var(--flame-core);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.5s ease;
}

.card:hover h2 { color: var(--flame-yellow); }

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

/* --- Footer / Badges --- */
footer {
    text-align: center;
    padding: 3rem 1.5rem 2.5rem;
    color: var(--muted);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.9rem;
    background: rgba(79, 195, 247, 0.08);
    border: 1px solid rgba(79, 195, 247, 0.45);
    border-radius: 999px;
    color: var(--flame-blue);
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.75rem;
    text-shadow: 0 0 8px rgba(79, 195, 247, 0.6);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1;   transform: scale(1);   }
    50%      { opacity: 0.4; transform: scale(0.9); }
}

footer .signature {
    font-family: 'Cinzel', Georgia, serif;
    letter-spacing: 3px;
    font-size: 0.75rem;
    opacity: 0.7;
}

@media (max-width: 600px) {
    header        { padding-top: 3rem; }
    .avatar-wrap  { width: 115px; height: 115px; }
    .flame.f1     { inset: -18px; }
    .flame.f2     { inset: -28px; }
    .grid         { gap: 1rem; }
    .card         { padding: 1.5rem 1.25rem; }
    h1            { letter-spacing: 5px; }
}
