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

body {    
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f4f1e8;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.03) 2px, rgba(0,0,0,.03) 3px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,.03) 2px, rgba(0,0,0,.03) 3px);
    color: #000;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 50px;
    background: #faf8f3;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
}

.cv-header {
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 3px solid #000;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

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

.header-text h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
}

.header-text h2 {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.2;
}

.brand-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    justify-self: end;
}

.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #000;
    margin-bottom: 20px;
}

.contact-col p {
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: flex;
}

.contact-col strong {
    display: inline-block;
    min-width: 80px;
}

.contact-col a {
    color: #000;
    text-decoration: none;
}

.contact-col a:hover {
    text-decoration: underline;
}

.cv-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    margin-bottom: 25px;
    align-items: start;
}

.row-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding-top: 3px;
}

.row-content p {
    font-size: 0.9rem;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 10px;
}

.row-content ul {
    margin-left: 20px;
    font-size: 0.9rem;
}

.row-content ul li {
    margin-bottom: 5px;
    line-height: 1.6;
}

.skills-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.skills-col p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.project-item {
    margin-bottom: 20px;
}

.project-item h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-item p {
    font-size: 0.9rem;
    text-align: justify;
    margin-bottom: 8px;
}

.project-item ul {
    margin-left: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.project-item ul li {
    margin-bottom: 3px;
}

.row-content a {
    color: #000;
    text-decoration: none;
}

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

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.gallery-img-wrapper {
    display: flex;
    flex-direction: column;
}

.project-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.img-description {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    text-align: center;
    font-style: italic;
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #000;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    .cv-header {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 15px;
    }

    .logo {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .brand-logo {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .header-text {
        grid-column: 1 / -1;
        grid-row: 2;
        text-align: center;
    }

    .contact-section {
        grid-template-columns: 1fr;
    }

    .cv-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .skills-grid-two {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.9); 
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.modal-content, #caption {  
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px){
    .modal-content {
        width: 100%;
    }
}

/* Hide content when printing */
@media print {
    html, body {
        display: none !important;
    }
}/* Accordion Styles for Projects Section */
.projects-section .project-item {
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.1); /* Minimal separator */
}

.projects-section .project-item:last-child {
    border-bottom: none;
}

.projects-section .project-item h4 {
    margin: 0;
    padding: 10px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
}

.projects-section .project-item h4:hover {
    opacity: 0.7;
}

.projects-section .project-item h4::after {
    content: '+';
    font-size: 1.2rem;
    color: #555;
    font-weight: normal;
}

.projects-section .project-item.active h4::after {
    content: '-';
}

/* Hide content by default */
.projects-section .project-item > *:not(h4) {
    display: none;
}

/* Show content when active */
.projects-section .project-item.active > *:not(h4) {
    display: block;
}

/* Adjust spacing for inner elements */
.projects-section .project-item.active p {
    margin-top: 5px;
    margin-bottom: 10px;
}

.projects-section .project-item.active ul {
    margin-bottom: 15px;
    margin-left: 20px;
}
