/* Global reset - removes default margins/padding and ensures consistent box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* CSS Variables for theme colors */
:root {
    --bg-color: #ffffff;
    --text-color: #333;
    --text-light: #555;
    --text-muted: #666;
    --text-very-muted: #888;
    --card-bg: #ffffff;
    --card-hover-bg: #f8f9fa;
    --card-hover-bg-alt: #f0f2f5;
    --border-color: #eee;
    --accent-color: #2d5a3d;
    --accent-light: rgba(45, 90, 61, 0.1);
    --nav-shadow: rgba(0, 0, 0, 0.1);
    --link-color: #0066CC;
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #ffffff;
    --text-light: #e0e0e0;
    --text-muted: #b3b3b3;
    --text-very-muted: #999999;
    --card-bg: #1e1e1e;
    --card-hover-bg: #2a2a2a;
    --card-hover-bg-alt: #333333;
    --border-color: #404040;
    --accent-color: #4CAF50;
    --accent-light: rgba(76, 175, 80, 0.15);
    --nav-shadow: rgba(0, 0, 0, 0.4);
    --link-color: #66B3FF;
}

/* Base body styles - sets default font, colors, and background for entire site */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Global link styling */
a {
    color: var(--link-color);
    transition: color 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

/* ===== HERO SECTION ===== */
/* Main hero banner at top of page with animated Voronoi background and profile info */
.hero {
    background: #000000; /* background */
    color: white;
    padding: 30px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Animated Voronoi canvas background - positioned absolutely behind content, more visible */
.voronoi-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 1;
}

/* Dark overlay on hero background for better text readability over the Voronoi pattern */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1;
}

/* Container for hero content - centers content and adds padding, positioned above canvas and overlay */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Circular profile image container with hover effect */
.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.7);
    margin: 0 auto 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* Slight scale effect when hovering over profile image */
.profile-image:hover {
    transform: scale(1.05);
}

/* Ensures profile image fills container and maintains aspect ratio with crisp rendering */
.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: optimize-contrast;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    filter: contrast(1.1) brightness(1.02);
}

/* Main name/title styling in hero section */
.hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 350;
    margin-bottom: 10px;
    letter-spacing: 1px;
    color: rgb(255, 255, 255);
}

/* Subtitle/position text styling */
.hero .title {
    font-size: clamp(1rem, 3vw, 1.2rem);
    opacity: 1;
    margin-bottom: 20px;
    font-weight: 400;
    color: rgb(255, 255, 255);
}

/* Container for social media links - flexbox centers them horizontally */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* Individual social media link styling - circular buttons with white background */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Social media icon images - sized to fit within the circular buttons */
.social-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Hover effect for social links - slightly gray background and lifts */
.social-links a:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== MAIN NAVIGATION ===== */
/* Sticky navigation bar that stays at top when scrolling */
.navigation {
    background: var(--card-bg);
    box-shadow: 0 2px 15px var(--nav-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

/* Centers navigation content and sets max width */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

/* Flexbox layout for navigation tabs */
.nav-tabs {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

/* Remove default list item margins */
.nav-tabs li {
    margin: 0;
}

/* Individual tab styling with underline animation */
.nav-tabs a {
    display: block;
    padding: 20px 15px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    text-align: center;
    min-width: 120px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Active and hover states - changes color and shows underline */
.nav-tabs a:hover,
.nav-tabs a.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: var(--accent-light);
}

/* Theme toggle in social links - matches social icon styling */
.theme-toggle-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
}

.theme-toggle-social:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hide the checkbox */
.theme-toggle-social input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

/* Theme text styling */
.theme-text {
    font-size: 0.65rem;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    pointer-events: none;
    text-align: center;
    line-height: 1.1;
}

/* Dark mode state - change background and text */
.theme-toggle-social:has(input:checked) {
    background: var(--card-bg);
}

.theme-toggle-social:has(input:checked) .theme-text {
    color: var(--text-color);
}

.theme-toggle-social:has(input:checked):hover {
    background: var(--card-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--nav-shadow);
}

/* ===== SUB-NAVIGATION ===== */
/* Secondary navigation bar for "That's cool" section (legacy - now using left sidebar) */
.sub-nav {
    background: rgba(45, 90, 61, 0.05);
    border-top: 1px solid #eee;
    display: none;
}

/* Shows sub-nav when That's cool tab is active */
.sub-nav.active {
    display: block;
}

/* Centers sub-navigation content */
.sub-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

/* Flexbox layout for sub-navigation tabs */
.sub-nav-tabs {
    display: flex;
    list-style: none;
    gap: 0;
}

/* Sub-navigation tab styling - smaller and different color scheme */
.sub-nav-tabs a {
    display: block;
    padding: 15px 25px;
    color: #2d5a3d;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

/* Sub-nav hover and active states with darker green accent */
.sub-nav-tabs a:hover,
.sub-nav-tabs a.active {
    color: #1e4a2a;
    border-bottom-color: #1e4a2a;
    background: rgba(30, 74, 42, 0.1);
}

/* ===== MAIN CONTENT AREA ===== */
/* Default grid layout for main content - matches navigation width */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    /*display: grid;
    grid-template-columns: 2fr 1fr;*/
    gap: 40px;
    align-items: start;
}

/* White content cards with shadow and rounded corners */
.about-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--nav-shadow);
    transition: background-color 0.3s ease;
}

/* Main heading styling within content sections */
.about-section h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 300;
}

/* Paragraph text styling - responsive font size and relaxed line height for readability */
.about-section p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ===== SIDEBAR COMPONENTS ===== */
/* Vertical container for sidebar cards */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Individual sidebar card styling - matches main content cards */
.sidebar-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--nav-shadow);
    transition: background-color 0.3s ease;
}

/* Sidebar card headings with colored underline */
.sidebar-card h3 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 500;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

/* Custom styled list for interests - removes default bullets */
.interests-list {
    list-style: none;
}

/* Individual interest items with custom arrow bullet */
.interests-list li {
    padding: 8px 0;
    color: var(--text-light);
    position: relative;
    padding-left: 20px;
}

/* Custom triangle arrow bullet for interest items */
.interests-list li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ===== EDUCATION SECTION ===== */
/* Individual education entry with bottom border separator */
.education-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

/* Remove border from last education item */
.education-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Degree/qualification name styling */
.degree {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

/* Institution name with brand color */
.institution {
    color: var(--accent-color);
    font-weight: 500;
}

/* Year/date information in muted color */
.year {
    color: var(--text-very-muted);
    font-size: 0.9rem;
}

/* Distinction styling - italics on new line */
.distinction {
    font-style: italic;
    font-weight: normal;
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 2px 0;
}

/* Thesis/Dissertation/Research Report styling */
.thesis {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 3px 0;
    font-style: italic;
}

/* Supervisor information styling */
.supervisor {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 3px 0;
}

/* Grade average styling */
.grade {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 3px 0;
    font-weight: 500;
}

/* ===== PUBLICATIONS SECTION ===== */
/* Spacing for publication list items */
#publications-content ul {
    list-style: none;
    padding-left: 0;
}

#publications-content ul li {
    margin-bottom: 1.5em;
    line-height: 1.6;
    padding: 15px 20px;
    background: var(--card-hover-bg);
    border-radius: 8px;
    position: relative;
    padding-left: 40px;
    transition: background-color 0.3s ease;
    color: var(--text-light);
}

#publications-content ul li:hover {
    background: var(--card-hover-bg-alt);
}

#publications-content ul li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 20px;
    font-weight: bold;
}


/* Spacing before publication year headings */
#publications-content h3 {
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--accent-color);
    font-weight: 500;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

/* Remove top margin from first h3 */
#publications-content h3:first-of-type {
    margin-top: 1em;
}

/* ===== TAB CONTENT SECTIONS ===== */
/* Hide all tab content by default */
.content-section {
    display: none;
}

/* Show active tab content */
.content-section.active {
    display: block;
}

/* Home tab uses special grid layout with wider sidebar (60/40 split instead of 66/33) */
#home-content.active {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

/* ===== "THAT'S COOL" TAB LAYOUT ===== */
/* Hide That's cool content by default */
#thats-cool-content {
    display: none;
}

/* That's cool tab uses left sidebar layout: 250px fixed sidebar + flexible main content */
#thats-cool-content.active {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: start;
}

/* Left sidebar container for That's cool navigation */
.thats-cool-sidebar {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--nav-shadow);
    transition: background-color 0.3s ease;
}

/* Navigation list in That's cool sidebar */
.thats-cool-nav {
    list-style: none;
}

/* Spacing between navigation items */
.thats-cool-nav li {
    margin-bottom: 5px;
}

/* That's cool navigation links - more compact than main nav */
.thats-cool-nav a {
    display: block;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* That's cool nav hover/active states */
.thats-cool-nav a:hover,
.thats-cool-nav a.active {
    color: var(--accent-color);
    background: var(--accent-light);
}

/* Main content area for That's cool subcontent */
.thats-cool-main {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--nav-shadow);
    transition: background-color 0.3s ease;
}

/* Hide all That's cool subcontent by default */
.thats-cool-subcontent {
    display: none;
}

/* Show active That's cool subcontent */
.thats-cool-subcontent.active {
    display: block;
}

/* ===== RESEARCH PROJECTS TAB LAYOUT ===== */
/* Hide Research Projects content by default */
#research-projects-content {
    display: none;
}

/* Research Projects tab uses left sidebar layout: 250px fixed sidebar + flexible main content */
#research-projects-content.active {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: start;
}

/* Left sidebar container for Research Projects navigation */
.research-projects-sidebar {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--nav-shadow);
    transition: background-color 0.3s ease;
}

/* Navigation list in Research Projects sidebar */
.research-projects-nav {
    list-style: none;
}

/* Spacing between navigation items */
.research-projects-nav li {
    margin-bottom: 5px;
}

/* Research Projects navigation links - more compact than main nav */
.research-projects-nav a {
    display: block;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Research Projects nav hover/active states */
.research-projects-nav a:hover,
.research-projects-nav a.active {
    color: var(--accent-color);
    background: var(--accent-light);
}

/* Main content area for Research Projects subcontent */
.research-projects-main {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--nav-shadow);
    transition: background-color 0.3s ease;
}

/* Hide all Research Projects subcontent by default */
.research-projects-subcontent {
    display: none;
}

/* Show active Research Projects subcontent */
.research-projects-subcontent.active {
    display: block;
}

/* Research list styling within Research Projects */
.research-list {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.research-list li {
    margin-bottom: 15px;
    padding: 15px 20px;
    background: var(--card-hover-bg);
    border-radius: 8px;
    line-height: 1.6;
    position: relative;
    padding-left: 40px;
    transition: background-color 0.3s ease;
    color: var(--text-light);
}

.research-list li:hover {
    background: var(--card-hover-bg-alt);
}

.research-list li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 20px;
    font-weight: bold;
}

.research-list li:last-child {
    margin-bottom: 0;
}

.research-list a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.research-list a:hover {
    text-decoration: underline;
    color: var(--accent-color);
    opacity: 0.8;
}

/* Responsive Research Projects layout */
@media (max-width: 768px) {
    /* Research Projects layout stacks vertically on tablets */
    #research-projects-content.active {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===== SIMPLE CONTACT STYLING ===== */
/* Container for simple contact section */
.simple-contact {
    margin-top: 20px;
}

.simple-contact p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 30px;
}

/* Individual contact item container */
.contact-item {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background: #f0f2f5;
}

.contact-item h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 500;
}

/* Contact links styling */
.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #2d5a3d;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #1e4a2a;
    text-decoration: underline;
}

/* Contact icon styling */
.contact-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* ===== WORK EXPERIENCE SECTION STYLING ===== */
/* Individual work experience item container */
.work-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 25px;
    margin-bottom: 35px;
    padding: 25px;
    background: var(--card-hover-bg);
    border-radius: 8px;
    transition: background-color 0.3s ease;
    align-items: start;
}

.work-item:hover {
    background: var(--card-hover-bg-alt);
}

.work-item:last-child {
    margin-bottom: 0;
}

/* Work period styling */
.work-period {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Work details container */
.work-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Work title/company styling */
.work-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Work position styling */
.work-position {
    color: var(--accent-color);
    font-style: italic;
    font-weight: 500;
}

/* Work description styling */
.work-description {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-top: 5px;
}

/* Responsive work experience layout */
@media (max-width: 768px) {
    .work-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .work-period {
        font-size: 0.85rem;
    }
    
    .work-title {
        font-size: 1rem;
    }
}

/* ===== AWARDS SECTION STYLING ===== */
/* Awards category container */
.awards-category {
    margin-bottom: 40px;
}

.awards-category:last-child {
    margin-bottom: 0;
}

/* Awards category headings */
.awards-category h3 {
    color: var(--text-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 500;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

/* Individual award item container */
.award-item {
    display: grid;
    grid-template-columns: 120px 1fr 200px;
    grid-template-rows: auto auto;
    grid-template-areas:
        "year name awarding-body"
        "year description awarding-body";
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--card-hover-bg);
    border-radius: 8px;
    transition: background-color 0.3s ease;
    align-items: start;
}

.award-item:hover {
    background: var(--card-hover-bg-alt);
}

.award-item:last-child {
    margin-bottom: 0;
}

/* Award year styling */
.award-year {
    grid-area: year;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Award name styling */
.award-name {
    grid-area: name;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0;
}

/* Award description styling */
.award-description {
    grid-area: description;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.4;
    font-style: italic;
    margin-top: 5px;
}

/* Awarding body styling */
.awarding-body {
    grid-area: awarding-body;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: right;
}

/* Responsive awards layout */
@media (max-width: 768px) {
    .award-item {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "year"
            "name"
            "description"
            "awarding-body";
        gap: 10px;
    }
    
    .award-year {
        font-size: 0.85rem;
    }
    
    .awarding-body {
        text-align: left;
    }
}

/* ===== IN PRESS SECTION STYLING ===== */
/* Press list styling */
.press-list {
    margin-top: 20px;
    padding-left: 0;
    list-style: none;
}

.press-list li {
    margin-bottom: 15px;
    padding: 15px 20px;
    background: var(--card-hover-bg);
    border-radius: 8px;
    line-height: 1.6;
    position: relative;
    padding-left: 40px;
    transition: background-color 0.3s ease;
    color: var(--text-light);
}

.press-list li:hover {
    background: var(--card-hover-bg-alt);
}

.press-list li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 20px;
    font-weight: bold;
}

.press-list li:last-child {
    margin-bottom: 0;
}

.press-list a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.press-list a:hover {
    text-decoration: underline;
    color: var(--accent-color);
    opacity: 0.8;
}

/* ===== RESPONSIVE DESIGN ===== */


/* Tablet breakpoint (768px and below) */
@media (max-width: 768px) {
    /* Reduce hero title size on tablets */
    .hero h1 {
        font-size: 2.2rem;
    }

    /* Stack main content vertically instead of side-by-side and use full width */
    .main-content {
        max-width: none;
        width: 100%;
        margin: 20px 0;
        padding: 0 20px;
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    /* Reduce padding in content cards on smaller screens */
    .about-section,
    .sidebar-card {
        padding: 25px;
    }

    /* Smaller navigation padding on tablets */
    .nav-tabs a {
        padding: 15px 10px;
        min-width: 100px;
        font-size: 0.9rem;
    }

    /* Sub-navigation also wraps and centers */
    .sub-nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Smaller sub-nav padding */
    .sub-nav-tabs a {
        padding: 12px 18px;
    }

    /* That's cool layout stacks vertically on tablets */
    #thats-cool-content.active {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Home layout stacks vertically on tablets */
    #home-content.active {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Mobile breakpoint (480px and below) */
@media (max-width: 480px) {
    /* Ensure body and html use full viewport */
    html, body {
        width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    /* Remove hero padding on mobile for full screen */
    .hero {
        padding: 20px 0;
        margin: 0;
        width: 100vw;
    }

    /* Container for hero content - reduce side padding */
    .hero-content {
        padding: 0 10px;
    }

    /* Navigation full width */
    .navigation {
        width: 100vw;
        margin: 0;
    }

    .nav-container {
        padding: 0 10px;
    }

    /* Smaller profile image on mobile */
    .profile-image {
        width: 120px;
        height: 120px;
    }

    /* Even smaller hero title on mobile */
    .hero h1 {
        font-size: 1.8rem;
    }

    /* Full width main content on mobile */
    .main-content {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 0 10px;
    }

    /* Reduce content card padding on mobile */
    .about-section,
    .sidebar-card {
        padding: 15px;
        margin: 0;
    }

    /* Full width content areas for special layouts */
    #thats-cool-content.active,
    #research-projects-content.active {
        width: 100%;
        margin: 0;
        padding: 0 10px;
    }

    .thats-cool-main,
    .research-projects-main {
        margin: 0;
    }

    /* Compact navigation on mobile */
    .nav-tabs a {
        padding: 12px 8px;
        font-size: 0.85rem;
        min-width: 80px;
    }

    /* Very compact sub-navigation on mobile */
    .sub-nav-tabs a {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}