/*  Design Tokens (Color Palette) */
:root {
    --primary: #ff6f3c;
    --secondary: #155e75;
    --accent: #e2e8f0;
    --bg: #fafafa;
    --text-dark: #0d1b2a;
    --text-muted: #5f6c80;
    --navbar-bg: #0f172a;
}

/* Global Reset  */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container for page content */
.page-wrapper {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    flex: 1 0 auto;
}

/* Simple section spacing */
.section {
    margin-top: 60px;
}

.section:first-child {
    margin-top: 0;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 18px;
    display: inline-block;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 60px;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
}

/* Utility */
.text-muted {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Pill Navbar */

header {
    margin-bottom: 32px;
}

.nav-shell {
    max-width: 1120px;
    margin: 20px auto 0;
    background: var(--navbar-bg);
    border-radius: 999px;
    padding: 10px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: #ffffff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-center-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-center-circle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #111111;
}

.nav-center-text {
    font-weight: 600;
    letter-spacing: 0.08em;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.nav-link {
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 999px;
    color: #f5f5f5;
    text-decoration: none;
    background: transparent;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.08s ease;
}

.nav-link:hover {
    background: var(--primary);
    color: #111111;
    transform: translateY(-1px);
}

.nav-active {
    color: var(--primary);
    font-weight: 600;
}

/*  Buttons  */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition:
        transform 0.08s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        color 0.18s ease;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.hero-buttons a {
    min-width: 80px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-primary,
.btn-ghost {
    background: #0a66c2;
    color: #ffffff;
    border: 1px solid #d0d0d0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.btn-primary:hover,
.btn-ghost:hover {
    background: var(--primary);
    border-color: #0a66c2;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(255, 122, 26, 0.32);
}

/*  Chips (Tech stack)  */



/* Container */

.chips-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 20px;
}


.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    min-width: 160px;
    padding: 0 28px;
    border-radius: 999px;
    border: 1.5px solid #326ce5;
    background: #ffffff;
    color: #2448a8;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(15, 52, 67, 0.06);
}

.chip-neutral {
    padding: 0 32px;
}


.chip-icon {
    width: 40px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}


/*  Home / Hero */

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-top: 24px;
}

.hero-text {
    max-width: 560px;
}

.hero-kicker {
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.hero-title {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 26px;
}


/* Social buttons */

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    background: #0a66c2;
    color: #ffffff;
    border: 1px solid #0a66c2;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.social-btn i {
    font-size: 1.1rem;
}

.social-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: #0a66c2;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(255, 122, 26, 0.32);
}

/* Hero photo circle */
.hero-photo-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 6px solid #e6e6e6;
    margin-left: 180px;
    ;
    overflow: hidden;
    flex-shrink: 0;
}

.hero-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*About / Projects / Contact / Resume   */

.about-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-top: 32px;
}

.about-photo-frame {
    width: 260px;
    border-radius: 24px;
    height: 260px;
    border: 6px solid #e6e6e6;
    overflow: hidden;
    flex-shrink: 0;
}

.about-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text {
    flex: 1;
    font-size: 0.98rem;
    color: #334e68;
}

.about-text p+p {
    margin-top: 12px;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 28px;
}

.project-card {
    
display: flex;
    gap: 24px;
    background: #ffffff;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 14px 45px rgba(15, 52, 67, 0.08);
}

.project-images-wrapper {
    margin-top: 30px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: none;
    background: transparent;
}

.project-media {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
}

.project-media img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.project-media img:hover {
    transform: scale(1.05);
}

.project-thumbs {
    display: flex;
    gap: 12px;
    width: 100%;

}

.project-thumbs img {
    flex: 1;
    min-width: 0;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #e6e6e6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-thumbs img:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 52, 67, 0.18);
}

.project-body {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-index {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 6px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.project-desc {
    font-size: 0.95rem;
    color: #4a5568;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-top: 18px;
}

.project-links {
    display: flex;
    gap: 10px;
}

.project-link-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(23, 74, 91, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #174a5b;
    text-decoration: none;
    transition:
        background 0.18s ease,
        transform 0.08s ease;
}

.project-link-icon:hover {
    background: rgba(26, 180, 196, 0.09);
    transform: translateY(-1px);
}

/* Contact */

section#contact {
    margin-top: 5px;
}

.contact-intro {
    max-width: 620px;
    margin-top: 16px;
    color: #4a5568;
}

.contact-form-wrapper {
    margin-top: 26px;
    max-width: 620px;
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 24px 28px;
    box-shadow: 0 12px 40px rgba(15, 52, 67, 0.08);
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-row label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-row input,
.form-row textarea {
    border-radius: 10px;
    border: 1px solid #cbd5e0;
    padding: 9px 11px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 1px rgba(0, 184, 197, 0.35);
}

.form-row textarea {
    resize: vertical;
    min-height: 140px;
}

/* Resume */

.resume-intro {
    margin-top: 16px;
    color: #4a5568;
}

.resume-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Footer */

footer {
    margin-top: 40px;
    padding: 18px 16px;
    background: #0b1925;
    color: #93a4b8;
    text-align: center;
    font-size: 0.8rem;
}

/* Responsive */

@media (max-width: 900px) {
    .hero {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .hero-photo-wrapper {
        align-self: center;
    }

    .about-layout {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-card {
        flex-direction: column;
    }

    .hero-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .nav-shell {
        padding: 8px 18px;
        gap: 16px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 0.82rem;
    }

    .nav-center-text {
        display: none;
    }
}

@media (max-width: 650px) {
    .nav-links {
        display: none;
    }

    .nav-shell {
        justify-content: center;
    }
}

/* Image Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #ffffff;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.page-loader.active {
    opacity: 1;
}

.loader-spinner {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Page Transitions */
.page-fade-out {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.page-fade-in {
    animation: pageSlideIn 0.3s ease forwards;
}

@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error Page Styling */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.error-page p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-shell {
        flex-wrap: wrap;
        padding: 12px 20px;
        position: relative;
    }

    .nav-center-logo {
        order: 1;
        flex: 1;
        justify-content: center;
    }

    .mobile-menu-toggle {
        order: 0;
    }

    .nav-links {
        order: 3;
        width: 100%;
        flex-direction: column;
        gap: 8px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    }

    .nav-shell.mobile-menu-open .nav-links {
        max-height: 400px;
        opacity: 1;
        margin-top: 16px;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    .nav-left,
    .nav-right {
        width: 100%;
    }

    .chips-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .chip {
        min-width: 120px;
        font-size: 0.8rem;
    }

    .hero {
        flex-direction: column;
        gap: 30px;
    }

    .hero-photo-wrapper {
        order: -1;
        max-width: 280px;
    }

    .hero-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.project-link-icon:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.mobile-menu-toggle:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
}
