@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Space Grotesk", "Inter", system-ui, Arial, sans-serif;
    color: #fff;
    background:
        radial-gradient(circle at 20% 20%, rgba(244, 155, 255, 0.35), transparent 55%),
        radial-gradient(circle at 80% 10%, rgba(132, 209, 255, 0.3), transparent 45%),
        radial-gradient(circle at 65% 70%, rgba(255, 196, 145, 0.25), transparent 50%),
        #03030a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 72px;
    background-attachment: fixed;
}

.galaxy-section {
    position: relative;
}

#container {
    position: relative;
    width: 100%;
    height: 100vh;
}

#projects {
    scroll-margin-top: 80px;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.site-nav {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(960px, calc(100% - 32px));
    height: 52px;
    padding: 0 18px;
    border-radius: 14px;
    background: rgba(5, 5, 12, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 30;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.nav-brand {
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-link {
    text-decoration: none;
    color: #e5e6ff;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(138, 176, 255, 0.15);
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    box-shadow: 0 0 28px rgba(194, 139, 255, 0.35);
}

.nav-link:focus-visible {
    outline: 2px solid #8ab0ff;
    outline-offset: 2px;
}

.modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.98);
    width: min(90vw, 720px);
    max-height: calc(100vh - 48px);
    padding: 20px;
    background: linear-gradient(180deg, rgba(12, 12, 20, 0.98), rgba(12, 12, 20, 0.95));
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease;
    z-index: 20;
}

.modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

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

.modal h3 {
    margin: 0;
    font-size: 1.1rem;
}

.modal p {
    margin: 12px 0 0;
    color: #d6d6e0;
    line-height: 1.5;
    font-size: 0.96rem;
}

.modal .meta {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.modal-actions a {
    flex: 1 1 0;
}

.modal-actions button {
    width: 100%;
}

.tag {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: #e8e8f0;
}

.close-btn {
    appearance: none;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 160ms ease, transform 160ms ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.close-btn:focus-visible {
    outline: 2px solid #8ab0ff;
    outline-offset: 2px;
}

.label {
    position: fixed;
    transform: translate(-50%, -50%);
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(8, 8, 15, 0.88);
    font-size: 0.85rem;
    color: #fff;
    white-space: nowrap;
    pointer-events: none;
    display: none;
    z-index: 15;
}

.hint {
    position: fixed;
    left: 18px;
    bottom: 18px;
    font-size: 0.85rem;
    color: #bfc0d6;
    background: rgba(0, 0, 0, 0.25);
    padding: 9px 12px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.galaxy-label {
    position: absolute;
    right: 40px;
    top: 110px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(5, 5, 12, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    color: #fff;
    max-width: 260px;
    backdrop-filter: blur(6px);
    z-index: 9;
}

.galaxy-label span {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.galaxy-label p {
    margin: 0;
    color: #d1d2ef;
    font-size: 0.9rem;
}

@media (max-width: 700px) {
    .site-nav {
        flex-direction: column;
        gap: 8px;
        height: auto;
        padding: 12px 16px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-link {
        flex: 1 0 auto;
        text-align: center;
        padding: 8px 12px;
    }

    .galaxy-label {
        position: absolute;
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        text-align: center;
        max-width: 220px;
        padding: 12px 14px;
    }
}

.content-section {
    padding: 96px 20px;
    background: transparent;
}

.skills-section {
    position: relative;
    overflow: hidden;
}

.skills-layout {
    display: flex;
    justify-content: center;
}

.skill-stack {
    position: relative;
    width: min(460px, 100%);
    height: 360px;
    perspective: 1200px;
    perspective-origin: 50% 40%;
}

.skill-card {
    position: absolute;
    inset: 0;
    padding: 22px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 218, 156, 0.2), rgba(138, 176, 255, 0.12)),
        #0a0b18;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(138, 176, 255, 0.12);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    display: grid;
    place-items: center;
    gap: 14px;
    text-align: center;
}

.skill-card h3 {
    margin: 12px 0 10px;
}

.skill-card p {
    color: #e4e6ff;
}

.skill-logo {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 20px rgba(138, 176, 255, 0.12);
}

.skill-logo img {
    width: 72px;
    height: 72px;
}

.about-section {
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: "";
    position: absolute;
    inset: 12% auto 8% -18%;
    width: 45%;
    height: 80%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 218, 156, 0.22), rgba(194, 139, 255, 0.05));
    filter: blur(20px);
    opacity: 0.8;
    pointer-events: none;
}

.about-section::after {
    content: "";
    position: absolute;
    inset: -6% -22% 18% auto;
    width: 38%;
    height: 70%;
    background: radial-gradient(circle at 70% 60%, rgba(138, 176, 255, 0.26), rgba(8, 8, 20, 0));
    filter: blur(22px);
    opacity: 0.7;
    pointer-events: none;
}

.section-inner {
    width: min(900px, 100%);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-inner h2 {
    margin: 0 0 12px;
    font-size: 1.8rem;
    letter-spacing: 0.02em;
}

.section-inner p {
    margin: 0;
    line-height: 1.7;
    color: #d8d9f5;
    font-size: 1rem;
}

.section-inner a {
    color: #8ab0ff;
}

.section-header {
    margin-bottom: 32px;
}

.section-subtitle {
    color: #b9bcee;
    font-size: 1rem;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.about-copy p {
    margin-bottom: 20px;
    color: #e2e3ff;
}

.focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f6f7ff;
    font-size: 0.9rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.stat {
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(8, 8, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 20px rgba(138, 176, 255, 0.08);
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffda9c;
}

.stat-label {
    font-size: 0.85rem;
    color: #c4c7ef;
}

.orbit-cards {
    display: grid;
    gap: 18px;
}

.orb-card {
    position: relative;
    padding: 20px;
    border-radius: 18px;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), rgba(16, 18, 40, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    transform-style: preserve-3d;
}

.orb-card h3 {
    margin-top: 0;
}

.orb-card p {
    margin-bottom: 0;
}

.orb-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 218, 156, 0.15), rgba(138, 176, 255, 0.05));
    opacity: 0;
    transition: opacity 200ms ease;
}

.orb-card:hover::before {
    opacity: 1;
}

.orb-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    filter: blur(40px);
    background: radial-gradient(circle, rgba(255, 218, 156, 0.35), rgba(138, 176, 255, 0));
    top: -40px;
    right: -40px;
    opacity: 0.45;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 32px;
    align-items: stretch;
}

.contact-panel {
    padding: 28px;
    border-radius: 20px;
    background: rgba(8, 8, 16, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.5);
}

.contact-panel h3 {
    margin-top: 0;
}

.contact-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-btn,
.ghost-btn {
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-btn {
    background: linear-gradient(120deg, #8ab0ff, #c28bff);
    box-shadow: 0 10px 30px rgba(138, 176, 255, 0.4);
    color: #05050b;
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #e7e8ff;
    background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
}

.signal-cards {
    display: grid;
    gap: 16px;
}

.signal-card {
    padding: 18px;
    border-radius: 16px;
    background: rgba(14, 16, 36, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.05);
}

.signal-card h4 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.cert-card {
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 11, 28, 0.9);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.cert-card::after {
    content: "";
    position: absolute;
    inset: -30% -30% auto auto;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(138, 176, 255, 0.3), rgba(194, 139, 255, 0));
    filter: blur(20px);
    opacity: 0.5;
}

.cert-card h3 {
    margin: 8px 0 6px;
    font-size: 1.2rem;
}

.cert-meta {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a9adff;
    opacity: 0.8;
}

.cert-type {
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 640px) {
    body {
        padding-top: 70px;
    }

    .modal {
        top: 52%;
        width: calc(100vw - 2rem);
        max-height: calc(100vh - 32px);
        padding: 16px;
    }

    .site-nav {
        width: calc(100% - 20px);
        padding: 0 12px;
        height: 50px;
        gap: 12px;
    }

    .nav-brand {
        font-size: 0.82rem;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 0.82rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .contact-actions {
        flex-direction: column;
    }

    .hint {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .skills-layout {
        flex-direction: column;
    }

    .skill-stack {
        height: 320px;
        margin-top: 10px;
    }

    .contact-actions {
        flex-direction: column;
    }

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