/*
 * FILE: css/index.css
 * Portfolio Stylesheet for David St John - Principal DevSecOps Engineer
 * Mobile-first responsive design with proper viewport handling - FIXED MOBILE MENU
 */

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

:root {
    --primary-color: #00ff88;
    --secondary-color: #0066ff;
    --accent-color: #ff0066;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ANIMATED BACKGROUND */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(0, 102, 255, 0.05), transparent);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* NAVIGATION - FIXED MOBILE ISSUES */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 2px 20px rgba(0, 255, 136, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* MOBILE MENU TOGGLE - HIDDEN BY DEFAULT */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* DESKTOP NAVIGATION - ALWAYS VISIBLE ON DESKTOP */
.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* MOBILE NAVIGATION OVERLAY - HIDDEN BY DEFAULT */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: none;
    flex-direction: column;
}

.mobile-nav-overlay.active {
    left: 0;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.mobile-logo {
    font-size: 1.2rem;
    font-weight: bold;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.mobile-nav-close:hover {
    color: var(--accent-color);
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    flex: 1;
}

.mobile-nav-links li {
    margin-bottom: 0.5rem;
}

.mobile-nav-links a {
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-links a:hover {
    color: var(--primary-color);
    padding-left: 1rem;
    background: rgba(0, 255, 136, 0.05);
}

.mobile-nav-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-3);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

/* HERO SECTION - FIXED MOBILE LAYOUT */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}

.hero-content {
    max-width: 900px;
    width: 100%;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
    font-size: 0.8rem;
}

.hero h1 {
    font-size: clamp(2rem, 8vw, 5rem);
    margin-bottom: 0.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 5vw, 2.2rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    animation: fadeInUp 1s ease 0.2s both;
    line-height: 1.3;
}

.hero-description {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 2rem;
    line-height: 1.6;
    animation: fadeInUp 1s ease 0.4s both;
}

/* HERO STATS - FIXED MOBILE GRID */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    animation: fadeInUp 1s ease 0.5s both;
}

.stat-highlight {
    text-align: center;
    padding: 0.5rem;
}

.stat-highlight .stat-number {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: bold;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-highlight .stat-label {
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.2;
}

/* HERO HIGHLIGHTS - FIXED MOBILE STACKING */
.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    margin: 2rem 0;
    animation: fadeInUp 1s ease 0.6s both;
}

.highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(0, 255, 136, 0.1);
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: var(--text-primary);
    font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.highlight:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
}

.highlight i {
    color: var(--primary-color);
    font-size: 1rem;
    flex-shrink: 0;
}

/* BUTTONS - FIXED MOBILE STACKING */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.8s both;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

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

.btn-secondary {
    background: var(--gradient-2);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

/* SECTIONS - CONSISTENT SPACING */
section {
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ACHIEVEMENTS GRID - FIXED MOBILE LAYOUT */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.achievement-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, var(--card-bg) 100%);
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transition: left 0.5s ease;
}

.achievement-card:hover::before {
    left: 100%;
}

.achievement-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.2);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.achievement-icon i {
    font-size: 1.8rem;
    color: white;
}

.achievement-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.achievement-metric {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.achievement-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.achievement-proof {
    margin-top: 1rem;
}

.proof-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.proof-link:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* SKILLS GRID - RESPONSIVE CARDS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transition: left 0.5s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.1);
}

.skill-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* PROJECTS SECTION - FIXED MOBILE CARDS */
.featured-project {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 4rem;
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.featured-project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-3);
}

.featured-project-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.featured-project h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.featured-project p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.tech-tag {
    background: rgba(0, 102, 255, 0.1);
    color: var(--secondary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 102, 255, 0.3);
}

.project-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(0, 102, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 102, 255, 0.2);
    border-color: var(--secondary-color);
}

.project-header {
    padding: 1.5rem;
    background: var(--gradient-1);
    color: white;
}

.project-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-body {
    padding: 1.5rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.github-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* TIMELINE - FIXED MOBILE LAYOUT */
.timeline {
    position: relative;
    margin: 3rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-3);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 60px;
}

.timeline-item.featured {
    background: rgba(0, 255, 136, 0.05);
    padding: 1.5rem;
    padding-left: 60px;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.timeline-dot {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.featured-dot {
    width: 25px;
    height: 25px;
    left: 7.5px;
    background: var(--gradient-2);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.8);
}

.timeline-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.1);
}

.featured-content {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.achievement-highlight {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 255, 136, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin: 1rem 0;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.achievement-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.achievement-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.achievement-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* CONTACT SECTION - ENHANCED WITH CLICKABLE CARDS */
.contact-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-intro p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 0, 102, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 30px rgba(255, 0, 102, 0.1);
}

/* CLICKABLE CONTACT CARDS */
.contact-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.contact-card-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transition: left 0.5s ease;
}

.contact-card-link:hover::before {
    left: 100%;
}

.contact-card-link:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.2);
    border-color: var(--primary-color);
}

.contact-card-link:hover .contact-icon {
    transform: scale(1.1);
    color: var(--primary-color);
}

.contact-card-link:hover h3 {
    color: var(--primary-color);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.contact-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.contact-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.resume-links {
    margin-top: 1rem;
}

.resume-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-3);
    color: white;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.resume-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

.contact-cta {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    margin-top: 4rem;
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.contact-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-3);
}

.contact-cta h3 {
    color: var(--text-primary);
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    margin-bottom: 1rem;
}

.contact-cta p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    margin-bottom: 2rem;
}

/* MODAL - FIXED MOBILE RESPONSIVE */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 1rem;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid var(--primary-color);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    margin-bottom: 0.5rem;
}

.modal-header .subtitle {
    color: var(--primary-color);
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    font-weight: 600;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-color);
}

.resume-preview {
    background: var(--dark-bg);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.resume-preview h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resume-highlights {
    list-style: none;
    padding: 0;
}

.resume-highlights li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resume-highlights li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
}

.resume-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.resume-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
}

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

.resume-btn-secondary {
    background: var(--gradient-2);
    color: white;
}

.resume-btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.resume-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
}

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

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

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* LOADING SPINNER */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 255, 136, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc6f;
}

/* MOBILE RESPONSIVE - PROPER BREAKPOINT MANAGEMENT */
@media (max-width: 768px) {
    /* Show mobile menu toggle, hide desktop nav */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    /* Enable mobile nav overlay */
    .mobile-nav-overlay {
        display: flex;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .hero {
        padding: 1rem 0.5rem;
        min-height: 90vh;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .hero-highlights {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .btn {
        padding: 12px 20px;
        justify-content: center;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .featured-project {
        padding: 1.5rem;
    }

    .featured-project-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skills-grid,
    .projects-container {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-dot {
        left: 5px;
    }

    .featured-dot {
        left: 2.5px;
    }

    .timeline-item.featured {
        padding-left: 50px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .resume-actions {
        grid-template-columns: 1fr;
    }

    section {
        padding: 2rem 1rem;
    }

    .mobile-nav-links a {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }

    .stat-highlight {
        padding: 0.3rem;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-dot {
        left: 0;
        width: 16px;
        height: 16px;
    }

    .featured-dot {
        left: -2px;
        width: 20px;
        height: 20px;
    }

    .modal-content {
        padding: 1rem;
    }

    .mobile-nav-links a {
        font-size: 1rem;
        padding: 0.8rem 0;
    }

    .mobile-contact-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* DESKTOP BREAKPOINT - CRITICAL FIX */
@media (min-width: 769px) {
    /* Force hide all mobile navigation elements on desktop */
    .mobile-menu-toggle {
        display: none !important;
    }

    .mobile-nav-overlay {
        display: none !important;
    }

    /* Ensure desktop navigation is always visible */
    .nav-links {
        display: flex !important;
    }

    /* Reset any mobile menu state */
    body {
        overflow: auto !important;
    }

    body.mobile-menu-open {
        overflow: auto !important;
    }
}

/* PRINT STYLES */
@media print {
    .bg-animation,
    nav,
    .modal,
    .mobile-nav-overlay,
    .mobile-menu-toggle {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    section {
        padding: 1rem 0;
    }
}

/* ACCESSIBILITY IMPROVEMENTS */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for keyboard navigation */
.mobile-menu-toggle:focus,
.mobile-nav-close:focus,
.contact-card-link:focus,
.btn:focus,
.resume-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}