/* Art Gallery Styles */
.navbar {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 2px solid #e9ecef;
    text-align: left;
}
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    max-width: 100%;
    margin: 0 auto;
    border: 2px solid #e9ecef;
}
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr;
        padding: 0.5rem;
        gap: 1rem;
    }
}

.artwork {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.artwork:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.artwork-image {
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.artwork-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.artwork:hover .artwork-image img {
    transform: scale(1.03);
}

.artwork-info {
    padding: 1rem 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.artwork-info h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.artwork-info p {
    color: #666;
    margin-bottom: 0.25rem;
    text-align: left;
    font-size: 0.9rem;
}

.artwork-info p.description {
    color: #666;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    text-align: left;
    font-style: italic;
}
header {
    text-align: center;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin-bottom: 2rem;
    width: 100%;
}

header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem auto;
}
header h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem auto;
    text-align: left;
}
.intro {
    max-width: 100%;
    margin: 0 auto;
    color: #555;
    line-height: 1.6;
}

footer {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    margin-top: 3rem;
    color: #666;
}

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

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

.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;
}

.modal-caption {
    margin: 15px auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 1.2em;
}

/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Link Styles */
a {
    color: #4a6fa5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: #3a5a8c;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    table {
        width: 95%;
    }
    
    th, td {
        padding: 0.75rem;
    }
}


/* ========================================
   HOME PAGE STYLES
   ======================================== */

/* Header */
.header {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.95;
}

/* Full-page sizing */
html, body {
    height: 100%;
    font-family: 'Garamond', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 2rem 1rem;
}

/* Container */
.container-narrow {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    padding: 0;
}

/* Section */
.section {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
}

.section h2 {
    color: #20c997;
    font-size: 1.6rem;
    margin-bottom: 16px;
}

/* Item */
.item {
    border-left: 4px solid #20c997;
    padding-left: 16px;
    margin-bottom: 18px;
}

.item-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 8px;
}

.item-title {
    font-size: 1.5rem;
    color: #343a40;
    font-weight: 600;
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.item-meta {
    color: #232323;
    font-size: 0.95rem;
}

.item-subtitle {
    color: #495057;
    font-size: 1rem;
    margin-bottom: 4px;
}

/* Bullets */
.bullets {
    margin: 8px 0 0 0;
    padding-left: 18px;
}

.bullets li {
    margin-bottom: 6px;
    color: #495057;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    background: #e9f7f2;
    border: 1px solid #20c99733;
    color: #129c79;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.85rem;
}

/* Skills List */
.skills-list {
    margin-top: 8px;
}

.skill-item {
    color: #232323;
    font-size: 1.2rem;
    margin-bottom: 6px;
    padding: 4px 0 4px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.skill-item:last-child {
    border-bottom: none;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.project-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow-wrap: anywhere;
}

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

.project-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-title a {
    color: #343a40;
    text-decoration: none;
    font-size: 1.1rem;
}
.project-title a {
    color: #343a40;
    text-decoration: none;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.project-title a[target="_blank"]::after {
    content: "↗";
    font-size: 1.5em;
    opacity: 1;
    margin-left: 2px;
    line-height: 1;
}

.project-title a[target="_blank"]:hover::after {
    opacity: 1;
}
.project-title a:hover {
    color: #20c997;
    text-decoration: none;
}

.project-desc {
    color: #495057;
    margin: 4px 0 8px 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Contact */
.contact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.contact a {
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact a:hover {
    background: rgba(255,255,255,0.32);
}

/* Two-column layout */
.layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
}

.left-col {
    flex: 1 1 300px;
    min-height: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex items from overflowing */
    background: linear-gradient(160deg, #20c997 0%, #17a2b8 100%);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 24px 10px;
    margin-bottom: 24px;
}

.right-col {
    flex: 3 1 0%;
    min-width: 0; /* Prevents flex items from overflowing */
    width: 100%;
}

.profile h1 {
    font-size: 2rem;
    margin: 0 0 6px 0;
    color: #20c997;
}

.profile p {
    margin: 0;
    color: #232323;
}

.profile .contact a {
    color: #20c997;
    background: #e9f7f2;
}

.profile .contact a:hover {
    background: #d9f0ea;
}

/* Left column teal container and profile image */
.left-container {
    color: #ffffff;
    flex: 1 1 auto;
    width: 100%;
}

.profile-photo {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.8);
    display: block;
    margin: 0 auto 16px auto;
}

.profile-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 16px;
    padding: 16px;
}

.profile-card h1 {
    color: #000000;
}

.profile-card h2 {
    color: #000000;
}

.profile-card p {
    color: #232323;
}

/* Collapsible Experience */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.expanded {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

.collapse-toggle {
    background: none;
    border: none;
    color: #000000;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    margin-top: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    text-align: left;
}

.collapse-toggle:hover {
    background-color: #e9f7f2;
}

.collapse-toggle i {
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.collapse-toggle.expanded i {
    transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 992px) {
     .projects-grid {
         grid-template-columns: 1fr; /* Single column on mobile */
         padding: 0 10px; /* Add some padding */
     }

     .project-card {
         margin-bottom: 15px; /* Add space between cards */
         width: 100%;
         max-width: 100%;
     }

     .layout {
        flex-direction: column;
        gap: 15px;
    }
    
    .left-col, .right-col {
        max-width: 100%;
        width: 100%;
        flex: 0 0 auto;
        padding: 0 15px;
        height: auto;
    }
    
    .container-narrow {
        padding: 0 10px;
    }
    .header h1 { font-size: 2.2rem; }
    .header p { font-size: 1rem; }
}

/* ========================================
   GAMES PAGES STYLES
   ======================================== */

.game-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.back-home-link {
    display: inline-block;
    margin: 0 auto 12px auto;
    color: #20c997;
    font-weight: 600;
    text-decoration: none;
}

.back-home-link:hover {
    text-decoration: underline;
}

.game-header {
    color: #20c997;
    margin-bottom: 16px;
    text-align: center;
}

.game-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.mine-counter,
.game-status {
    background: #e9f7f2;
    border: 1px solid #20c99733;
    color: #129c79;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
}

.new-game-btn,
.control-button {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    border: none;
    color: #ffffff;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
}

.new-game-btn:hover,
.control-button:hover {
    filter: brightness(0.95);
}

.new-game-btn:disabled,
.control-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.game-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.game-container .game-board {
    display: grid;
    grid-template-columns: repeat(9, 34px);
    grid-template-rows: repeat(9, 34px);
    gap: 2px;
    background: #d6e5e0;
    border: 1px solid #c2d2cc;
    border-radius: 10px;
    padding: 8px;
}

.instructions {
    width: 100%;
    max-width: 100%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 14px;
}

.instructions h3 {
    margin-bottom: 8px;
}

.instructions ul {
    padding-left: 18px;
}

.cell {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 4px;
    user-select: none;
    font-size: 0.95rem;
}

.covered {
    background: #20c997;
    cursor: pointer;
}

.covered:hover {
    filter: brightness(1.05);
}

.uncovered {
    background: #eef2f4;
    border: 1px solid #d6dde0;
}

.flagged,
.question,
.mine,
.exploded,
.incorrect-flag {
    background: #eef2f4;
    border: 1px solid #d6dde0;
}

.number-1 { color: #0066cc; }
.number-2 { color: #2e8b57; }
.number-3 { color: #cc0000; }
.number-4 { color: #663399; }
.number-5 { color: #8b4513; }
.number-6 { color: #008b8b; }
.number-7 { color: #111111; }
.number-8 { color: #666666; }

.game-over {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.game-over-content {
    background: #ffffff;
    padding: 22px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.game-over.win .game-over-content h2 {
    color: #129c79;
}

.game-over.lose .game-over-content h2 {
    color: #c0392b;
}

.game-area {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
    gap: 20px;
    align-items: start;
}

#tetrisCanvas {
    display: block;
    width: 320px;
    max-width: 100%;
    height: auto;
    background: #2c3e50;
    border: 1px solid #1f2f3f;
    border-radius: 10px;
}

.game-info {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 14px;
}

.info-section {
    margin-bottom: 12px;
}

.info-title {
    color: #6c757d;
    font-size: 0.9rem;
}

.info-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #343a40;
}

#nextPieceCanvas {
    display: block;
    width: 128px;
    height: 128px;
    max-width: 100%;
    background: #2c3e50;
    border: 1px solid #1f2f3f;
    border-radius: 8px;
    margin-top: 6px;
}

.controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 992px) {
    .game-area {
        grid-template-columns: 1fr;
    }

    .game-container .game-board,
    #tetrisCanvas {
        margin: 0 auto;
    }

    .instructions,
    .game-info {
        max-width: 100%;
    }
}




