:root {
    --hover-color: #F1802D;
}

body {
    margin: 0;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background-color: #f9fafb;
    color: #1e1e1e;
}

main {
    height: auto;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    scroll-behavior: smooth;
}

.external-icon {
    font-size: 1em;
    margin-left: 2px;
    vertical-align: super;
    opacity: 0.7;
}

a {
    color: var(--hover-color);
    text-decoration: none !important;
    font-weight: 500;
    display: inline-block;
    transition: transform 0.2s ease, color 0.2s ease;
}

a:hover {
    transform: translateY(-1px);
    color: var(--hover-color);
}

a:hover {
    transform: translateY(-1px);
    color: var(--hover-color);
}


.header {
    position: sticky;
    top: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 100;

    display: flex;
    align-items: center;
    padding: 0.75rem 2rem;
}

.title-name,
.visitor-count {
    flex: 1;
}

.title-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.35rem;
    color: #0f172a;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.title-name:hover {
    color: var(--hover-color);
    cursor: default;
}

.nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 0.7rem;
}

.nav-btn {
    font-weight: 500;
    font-size: 1.1rem;
    color: #374151;
    cursor: pointer;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;
    opacity: 0.7;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -moz-tap-highlight-color: transparent;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    user-select: none;
    transition:
        color 0.4s ease,
        border-color 0.4s ease,
        opacity 0.4s ease;
}

.nav-btn:hover {
    color: var(--hover-color);
    opacity: 1;
}

.nav-btn.active {
    color: var(--hover-color);
    border-color: var(--hover-color);
    opacity: 1;
    transition:
        color 0.4s ease,
        border-color 0.4s ease,
        opacity 0.4s ease;
}

.visitor-count {
    display: flex;
    justify-content: flex-end;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #6b7280;
    padding: 0 0rem;
}

.tab-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: absolute;
    visibility: hidden;
    display: none;
}

.tab-content.active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
    visibility: visible;
    position: relative;
    display: block;
}


/* ===== About Section ===== */
#about {
    max-width: 850px;
    margin: 4rem auto;
    padding: 0 1.5rem;
    line-height: 1.8;
    color: #374151;
}

.about-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 2.8rem;
    /* large but not overpowering */
    color: var(--hover-color);
    /* your orange */
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    letter-spacing: 0.8px;
    line-height: 1.1;
}

#about h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #374151;
    border-left: 4px solid var(--hover-color);
    padding-left: 0.75rem;
    letter-spacing: 0.3px;
}

#about p {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

/* ===== Social Links ===== */
.social-links {
    margin-top: 2rem;
    display: flex;
    gap: 2rem;
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-weight: 500;
    color: #374151;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.linkedin-link:hover {
    transform: translateY(-1px);
    opacity: 0.8;
}

.linkedin-icon {
    width: 22px;
    height: 22px;
    fill: var(--hover-color);
    filter: invert(52%) sepia(91%) saturate(2423%) hue-rotate(360deg) brightness(101%) contrast(97%);
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-weight: 500;
    color: #374151;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.email-link:hover {
    transform: translateY(-1px);
    opacity: 0.8;
}

.email-icon {
    width: 22px;
    height: 22px;
    filter: invert(52%) sepia(91%) saturate(2423%) hue-rotate(360deg) brightness(101%) contrast(97%);
}


/* ===== Resume Section ===== */
#resume {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    line-height: 1.8;
    color: #1f2937;
}

/* Section title */
#resume h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--hover-color);
    border-left: 4px solid var(--hover-color);
    padding-left: 0.75rem;
    margin-bottom: 2rem;
}

/* Subsection headers (Education, Experience, etc.) */
#resume h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #374151;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    border-bottom: 2px solid rgba(241, 128, 45, 0.2);
    padding-bottom: 0.3rem;
}

#resume h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: #111827;
    margin-bottom: 0.1rem;
}

#resume h3+p {
    margin-top: 0.15rem;
}

#resume em {
    color: #4b5563;
}

#resume p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

#resume ul {
    margin-top: 0.3rem;
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

#resume li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

#resume a {
    color: var(--hover-color);
    text-decoration: none;
    font-weight: 500;
}

#resume a:hover {
    text-decoration: underline;
}

#resume .resume-entry:not(:last-child) {
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1.2rem;
}

#resume .resume-list {
    list-style-type: square;
    padding-left: 1.5rem;
}

#resume p strong {
    color: #111827;
}

/* ===== Resume Layout with Sidebar ===== */
.resume-container {
    display: flex;
    gap: 4rem;
    max-width: 1200px;
    margin: 2.5rem auto;
    padding-left: 1rem;
}

.resume-sidebar {
    flex: 0 0 180px;
    position: sticky;
    top: 6rem;
    align-self: flex-start;
    height: fit-content;
    margin-left: -10rem;
}


.resume-sidebar ul {
    display: flex;
    flex-direction: column;
    gap: 3vh;
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid rgba(241, 128, 45, 0.2);
}

.resume-sidebar li {
    margin-bottom: 1rem;
}

.resume-sidebar a {
    display: block;
    padding-left: 1rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

.resume-sidebar a:hover {
    color: var(--hover-color);
    transform: translateX(4px);
}

.resume-section {
    flex: 1.4;
    max-width: 80rem;
}

/* ===== Responsive (hide sidebar on small screens) ===== */
@media (max-width: 900px) {
    .resume-container {
        flex-direction: column;
    }

    .resume-sidebar {
        display: none;
    }
}

/* ===== About This Website Section ===== */
#website {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 1.5rem;
    line-height: 1.8;
    color: #374151;
}

#website h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--hover-color);
    border-left: 4px solid var(--hover-color);
    padding-left: 0.75rem;
    margin-bottom: 2rem;
}

#website h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #374151;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    border-bottom: 2px solid rgba(241, 128, 45, 0.2);
    padding-bottom: 0.3rem;
}

.website-container ul {
    margin-top: 0.3rem;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.website-container li {
    margin-bottom: 0.5rem;
}

.website-diagram {
    display: block;
    width: 100%;
    max-width: 850px;
    margin: 2.5rem auto;
    border-radius: 10px;
}

/* ===== Image Loading Spinner ===== */
.image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    /* ensures spinner area before image loads */
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--hover-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.image-container img {
    display: none;
    max-width: 100%;
    border-radius: 8px;
    transition: opacity 0.4s ease;
}



/* ===== Responsive Layout===== */
@media (max-width: 900px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    main {
        -webkit-overflow-scrolling: touch;
        overflow-y: scroll;
        scrollbar-width: none;
    }

    main::-webkit-scrollbar {
        display: none;
    }

    main::after {
        content: "";
        display: block;
        height: 150px;
    }

    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.8rem;
        padding: 1rem;
    }

    .title-name,
    .visitor-count {
        flex: none;
        /* prevents uneven space allocation */
        width: auto;
    }

    .title-name {
        font-size: 1.1rem;
        text-align: center;
        margin-bottom: 0.3rem;
    }

    .nav {
        width: 100%;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        flex-wrap: wrap;
        /* allows wrapping instead of overflow */
        padding: 0.5rem 0;
    }

    .nav-btn {
        font-size: 1rem;
        line-height: 1.4;
    }

    .visitor-count {
        display: none;
        /* hide on small screens to prevent crowding */
    }

    #about {
        padding: 1.5rem 1rem;
        margin: 2rem auto;
    }

    .about-name {
        font-size: 2rem;
        text-align: center;
    }

    #about h1 {
        text-align: center;
        border-left: none;
        border-bottom: 3px solid var(--hover-color);
        display: inline-block;
        padding: 0 0 0.3rem 0;
    }

    .social-links {
        justify-content: center;
        align-items: center;
        text-align: center;
        flex-direction: column;
        gap: 1rem;
    }
}