* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    line-height: 1.7;
    color: #e0e0e0;
    background-color: #0a0a0a;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-theme {
    color: #2a2a2a;
    background-color: #f5f5f5;
}

body.light-theme header {
    background-color: #f5f5f5;
}

body.light-theme .logo {
    color: #2a2a2a;
}

body.light-theme .nav-item {
    color: #606060;
}

body.light-theme .nav-item:hover {
    color: #2a2a2a;
}

body.light-theme .nav-item.active {
    color: #2a2a2a;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme .hero-title,
body.light-theme .experience-title {
    color: #1a1a1a;
}

body.light-theme p,
body.light-theme .hero-description,
body.light-theme .experience-description {
    color: #505050;
}

body.light-theme .experience-card {
    background-color: #d8d8d8;
}

body.light-theme .certs-grid .card {
    background-color: transparent;
}


body.light-theme .card p {
    color: #505050;
}

body.light-theme .experience-company,
body.light-theme .experience-date {
    color: #707070;
}

body.light-theme .divider {
    background: linear-gradient(90deg, transparent, #d0d0d0, transparent);
}

body.light-theme .theme-toggle {
    color: #2a2a2a;
}

header {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #a0a0a0;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item:hover {
    color: #ffffff;
}

.nav-item.active {
    color: #ffffff;
}

.nav-item .icon {
    font-size: 1.125rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 1.3rem;
    line-height: 1;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    opacity: 0.7;
}

/* Header right cluster: toggle + hamburger */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hamburger button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 36px;
    height: 36px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #e0e0e0;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

body.light-theme .hamburger span {
    background-color: #2a2a2a;
}

/* Hamburger to X animation */
.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: calc(100vh - 80px);
}

.page-section {
    display: none;
}

.page-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    margin-top: 3rem;
    color: #ffffff;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

p {
    margin-bottom: 1rem;
    color: #b0b0b0;
    font-size: 1.05rem;
}

.hero-section {
    padding: 6rem 0 4rem 0;
    margin-top: 3rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 2.5rem;
    color: #a0a0a0;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.2rem;
    color: #b0b0b0;
    max-width: 700px;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.75rem 1.75rem;
    color: #ffffff;
    background: transparent;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cta-button::before {
    content: '~/';
}

.ctb-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    margin-left: 0.75rem;
    padding: 0.75rem 1.75rem;
    color: #000000;
    background: #f0f0f0;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    text-decoration: none;
    letter-spacing: 0.03em;
}

.ctb-button:hover {
    background-color: #ffffff !important;
    color: #1a1a1a;
}



body.light-theme .cta-button {
    color: #1a1a1a;
    border-color: #bbb;
}

body.light-theme .ctb-button {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

body.light-theme .ctb-button:hover {
    background-color: #2a2a2a !important;
    color: #f0f0f0;
}



.section {
    margin-bottom: 4rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: #0a0a0a;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card p {
    color: #909090;
    font-size: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    background-color: #0a0a0a;
    color: #e0e0e0;
    border-radius: 20px;
    font-size: 0.83rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    border: 1px solid #2a2a2a;
}



body.light-theme .badge {
    background-color: #d0d0d0;
    color: #2a2a2a;
    border: 1px solid #c0c0c0;
}


.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #2a2a2a, transparent);
    margin: 3rem 0;
}

.experience-card {
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.experience-card:hover {
    background-color: #0f0f0f;
    border-color: #2a2a2a;
    transform: translateX(8px);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.experience-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.experience-company {
    font-size: 1rem;
    color: #a0a0a0;
    margin-bottom: 0.5rem;
}

.experience-date {
    font-size: 0.9rem;
    color: #707070;
}

.experience-description {
    color: #909090;
    line-height: 1.7;
}

.tech-stack {
    margin-top: 1.5rem;
    margin-bottom: 0.3rem;
}

.logo-slider-section {
    margin-top: 3.5rem;
    margin-bottom: 2rem;
}

.logo-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 2rem 0;
}

.logo-track {
    display: flex;
    gap: 3rem;
    animation: scroll 30s linear infinite;
    width: fit-content;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.logo-slider:hover .logo-track {
    animation-play-state: paused;
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    padding: 0 1rem;
    transition: transform 0.3s ease;
}

.logo-item img {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) brightness(1.2);
    transition: filter 0.3s ease, transform 0.3s ease;
}

body.light-theme .logo-item img {
    filter: grayscale(100%) brightness(0.5);
}

.logo-item:hover img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1);
}

body.light-theme .logo-item:hover img {
    filter: grayscale(0%) brightness(1);
}

body.light-theme .logo-item {
    color: #2a2a2a;
}

.logo-item:hover {
    transform: scale(1.1);
}

.resume-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1rem;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    color: #0a0a0a;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-button:hover {
    opacity: 0.85;
}


body.light-theme .download-button {
    background: #1a1a1a;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

body.light-theme .download-button:hover {
    background: #2a2a2a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.pdf-viewer-container {
    width: 100%;
    height: 800px;
    background-color: #111111;
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 2rem;
}

body.light-theme .pdf-viewer-container {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
}

.certs-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.certs-grid .card {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
}

.certs-grid .card-icon img {
    width: 240px;
    height: 240px;
    object-fit: contain;
}

.certs-grid .card-icon {
    font-size: 3rem;
    margin-bottom: 0;
    flex-shrink: 0;
    line-height: 1;
}

.certs-grid .card-content {
    flex: 1;
}

.certs-grid .card h3 {
    margin-top: 0;
    line-height: 1.2;
}



/* Project Cards */
.project-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    background-color: #0a0a0a;
    border-radius: 16px;
    padding: 2.5rem 0;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.project-description {
    color: #909090;
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

.project-image {
    flex-shrink: 0;
    width: 600px;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.project-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.github-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.9rem;
    color: #ffffff;
    border-radius: 50px;
    margin-top: 0.5rem;
}

.github-button:hover {
    opacity: 0.85;
}


body.light-theme .github-button {
    color: #0f0f0f;
}

.project-button {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #ffffff;
    color: #000000;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    width: fit-content;
    transition: opacity 0.2s ease;
}

.project-button:hover {
    opacity: 0.85;
}

body.light-theme .project-card {
    background-color: #f5f5f5;
}

body.light-theme .project-title {
    color: #1a1a1a;
}

body.light-theme .project-button {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.light-theme .project-image {
    background-color: #111;
}

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }

    .project-image {
        width: 340px;
        height: 220px;
    }

    .certs-grid .card-icon img {
        width: 160px;
        height: 160px;
    }

    .pdf-viewer-container {
        height: 600px;
    }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
    /* Header */
    .header-content {
        padding: 1rem 1.25rem;
        flex-wrap: nowrap;
        gap: 0;
        position: relative;
    }

    /* Hide nav by default on mobile */
    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: rgba(10, 10, 10, 0.98);
        border-top: 1px solid #1a1a1a;
        border-bottom: 1px solid #1a1a1a;
        padding: 0.5rem 0;
        z-index: 99;
    }

    body.light-theme nav {
        background-color: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
    }

    nav.open {
        display: flex;
    }

    .nav-item {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
        border-radius: 0;
        width: 100%;
    }

    .nav-item:hover {
        background-color: #1a1a1a;
    }

    body.light-theme .nav-item:hover {
        background-color: #f0f0f0;
    }

    /* Show hamburger */
    .hamburger {
        display: flex;
    }

    /* Main */
    main {
        padding: 2rem 1.25rem;
    }

    /* Hero */
    .hero-section {
        padding: 3rem 0 2rem 0;
        margin-top: 10rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    /* Project cards */
    .project-card {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .project-image {
        width: 100%;
        height: 200px;
    }

    .project-title {
        font-size: 1.2rem;
    }

    /* Certs */
    .certs-grid .card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .certs-grid .card-icon img {
        width: 120px;
        height: 120px;
    }

    /* Resume */
    .resume-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .pdf-viewer-container {
        height: 450px;
    }

    /* Logo slider */
    .logo-item img {
        height: 36px;
    }

    .divider {
        margin: 1.5rem 0;
    }

    .ctb-button {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
        border-radius: 5px;
        
        width: auto;
    }

    .cta-button {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
    }
}

/* ── Small mobile (≤ 480px) ── */
@media (max-width: 480px) {
    .hero-title {
        font-size: 3rem;
    }

    .nav-item span {
        font-size: 0.75rem;
    }

    .project-image {
        height: 160px;
    }

    .pdf-viewer-container {
        height: 350px;
    }

    .certs-grid .card-icon img {
        width: 90px;
        height: 90px;
    }

    .ctb-button {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
        margin-left: 0.25rem;
        width: auto;
    }

    .cta-button {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}


/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    backdrop-filter: blur(6px);
}

.lightbox.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.lightbox-close:hover {
    opacity: 1;
}

.project-image img {
    cursor: zoom-in;
}
