.skill-category {
    color: #6495ed;
}

.skill-subcategory {
    color: #c9dcff;
}

.lang-tool-card {
    background: #0e1d38;
    color: #c9dcff;
    border: 1px solid rgba(100, 149, 237, 0.25);
    border-radius: 0.65rem;
    padding: 0.55rem 0.4rem;
    font-size: 0.97rem;
    margin: 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(100, 149, 237, 0.08);
}

@media (max-width: 575.98px) {
    .lang-tool-card {
        font-size: 0.85rem;
        padding: 0.5rem 0.3rem;
    }
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.skill-group,
.content-group {
    min-width: 0;
    padding: 1.4rem;
    background: rgba(8, 16, 34, 0.35);
    border: 1px solid rgba(100, 149, 237, 0.18);
    border-radius: 0.75rem;
}

.skill-group-wide {
    grid-column: 1 / -1;
}

.skill-group .skill-category,
.content-group .skill-category {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.courses-group {
    margin: 1.5rem 0 1rem;
}

.project-content-group + .project-content-group {
    margin-top: 1rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-group .lang-tool-card {
    width: auto;
    min-width: 64px;
    min-height: 34px;
    margin: 0;
    padding: 0.42rem 0.65rem;
    flex: 0 1 auto;
    background: rgba(14, 29, 56, 0.82);
    box-shadow: none;
    font-size: 0.84rem;
}

@media (max-width: 767.98px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-group-wide {
        grid-column: auto;
    }
}

@media (max-width: 575.98px) {
    .skill-group,
    .content-group {
        padding: 1.1rem;
    }

    .skill-group .lang-tool-card {
        font-size: 0.8rem;
    }
}

:root {
    --reveal-delay: 100ms;
    --sidebar-width: 250px;
    --sidebar-bg: rgba(8, 16, 34, 0.97);
    --sidebar-border: rgba(100, 149, 237, 0.15);
    --sidebar-accent: #6495ed;
    --sidebar-text: #c9dcff;
    --sidebar-text-dim: var(--sidebar-text);
}

html,
body {
    font-family: "JetBrains Mono", monospace;
    background-color: #0e1d38;
}

hr {
    border: 0;
    border-top: 1px solid rgba(100, 149, 237, 0.25);
    opacity: 1;
}

/* ===== VERTICAL SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4.5rem;
    padding: 1.5rem 2.25rem;
    z-index: 10000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}

.sidebar-brand {
    position: absolute;
    top: 2.25rem;
    left: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(100, 149, 237, 0.08);
    border: 1px solid rgba(100, 149, 237, 0.12);
    transition:
        background 0.2s ease,
        transform 0.2s ease;
    flex-shrink: 0;
}

.sidebar-brand:hover {
    background: rgba(100, 149, 237, 0.18);
    transform: scale(1.05);
}

.sidebar-brand img {
    width: 32px;
    height: 32px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.sidebar-nav-item {
    width: 100%;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    justify-content: flex-start;
    color: var(--sidebar-text-dim);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.04em;
    transition:
        color 0.2s ease,
        background 0.2s ease;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: transparent;
    transition: background 0.2s ease;
}

.sidebar-nav-link:hover {
    color: var(--sidebar-accent);
    background: rgba(100, 149, 237, 0.06);
    border-radius: 0.65rem;
}

.sidebar-nav-link.active {
    color: var(--sidebar-accent);
}

.sidebar-nav-link.active::before {
    background: var(--sidebar-accent);
}

.sidebar-nav-link svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.sidebar-nav-link .sidebar-nav-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.sidebar-nav-link:hover .sidebar-nav-arrow,
.sidebar-nav-link:focus-visible .sidebar-nav-arrow {
    opacity: 1;
}

.sidebar-nav-label {
    opacity: 1;
    transform: none;
}

.sidebar hr {
    width: 100%;
    margin: 0;
}

.sidebar-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0;
    width: 100%;
}

.sidebar-contact-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    color: var(--sidebar-text-dim);
    font-size: 1rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.sidebar-social {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
    width: 100%;
}

.sidebar-social-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.35rem 0.85rem;
    color: var(--sidebar-text-dim);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.04em;
    transition:
        color 0.2s ease,
        background 0.2s ease;
    white-space: nowrap;
}

.sidebar-social-link:hover {
    color: var(--sidebar-accent);
    background: rgba(100, 149, 237, 0.06);
    border-radius: 0.65rem;
}

.sidebar-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--sidebar-text-dim);
    border: 1px solid rgba(100, 149, 237, 0.12);
    background: rgba(14, 29, 56, 0.55);
    transition:
        color 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
    flex-shrink: 0;
}

.sidebar-social-link:hover .sidebar-social-icon {
    color: var(--sidebar-accent);
    border-color: rgba(100, 149, 237, 0.25);
    background: rgba(100, 149, 237, 0.06);
}

.sidebar-social-icon svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Main content offset */
.main-content {
    margin-left: var(--sidebar-width);
}

/* Sidebar overlay for mobile when open */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 34, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile sidebar toggle button */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 10001;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(100, 149, 237, 0.25);
    background: rgba(8, 16, 34, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--sidebar-text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition:
        left 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.2s ease,
        border-color 0.2s ease;
}

.mobile-sidebar-toggle:hover {
    border-color: rgba(100, 149, 237, 0.5);
    background: rgba(14, 29, 56, 0.98);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar.mobile-open ~ .mobile-sidebar-toggle {
        left: calc(var(--sidebar-width) + 1.25rem);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-sidebar-toggle {
        display: flex;
    }
}

/* ===== LANDING / HOME OVERLAY ===== */
.home {
    background: linear-gradient(-90deg, #0e1d38, #6495ed, #0e1d38);
    background-size: 600% 600%;
    animation: gradient 5s linear infinite;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    transform: translateY(0);
    will-change: transform;
    transition:
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.9s;
}

.home.exit-up {
    transform: translateY(-110%);
    visibility: hidden;
    pointer-events: none;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Radial vignette overlay — darkens the edges for depth */
.home::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(8, 15, 31, 0.45) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.home > * {
    position: relative;
    z-index: 2;
}

#moto {
    font-size: clamp(1rem, 8vw, 4rem);
    color: #c9dcff;
}

.moto-gradient {
    display: inline-block;
}

.moto-gradient .moto-text,
.moto-gradient .dots {
    background: linear-gradient(-90deg, #6495ed, #0e1d38, #6495ed);
    background-size: 600% 600%;
    animation: gradient 5s linear infinite;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.dots {
    display: inline-block;
    margin-left: 0.1em;
}

.dots span {
    opacity: 0;
}

.moto-gradient .dots span {
    background: linear-gradient(-90deg, #6495ed, #0e1d38, #6495ed);
    background-size: 600% 600%;
    animation:
        gradient 5s linear infinite,
        dotsFade 1.2s infinite;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1), ease;
    animation-delay: 0s, 0s;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.moto-gradient .dots span:nth-child(1) {
    animation-delay: 0s, 0s;
}

.moto-gradient .dots span:nth-child(2) {
    animation-delay: 0s, 0.2s;
}

.moto-gradient .dots span:nth-child(3) {
    animation-delay: 0s, 0.4s;
}

@keyframes dotsFade {
    0%,
    20% {
        opacity: 0;
    }

    40%,
    60% {
        opacity: 1;
    }

    80%,
    100% {
        opacity: 0;
    }
}

#moto .moto-text,
.dots {
    font-weight: bold;
}

/* ===== ABOUT SECTION ===== */
.about-me {
    min-height: 100vh;
    color: rgb(201, 220, 255);
    text-align: justify;
    background-color: rgb(14, 29, 56);
}

.about-cta {
    text-align: left;
}

.resume-btn {
    display: inline-block;
    text-decoration: none;
    background: rgba(8, 16, 34, 0.35);
    color: #c9dcff;
    border: 1px solid rgba(100, 149, 237, 0.25);
    border-radius: 0.65rem;
    padding: 0.55rem 1rem;
    font-size: 0.97rem;
    box-shadow: 0 2px 8px rgba(100, 149, 237, 0.08);
    transition:
        color 0.15s ease,
        border-color 0.15s ease;
}

.resume-btn:hover,
.resume-btn:focus-visible {
    color: #6495ed;
    border-color: #6495ed;
}

.resume-btn:active {
    color: #6495ed;
    border-color: #6495ed;
}

.about-photo-float {
    float: right;
    width: 200px;
    height: 200px;
    object-fit: cover;
    margin: 0 0 1.5rem 2rem;
    border: 3px solid #6495ed;
    border-radius: 50%;
    filter: contrast(1.05) saturate(1.05);
    shape-outside: circle(50%);
}

@media (max-width: 767.98px) {
    .about-photo-float {
        float: none;
        display: block;
        margin: 0 auto 2rem auto;
        width: 160px;
        height: 160px;
    }
}

/* ===== PROJECTS SECTION ===== */
.projects {
    background-color: #0e1d38;
    min-height: 100vh;
    color: rgb(201, 220, 255);
}

.projects h2 {
    color: rgb(201, 220, 255);
}

.projects h4 {
    color: #6495ed;
}

h3 {
    color: rgb(201, 220, 255);
}

.repo-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.repo-card {
    background: rgba(14, 29, 56, 0.92);
    color: #c9dcff;
    border: 1px solid rgba(100, 149, 237, 0.25);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.repo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(14, 29, 56, 0.5);
    border-color: #6495ed;
}

.repo-name {
    font-size: 1.1rem;
    color: #c9dcff;
    word-break: break-word;
}

.repo-desc {
    font-size: 0.85rem;
    color: rgba(201, 220, 255, 0.72);
    line-height: 1.5;
}

.repo-meta {
    font-size: 0.78rem;
    color: rgba(201, 220, 255, 0.6);
}

.repo-lang {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.repo-lang-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.repo-stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ===== CONTACT SECTION ===== */
.contact {
    color: #c9dcff;
    background-color: #0e1d38;
    position: relative;
}

/* Gradient top divider */
.contact::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #6495ed, transparent);
}

.contact-heading {
    color: #c9dcff;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.contact-icon {
    color: #c9dcff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(100, 149, 237, 0.18);
    background: rgba(14, 29, 56, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: color 0.15s ease-in-out;
}

.contact-icon:hover {
    color: #6495ed;
}

.footer {
    padding: 2.5rem 0;
    border-top: 1px solid rgba(100, 149, 237, 0.25);
    background-color: #0e1d38;
}

.copyright-text {
    color: rgba(201, 220, 255, 0.55);
    font-size: 0.82rem;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    filter: blur(6px);
    transition-property: opacity, transform, filter;
    transition-duration: 700ms;
    transition-delay: var(--reveal-delay);
    transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform, filter;
}

.reveal.reveal--up {
    transform: translate3d(0, 18px, 0);
}

.reveal.reveal--left {
    transform: translate3d(-22px, 0, 0);
}

.reveal.reveal--right {
    transform: translate3d(22px, 0, 0);
}

.reveal.reveal--zoom {
    transform: scale(0.96);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}
