.projects-grid {
    display: grid;
    gap: 1.8rem;
}

.project-card + .project-card {
    margin-top: 0;
}

.resume-wrapper {
    margin-top: 1.5rem;
}

.resume-embed {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 254, 0.35);
    background: #020617;
}

.resume-embed iframe,
.resume-embed object {
    width: 100%;
    height: 550px;
    border: none;
}

.resume-mobile-note {
    margin-top: 0.75rem;
    color: #a5afc9;
    font-size: 0.9rem;
    display: none;
}

.resume-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-start;
}

@media (max-width: 640px) {
    .project-image {
        aspect-ratio: auto;
        height: auto;
        object-fit: contain;
    }
}
/* ===== Base Reset & Typography ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #050814;
    color: #f5f7ff;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ===== Layout Helpers ===== */
.container {
    width: min(1100px, 90%);
    margin: 0 auto;
}

.section {
    padding: 3.5rem 0;
}

.alt-bg {
    background: #070b1c;
}

.page-title {
    font-size: 2.1rem;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #a5afc9;
    margin-bottom: 1.75rem;
}

/* ===== Header / Nav ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(5, 8, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
}

.logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(129, 140, 248, 0.8);
    background: radial-gradient(circle at top left, #6366f1, #0f172a);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.nav {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.nav-link {
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    color: #cbd5f5;
    transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease;
    flex: 0 0 auto;
}

.nav-link:hover {
    background: rgba(148, 163, 254, 0.12);
    color: #e5e7ff;
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, #6366f1, #22c1c3);
    color: #050814;
    font-weight: 600;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.primary-btn {
    background: linear-gradient(135deg, #6366f1, #22c1c3);
    color: #050814;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
}

.primary-btn:hover {
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.35);
}

.secondary-btn {
    border-color: rgba(148, 163, 254, 0.7);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7ff;
}

.secondary-btn:hover {
    background: rgba(15, 23, 42, 1);
    border-color: rgba(129, 140, 248, 1);
}

.text-link {
    font-size: 0.95rem;
    color: #a5b4fc;
    margin-right: 0.75rem;
}

.text-link:hover {
    color: #e0e7ff;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.icon-link svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

/* ===== Hero ===== */
.hero {
    padding: 3.5rem 0 2.5rem;
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.22), transparent 55%),
                radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.18), transparent 55%);
}

.hero-inner {
    display: flex;
    flex-direction: column;
}

.hero-text h1 {
    font-size: clamp(2.3rem, 4vw, 2.9rem);
    letter-spacing: 0.02em;
}

.subtitle {
    margin-top: 0.3rem;
    color: #a5b4fc;
    font-size: 1rem;
}

.hero-summary {
    margin-top: 1rem;
    max-width: 42rem;
    color: #c7d2fe;
}

.hero-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ===== Resume Section ===== */

/* ===== Project Banner ===== */
.project-banner {
    margin-top: 1.5rem;
    position: relative;
    border-radius: 1.2rem;
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.13), transparent 60%),
                #020617;
    border: 1px solid rgba(148, 163, 254, 0.25);
    overflow: hidden;
    padding: 1.1rem 1rem;
}

.banner-inner {
    display: flex;
    position: relative;
    min-height: 150px;
    z-index: 1;
}

.banner-slide {
    flex: 1 0 100%;
    opacity: 0;
    transform: translateX(6%);
    transition: opacity 0.35s ease, transform 0.35s ease;
    position: absolute;
    inset: 0;
    padding: 0.3rem 2.8rem;
    pointer-events: none;
}

.banner-slide.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
}

.banner-slide h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.banner-slide p {
    font-size: 0.95rem;
    color: #cbd5ff;
    margin-bottom: 0.6rem;
}

.banner-link {
    font-size: 0.9rem;
    color: #a5b4fc;
    font-weight: 500;
}

.banner-link:hover {
    color: #e0e7ff;
}

.banner-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 254, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7ff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.18s ease, transform 0.12s ease;
    z-index: 2;
}

.banner-control-prev {
    left: 0.6rem;
}

.banner-control-next {
    right: 0.6rem;
}

.banner-control:hover {
    background: rgba(15, 23, 42, 1);
    transform: translateY(-50%) translateY(-1px);
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 254, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.banner-dot.active {
    background: #a5b4fc;
    transform: scale(1.2);
}

.banner-img {
    width: 100%;
    height: clamp(160px, 240px, 400px);
    object-fit: cover;
    object-position: top center;
    border-radius: 0.6rem;
    margin-bottom: 0.6rem;
    border: 1px solid rgba(148, 163, 254, 0.25);
    transition: height 0.2s ease;
    gap: 1.5rem;
    margin-top: 1.75rem;
}

.project-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.7fr);
    gap: 1.25rem;
    padding: 1.1rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(51, 65, 85, 0.9);
}

.project-image-wrapper {
    border-radius: 0.8rem;
    overflow: hidden;
    background: #020617;
}

.project-image {
    object-fit: cover;
    width: 100%;
    aspect-ratio: 4 / 3;
}

.project-content h2 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.project-content p {
    font-size: 0.95rem;
    color: #cbd5ff;
}

.project-meta {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #a5afc9;
}

.project-links {
    margin-top: 0.7rem;
}

.project-link {
    font-size: 0.9rem;
    color: #a5b4fc;
}

.project-link:hover {
    color: #e0e7ff;
}

/* ===== Experience Timeline ===== */
.experience-timeline {
    margin-top: 1.75rem;
    display: grid;
    gap: 1.5rem;
}

.experience-item {
    padding: 1.25rem 1.2rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(51, 65, 85, 0.9);
}

.experience-item h2 {
    font-size: 1.1rem;
    margin-bottom: 0.1rem;
}

.experience-meta {
    font-size: 0.9rem;
    color: #a5afc9;
    margin-bottom: 0.6rem;
}

.experience-item ul {
    list-style: disc;
    padding-left: 1.1rem;
}

.experience-item li {
    font-size: 0.93rem;
    margin-bottom: 0.3rem;
}

/* ===== About Layout ===== */
.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.7fr);
    gap: 2rem;
    align-items: center;
}

.profile-image {
    border-radius: 1.3rem;
    border: 1px solid rgba(148, 163, 254, 0.5);
    object-fit: cover;
}

.about-content p + p {
    margin-top: 0.6rem;
}

/* Skills */
.skills {
    margin-top: 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 0.8rem;
}

.skills-group h3 {
    font-size: 0.98rem;
    margin-bottom: 0.3rem;
    color: #c7d2fe;
}

.skills-group ul {
    list-style: disc;
    padding-left: 1.1rem;
}

.skills-group li {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.about-links {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.contact-section {
    background: #070b1c;
}

.contact-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.8rem 2rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(148, 163, 254, 0.25);
    background: rgba(10, 14, 33, 0.92);
}

.contact-card h2 {
    font-size: 1.6rem;
    margin-bottom: 0.35rem;
}

.contact-card p {
    color: #a5afc9;
    max-width: 28rem;
}

.contact-card-content {
    flex: 1;
    min-width: 220px;
}

.contact-card-content p {
    margin-top: 0.35rem;
}

.contact-card .about-links {
    margin-top: 0;
}

/* ===== Footer ===== */
.site-footer {
    border-top: 1px solid rgba(148, 163, 254, 0.15);
    padding: 1.3rem 0 1.4rem;
    background: #020617;
    margin-top: 2.5rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #9ca3af;
}

.footer-links a {
    margin-left: 0.7rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .project-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .projects-grid {
        gap: 1.6rem;
    }

    .about-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .banner-slide {
        padding: 0.3rem 1.8rem;
    }

    .contact-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-detail-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-gallery {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.6rem;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .hero {
        padding-top: 2.4rem;
    }

    .resume-embed iframe {
        height: 420px;
    }

    .skills-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-banner {
        padding-inline: 0.8rem;
    }

    .projects-grid {
        gap: 1.35rem;
    }

    .banner-slide {
        padding-inline: 2.2rem;
    }

    .contact-card {
        padding: 1.5rem;
        align-items: stretch;
        gap: 1rem;
    }

    .contact-card-content {
        width: 100%;
    }

    .contact-card .about-links {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .contact-card .about-links a {
        width: 100%;
        justify-content: center;
    }

    .contact-card .about-links .text-link {
        margin-right: 0;
        text-align: center;
    }

    .resume-embed {
        display: none;
    }

    .resume-mobile-note {
        display: block;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .resume-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .resume-actions .btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .resume-mobile-note {
        margin-inline: auto;
    }

    .resume-embed iframe,
    .resume-embed object {
        height: 360px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.6rem;
        margin-left: 0;
    }

    .footer-links a {
        margin-left: 0;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.35rem 0.65rem;
    }

}

/* ===== Project Detail Pages ===== */
.project-detail-header {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
}

.project-cnc-hero {
    position: relative;
    padding: 3rem 2.5rem;
    border-radius: 1.2rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 254, 0.25);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.75)),
        url("cnc2.jpg") center/cover no-repeat;
    box-shadow: 0 25px 55px rgba(15, 23, 42, 0.55);
}

.project-cnc-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(79, 70, 229, 0.3) 0%, rgba(7, 11, 28, 0.85) 55%, rgba(2, 6, 23, 0.95) 100%);
    pointer-events: none;
}

.project-cnc-hero-content {
    position: relative;
    z-index: 1;
    max-width: 36rem;
    display: grid;
    gap: 0.6rem;
}

.project-trading-hero {
    position: relative;
    padding: 3rem 2.5rem;
    border-radius: 1.2rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 254, 0.25);
    background:
        linear-gradient(135deg, rgba(13, 17, 36, 0.88), rgba(1, 7, 18, 0.75)),
        url("trading1.jpg") center/cover no-repeat;
    box-shadow: 0 25px 55px rgba(10, 16, 35, 0.55);
}

.project-trading-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(56, 189, 248, 0.32) 0%, rgba(7, 11, 28, 0.85) 55%, rgba(2, 6, 23, 0.95) 100%);
    pointer-events: none;
}

.project-trading-hero-content {
    position: relative;
    z-index: 1;
    max-width: 36rem;
    display: grid;
    gap: 0.6rem;
}

.project-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
    gap: 2rem;
    margin-top: 1rem;
}

.project-detail-text p {
    font-size: 0.95rem;
    color: #cbd5ff;
    margin-bottom: 0.7rem;
}

.project-detail-text h2 {
    font-size: 1.1rem;
    margin-top: 1.1rem;
    margin-bottom: 0.4rem;
}

.project-meta-list {
    list-style: disc;
    padding-left: 1.2rem;
    font-size: 0.93rem;
    color: #cbd5ff;
}

.project-meta-list li {
    margin-bottom: 0.25rem;
}

.project-detail-side h2 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.project-gallery img {
    border-radius: 0.7rem;
    border: 1px solid rgba(148, 163, 254, 0.5);
    cursor: pointer;
    object-fit: cover;
    height: 220px;
    width: 100%;
}

.project-gallery img:hover {
    outline: 2px solid rgba(129, 140, 248, 0.9);
    outline-offset: 2px;
}

.gallery-note {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-top: 0.4rem;
}

/* ===== Image Lightbox ===== */
body.lightbox-open {
    overflow: hidden;
}

#image-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 999;
}

#image-lightbox.is-visible {
    display: block;
}

#image-lightbox .lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 20, 0.82);
    backdrop-filter: blur(8px);
}

#image-lightbox .lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(95vw, 1200px);
    height: min(95vh, 900px);
    max-width: 95vw;
    max-height: 95vh;
    padding: 1.2rem;
    background: rgba(9, 13, 28, 0.95);
    border: 1px solid rgba(148, 163, 254, 0.25);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.7);
    min-height: 0;
    min-width: 0;
}

#image-lightbox .lightbox-image {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.75rem;
    background: #0f172a;
}

#image-lightbox .lightbox-caption {
    margin: 0;
    font-size: 0.95rem;
    color: #cbd5ff;
}

#image-lightbox .lightbox-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 2.2rem;
    height: 2.2rem;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    color: #f5f7ff;
    font-size: 1.4rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

#image-lightbox .lightbox-close:hover {
    background: rgba(129, 140, 248, 0.85);
    transform: scale(1.05);
}

@media (max-width: 640px) {
    #image-lightbox .lightbox-content {
        padding: 0.9rem;
        width: 96vw;
        height: 96vh;
        max-width: 96vw;
        max-height: 96vh;
    }

    .project-cnc-hero {
        padding: 2.2rem 1.4rem;
        border-radius: 1rem;
        background-position: center;
    }

    .project-cnc-hero-content {
        max-width: none;
    }

    #image-lightbox .lightbox-caption {
        font-size: 0.85rem;
    }

    #image-lightbox .lightbox-close {
        width: 1.9rem;
        height: 1.9rem;
    }
}

/* Responsive for detail pages */
@media (max-width: 900px) {
    .project-detail-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .project-gallery {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-gallery img {
        height: 260px;
    }

    .project-trading-hero {
        padding: 2.2rem 1.4rem;
        border-radius: 1rem;
        background-position: center;
    }

    .project-trading-hero-content {
        max-width: none;
    }
}

