/* -------------------------------------------------------------------------- */
/* GLOBAL RESET & VARIABLES */
/* -------------------------------------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 19px;
}

:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #555555;
    --accent: #d4a500;
    --border: #e0e0e0;
    --card-bg: #f8f9fa;
}

[data-theme="dark"] {
    --bg: #1e1e1e;
    --text: #e4e4e4;
    --text-secondary: #b0b0b0;
    --accent: #ffc107;
    --border: #3a3a3a;
    --card-bg: #2a2a2a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* -------------------------------------------------------------------------- */
/* NAVIGATION */
/* -------------------------------------------------------------------------- */

nav {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-align: center;
    flex-shrink: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    flex: 1;
    justify-content: space-evenly;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    transition: color 0.2s;
    white-space: nowrap;
}

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

.nav-separator {
    color: var(--text-secondary);
    user-select: none;
    font-size: 0.7rem;
}

.theme-toggle,
.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text);
    cursor: pointer;
}

.mobile-menu-btn {
    margin-left: 1.5rem;
}

.lang-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s;
}

.lang-toggle:hover {
    color: var(--accent);
}

/* -------------------------------------------------------------------------- */
/* MAIN LAYOUT */
/* -------------------------------------------------------------------------- */

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: calc(100vh - 200px);
}

/* -------------------------------------------------------------------------- */
/* HERO SECTION */
/* -------------------------------------------------------------------------- */

.hero-section {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: start;
}

.profile-image-container {
    text-align: center;
}

.profile-image {
    width: 14rem;
    height: 14rem;
    max-width: 245px;
    max-height: 245px;
    border-radius: 4px;
    object-fit: cover;
}

.hero-content h1 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.hero-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* -------------------------------------------------------------------------- */
/* TEXT */
/* -------------------------------------------------------------------------- */

.text-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 2.5rem 0 1.5rem;
}

.text-content p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    font-size: 1rem;
    line-height: 1.7;
}

/* -------------------------------------------------------------------------- */
/* EXPERIENCE */
/* -------------------------------------------------------------------------- */

.experience-item {
    margin-bottom: 3rem;
}

.experience-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.experience-date {
    color: var(--text-secondary);
}

.experience-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.experience-org {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
}

.experience-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* -------------------------------------------------------------------------- */
/* PROJECTS */
/* -------------------------------------------------------------------------- */

.section-title {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent);
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    margin: 3rem 0 2rem;
}

.project-item {
    margin-bottom: 2.5rem;
}

.project-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.project-year {
    color: var(--text-secondary);
}

.project-title-link {
    color: var(--text);
    text-decoration: underline;
    font-weight: 500;
    font-size: 1rem;
}

.project-title-link:hover {
    color: var(--accent);
}

.project-badge {
    background: var(--accent);
    color: var(--bg);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* -------------------------------------------------------------------------- */
/* SKILLS */
/* -------------------------------------------------------------------------- */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

/* -------------------------------------------------------------------------- */
/* HOBBIES */
/* -------------------------------------------------------------------------- */

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 2rem;
}

/* -------------------------------------------------------------------------- */
/* FOOTER */
/* -------------------------------------------------------------------------- */

footer {
    background-color: var(--bg);
    color: var(--text);
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.95rem;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* -------------------------------------------------------------------------- */
/* MOBILE */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {

    /* NAV */
    .nav-right {
        gap: 1rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-separator {
        display: none;
    }

    /* HERO -> Stack vertical */
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .profile-image {
        width: 160px;
        height: 160px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    /* TEXT */
    .section-title {
        font-size: 1.8rem;
    }

    /* FOOTER */
    .footer-content {
        gap: 1.5rem;
    }
}

/* -------------------------------------------------------------------------- */
/* PROJECT MEDIA                                                               */
/* -------------------------------------------------------------------------- */

.project-media {
    width: 100%;
    max-width: 600px;
    margin: 1rem 0 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* -------------------------------------------------------------------------- */
/* SKILLS                                                                      */
/* -------------------------------------------------------------------------- */

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.skill-category h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tech-item {
    background: var(--card-bg);
    color: var(--text-secondary);
    padding: 0.3rem 0.7rem;
    border-radius: 3px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

/* -------------------------------------------------------------------------- */
/* GALLERY                                                                     */
/* -------------------------------------------------------------------------- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: translateY(-2px);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.gallery-placeholder {
    width: 100%;
    height: 220px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: var(--text-secondary);
}

.gallery-placeholder i {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--accent);
}

.gallery-placeholder span {
    font-size: 0.9rem;
}

.gallery-caption {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* -------------------------------------------------------------------------- */
/* LIGHTBOX                                                                    */
/* -------------------------------------------------------------------------- */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    cursor: default;
}

.lightbox-caption {
    color: #ccc;
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
    padding: 0 2rem;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--accent);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 1rem;
    z-index: 1001;
    transition: color 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--accent);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.gallery-item {
    cursor: pointer;
}

/* -------------------------------------------------------------------------- */
/* ACHIEVEMENTS TABLE                                                          */
/* -------------------------------------------------------------------------- */

.achievements-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.achievements-table td {
    padding: 0.7rem 0.5rem;
    vertical-align: top;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
}

.achievements-table tr:last-child td {
    border-bottom: none;
}

.achievement-year {
    white-space: nowrap;
    font-weight: 600;
    color: var(--accent);
    width: 90px;
    font-size: 0.9rem;
    padding-right: 1.2rem !important;
}

.achievements-table a {
    color: var(--accent);
    text-decoration: none;
}

.achievements-table a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* LISTS                                                                       */
/* -------------------------------------------------------------------------- */

.hobby-list,
.contact-list {
    list-style: none;
    padding: 0;
}

.hobby-list li,
.contact-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.6;
}

.hobby-list li:last-child,
.contact-list li:last-child {
    border-bottom: none;
}

.text-content ul {
    list-style: none;
    padding: 0;
}

.text-content ul li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.text-content ul li:last-child {
    border-bottom: none;
}

.text-content a {
    color: var(--accent);
    text-decoration: none;
}

.text-content a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* LINKS                                                                       */
/* -------------------------------------------------------------------------- */

.footer-links a,
.contact-list a {
    color: var(--accent);
    text-decoration: none;
}

.footer-links a:hover,
.contact-list a:hover {
    text-decoration: underline;
}

.experience-description a {
    color: var(--accent);
    text-decoration: none;
}

.experience-description a:hover {
    text-decoration: underline;
}

.project-description a {
    color: var(--accent);
    text-decoration: none;
}

.project-description a:hover {
    text-decoration: underline;
}

/* Routing pages */
.page { display: none; }
.page.active { display: block; }

/* -------------------------------------------------------------------------- */
/* BOOKSHELF TABLE                                                             */
/* -------------------------------------------------------------------------- */

.bookshelf-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2.5rem;
}

.bookshelf-table thead th {
    text-align: left;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.8rem;
    border-bottom: 2px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bookshelf-table tbody td {
    padding: 0.6rem 0.8rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
}

.bookshelf-table tbody tr:last-child td {
    border-bottom: none;
}

.bookshelf-table tbody tr:hover {
    background: var(--card-bg);
}

.bookshelf-table tbody td:first-child {
    color: var(--text);
    font-weight: 400;
}

.bookshelf-table tbody td:last-child {
    color: var(--accent);
    font-size: 0.85rem;
    white-space: nowrap;
}
