:root {
    --blue: #1976d2;
    --blue-dark: #0b4f9c;
    --blue-light: #45b6ff;
    --cyan: #15c5e8;
    --purple: #7357e8;
    --green: #22a66f;
    --casino: #8055d8;
    --casino-dark: #653bb7;
    --text: #203247;
    --muted: #65768a;
    --background: #f7fbff;
    --background-alt: #edf7ff;
    --card: #ffffff;
    --border: #dbeaf5;
    --shadow: 0 12px 35px rgba(40, 100, 160, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.65;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.narrow {
    max-width: 820px;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(20, 100, 180, 0.10);
}

.nav-wrap {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    color: var(--blue-dark);
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 24px;
}

nav a {
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

nav a:hover {
    color: var(--blue);
}

/* HERO */

.hero {
    position: relative;
    overflow: hidden;
    min-height: 660px;
    display: flex;
    align-items: center;
    isolation: isolate;

    /* LinkedIn-style artwork as the hero background */
    background-image:
        linear-gradient(
            90deg,
            rgba(247, 251, 255, 0.97) 0%,
            rgba(247, 251, 255, 0.91) 32%,
            rgba(247, 251, 255, 0.55) 54%,
            rgba(247, 251, 255, 0.06) 78%
        ),
        url("Images/hero-background.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 20%, rgba(255,255,255,0.88), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.12));
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 150px;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, rgba(247, 251, 255, 0.20));
}

#hero-3d {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

#hero-3d canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-glow {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 92px 0 100px;
    max-width: none;
}

.hero-content-panel {
    width: min(1120px, calc(100% - 40px));
}

.hero-content-panel > * {
    max-width: 650px;
}

.eyebrow,
.section-label {
    margin-bottom: 12px;
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 660px;
    margin: 0 0 24px;
    color: #123f70;
    font-size: clamp(2.8rem, 5.7vw, 4.65rem);
    line-height: 1.03;
    letter-spacing: -0.045em;
    text-wrap: balance;
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

.lead {
    max-width: 620px;
    margin-bottom: 32px;
    color: #49647e;
    font-size: 1.14rem;
    line-height: 1.65;
    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}

/* BUTTONS */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.actions.center {
    justify-content: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 11px 21px;
    border: 1px solid rgba(92, 151, 201, 0.36);
    border-radius: 11px;
    background: rgba(255,255,255,0.80);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--blue-dark);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(30, 92, 145, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(38, 111, 180, 0.16);
    background: rgba(255,255,255,0.96);
}

.button.primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--blue-light), var(--blue));
    color: white;
    box-shadow: 0 10px 26px rgba(25, 118, 210, 0.23);
}

.button.primary:hover {
    box-shadow: 0 13px 30px rgba(25, 118, 210, 0.29);
}

.button-arrow {
    font-size: 1.08rem;
    transition: transform 0.2s ease;
}

.button.primary:hover .button-arrow {
    transform: translateX(3px);
}

.casino-button {
    border-color: transparent;
    background: linear-gradient(135deg, #9b6cf0, var(--casino-dark));
    color: white;
}

/* SECTIONS */

.section {
    padding: 90px 0;
}

.section.alt {
    background: linear-gradient(180deg, #edf7ff, #f6fbff);
}

.section h2 {
    margin: 0 0 22px;
    color: #173e66;
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.025em;
}

.section-intro {
    max-width: 740px;
    margin-bottom: 38px;
    color: var(--muted);
    font-size: 1.08rem;
}

/* CARDS */

.cards {
    display: grid;
    gap: 24px;
}

.skills-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 45px rgba(40, 100, 160, 0.15);
}

.card h3 {
    margin: 10px 0 12px;
    color: #173e66;
}

.skill-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #e0f5ff, #e9e2ff);
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 900;
}

/* PROJECTS */

.projects-section {
    background: white;
}

.project-card {
    position: relative;
    overflow: hidden;
}

.featured-project {
    border-top: 4px solid #23a9f2;
}

.casino-project {
    border-top: 4px solid var(--casino);
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 100px;
    background: #e8f5ff;
    color: #1767ad;
    font-size: 0.76rem;
    font-weight: 800;
}

.live-badge {
    color: var(--green);
    font-size: 0.77rem;
    font-weight: 800;
}

.project-card h3 {
    margin-top: 18px;
    font-size: 1.6rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 20px 0;
}

.project-tech span {
    padding: 5px 9px;
    border: 1px solid #d8e8f3;
    border-radius: 7px;
    background: #f7fbff;
    color: #567086;
    font-size: 0.76rem;
    font-weight: 650;
}

.project-actions {
    margin-top: 22px;
}

/* EXPERIENCE */

.timeline {
    position: relative;
    margin-top: 35px;
    padding-left: 34px;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 8px;
    width: 2px;
    background: linear-gradient(var(--blue-light), var(--purple));
}

.timeline article {
    position: relative;
    margin-bottom: 42px;
}

.timeline article::before {
    content: "";
    position: absolute;
    left: -32px;
    top: 8px;
    width: 14px;
    height: 14px;
    border: 4px solid #edf7ff;
    border-radius: 50%;
    background: var(--blue);
}

.timeline h3 {
    margin-bottom: 5px;
    color: #183d63;
}

.timeline h3 span {
    font-weight: 600;
}

.muted {
    color: var(--muted);
}

/* CONTACT */

.contact-section {
    text-align: center;
    background: linear-gradient(135deg, #e3f6ff, #f1edff);
}

/* FOOTER */

footer {
    padding: 26px 0;
    background: #173e66;
    color: #dbeeff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 0.88rem;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .skills-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        background-position: 58% center;
    }

    .hero-content-panel > * {
        max-width: 590px;
    }
}

@media (max-width: 700px) {
    .nav-wrap {
        flex-direction: column;
        padding: 16px 0;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 18px;
    }

    .hero {
        min-height: auto;
        background-image:
            linear-gradient(
                90deg,
                rgba(247, 251, 255, 0.96) 0%,
                rgba(247, 251, 255, 0.88) 72%,
                rgba(247, 251, 255, 0.44) 100%
            ),
            url("Images/hero-background.png");
        background-position: 64% center;
    }

    .hero-content {
        padding: 68px 0 76px;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 12vw, 3.6rem);
    }

    .lead {
        font-size: 1.05rem;
    }

    .skills-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 65px 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    #hero-3d {
        display: none;
    }

    .button,
    .card {
        transition: none;
    }
}
