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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

/* Sticky Top Banner (for all pages except home) */
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 200;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.top-banner .banner-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-banner .banner-profile-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.top-banner .banner-profile-link {
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.top-banner .banner-profile-link:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.top-banner .banner-profile-link:active {
    transform: scale(0.95);
}

.top-banner h1 {
    font-size: 1.5em;
    margin: 0;
}

.top-banner .menu-icon {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.top-banner .menu-icon span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Hide default header when banner is active */
body.has-banner header {
    display: none;
}

/* Add padding to body to account for fixed banner */
body.has-banner {
    padding-top: 70px;
}

/* Profile Section */
.profile {
    text-align: center;
    background-color: #fff;
    padding: 40px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid #2c3e50;
    max-width: 100%;
}

.profile p {
    font-size: 1.1em;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
}

/* Site Structure Section */
.site-structure {
    background-color: #fff;
    padding: 40px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.site-structure h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.site-links {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.site-links li {
    background-color: #3498db;
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.site-links li:hover {
    transform: translateY(-5px);
    background-color: #2980b9;
}

.site-links a {
    display: block;
    padding: 25px;
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    min-height: 44px;
}

/* Navigation */
nav {
    background-color: #34495e;
    padding: 15px 0;
    margin-bottom: 20px;
    transition: transform 0.1s linear;
}

body.has-banner nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 100;
    margin-bottom: 0;
}

body.has-banner nav.nav-hidden {
    transform: translateY(-100%);
    pointer-events: none;
}

body.has-banner nav.nav-visible {
    transform: translateY(0);
    pointer-events: auto;
}

/* Home page sticky navbar */
body:not(.has-banner) nav {
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 20px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

nav ul li {
    margin: 0 15px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1em;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: inline-block;
    min-height: 44px;
    min-width: 44px;
    text-align: center;
    line-height: 1.6;
}

nav a:hover {
    background-color: #2c3e50;
}

/* Content Sections */
.content-section {
    background-color: #fff;
    padding: 40px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2em;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.content-section h3 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.content-section p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.8;
}

.content-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.content-section li {
    margin-bottom: 10px;
    color: #555;
}

.content-section a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
    min-height: 44px;
    display: inline-block;
    padding: 5px 0;
}

.content-section a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Responsive Images */
.section-image,
.project-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Circular profile image for About Me section */
.content-section.about-me-section .section-image {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: none;
}

/* About Me section special layout (similar to Education) */
.aboutme-flex-container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin: 20px 0;
}

.aboutme-image-container {
    flex-shrink: 0;
    width: 200px;
    order: -1; /* Image on left */
}

.aboutme-image-container .section-image {
    width: 100%;
    margin: 0;
}

.aboutme-details-container {
    flex: 1;
    min-width: 0;
}

/* Education section special layout */
.education-flex-container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin: 20px 0;
}

.education-image-container {
    flex-shrink: 0;
    width: 350px;
    order: -1; /* Image on left */
}

.education-image-container .section-image {
    width: 100%;
    margin: 0;
}

.education-details-container {
    flex: 1;
    min-width: 0;
}

/* Project Items */
.project-item {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

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

.project-item img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

/* Portfolio project skills grid layout */
.project-skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
    align-items: stretch;
}

.project-skills-list {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-skills-list h4 {
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 15px;
    margin-top: 0;
}

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

.project-skills-list li {
    color: #555;
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.project-skills-list li:before {
    content: "▸";
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.project-images-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-skills-grid .project-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-skills-grid .project-image-container img {
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Portfolio project with images side by side */
.project-item .project-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 0;
    height: 100%;
    align-items: center;
}

.project-item .project-images-grid img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: 0;
}

.project-link {
    display: inline-block;
    background-color: #3498db;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none !important;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-height: 44px;
    line-height: 1.6;
}

.project-link:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Subsection Styles */
.subsection {
    margin-top: 30px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 3px solid #3498db;
}

.subsection h3 {
    color: #34495e;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.subsection p {
    color: #666;
}

.subsection ul {
    margin-top: 10px;
}

/* Alternating Image Layout */
.content-section-left,
.content-section-right {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.content-section-left .image-container {
    flex-shrink: 0;
    width: 350px;
    order: -1;
}

.content-section-right .image-container {
    flex-shrink: 0;
    width: 350px;
    order: 1;
}

.content-section-left .content-container,
.content-section-right .content-container {
    flex: 1;
    min-width: 0;
}

.content-section-left .section-image,
.content-section-right .section-image {
    width: 100%;
    margin: 0;
}

/* Special Grid Layout for Intramurals/Other Clubs */
.subsection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
}

.subsection-grid .subsection {
    margin: 0;
    padding: 0;
    border-left: none;
}

.subsection-grid .subsection h3 {
    text-align: center;
    color: #2c3e50;
    font-size: 1.4em;
    margin-bottom: 15px;
}

.subsection-grid .subsection .section-image {
    width: 100%;
    margin: 15px 0;
}

.subsection-grid .subsection p,
.subsection-grid .subsection ul {
    text-align: left;
}

/* Items grid within each subsection for Intramurals/Other Clubs */
.subsection-grid .subsection .items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.subsection-grid .subsection .item {
    text-align: center;
}

.subsection-grid .subsection .item-text {
    font-weight: 500;
    color: #34495e;
    margin-bottom: 10px;
    font-size: 1em;
}

.subsection-grid .subsection .item-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Tablet Responsive Design (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2.2em;
    }
    
    .profile,
    .site-structure,
    .content-section {
        padding: 30px;
    }
    
    .site-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Responsive Design (< 768px) */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8em;
        padding: 0 10px;
    }
    
    header {
        padding: 15px 0;
    }
    
    /* Top banner mobile adjustments */
    .top-banner {
        padding: 10px 15px;
    }
    
    .top-banner h1 {
        font-size: 1.2em;
    }
    
    .top-banner .banner-profile-img {
        width: 40px;
        height: 40px;
    }
    
    body.has-banner {
        padding-top: 60px;
    }
    
    body.has-banner nav {
        top: 60px;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
    
    .profile,
    .site-structure,
    .content-section {
        padding: 20px;
        margin: 15px 0;
    }
    
    .profile p,
    .content-section p {
        font-size: 1em;
    }
    
    .site-structure h2,
    .content-section h2 {
        font-size: 1.5em;
    }
    
    .content-section h3 {
        font-size: 1.3em;
    }
    
    .site-links {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .site-links a {
        padding: 20px;
        font-size: 1.1em;
    }
    
    nav {
        padding: 10px 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    nav a {
        font-size: 1em;
        padding: 10px 20px;
        display: block;
        width: 100%;
        max-width: 200px;
    }
    
    .project-item {
        margin-bottom: 30px;
    }
    
    /* Stack skills grid on mobile */
    .project-skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Stack project images on mobile */
    .project-item .project-images-grid {
        grid-template-columns: 1fr;
    }
    
    .project-link {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
    }
    
    .subsection {
        margin-left: 10px;
        padding-left: 15px;
    }
    
    /* Stack layout on mobile for alternating sections */
    .content-section-left,
    .content-section-right {
        flex-direction: column;
    }
    
    .content-section-left .image-container,
    .content-section-right .image-container {
        width: 100%;
        order: -1;
    }
    
    /* Stack Education section on mobile */
    .education-flex-container {
        flex-direction: column;
    }
    
    .education-image-container {
        width: 100%;
        order: -1;
    }
    
    /* Stack grid layout on mobile */
    .subsection-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Stack items grid on mobile */
    .subsection-grid .subsection .items-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    footer {
        padding: 15px 10px;
        font-size: 0.9em;
    }
}

/* Extra Small Mobile (< 480px) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }
    
    .profile-img {
        width: 120px;
        height: 120px;
    }
    
    .profile,
    .site-structure,
    .content-section {
        padding: 15px;
    }
    
    .site-structure h2,
    .content-section h2 {
        font-size: 1.3em;
    }
    
    .content-section h3 {
        font-size: 1.1em;
    }
    
    nav a {
        font-size: 0.95em;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets on touch devices */
    nav a,
    .site-links a,
    .content-section a,
    .project-link {
        min-height: 48px;
        padding: 12px 20px;
    }
    
    /* Remove hover effects on touch devices */
    .site-links li:hover {
        transform: none;
    }
}
