/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3d8b6f;
    --secondary-color: #2c6450;
    --accent-color: #c9a876;
    --text-primary: #2d2820;
    --text-secondary: #5d6856;
    --bg-light: #eae6dd;
    --bg-dark: #3d5a4a;
    --border-color: #b8c5b3;
    --shadow-sm: 0 2px 4px rgba(45, 40, 32, 0.1);
    --shadow-md: 0 6px 18px rgba(45, 40, 32, 0.12);
    --shadow-lg: 0 8px 24px rgba(45, 40, 32, 0.18);
    --transition: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #f5f3ed;
    overflow-x: hidden;
    -ms-overflow-style: none; /* IE/Edge */
    position: relative;
}

/* View Management - Single Page App Switching */
.main-view,
.challenge-view {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.main-view.hidden,
.challenge-view.hidden {
    display: none;
}

/* Topographic Background */
#topographic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 4.8vw, 3.2rem); }
h2 { font-size: clamp(1.44rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.04rem, 2.4vw, 1.6rem); }
h4 { font-size: clamp(0.88rem, 2vw, 1.2rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.lead-text {
    font-size: clamp(0.88rem, 2vw, 1.12rem);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.7;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    max-width: 560px;
    margin: -0.4rem auto 1.6rem;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(234, 230, 221, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(234, 230, 221, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 16px;
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: var(--transition);
}

.nav-brand:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.6rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    width: 20px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

/* Unified Hero Section */
.unified-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
    padding: 80px 16px 64px;
    overflow: hidden;
}

.unified-hero-content {
    position: relative;
    z-index: 1;
    max-width: 880px;
    width: 100%;
    animation: fadeInUp 1s ease;
}

/* Hero Header */
.hero-header {
    text-align: center;
    margin-bottom: 2.4rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.hero-name {
    font-size: clamp(2.4rem, 4.8vw, 3.6rem);
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.hero-tagline {
    font-size: clamp(0.88rem, 2vw, 1.2rem);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hero-location {
    font-size: clamp(0.8rem, 1.6vw, 0.96rem);
    color: var(--text-secondary);
    margin: 0 0 1.6rem 0;
}

/* Compact Skills & Connect */
.hero-skills-compact,
.hero-connect-compact {
    margin-top: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.compact-label {
    font-size: clamp(0.72rem, 1.44vw, 0.8rem);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.skills-compact-list,
.connect-compact-list {
    display: flex;
    gap: 0.48rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Skill Chips */
.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    padding: 0.32rem 0.64rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: default;
}

.skill-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.skill-chip-icon {
    font-size: 0.96rem;
}

.skill-chip-text {
    font-size: clamp(0.64rem, 1.2vw, 0.72rem);
    color: var(--text-primary);
    font-weight: 500;
}

/* Connect Buttons */
.connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    border: 2px solid transparent;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.connect-btn-primary {
    background: var(--primary-color);
    color: white;
}

.connect-btn-primary:hover {
    background: var(--secondary-color);
}

.connect-btn-icon {
    font-size: 0.96rem;
}

.connect-btn-text {
    font-size: clamp(0.68rem, 1.2vw, 0.76rem);
    font-weight: 500;
}

/* Bio Section */
.hero-bio-section {
    display: flex;
    align-items: center;
    gap: 2.4rem;
    margin-bottom: 3.2rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    padding: 2.4rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.hero-profile-photo {
    flex-shrink: 0;
}

.hero-profile-photo img {
    width: 224px;
    height: 224px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-slow);
}

.hero-profile-photo img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.hero-bio-text {
    flex: 1;
}

.bio-lead {
    font-size: clamp(0.92rem, 2vw, 1.08rem);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.bio-secondary {
    font-size: clamp(0.8rem, 1.6vw, 0.88rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Hidden Legacy Sections */
.hero-skills-section,
.hero-connect-section,
.skills-grid,
.connect-cards {
    display: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Sections */
.section {
    padding: 2.4rem 0;
    position: relative;
}

.section-alt {
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Projects Panel */
.projects-unified-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
}

#projects .container {
    max-width: 90vw;
}

/* Split Screen Layout System */
.split-section {
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.split-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.split-container.reverse {
    flex-direction: row-reverse;
}

.split-left,
.split-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem;
    position: relative;
}

.split-content {
    max-width: 600px;
    width: 100%;
}

.split-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.split-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-slow);
}

.split-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.profile-image {
    border-radius: 50% !important;
    max-width: 400px;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Parallax Effect */
.parallax-image {
    will-change: transform;
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(74, 144, 226, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.split-image:hover .image-overlay {
    opacity: 1;
}

/* Skills Section Specific */
.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.skill-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.skill-details h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.skill-details p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Skills Visual */
.skills-visual {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.skills-circle {
    position: relative;
    width: 400px;
    height: 400px;
}

.skill-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    z-index: 2;
}

.skill-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px dashed var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
}

.orbit-1 {
    width: 250px;
    height: 250px;
    animation: rotate 15s linear infinite;
}

.orbit-2 {
    width: 350px;
    height: 350px;
    animation: rotate 20s linear infinite reverse;
}

.orbit-3 {
    width: 450px;
    height: 450px;
    animation: rotate 25s linear infinite;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.skill-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    background: white;
    border-radius: 50%;
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
}

/* Project Filters */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.2rem;
}

/* Filter Dropdown Wrapper */
.filter-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

/* Category Filter Buttons (Simple, No Dropdown) */
.filter-btn {
    padding: 0.48rem 1.44rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Category Filter Buttons WITH Dropdown */
.filter-btn-with-dropdown {
    padding: 0.48rem 1.44rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-btn-with-dropdown:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.filter-btn-with-dropdown.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Subcategory badge on dropdown button */
.subcategory-badge {
    display: none;
    margin-left: 0.4rem;
    padding: 0.15rem 0.5rem;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    transform: scale(0.8);
    transition: transform 0.2s ease;
}

.filter-btn-with-dropdown.active .subcategory-badge {
    background: rgba(255, 255, 255, 0.3);
}

.subcategory-badge.visible {
    display: inline-block;
    transform: scale(1);
}

/* Chevron indicator for dropdown */
.filter-btn-with-dropdown::after {
    content: '';
    display: inline-block;
    margin-left: 0.2rem;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid currentColor;
    width: 0;
    height: 0;
    transition: transform 0.18s ease;
}

/* --- New Clean CSS Dropdown --- */

.filter-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(6px);
    overflow: hidden;
    transform-origin: top;
    transform: scaleY(0.85);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.18, 0.75, 0.35, 1.15);
    z-index: 2000;
}

.filter-dropdown.open {
    opacity: 1;
    transform: scaleY(1);
    pointer-events: auto;
}

.filter-dropdown.flip {
    top: auto;
    bottom: calc(100% + 6px);
    transform-origin: bottom;
}

.filter-dropdown-item {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    user-select: none;
    position: relative;
    padding-left: 2.5rem;
}

.filter-dropdown-item + .filter-dropdown-item {
    border-top: 1px solid rgba(0,0,0,0.04);
}

.filter-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.filter-dropdown-item:active {
    background: rgba(0, 0, 0, 0.06);
}

/* Selected dropdown item styling */
.filter-dropdown-item.selected {
    background: rgba(61, 90, 74, 0.08);
    color: var(--primary-color);
    font-weight: 600;
}

.filter-dropdown-item.selected:hover {
    background: rgba(61, 90, 74, 0.12);
}

.filter-dropdown-item.selected::before {
    content: '✓';
    position: absolute;
    left: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1rem;
}

/* Projects grid / cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
    margin-top: 0.8rem;
}

.project-card {
    background: #f9f7f3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-card.hidden {
    display: none;
}

.project-card-image {
    position: relative;
    width: 100%;
    height: 224px;
    overflow: hidden;
    background: var(--bg-light);
}

.project-card-image img,
.project-card-image svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.hab-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d8e8d5 0%, #c5d9c0 100%);
    padding: 1.6rem;
}

.hab-card-image svg {
    object-fit: contain;
    max-width: 100%;
    height: auto;
}

.project-card:hover .project-card-image img {
    transform: scale(1.1);
}

.project-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(74, 144, 226, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.view-details-btn {
    color: white;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.64rem 1.44rem;
    border: 2px solid white;
    border-radius: 20px;
    transition: var(--transition);
}

.project-card:hover .view-details-btn {
    background: white;
    color: var(--primary-color);
}

.project-card-content {
    padding: 1.44rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.28rem 0.72rem;
    border-radius: 16px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    width: fit-content;
}

.project-card-title {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.64rem;
    line-height: 1.3;
}

.project-card-description {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Shared Modal Styles (Project & Challenge) */
.project-modal,
.challenge-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 1.6rem;
}

.project-modal.active,
.challenge-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.project-modal-overlay,
.challenge-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(45, 40, 32, 0.85);
    backdrop-filter: blur(8px);
}

.project-modal-content,
.challenge-modal-content {
    position: relative;
    background: white;
    border-radius: 13px;
    width: 80vw;
    height: 70vh;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.4);
    animation: slideUp 0.4s ease;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-modal-close,
.challenge-modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: var(--accent-color);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 0;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 2;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-modal-close:hover,
.challenge-modal-close:hover {
    background: #a67c52;
    transform: rotate(90deg);
}

.project-modal-body,
.challenge-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    height: 100%;
    position: relative;
}

.project-modal-image-section,
.challenge-modal-image-section {
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.project-modal-image-section img,
.challenge-modal-image-section img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
}

.project-modal-image-section img:hover,
.challenge-modal-image-section img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.project-modal-info-section,
.challenge-modal-info-section {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    position: relative;
    scroll-behavior: smooth;
}

/* Scroll indicator gradient - shows there's more content below */
.project-modal-info-section::after,
.challenge-modal-info-section::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show gradient when scrolled (controlled via JS or CSS) */
.project-modal-info-section:not(:hover)::after,
.challenge-modal-info-section:not(:hover)::after {
    opacity: 1;
}

/* Custom scrollbar for modal info sections */
.project-modal-info-section::-webkit-scrollbar,
.challenge-modal-info-section::-webkit-scrollbar {
    width: 8px;
}

.project-modal-info-section::-webkit-scrollbar-track,
.challenge-modal-info-section::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

.project-modal-info-section::-webkit-scrollbar-thumb,
.challenge-modal-info-section::-webkit-scrollbar-thumb {
    background: rgba(61,139,111,0.4);
    border-radius: 4px;
}

.project-modal-info-section::-webkit-scrollbar-thumb:hover,
.challenge-modal-info-section::-webkit-scrollbar-thumb:hover {
    background: rgba(61,139,111,0.6);
}

/* Firefox scrollbar styling */
.project-modal-info-section,
.challenge-modal-info-section {
    scrollbar-width: thin;
    scrollbar-color: rgba(61,139,111,0.4) rgba(0,0,0,0.05);
}

.project-modal-title,
.challenge-modal-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 700;
}

.project-modal-description,
.challenge-modal-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Project-Specific Modal Content */
.project-modal-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    width: fit-content;
}

.project-modal-lead {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.project-modal-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* Challenge-Specific Modal Content */
.challenge-modal-day {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.challenge-modal-full-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 1.2rem;
    opacity: 0.9;
}

/* HAB Visual */
.hab-visual {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
}

.hab-visual svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

/* Contact Section */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.contact-item p {
    color: var(--text-secondary);
    margin: 0;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 2px solid transparent;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.contact-icon-large {
    font-size: 3rem;
    margin-right: 1rem;
}

.contact-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-size: 1.3rem;
}

.contact-card p {
    color: var(--primary-color);
    margin: 0;
    font-weight: 500;
}

.link-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.contact-card:hover .link-arrow {
    transform: translateX(5px);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    text-align: center;
    padding: 3rem 0;
}

.footer p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.9);
}

.footer-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 40, 32, 0.95);
    z-index: 10002;
    align-items: center;
    justify-content: center;
    padding: 1.6rem;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: var(--transition);
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus,
button:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .split-container {
        min-height: auto;
    }

    .split-left,
    .split-right {
        padding: 2.4rem 1.6rem;
    }

    .skills-circle {
        width: 280px;
        height: 280px;
    }

    .orbit-1 { width: 160px; height: 160px; }
    .orbit-2 { width: 240px; height: 240px; }
    .orbit-3 { width: 320px; height: 320px; }

    /* Grid: 3 columns on tablet */
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }

    .project-modal-content,
    .challenge-modal-content {
        width: 85vw;
        height: auto;
        max-height: 80vh;
    }

    .project-modal-body,
    .challenge-modal-body {
        grid-template-columns: 1fr;
    }

    .project-modal-image-section,
    .challenge-modal-image-section {
        padding: 1.5rem;
    }

    .project-modal-info-section,
    .challenge-modal-info-section {
        padding: 1.5rem;
    }

    /* Unified Hero: Tablet */
    .hero-profile-photo img {
        width: 192px;
        height: 192px;
    }

    .hero-bio-section {
        padding: 2rem;
        gap: 1.6rem;
    }

    .skills-grid {
        gap: 1.2rem;
    }

    .connect-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 100%;
        flex-direction: column;
        background-color: var(--bg-light);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 1.6rem 0;
        margin-top: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Split Screen becomes Stacked on Mobile */
    .split-container,
    .split-container.reverse {
        flex-direction: column;
        min-height: auto;
    }

    .split-left,
    .split-right {
        padding: 2rem 1.2rem;
        min-height: auto;
    }

    .split-section {
        min-height: auto;
    }

    .section {
        padding: 2.4rem 0;
    }

    /* Unified Hero: Mobile */
    .unified-hero {
        min-height: auto;
        padding: 64px 12px 48px;
    }

    .hero-header {
        margin-bottom: 2rem;
    }

    .hero-bio-section {
        flex-direction: column;
        padding: 1.6rem 1.2rem;
        gap: 1.6rem;
        margin-bottom: 2.4rem;
    }

    .hero-profile-photo {
        text-align: center;
    }

    .hero-profile-photo img {
        width: 160px;
        height: 160px;
    }

    .bio-lead,
    .bio-secondary {
        text-align: center;
    }

    /* Compact skills/connect on mobile */
    .hero-skills-compact,
    .hero-connect-compact {
        flex-direction: column;
        align-items: center;
        margin-top: 0.8rem;
    }

    .skills-compact-list,
    .connect-compact-list {
        justify-content: center;
    }

    .skill-chip {
        padding: 0.28rem 0.56rem;
    }

    .skill-chip-icon {
        font-size: 0.8rem;
    }

    .skill-chip-text {
        font-size: 0.6rem;
    }

    .connect-btn {
        padding: 0.36rem 0.72rem;
    }

    .connect-btn-icon {
        font-size: 0.8rem;
    }

    .connect-btn-text {
        font-size: 0.8rem;
    }

    /* Grid: 1 column on mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .project-card-image {
        height: 176px;
    }

    .project-modal,
    .challenge-modal {
        padding: 0.5rem;
    }

    .project-modal-content,
    .challenge-modal-content {
        width: 95vw;
        height: 80vh;
    }

    .project-modal-close,
    .challenge-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .project-modal-body,
    .challenge-modal-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .project-modal-image-section,
    .challenge-modal-image-section {
        padding: 1rem;
        max-height: 50vh;
        min-height: 200px;
    }

    .project-modal-info-section,
    .challenge-modal-info-section {
        padding: 1rem;
        min-height: auto;
        height: auto;
        overflow-y: visible;
        overflow-x: hidden;
    }

    /* Remove scroll indicator gradient on mobile since parent scrolls */
    .project-modal-info-section::after,
    .challenge-modal-info-section::after {
        display: none;
    }

    .project-modal-title,
    .challenge-modal-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .project-modal-lead,
    .challenge-modal-day {
        font-size: 0.875rem;
        margin-bottom: 0.6rem;
    }

    .project-modal-description,
    .challenge-modal-description,
    .challenge-modal-full-description {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .project-modal-category {
        font-size: 0.75rem;
        padding: 0.35rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 1.6rem 0;
    }

    .split-left,
    .split-right {
        padding: 1.6rem 0.8rem;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 0.96rem; }

    .project-filters {
        gap: 0.4rem;
    }

    .filter-btn {
        padding: 0.4rem 0.96rem;
        font-size: 0.72rem;
    }

    .skills-circle {
        width: 200px;
        height: 200px;
    }

    .skill-center {
        font-size: 2rem;
    }

    .orbit-1 { width: 96px; height: 96px; }
    .orbit-2 { width: 144px; height: 144px; }
    .orbit-3 { width: 200px; height: 200px; }

    .contact-card {
        padding: 1.2rem;
    }

    .contact-icon-large {
        font-size: 2rem;
    }

    /* Modal improvements for small screens */
    .project-modal-content,
    .challenge-modal-content {
        width: 98vw;
        height: auto;
        max-height: 90vh;
    }

    .project-modal-body,
    .challenge-modal-body {
        grid-template-rows: auto auto;
        height: auto;
        max-height: calc(90vh - 60px); /* Account for close button */
    }

    .project-modal-info-section,
    .challenge-modal-info-section {
        padding: 0.75rem;
        height: auto;
        min-height: auto;
    }

    .project-modal-title,
    .challenge-modal-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .project-modal-lead,
    .challenge-modal-day {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .project-modal-description,
    .challenge-modal-description,
    .challenge-modal-full-description {
        font-size: 0.75rem;
        line-height: 1.55;
    }

    .project-modal-category {
        font-size: 0.65rem;
        padding: 0.3rem 0.7rem;
        margin-bottom: 0.5rem;
    }

    .project-modal-image-section,
    .challenge-modal-image-section {
        padding: 0.75rem;
        max-height: 45vh;
    }
}

/* ========================================
   30 Day Map Challenge 2025 - Calendar Styles
   ======================================== */

.challenge-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 5.5rem 0 0 0;
    background: transparent;
    overflow: hidden;
}

.challenge-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0;
    padding-bottom: 1.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    min-width: 80%;
    max-height: 100vh;
    overflow: hidden;
    margin: 0 auto;
}

.challenge-header {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.challenge-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    margin-top: 0;
}

.challenge-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.calendar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: none;
    width: 100%;
    margin: 0 auto;
    min-height: 0;
}

.calendar-header {
    display: none; /* Hide day-of-week labels */
}

.day-label {
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0.25rem;
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: clamp(0.5rem, 1vw, 1rem);
    min-height: 0;
}

.calendar-day {
    height: 100%;
    width: 100%;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
    min-height: 0;
}

.calendar-day:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
    box-shadow: none;
}

.calendar-day.empty:hover {
    transform: none;
}

.calendar-day-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.calendar-day-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.calendar-algae-filler {
    background: linear-gradient(135deg, #d8e8d5 0%, #c5d9c0 100%);
    padding: 1.6rem;
    object-fit: contain;
}

.calendar-day-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    color: white;
    padding: 1.5rem 0.75rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    z-index: 1;
}

/* Responsive Calendar Styles */
@media (max-width: 1024px) {
    .calendar-day-title {
        font-size: 0.7rem;
        padding: 1.2rem 0.6rem 0.6rem;
    }

    .challenge-wrapper {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Allow scrolling on mobile */
    .challenge-section {
        height: auto;
        min-height: 100vh;
        overflow: auto;
        padding: 6rem 0 0 0;
    }

    .challenge-wrapper {
        padding-top: 0;
        padding-bottom: 3rem;
        padding-left: 1rem;
        padding-right: 1rem;
        max-height: none;
        overflow: visible;
    }

    .calendar-container {
        overflow: visible;
    }

    .calendar-grid {
        grid-template-rows: auto; /* Let rows size naturally */
    }

    .calendar-day {
        aspect-ratio: 1; /* Restore aspect ratio on mobile */
        height: auto;
    }

    .calendar-day-number {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }

    .calendar-day-title {
        font-size: 0.65rem;
        padding: 1rem 0.5rem 0.5rem;
    }

}

@media (max-width: 480px) {
    .calendar-day {
        border-radius: 8px;
    }

    .calendar-day-number {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.7rem;
        top: 0.25rem;
        left: 0.25rem;
    }

    .calendar-day-title {
        font-size: 0.6rem;
        padding: 0.8rem 0.4rem 0.4rem;
    }

    .day-label {
        font-size: 0.7rem;
        padding: 0.4rem 0.2rem;
    }

    .challenge-modal .modal-body {
        padding: 4.8rem;
    }

    .challenge-wrapper {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-buttons,
    .project-filters,
    .footer,
    .lightbox,
    .scroll-progress {
        display: none;
    }

    .split-section {
        min-height: auto;
        page-break-inside: avoid;
    }

    .split-container {
        flex-direction: column;
        min-height: auto;
    }

    body {
        background: white;
    }
}
