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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #2b2b2b;
    background: #e8ecf1;
}

.page-wrap {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    border-left: 1px solid #d0d7e2;
    border-right: 1px solid #d0d7e2;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    min-height: 100vh;
}

/* Intro / Header */
#intro {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 25px 20px;
    background: #2b2b2b;
    color: #ffffff;
    border-bottom: 5px solid #7c9473;
}

.intro-text {
    text-align: left;
}

.profile-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #7c9473;
    margin-bottom: 18px;
}

#intro h1 {
    font-size: 2.2em;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.tagline {
    color: #c9d4c4;
    font-size: 0.5em;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Two-column layout */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
}

/* SIDEBAR */
.sidebar {
    background: #a8c4a2;
    padding: 30px 25px;
}

.sidebar-block {
    margin-bottom: 30px;
}

.sidebar-block h4 {
    font-size: 0.95em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #2b2b2b;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(43,43,43,0.3);
    padding-bottom: 6px;
}

.sidebar-block p {
    font-size: 0.85em;
    color: #2b2b2b;
    margin-bottom: 8px;
}

.sidebar-block p {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-block p i {
    width: 16px;
    flex-shrink: 0;
    text-align: center;
    color: #2b2b2b;
}

.sidebar-block a {
    color: #2b2b2b;
    text-decoration: none;
}

.sidebar-block a:hover {
    text-decoration: underline;
}

/* MAIN CONTENT */
.main-content {
    padding: 10px 30px 40px;
}

/* Collapsible section cards */
.section-card {
    background: #ffffff;
    border-bottom: 1px solid #e2e6ec;
    padding: 5px 0;
}

.section-card summary {
    font-size: 1.5em;
    font-weight: 700;
    padding: 20px 0;
    cursor: pointer;
    list-style: none;
    position: relative;
    color: #2b2b2b;
    letter-spacing: 1px;
}

.section-card summary::marker,
.section-card summary::-webkit-details-marker {
    display: none;
}

.section-card summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 16px;
    font-size: 0.7em;
    color: #7c9473;
    font-weight: bold;
}

.section-card[open] summary::after {
    content: "−";
}

.section-content {
    padding-bottom: 25px;
}

/* Experience & Education */
.job {
    margin-bottom: 22px;
}

.job h3 {
    font-size: 1.1em;
    margin-bottom: 2px;
    color: #2b2b2b;
}

.job-meta {
    color: #7c9473;
    font-size: 0.85em;
    font-style: italic;
    margin-bottom: 8px;
}

.job ul {
    margin-left: 20px;
}

.job ul li {
    margin-bottom: 4px;
}

/* Portfolio grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 10px;
}

.portfolio-item {
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #f0f2f5;
    border-radius: 8px;
    margin-bottom: 10px;
    display: block;
    border: 1px solid #e2e6ec;
    transition: transform 0.15s ease;
}

.portfolio-item:hover img {
    transform: scale(1.02);
}

.portfolio-item h3 {
    font-size: 1.05em;
    margin-bottom: 4px;
}

.portfolio-item p {
    font-size: 0.9em;
    color: #555;
}

/* Hobbies video */
.hobby-video {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 450px;
    border-radius: 10px;
    margin: 15px auto 0;
    display: block;
    object-fit: cover;
}

/* Project Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    position: relative;
}

.modal-content img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

.modal-content h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8em;
    cursor: pointer;
    color: #555;
    line-height: 1;
}

.modal-close:hover {
    color: #2b2b2b;
}

/* Responsive: stack sidebar on top for narrow screens */
@media (max-width: 700px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

.edu-item {
    margin-bottom: 8px;
}

.edu-title {
    font-weight: bold;
    font-size: 0.8em;
    line-height: 1.4;
    white-space: nowrap;
}

.edu-date {
    font-weight: normal;
    font-style: italic;
    font-size: 0.6em;
    color: #4f6249;
    white-space: nowrap;
}

.edu-detail {
    font-size: 0.8em;
    margin-top: 2px;
}

/* Hobby video thumbnail */
.thumb-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
    border-radius: 8px;
    margin-bottom: 10px;
    display: block;
    border: 1px solid #e2e6ec;
    pointer-events: none;
}

.portfolio-item {
    position: relative;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2em;
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    pointer-events: none;
}

.skills-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skills-sidebar-list li {
    font-size: 0.85em;
    color: #2b2b2b;
    padding-left: 14px;
    position: relative;
    margin-bottom: 6px;
    line-height: 1.4;
}

.skills-sidebar-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #4f6249;
}


.cv-icon-btn:hover {
    background: #5f7458;
}

.cv-btn:hover {
    background: #5f7458;
}

.cv-icon-btn {
    position: absolute;
    top: 20px;
    right: 25px;
}


.cv-icon-btn:hover .cv-tooltip {
    opacity: 1;
}

.section-content p + .portfolio-grid {
    margin-top: 20px;
}

/* Footer */
#site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px 20px 40px;
    background: #2b2b2b;
    border-top: 5px solid #7c9473;
}

.footer-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #7c9473;
    color: #ffffff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    transition: background 0.2s ease;
}

.footer-btn:hover {
    background: #5f7458;
}

.footer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #ffffff;
    color: #2b2b2b;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2em;
    transition: background 0.2s ease;
}

.footer-icon:hover {
    background: #c9d4c4;
}

summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: 32px;
    height: 32px;
    margin-right: 6px;
}

.volunteer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.volunteer-text {
    flex: 1;
}

.volunteer-photo {
    width: 240px;
    flex-shrink: 0;
}

.volunteer-photo .portfolio-item {
    width: 240px;
    height: 240px;
    overflow: hidden;
    border-radius: 12px;
}

.volunteer-photo .portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tablet and below */
@media (max-width: 700px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .main-content {
        order: 1;
        padding: 10px 20px 30px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #intro {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .intro-text {
        text-align: center;
    }

    #intro h1 {
        font-size: 1.8em;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .section-card summary {
        font-size: 1.3em;
    }

    .profile-photo {
        width: 80px;
        height: 80px;
    }

    #site-footer {
        flex-direction: column;
        gap: 15px;
    }
}

.portfolio-item img.photo-fill {
    object-fit: cover;
    background: none;
}

.job-with-image .portfolio-item {
    width: 220px;
    height: 220px;
    overflow: hidden;
    border-radius: 12px;
    float: left;
    margin: 0 1.5rem 0.5rem 0;
    shape-outside: margin-box;
    cursor: pointer;
}

.job-with-image .portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.job-with-image::after {
    content: "";
    display: table;
    clear: both;
}

@media (max-width: 600px) {
    .job-with-image .portfolio-item {
        float: none;
        width: 100%;
        height: auto;
        margin: 0 0 1rem 0;
    }
}

@media (max-width: 600px) {
    .volunteer-content {
        flex-direction: column;
    }
    .volunteer-photo {
        width: 100%;
    }
    .volunteer-photo .portfolio-item {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}