* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(40, 60, 100, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(30, 50, 80, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(20, 35, 60, 0.3) 0%, transparent 70%),
        #080a12;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #ffffff;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #080a12;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(100, 140, 180, 0.2);
    border-top-color: rgba(100, 140, 180, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(8, 10, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(100, 140, 180, 0.1);
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(100, 140, 180, 0.15);
}

.nav-link:focus {
    outline: 2px solid rgba(100, 140, 180, 0.6);
    outline-offset: 2px;
    color: #ffffff;
}

.nav-link:focus:not(:focus-visible) {
    outline: none;
}

.nav-link:focus-visible {
    outline: 2px solid rgba(100, 140, 180, 0.8);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Load animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: rgba(15, 20, 35, 0.55);
    border: 1px solid rgba(100, 140, 180, 0.15);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(80, 120, 160, 0.08),
        inset 0 1px 0 rgba(100, 150, 200, 0.1);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(100, 140, 180, 0.25);
    box-shadow:
        0 30px 60px -12px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(80, 120, 160, 0.15),
        inset 0 1px 0 rgba(100, 150, 200, 0.15);
}

.card-content {
    display: flex;
    align-items: center;
    min-height: 450px;
}

.info {
    padding: 80px 100px;
    min-width: 350px;
}

.name {
    font-size: 3.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: #ffffff;
}

.title {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    margin-bottom: 16px;
}

.tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    margin-bottom: 28px;
}

.links {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.skills {
    margin-bottom: 0;
}

.skill-category {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 12px;
}

.skill-category:last-child {
    margin-bottom: 0;
}

.skill-category-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 2px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(100, 140, 180, 0.12);
    border: 1px solid rgba(100, 140, 180, 0.2);
    border-radius: 4px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(100, 140, 180, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.skill-tag:hover::before {
    left: 100%;
}

.skill-tag:hover {
    background: rgba(100, 140, 180, 0.25);
    border-color: rgba(100, 140, 180, 0.4);
    color: #ffffff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(100, 140, 180, 0.15);
}

.link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    position: relative;
}

.link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.link:hover {
    color: #ffffff;
    background: rgba(100, 140, 180, 0.15);
    transform: translateY(-2px);
}

.link:hover svg {
    transform: scale(1.1);
}

.link:focus {
    outline: 2px solid rgba(100, 140, 180, 0.6);
    outline-offset: 2px;
    color: #ffffff;
}

.link:focus:not(:focus-visible) {
    outline: none;
}

.link:focus-visible {
    outline: 2px solid rgba(100, 140, 180, 0.8);
    outline-offset: 2px;
    color: #ffffff;
}

.sphere-container {
    width: 500px;
    height: 450px;
    position: relative;
    transition: transform 0.3s ease;
}

.sphere-container:hover {
    transform: scale(1.05);
}

.sphere-container:focus {
    outline: 2px solid rgba(100, 140, 180, 0.6);
    outline-offset: 4px;
    border-radius: 8px;
}

.sphere-container:focus:not(:focus-visible) {
    outline: none;
}

/* Projects Section */
.projects-section {
    width: 100%;
    max-width: 1400px;
    margin-top: 60px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.projects-heading {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
    color: #ffffff;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
}

.project-card {
    background: rgba(15, 20, 35, 0.55);
    border: 1px solid rgba(100, 140, 180, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 20px 40px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(80, 120, 160, 0.08),
        inset 0 1px 0 rgba(100, 150, 200, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: rgba(100, 140, 180, 0.25);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(80, 120, 160, 0.15),
        inset 0 1px 0 rgba(100, 150, 200, 0.15);
    transform: translateY(-4px);
}

.project-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.project-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tag {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(100, 140, 180, 0.12);
    border: 1px solid rgba(100, 140, 180, 0.2);
    border-radius: 4px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    white-space: nowrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.project-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.project-link:hover {
    color: #ffffff;
    gap: 12px;
}

.project-link:hover svg {
    transform: translateX(4px);
}

.project-link:focus {
    outline: 2px solid rgba(100, 140, 180, 0.6);
    outline-offset: 2px;
    border-radius: 4px;
}

.project-link:focus:not(:focus-visible) {
    outline: none;
}

.project-link:focus-visible {
    outline: 2px solid rgba(100, 140, 180, 0.8);
    outline-offset: 2px;
}

/* Certifications Section */
.certifications-section {
    width: 100%;
    max-width: 1400px;
    margin-top: 60px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.certifications-heading {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
    color: #ffffff;
    text-align: center;
}

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

.certification-item {
    background: rgba(15, 20, 35, 0.55);
    border: 1px solid rgba(100, 140, 180, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 10px 30px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(80, 120, 160, 0.08),
        inset 0 1px 0 rgba(100, 150, 200, 0.1);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.certification-item:hover {
    border-color: rgba(100, 140, 180, 0.25);
    box-shadow:
        0 15px 40px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(80, 120, 160, 0.15),
        inset 0 1px 0 rgba(100, 150, 200, 0.15);
    transform: translateY(-2px);
}

.certification-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    stroke: rgba(100, 140, 180, 0.8);
    transition: transform 0.3s ease;
}

.certification-item:hover .certification-icon {
    transform: scale(1.1);
    stroke: rgba(100, 140, 180, 1);
}

.certification-title {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .nav-container {
        padding: 14px 24px;
    }

    .nav-links {
        gap: 4px;
    }

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

    .card-content {
        flex-direction: column;
        min-height: auto;
    }

    .info {
        padding: 50px 40px;
        text-align: center;
        min-width: auto;
    }

    .links {
        justify-content: center;
    }

    .sphere-container {
        width: 350px;
        height: 350px;
        margin-bottom: 20px;
    }

    .sphere-container:hover {
        transform: scale(1.03);
    }

    .name {
        font-size: 2.5rem;
    }

    .title {
        font-size: 1.2rem;
        margin-bottom: 35px;
    }

    .skill-category {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 16px;
    }

    .skill-category-title {
        font-size: 0.75rem;
        padding-top: 0;
    }

    .skill-tag {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    .link {
        font-size: 0.95rem;
        padding: 7px 12px;
    }

    .projects-section {
        margin-top: 50px;
    }

    .projects-heading {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    @supports (min-width: 600px) {
        .projects-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    .project-content {
        padding: 28px;
    }

    .project-title {
        font-size: 1.35rem;
    }

    .project-description {
        font-size: 0.95rem;
    }

    .project-tag {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    .certifications-section {
        margin-top: 50px;
    }

    .certifications-heading {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .certification-item {
        padding: 20px;
    }

    .certification-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    .certification-title {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 12px 20px;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .info {
        padding: 40px 30px;
    }

    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1rem;
    }

    .skill-category {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 14px;
    }

    .skill-category-title {
        font-size: 0.7rem;
    }

    .skill-tag {
        font-size: 0.75rem;
        padding: 3px 8px;
    }

    .sphere-container {
        width: 280px;
        height: 280px;
    }

    .sphere-container:hover {
        transform: scale(1.02);
    }

    .card {
        border-radius: 16px;
    }

    .link {
        font-size: 0.9rem;
        padding: 6px 10px;
        gap: 6px;
    }

    .link svg {
        width: 18px;
        height: 18px;
    }

    .projects-section {
        margin-top: 40px;
    }

    .projects-heading {
        font-size: 1.75rem;
        margin-bottom: 24px;
    }

    .projects-grid {
        gap: 16px;
    }

    .project-content {
        padding: 24px;
    }

    .project-title {
        font-size: 1.25rem;
    }

    .project-description {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .project-tags {
        gap: 6px;
        margin-bottom: 16px;
    }

    .project-tag {
        font-size: 0.75rem;
        padding: 3px 8px;
    }

    .project-link {
        font-size: 0.9rem;
    }

    .project-link svg {
        width: 16px;
        height: 16px;
    }

    .certifications-section {
        margin-top: 40px;
    }

    .certifications-heading {
        font-size: 1.75rem;
        margin-bottom: 24px;
    }

    .certifications-grid {
        gap: 12px;
    }

    .certification-item {
        padding: 18px;
        gap: 12px;
    }

    .certification-icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .certification-title {
        font-size: 0.9rem;
    }
}

/* Section Reveal Animations */
.section-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-reveal.revealed .certification-item {
    animation: fadeInUp 0.5s ease-out backwards;
}

.section-reveal.revealed .certification-item:nth-child(1) { animation-delay: 0.1s; }
.section-reveal.revealed .certification-item:nth-child(2) { animation-delay: 0.2s; }
.section-reveal.revealed .certification-item:nth-child(3) { animation-delay: 0.3s; }

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid rgba(100, 140, 180, 0.3);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(100, 140, 180, 0.3);
    border-color: rgba(100, 140, 180, 0.5);
    transform: translateY(-3px);
}

.back-to-top:focus {
    outline: 2px solid rgba(100, 140, 180, 0.6);
    outline-offset: 2px;
}

.back-to-top:focus:not(:focus-visible) {
    outline: none;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}
