:root {
    --bg-color: #f6f8fc;
    --bg-accent: #e9eefb;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --surface-soft: #f0f4ff;
    --text-color: #0f172a;
    --text-muted: #5b6477;
    --accent-color: #3563e9;
    --accent-secondary: #7c3aed;
    --accent-soft: rgba(53, 99, 233, 0.12);
    --border-color: rgba(15, 23, 42, 0.1);
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.18);
}

[data-theme="dark"] {
    --bg-color: #09111f;
    --bg-accent: #0f172a;
    --surface: rgba(15, 23, 42, 0.8);
    --surface-strong: #111a2e;
    --surface-soft: #17203a;
    --text-color: #f8fafc;
    --text-muted: #a5b1c2;
    --accent-color: #8fb3ff;
    --accent-secondary: #b18cff;
    --accent-soft: rgba(143, 179, 255, 0.16);
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.45);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(180deg, var(--bg-color), var(--bg-accent));
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top, rgba(53, 99, 233, 0.06), transparent 35%);
    opacity: 0.45;
}

img,
video {
    display: block;
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

::selection {
    background: var(--accent-soft);
}

h1,
h2,
h3,
.eyebrow,
.project-tag,
.profile-card-label {
    font-family: "Space Grotesk", sans-serif;
}

.dark-mode-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-color);
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(16px);
    transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease;
}

.dark-mode-toggle:hover {
    transform: translateY(-1px);
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.9rem 1rem;
    z-index: 999;
}

[data-theme="dark"] .navbar {
    background: rgba(9, 17, 31, 0.78);
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.navbar a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.navbar a:hover {
    background: var(--accent-soft);
    color: var(--accent-color);
    transform: translateY(-1px);
}

section {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 5.5rem 0;
    position: relative;
}

section:not(.hero) {
    scroll-margin-top: 96px;
}

.hero {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none;
    margin: 0;
    padding: 7rem 1rem 5rem;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: auto;
    border-radius: 999px;
    filter: blur(24px);
    pointer-events: none;
}

.hero::before {
    width: 220px;
    height: 220px;
    background: rgba(53, 99, 233, 0.08);
    top: 12%;
    left: -70px;
}

.hero::after {
    width: 180px;
    height: 180px;
    background: rgba(124, 58, 237, 0.08);
    bottom: 10%;
    right: -60px;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(12px);
}

.hero-orb-one {
    width: 110px;
    height: 110px;
    top: 15%;
    right: 13%;
    background: rgba(255, 255, 255, 0.12);
}

.hero-orb-two {
    width: 140px;
    height: 140px;
    bottom: 12%;
    left: 8%;
    background: rgba(53, 99, 233, 0.08);
}

.hero-content {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-copy {
    padding: 1rem 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0;
    font-size: clamp(3rem, 6vw, 5.25rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    max-width: 10ch;
}

.hero-summary {
    max-width: 62ch;
    margin: 1.5rem 0 0;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2rem;
}

.cta-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: 0.9rem 1.35rem;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cta-button {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 16px 30px rgba(53, 99, 233, 0.25);
}

.secondary-button {
    background: var(--surface);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}

.cta-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}

.hero-stats li {
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.hero-stats strong {
    display: block;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 0.45rem;
    color: var(--accent-color);
}

.hero-stats span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.profile-card {
    width: min(100%, 470px);
    padding: 0.9rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transform: translateY(0);
}

[data-theme="dark"] .profile-card {
    background: rgba(17, 26, 46, 0.9);
}

.profile-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.profile-card-copy {
    padding: 1rem 0.2rem 0.25rem;
}

.profile-card-label {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.profile-card-meta {
    margin: 0;
    color: var(--text-muted);
}

h1,
h2,
h3 {
    color: var(--text-color);
    font-weight: 700;
}

h2 {
    margin: 0 0 1.5rem;
    font-size: clamp(2rem, 4vw, 2.9rem);
    letter-spacing: -0.03em;
}

h2::after {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    margin: 0.8rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
}

.about-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    text-align: left;
}

.about-content p {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.about-content p:last-child {
    margin-bottom: 0;
}

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

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    border-radius: 26px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    backdrop-filter: blur(16px);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
    border-color: rgba(53, 99, 233, 0.25);
}

.project-card.featured {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    padding: 0.9rem;
}

.project-card.featured::before {
    content: "Featured case study";
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-media {
    min-width: 0;
}

.project-video,
.project-images {
    position: relative;
    width: 100%;
    min-height: 180px;
    border-radius: 20px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.project-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card[data-video] .project-video {
    min-height: 180px;
    height: 180px;
}

.project-video::after {
    content: ">";
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.4rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-card:hover .project-video::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.03);
}

.project-images {
    min-height: 180px;
}

.project-images img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.project-images img:nth-child(1) {
    opacity: 0.72;
}

.project-images img:nth-child(2) {
    width: 80%;
    height: 84%;
    top: 9px;
    left: 9px;
    border-radius: 14px;
    transform: rotate(-2deg);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.project-images img:nth-child(3) {
    width: 70%;
    height: 78%;
    right: 9px;
    bottom: 9px;
    left: auto;
    top: auto;
    border-radius: 14px;
    transform: rotate(2deg);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.project-card:hover .project-images img {
    transform: scale(1.03);
}

.project-copy {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.project-card[data-video] .project-copy {
    gap: 0.7rem;
}

.project-tag {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-color);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-copy h3 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.project-copy p {
    margin: 0;
    color: var(--text-muted);
}

.project-links {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.project-links a,
.modal-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gh-link,
.apk-link,
.ps-link {
    background: rgba(53, 99, 233, 0.08);
    color: var(--accent-color);
    border: 1px solid rgba(53, 99, 233, 0.16);
}

.project-links a:hover,
.modal-links a:hover {
    transform: translateY(-1px);
    background: var(--accent-color);
    color: #fff;
    border-color: transparent;
}

.skills {
    padding-top: 3rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 920px;
}

.skills-list li {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    color: var(--text-color);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.skills-list li:hover {
    transform: translateY(-2px);
    border-color: rgba(53, 99, 233, 0.22);
    background: var(--accent-soft);
}

.contact {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    padding: 5rem 1.5rem;
    margin-bottom: 2rem;
}

.contact > p {
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
}

form {
    max-width: 560px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

form input,
form textarea {
    width: 100%;
    padding: 1rem 1.05rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font: inherit;
    color: var(--text-color);
    background: var(--surface-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: rgba(53, 99, 233, 0.5);
    box-shadow: 0 0 0 4px rgba(53, 99, 233, 0.14);
}

form button {
    padding: 1rem 1.1rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(53, 99, 233, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(53, 99, 233, 0.28);
}

.contact-links {
    max-width: 560px;
    margin: 2rem auto 0;
    color: var(--text-muted);
}

.contact-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
}

.contact-links a:hover {
    text-decoration: underline;
}

.certifications {
    padding-bottom: 5rem;
}

.cert-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    backdrop-filter: blur(16px);
}

.cert-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
}

.cert-preview {
    height: 190px;
    background: var(--surface-soft);
    overflow: hidden;
}

.cert-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.cert-card:hover .cert-preview img {
    transform: scale(1.05);
}

.cert-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-grow: 1;
    padding: 1.2rem 1.2rem 1.4rem;
    text-align: left;
}

.cert-content h3 {
    margin: 0;
    font-size: 1.15rem;
}

.cert-content .issuer {
    margin: 0;
    color: var(--accent-color);
    font-weight: 700;
}

.cert-actions {
    margin-top: auto;
    padding-top: 1rem;
}

.btn-verify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(53, 99, 233, 0.22);
    background: transparent;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn-verify:hover {
    transform: translateY(-1px);
    background: var(--accent-color);
    color: #fff;
    border-color: transparent;
}

[data-theme="dark"] .cert-card {
    background: rgba(17, 26, 46, 0.88);
}

[data-theme="dark"] .cert-content .issuer {
    color: #a8c6ff;
}

[data-theme="dark"] .btn-verify {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.24s ease;
}

.modal-content {
    width: min(860px, calc(100% - 1.5rem));
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    margin: 1rem auto;
    padding: 1.5rem;
    border-radius: 28px;
    background: var(--surface-strong);
    color: var(--text-color);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: relative;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.6rem;
    height: 2.6rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--text-color);
    font-size: 1.9rem;
    cursor: pointer;
    background: var(--surface);
    border: 1px solid var(--border-color);
}

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

#modalTitle {
    margin: 0 0 0.6rem;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
}

#modalDesc {
    margin: 0 0 1.25rem;
    color: var(--text-muted);
    white-space: pre-line;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.tech-badges span {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 700;
}

.modal-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.modal-images img,
.modal-images video {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    background: #000;
    max-height: 360px;
    object-fit: contain;
}

.modal-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.modal-links a {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    color: #fff;
    border: 1px solid transparent;
}

[data-theme="dark"] .eyebrow,
[data-theme="dark"] .hero-stats li,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .project-card.featured,
[data-theme="dark"] .contact,
[data-theme="dark"] .cert-card {
    background: rgba(17, 26, 46, 0.88);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 960px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        max-width: 12ch;
    }

    .project-card.featured {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    section {
        width: min(100%, calc(100% - 1rem));
        padding: 4.5rem 0;
    }

    .navbar {
        padding: 0.75rem 0.75rem 0.9rem;
    }

    .navbar ul {
        gap: 0.35rem;
    }

    .navbar a {
        font-size: 0.88rem;
        padding: 0.45rem 0.75rem;
    }

    .hero {
        padding-top: 6.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .profile-card {
        width: 100%;
    }

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

    .project-card.featured {
        gap: 1rem;
    }

    .project-images {
        min-height: 170px;
    }

    .modal-content {
        width: calc(100% - 1rem);
        padding: 1.25rem;
    }

    .modal-images {
        grid-template-columns: 1fr;
    }

    .contact {
        padding: 4rem 1rem;
        border-radius: 24px;
    }
}

@media (max-width: 560px) {
    .hero h1 {
        font-size: clamp(2.3rem, 11vw, 3.6rem);
    }

    .eyebrow {
        font-size: 0.75rem;
    }

    .hero-summary {
        font-size: 1rem;
    }

    .project-card,
    .about-content,
    .cert-card {
        border-radius: 20px;
    }

    .project-card.featured::before {
        top: 0.85rem;
        right: 0.85rem;
    }
}
