* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    --color-white: #f2f2fe;

    --cta-icon-size: 1em;
    --cta-icon-max: 24px;
    --blue-bg-primary: rgba(59, 130, 246, .8);
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 3rem;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: rgb(10, 10, 10);
    color: #e0e6ed;
    overflow-x: hidden;
    font-family: 'Raleway', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
}

section,
#home,
h1,
h2 {
    scroll-margin-top: 3rem;
}

/* Navigation */
nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);

    z-index: 1000;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.6rem 1rem;
}

nav {
    transition: transform 0.35s ease;
}

/* Hidden state */
.nav-hidden {
    transform: translate(-50%, -175%);
}

nav ul {
    display: flex;
    gap: 0.3rem;
    list-style: none;
    align-items: center;
}

nav a {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    font-weight: 400;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    display: block;
}

nav a:hover {
    color: #616060;
}

nav a.active {
    color: var(--blue-bg-primary);
}

nav a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

nav .icon {
    display: none;
}

nav .icon svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 768px) {
    nav .icon {
        display: block;
    }

    nav .text {
        display: none;
    }

    nav a {
        padding: 0.5rem 0.6rem;
    }


}

/* Hero Section */
#home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5% 5%;
    position: relative;
    text-align: center;
    gap: 1rem;
}

.text-generate {
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.text-generate span {
    display: inline-block;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(10px);
    animation: wordReveal 0.7s ease forwards;
}

/* Staggered animation delays for each word */
.text-generate span:nth-child(1) {
    animation-delay: 0.1s;
}

.text-generate span:nth-child(2) {
    animation-delay: 0.3s;
}

.text-generate span:nth-child(3) {
    animation-delay: 0.5s;
}

.text-generate span:nth-child(4) {
    animation-delay: 0.7s;
}

.text-generate span:nth-child(5) {
    animation-delay: 0.9s;
}

.text-generate span:nth-child(6) {
    animation-delay: 1.1s;
}

.text-generate span:nth-child(7) {
    animation-delay: 1.3s;
}
.text-generate span:nth-child(8) {
    animation-delay: 1.5s;
}

@keyframes wordReveal {
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

#home .greeting,
#home p:first-of-type {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #9aa3b2;
    margin-bottom: 0.6rem;
}

#home h1 {
    /*  min pref max */
    font-size: clamp(3rem, 6vw, 3.5rem);
    font-weight: 700;
    margin: 0.25rem 0;
    line-height: 0.85;
    color: var(--color-white);
}

#home .hero-description {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: #9aa3b2;
    max-width: 700px;
    margin: 1rem auto 1.5rem;
    line-height: 1.6;
}

#home .cta-group {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

#home .social-links,
#home .contributors {
    margin-top: 1.5rem;
}

/* .gradient-bg {
    position: absolute;
    z-index:-1;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at 30% 20%, rgba(30, 58, 138, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(15, 40, 71, 0.12) 0%, transparent 50%);
    pointer-events: none;
}    */

.grid-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: -1;
    mask: radial-gradient(circle at center, white 0%, white 40%, transparent 100%);
    -webkit-mask: radial-gradient(circle at center, white 0%, white 40%, transparent 100%);
}

.hero-content {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.greeting {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#home p:first-of-type {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #9aa3b2;
    margin-bottom: 0.8rem;
}

#home h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 600;
    margin: 1rem 0;
}

.highlight {
    color: rgba(59, 130, 246, .9);
}

.hero-description {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #9aa3b2;
    max-width: 700px;
    margin: 1rem auto 2rem;
    line-height: 1.6;
}


.cta-group {
    display: flex;
    gap: 1rem;
    margin: 2.5rem 0;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .cta-group {
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
        margin: 2.5rem auto;
    }

    .cta-btn.cta-primary.btn.shimmer {
        align-self: center;
    }
}

.cta-btn {

    padding: 0.9rem 1.25rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
    line-height: 1;
    min-height: 44px;
    cursor: pointer;
    background-clip: padding-box;
}



.cta-btn svg,
.project-btn svg,
.btn-icon svg,
.view-all svg {
    width: var(--cta-icon-size) !important;
    height: var(--cta-icon-size) !important;
    max-width: var(--cta-icon-max);
    max-height: var(--cta-icon-max);
    flex-shrink: 0;
    display: block;
    vertical-align: middle;
    stroke: currentColor;
    stroke-width: 2px;
}

.cta-btn>a,
.cta-btn>span,
.project-btn>a,
.project-btn>a,
.view-all>span,
.view-all>span {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.cta-btn svg {
    width: 1em;
    height: 1em;
    max-width: 24px;
    max-height: 24px;
    flex-shrink: 0;
    display: block;
    vertical-align: middle;
}

/* Specific styles */
.cta-primary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.1);
}

.cta-primary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cta-secondary {
    background: transparent;
    color: #5b8cc9;
    border: none;
}

.cta-secondary:hover {
    color: hsla(0, 0%, 100%, 0.7);
}

.cta-secondary svg {
    stroke: #5b8cc9;
    fill: none;
}

.cta-secondary svg[width],
.cta-secondary svg[height] {
    width: var(--cta-icon-size) !important;
    height: var(--cta-icon-size) !important;
}



.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 2.5rem;
    justify-content: center;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 1rem;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
}

/* Section Styles */
section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-white);
}

.section-subtitle {
    font-size: 1rem;
    color: #666;
    margin-top: 0.5rem;
}

.view-all {
    padding: 0.7rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.view-all:hover {
    background: rgba(255, 255, 255, 0.1);
}

.section-header>div {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

@media (max-width: 768px) {
    .view-all {
        margin-left: 0;
        align-self: flex-start;
    }

    .section-header>div {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

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

.project-card {
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.project-image {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
    position: absolute;
    z-index: 0;
}

.project-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    transition: transform 0.7s ease;
}

.project-content {
    padding: 1.8rem;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: var(--color-white);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #c1c9d6;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 1;
    transition: background-color 160ms ease, transform 120ms ease, color 160ms ease;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
}

.tech-tag:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-white);
}

.project-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.project-btn {
    padding: 0.6rem 0.9rem;
    background: var(--blue-bg-primary);
    color: var(--color-white);
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 200ms ease, transform 150ms ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    align-self: flex-start;
}


.shimmer {
    align-self: flex-start;
    position: relative;
    z-index: 0;
    display: inline-flex;
    gap: 0.625rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    border: 1px solid rgba(55, 65, 81, 0.85);
    background-image: linear-gradient(110deg, #1A1A1A 0%, #262626 45%, #1A1A1A 55%);
    background-size: 200% 100%;
    background-position: 0 0;
    padding: 0 1.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: #e6eef8;
    transition: background-position 450ms linear, background-image 200ms ease, color 160ms ease;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    overflow: hidden;
}

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


.shimmer::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 1;
    pointer-events: none;
    transform: translateX(-100%) rotate(-20deg);
    background: linear-gradient(110deg,
            rgba(255, 255, 255, 0) 30%,
            rgba(255, 255, 255, 0.06) 45%,
            rgba(255, 255, 255, 0.12) 50%,
            rgba(255, 255, 255, 0.06) 55%,
            rgba(255, 255, 255, 0) 70%);
    mix-blend-mode: screen;
    opacity: 0.95;
    will-change: transform;
    animation: shimmer-sweep 3s linear infinite;
}

.shimmer:hover {
    background-image: linear-gradient(110deg, #262626 45%, #262626);
    transition: background-image 300ms ease;
}

.shimmer:focus-visible {
    box-shadow:
        0 0 0 3px rgba(148, 163, 184, 0.34),
        0 0 0 7px rgba(247, 250, 252, 0.55);
}

@media (min-width: 768px) {
    .shimmer {
        font-size: 1rem;
    }
}

@keyframes shimmer-sweep {
    0% {
        transform: translateX(-100%) rotate(10deg);
    }

    100% {
        transform: translateX(100%) rotate(10deg);
    }
}


.project-btn:hover {
    background-color: rgba(59, 130, 246, 0.9);
}

@media (min-width: 768px) {
    .project-btn {
        align-self: flex-end;
    }
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 0.5rem;
    color: inherit;
    background: var(--blue-bg-primary);
    transition: background-color 200ms ease, transform 150ms ease;
    flex-shrink: 0;
    align-self: flex-start;
}

.btn-icon:hover {
    background-color: rgba(33, 114, 246, 0.9);
    color: black;
}

@media (min-width: 768px) {
    .btn-icon {
        align-self: flex-end;
    }
}



/* ============================= */
/*         SKILLS SECTION              */
/* ============================= */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1.2rem;
}

.skill-icon {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s;
    font-size: 2.5rem;
    padding: 1.5rem;
}

.skill-icon:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.skill-name {
    font-size: 0.8rem;
    color: #888;
    font-weight: 400;
}

/* ============================= */
/*         TIMELINE              */
/* ============================= */
.timeline {
    position: relative;
    max-width: 1000px;
    /* margin: 0 auto; */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;

    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    width: 100%;
}

.timeline-item.left {
    justify-content: flex-start;
}

.timeline-item.right {
    justify-content: flex-end;
}

.timeline-content {
    width: 45%;
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.8rem;
    position: relative;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);

}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 5rem;
    width: 12px;
    height: 12px;
    background: var(--color-white);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-year {
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-title {
    font-size: 1.3rem;
    color: var(--color-white);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.timeline-desc {
    color: #888;
    line-height: 1.7;
    font-size: 0.9rem;
}







.section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.timeline::before {
    left: 0;
    transform: none;
}

.timeline-item {
    justify-content: flex-start !important;
}

.timeline-content {
    width: 100%;
    margin-left: 2rem !important;
}

.timeline-dot {
    left: 0;
    transform: translateX(-50%);
}







.footer {
    background: #050505;
    padding: 3rem 5%;
    color: var(--color-white);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 2rem;
}

.footer-cta {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(4px);
}

.footer-cta h2 {
    font-size: 2.3rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1.2rem;
}

.footer-cta .email-link {
    color: rgba(59, 130, 246, .8);
    text-decoration: none;
    border-bottom: 2px solid rgba(59, 130, 246, .8);
    transition: color 200ms ease, border-color 200ms ease;
}

.footer-cta .email-link:hover {
    color: rgba(59, 130, 246, .6);
    border-bottom-color: rgba(59, 130, 246, .6);
}



/* ============================= */
/*         FOOTER GRID           */
/* ============================= */
.footer-grid {
    max-width: 1400px;
    margin: 3rem auto 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-about h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.footer-about p {
    color: #777;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #777;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--color-white);
    letter-spacing: 1px;
}


.footer-bottom {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #666;
    font-size: 0.85rem;
}


@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-cta h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 350px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}