:root {
    --bg: #090d16;
    --bg-soft: #101727;
    --surface: rgba(255, 255, 255, 0.055);
    --surface-hover: rgba(255, 255, 255, 0.09);
    --border: rgba(255, 255, 255, 0.105);
    --text: #f4f6fb;
    --muted: #a9b2c3;
    --accent: #79d2c6;
    --accent-strong: #9ce8dc;
    --heading-font: "Manrope", sans-serif;
    --body-font: "Manrope", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0 0 0 220px;
    background:
        radial-gradient(circle at 78% 12%, rgba(85, 142, 180, 0.16), transparent 28rem),
        radial-gradient(circle at 12% 85%, rgba(91, 176, 159, 0.09), transparent 25rem),
        var(--bg);
    color: var(--text);
    font-family: var(--body-font);
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    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: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

h1, h2, h3, h4, h5 {
    margin-top: 0;
    font-family: var(--heading-font);
}

h1 {
    margin: 20px 0;
    font-size: clamp(2.25rem, 5vw, 4.25rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

h2 {
    margin: 15px 0;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    letter-spacing: -0.035em;
}

h3 {
    margin: 10px 0;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

a {
    color: var(--accent);
    font-weight: 700;
}

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

.navbar {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    border-right: 1px solid var(--border);
    background: rgba(9, 13, 22, 0.82);
    backdrop-filter: blur(18px);
}

.navbar ul {
    display: flex;
    height: 100%;
    margin: 0;
    padding: 32px 20px;
    list-style: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.navbar li {
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    border-radius: 10px;
    transition: background 180ms ease, transform 180ms ease;
}

.navbar li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 999px;
    background: var(--accent);
    transform: translateY(-50%);
    transition: height 180ms ease;
}

.navbar li:hover,
.navbar li.active {
    background: var(--surface);
    transform: translateX(3px);
}

.navbar li.active::before {
    height: 24px;
}

.navbar a {
    display: block;
    padding: 13px 16px;
    color: var(--muted);
    font-size: 0.95rem;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 180ms ease;
}

.navbar li:hover a,
.navbar li.active a {
    color: var(--text);
}

.page-title {
    margin: 0 auto 28px;
    color: var(--text);
}

#home,
#experience,
#projects,
#contact,
#certificates {
    width: min(1180px, calc(100% - 64px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 92px 0 64px;
    text-align: center;
}

#home > .header-container {
    max-width: 920px;
    margin: 0 auto 48px;
    padding: 56px 24px 44px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

#home > .header-container h1 {
    margin: 0;
}

#home .header-container h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin: 22px auto 0;
    border-radius: 999px;
    background: var(--accent);
}

.About {
    max-width: 1050px;
    margin: 0 auto;
}

.About h3 {
    margin: 32px 0 16px;
    color: var(--text);
}

#home .about-copy {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 28px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.85;
    text-align: left;
}

.skills-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 20px auto 0;
    padding: 0;
}

.skill-box {
    min-width: 0;
    padding: 24px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.skill-box:hover {
    border-color: rgba(121, 210, 198, 0.35);
    background: var(--surface-hover);
    transform: translateY(-4px);
}

.skill-box h5 {
    min-height: 2.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 12px;
    color: var(--text);
    font-size: 1.05rem;
}

.skill-box ul,
.job-details ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.skill-box li {
    padding: 5px 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.resume-section {
    display: flex;
    justify-content: center;
    margin: 32px 0 0;
}

.resume-box {
    width: min(100%, 420px);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.resume-box h3 {
    margin: 0 0 8px;
}

.resume-box p {
    color: var(--muted);
}

.resume-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 8px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--accent);
    color: #091210;
    text-decoration: none;
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.resume-button:hover {
    background: var(--accent-strong);
    color: #091210;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(121, 210, 198, 0.16);
}

.Experience {
    max-width: 900px;
    margin: 0 auto;
}

.job {
    margin: 14px auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
    text-align: left;
    transition: border-color 180ms ease, background 180ms ease;
}

.job:hover {
    border-color: rgba(121, 210, 198, 0.25);
    background: var(--surface-hover);
}

.job-header {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
}

.job-header h3 {
    margin: 0;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.arrow {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--accent);
    font-size: 0.75rem;
    transition: transform 220ms ease, background 220ms ease;
}

.job-details {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    line-height: 1.7;
}

.job-details p {
    margin: 16px 0 10px;
    color: var(--accent);
    font-weight: 700;
}

.job-details li {
    margin: 8px 0 8px 18px;
    list-style: disc;
}

.projects-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 980px;
    margin: 20px auto 0;
}

.project-box {
    position: relative;
    height: 390px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.project-box img {
    position: absolute;
    inset: 68px 0 0;
    width: 100%;
    height: calc(100% - 68px);
    object-fit: cover;
    transition: transform 500ms cubic-bezier(.2,.7,.2,1), filter 300ms ease;
}

.project-box.shopscout-project img {
    object-fit: contain;
    padding: 38px;
    background: #111827;
}

.project-name {
    position: absolute;
    z-index: 2;
    inset: 0 0 auto;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    background: rgba(9, 13, 22, 0.92);
    backdrop-filter: blur(12px);
}

.project-name h4 {
    margin: 0;
    font-size: 1.15rem;
}

.project-hover {
    position: absolute;
    z-index: 3;
    inset: 68px 0 0;
    display: flex;
    padding: 28px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(9, 13, 22, 0.92);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 260ms ease, transform 260ms ease;
}

.project-hover p {
    max-width: 360px;
    margin: 0 0 12px;
    color: #dde4ef;
    line-height: 1.55;
}

.project-hover a {
    margin-top: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(121, 210, 198, 0.35);
    border-radius: 999px;
    text-decoration: none;
}

.project-box:hover img {
    transform: scale(1.035);
    filter: brightness(0.65);
}

.project-box:hover .project-hover,
.project-box:focus-within .project-hover {
    opacity: 1;
    transform: translateY(0);
}

.certificates-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 20px auto 0;
}

.certificate-box {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.certificate-box h3 {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.certificate-box img {
    width: 100%;
    max-height: 520px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.contact-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 760px;
    margin: 20px auto 0;
}

.contact-box {
    min-height: 210px;
    display: flex;
    padding: 24px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.contact-box:hover {
    border-color: rgba(121, 210, 198, 0.32);
    background: var(--surface-hover);
    transform: translateY(-4px);
}

.contact-box img {
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    filter: grayscale(1) brightness(1.8);
    opacity: 0.9;
}

.contact-box h5 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.contact-box p {
    margin: 0;
    color: var(--muted);
}

.contact-box a {
    text-decoration: none;
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.7,.2,1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    body {
        margin-left: 190px;
    }

    .navbar {
        width: 190px;
    }

    #home,
    #experience,
    #projects,
    #contact,
    #certificates {
        width: min(100% - 40px, 1180px);
    }

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

    .projects-section,
    .certificates-section,
    .contact-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    body {
        margin: 64px 0 0;
    }

    .navbar {
        width: 100%;
        height: 64px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .navbar ul {
        display: grid;
        height: 64px;
        grid-template-columns: repeat(5, 1fr);
        align-items: center;
        padding: 7px 6px;
        gap: 2px;
    }

    .navbar li,
    .navbar li:hover,
    .navbar li.active {
        text-align: center;
        transform: none;
    }

    .navbar li::before {
        left: 50%;
        top: auto;
        bottom: -7px;
        width: 0;
        height: 3px;
        transform: translateX(-50%);
    }

    .navbar li.active::before {
        width: 24px;
        height: 3px;
    }

    .navbar a {
        padding: 12px 2px;
        font-size: clamp(0.68rem, 2.8vw, 0.78rem);
    }

    #home,
    #experience,
    #projects,
    #contact,
    #certificates {
        width: calc(100% - 32px);
        min-height: calc(100vh - 64px);
        padding: 36px 0 48px;
    }

    #home > .header-container {
        margin-bottom: 32px;
        padding: 38px 16px 32px;
        border-radius: 18px;
    }

    #home .about-copy {
        padding: 18px;
        font-size: 0.98rem;
    }

    .project-box {
        height: 340px;
    }

    .contact-box {
        min-height: 180px;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
