* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

body {
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 240px;
    height: 100vh;
    background-color: #2c3e50;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar.open {
    transform: translateX(0);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 99;
}

.menu-overlay.active {
    display: block;
}

/* Logo Container */
.logo-container {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #34495e;
}

.logo-icon {
    font-size: 24px;
    color: white;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    margin-left: 15px;
    color: white;
}

/* Menu Item */
.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    text-decoration: none;
}

.menu-item:hover {
    background-color: #34495e;
}

.menu-icon {
    font-size: 20px;
    min-width: 30px;
    display: flex;
    justify-content: center;
    color: white;
}

.menu-title {
    font-size: 16px;
    margin-left: 10px;
    color: white;
}

/* Menu Toggle Button */
.menu-toggle {
    display: block;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 101;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px;
    cursor: pointer;
    font-size: 18px;
}

/* Main Content */
.main-content {
    margin-left: 0;
    width: 100%;
    padding: 30px;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Card Container */
.card-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
    padding: 20px;
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 16px rgba(0, 0, 0, 0.2);
}

/* Update these CSS rules */
.card-img {
    width: 100%;
    height: 250px;
    background-color: #2c3e50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    position: relative;
}

.project-image {
    width: 100%;
    height: 180px; /* Adjust this value to leave space for tech tags */
    object-fit: cover;
    border-radius: 8px;
}

.tech-list {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 1;
}

.tech-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.tech-tag {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.html { background-color: #e34c26; color: white; }
.css { background-color: #264de4; color: white; }
.js { background-color: #f7df1e; color: black; }

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.card-desc {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100px;
}

.tech-details {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: auto;
}

.tech-details h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.tech-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tech-details li {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.tech-details li i {
    color: #2c3e50;
}

.view-project-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    text-decoration: none;
    background-color: #2c3e50;
    color: white;
    border-radius: 8px;
    font-size: 16px;
    margin-top: 15px;
}

/* Media Queries */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: block;
    }

    .card-container {
        width: 100%;
        margin-left: 0;
        padding: 20px;
    }

    .card {
        padding: 40px;
    }
}

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

    h2 {
        font-size: 28px;
    }

    p {
        font-size: 16px;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .social-icons a {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 20px;
    }

    h2 {
        font-size: 24px;
    }

    p {
        font-size: 14px;
    }

    .profile-img {
        width: 120px;
        height: 120px;
    }

    .social-icons a {
        font-size: 22px;
    }
}

@media (max-width: 1024px) {
    .card-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        width: 100%;
        margin-left: 0;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .card-container {
        grid-template-columns: repeat(1, 1fr);
        gap: 20px;
        padding: 15px;
    }
}

/* iPad - Specific */
@media only screen 
and (min-width: 768px) 
and (max-width: 1024px)
and (-webkit-min-device-pixel-ratio: 1) {
    .card-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
}