
/* =========================
   1. GLOBAL RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================
   2. THEME COLORS
========================= */
:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --card: #f5f5f5;
    --accent: #722207;
}

body.dark {
    --bg: #111827;
    --text: #f9fafb;
    --card: #1f2937;
    --accent: #e89b7c;
}

/* =========================
   3. GLOBAL STYLES
========================= */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}


/* =========================
   4. SHARED LAYOUT
========================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding-top: 40px;
    padding-bottom: 40px;
    border-top: 1px solid var(--text);
}

.section h2 {
    margin-bottom: 24px;
}

/* Small accent line under section headings */
.section h2::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent);
    margin-top: 8px;
}

/* =========================
   5. NAVIGATION
========================= */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--text);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.navbar h2 {
    font-size: 20px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    position: relative;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

#theme-toggle {
    padding: 8px 14px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--text);
    cursor: pointer;
}

#theme-toggle:hover {
    background: var(--text);
    color: var(--bg);
}

/* Hidden on desktop; shown by mobile media query */
.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--text);
    border-radius: 4px;
    cursor: pointer;
    font-size: 24px;
}

/* =========================
   6. HERO
========================= */
.hero {
    min-height: 75vh;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

/* Hero Text */
.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.hero-text h2 {
    color: var(--accent);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}


/* Hero Photo */
.hero-photo {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    object-position: center 10%;

}


/* =========================
   7. MAIN BUTTON
========================= */
.btn {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    padding: 12px 24px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-weight: bold;
    transition: 0.2s;
}

.btn:hover {
    background: transparent;
    color: var(--accent);
}

/* Secondary Button */
.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--bg);
}

/* =========================
   EXPERIENCE
========================= */

/* Experience Vertical List */

/* .experience-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--text);
}

.experience-date {
    font-size: 14px;
}

.experience-content h3 {
    font-size: 20px;
}

.experience-company {
    color: var(--accent);
    margin: 4px 0 16px;
}

.experience-content ul {
    padding-left: 20px;
}

.experience-content li {
    margin-bottom: 8px;
} */

/* Mobile */
/* @media (max-width: 600px) {
    .experience-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
} */


/* Experience Timeline */
.experience-list {
    border-left: 1px solid var(--text);
    margin-left: 8px;
    padding-left: 30px;
}

.experience-item {
    position: relative;
    padding-bottom: 40px;
}

/* Remove extra spacing after last experience */
.experience-item:last-child {
    padding-bottom: 0;
}

/* Timeline Dots */
.experience-item::before {
    content: "";
    position: absolute;
    left: -39px;
    top: 6px;
    width: 15px;
    height: 15px;
    background: var(--accent);
    border-radius: 50%;
}

/* Experience Text */
.experience-date {
    font-size: 14px;
    margin-bottom: 8px;
}

.experience-item h3 {
    font-size: 20px;
}

.experience-company {
    color: var(--accent);
    margin: 4px 0 16px;
}

/* Bullet Points */
.experience-item ul {
    padding-left: 20px;
}

.experience-item li {
    margin-bottom: 8px;
}

/* =========================
   EDUCATION
========================= */
.education-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

/* University Logo */
.education-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* University Details */
.education-content h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.education-degree {
    color: var(--accent);
    font-weight: bold;
}

.education-date,
.education-gpa {
    font-size: 14px;
    margin-top: 8px;
}

/* Mobile */
@media (max-width: 600px) {
    .education-logo {
        width: 60px;
        height: 60px;
    }

    .education-item {
        gap: 16px;
    }
}

/* =========================
   8. SKILLS
========================= */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-list span {
    padding: 8px 16px;
    border: 1px solid var(--text);
    border-radius: 4px;
    font-size: 14px;
}

/* =========================
   9. PROJECT GRID
========================= */
#projects {
    scroll-margin-top: 90px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Project Card */
.project-card {
    background: var(--card);
    border: 1px solid var(--text);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.project-card:hover {
    transform: translateY(-4px);
}

/* Project Image */
.project-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    padding: 16px;
    background: var(--card);
    border-bottom: 1px solid var(--text);
}

/* Project Content */
.project-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.project-content h3 {
    font-size: 20px;
    line-height: 1.3;
}

.project-content p {
    font-size: 14px;
}

/* Project Tech Stack */
.tech-project {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-project span {
    padding: 4px 8px;
    border: 1px solid var(--text);
    font-size: 12px;
}

/* Project Buttons */
.project-btn {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
}

.btn-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    cursor: pointer;
    border: 1px solid var(--text);
    background: transparent;
    color: var(--text);
    border-radius: 4px;
    transition: 0.2s;
}

.btn-project:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* Keyboard Navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Project Pagination */
.project-card.is-hidden {
    display: none;
}

.project-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
}

#project-pages {
    display: flex;
    gap: 10px;
}

.project-pagination button {
    padding: 8px 14px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--text);
    border-radius: 4px;
    cursor: pointer;
}

.project-pagination button:hover,
.project-pagination button.active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.project-pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}


/* =========================
   CERTIFICATE
========================= */
.certificate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 20px;
    margin-bottom: 16px;

    background: var(--card);
    border: none;
    border-radius: 6px;
}

/* Certificate Details */
.certificate-content h3 {
    font-size: 20px;
}

.certificate-content p {
    font-size: 14px;
    margin-top: 6px;
}

.certificate-issuer {
    color: var(--accent);
    font-weight: bold;
}

/* Certificate Image */
.certificate-image {
    width: 180px;
    height: 120px;
    object-fit: contain;
    border: none;
    border-radius: 4px;
}

/* Certificate Link */
.certificate-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent);
    font-size: 14px;
}

.certificate-link:hover {
    text-decoration: underline;
}

/* Show More Certificates */
.more-certificates {
    margin-top: 24px;
}

.more-certificates summary {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 10px 20px;
    border: 1px solid var(--text);
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    list-style: none;
}

.more-certificates summary::-webkit-details-marker {
    display: none;
}

.more-certificates summary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* Toggle Show More / Show Less text */
.show-less {
    display: none;
}

.more-certificates[open] .show-more {
    display: none;
}

.more-certificates[open] .show-less {
    display: inline;
}

.more-certificates summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}


/* =========================
   CONTACT
========================= */
.contact-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 1px solid var(--text);
    border-radius: 4px;
    color: var(--text);
    transition: 0.2s;
}

.contact-item i {
    font-size: 20px;
}

.contact-item:hover {
    border-color: var(--accent);
    color: var(--accent);
}



/* =========================
   10. FOOTER
========================= */
footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--text);
    font-size: 14px;
}

/* =========================
   11. RESPONSIVE
========================= */

/* Tablet and smaller: compact navbar with a menu button */
@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .navbar {
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .navbar h2 {
        flex: 1;
        min-width: 0;
        font-size: 18px;
        line-height: 1.25;
    }

    .menu-toggle {
        display: inline-flex;
    }

    /* Links and theme toggle stay hidden until the menu opens */
    .nav-links {
        display: none;
        order: 3;
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding-top: 8px;
        border-top: 1px solid var(--text);
    }

    .nav-links a {
        width: fit-content;
        padding: 10px 0;
    }

    #theme-toggle {
        display: none;
        order: 4;
        margin-bottom: 6px;
    }

    .navbar.menu-open .nav-links {
        display: flex;
    }

    .navbar.menu-open #theme-toggle {
        display: inline-block;
    }
}

/* Stack hero photo and introduction before they become cramped */
@media (max-width: 760px) {
    .hero {
        flex-direction: column-reverse;
        align-items: stretch;
        min-height: auto;
        gap: 28px;
        padding-top: 44px;
        padding-bottom: 48px;
    }

    .hero-text {
        flex: initial;
        width: 100%;
    }

    .hero-photo {
        width: 200px;
        height: 200px;
        align-self: center;
    }
}

/* Phones */
@media (max-width: 600px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section {
        padding-top: 44px;
        padding-bottom: 44px;
        scroll-margin-top: 80px;
    }

    .hero {
        padding-top: 36px;
        padding-bottom: 48px;
    }

    .hero-photo {
        width: 180px;
        height: 180px;
    }

    .hero h1 {
        font-size: 36px;
        line-height: 1.2;
    }

    .hero h2 {
        font-size: 20px;
        line-height: 1.3;
    }

    .hero-buttons {
        gap: 10px;
    }

    .hero-buttons .btn {
        padding: 10px 14px;
        text-align: center;
    }

    /* Narrower timeline keeps bullet points readable */
    .experience-list {
        margin-left: 7px;
        padding-left: 22px;
    }

    .experience-item::before {
        left: -30px;
        width: 13px;
        height: 13px;
    }

    .experience-item h3 {
        font-size: 18px;
    }

    .experience-item li {
        overflow-wrap: break-word;
    }

    .education-item {
        gap: 14px;
    }

    .education-logo {
        flex-shrink: 0;
    }

    .education-content {
        min-width: 0;
    }

    /* One project card per row */
    .projects-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .project-content {
        padding: 16px;
        gap: 14px;
    }

    .project-btn {
        gap: 8px;
    }

    .btn-project {
        padding: 8px 12px;
    }

    .project-pagination {
        flex-wrap: wrap;
    }

    /* Keep issuer logos on the right, without oversized images */
    .certificate-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 14px;
    }

    .certificate-content {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .certificate-content h3 {
        font-size: 17px;
        line-height: 1.35;
    }

    .certificate-image {
        width: 76px;
        height: 76px;
        max-width: none;
        flex-shrink: 0;
    }

    .contact-item {
        padding: 10px 14px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn,
    .btn-project,
    .project-card {
        transition: none;
    }

    .project-card:hover {
        transform: none;
    }
}
