/* ===== VARIABLES & FOUNDATIONS ===== */
:root {
    --primary-green: #8fbc8f;
    --dark-green: #5a7a5a;
    --accent-green: #b4d4a8;
    --warm-gold: #d4a574;
    --earth-brown: #6b5d4f;
    --bg-dark: #1a1a1a;
    --bg-darker: #0d0d0d;
    --text-light: #f5f5f5;
    --text-muted: #b8b8b8;
    --card-bg: rgba(42, 42, 38, 0.85);
    --card-border: rgba(143, 188, 143, 0.25);
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-strong: 0 8px 40px rgba(0, 0, 0, 0.6);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: 
        linear-gradient(135deg, 
            rgba(13, 13, 13, 0.85) 0%,
            rgba(26, 26, 26, 0.75) 50%,
            rgba(13, 13, 13, 0.85) 100%),
        url('background.jpg') center/cover fixed;
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Blur overlay for background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/static/background.jpg') center/cover fixed;
    filter: blur(8px);
    z-index: -1;
    opacity: 0.3;
}

/* Floating particles background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(143, 188, 143, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 165, 116, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(90, 122, 90, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    animation: floatParticles 20s ease-in-out infinite;
}

@keyframes floatParticles {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* ===== HEADER & NAVIGATION ===== */
header {
    position: relative;
    z-index: 100;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(26, 26, 26, 0.7) 100%);
    backdrop-filter: blur(15px) saturate(1.2);
    border-bottom: 1px solid var(--card-border);
    padding: 2rem 2rem 3rem;
    text-align: center;
    box-shadow: var(--shadow-subtle);
}

nav {
    margin-bottom: 2rem;
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    top: -1rem;
    right: 1rem;
    z-index: 1000;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--primary-green);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

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

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

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

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-green));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--primary-green);
    background: rgba(168, 201, 165, 0.1);
}

nav a:hover::before {
    width: 80%;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 0.8s ease-out;
}

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

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    animation: fadeIn 1s ease-out 0.3s both;
}

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

/* ===== MAIN CONTENT ===== */
main {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(15px) saturate(1.2);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--shadow-subtle);
    transition: var(--transition-smooth);
    opacity: 0;
    transform: translateY(30px);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section:hover {
    border-color: rgba(143, 188, 143, 0.5);
    box-shadow: 0 8px 30px rgba(143, 188, 143, 0.2), 0 4px 15px rgba(212, 165, 116, 0.1);
    transform: translateY(-5px);
}

section h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-green);
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), transparent);
    border-radius: 2px;
}

/* ===== ABOUT SECTION ===== */
.about-intro, .about-highlight {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(143, 188, 143, 0.08);
    border-left: 4px solid var(--primary-green);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.about-intro:hover, .about-highlight:hover {
    background: rgba(143, 188, 143, 0.15);
    transform: translateX(5px);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(143, 188, 143, 0.1);
    border-radius: 15px;
    border: 1px solid var(--card-border);
    transition: var(--transition-bounce);
}

.stat-item:hover {
    background: rgba(143, 188, 143, 0.2);
    transform: translateY(-10px) scale(1.05);
    border-color: var(--primary-green);
    box-shadow: 0 10px 25px rgba(143, 188, 143, 0.3), 0 5px 15px rgba(212, 165, 116, 0.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== EDUCATION & CERTIFICATIONS ===== */
.education-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(143, 188, 143, 0.08);
    border-radius: 12px;
    border-left: 4px solid var(--dark-green);
}

.education-item h3 {
    color: var(--accent-green);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.institution {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.period {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: italic;
}

.cert-title {
    color: var(--accent-green);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    background: rgba(143, 188, 143, 0.08);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

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

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

.cert-card:hover {
    background: rgba(143, 188, 143, 0.15);
    border-color: var(--primary-green);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(143, 188, 143, 0.25), 0 5px 15px rgba(212, 165, 116, 0.15);
}

.cert-clickable .cert-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 1rem;
    height: 100%;
}

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

.cert-content h4 {
    color: var(--primary-green);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cert-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== PROJECTS SECTION ===== */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-list.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner {
    font-size: 3rem;
    animation: spin 2s linear infinite;
}

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

.project {
    background: rgba(143, 188, 143, 0.08);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 2rem;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project:hover {
    background: rgba(143, 188, 143, 0.15);
    border-color: var(--primary-green);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(143, 188, 143, 0.3), 0 8px 20px rgba(212, 165, 116, 0.15);
}

.project h3 {
    color: var(--accent-green);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.project p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.repo-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
    margin-top: auto;
}

.btn:hover {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(143, 188, 143, 0.4), 0 3px 10px rgba(212, 165, 116, 0.2);
}

/* ===== SKILLS SECTION ===== */
.skills-category {
    margin-bottom: 2rem;
}

.skills-category h3 {
    color: var(--accent-green);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(168, 201, 165, 0.3);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
}

.skills-list li {
    background: rgba(143, 188, 143, 0.12);
    color: var(--text-light);
    padding: 0.7rem 1.2rem;
    border-radius: 20px;
    font-size: 0.95rem;
    border: 1px solid var(--card-border);
    transition: var(--transition-bounce);
    cursor: default;
}

.skills-list li:hover {
    background: linear-gradient(135deg, var(--primary-green), var(--warm-gold));
    color: var(--bg-dark);
    transform: translateY(-5px) rotate(2deg);
    box-shadow: 0 5px 15px rgba(143, 188, 143, 0.4), 0 3px 10px rgba(212, 165, 116, 0.3);
}

/* Hidden skills and show more button */
.hidden-skill {
    display: none;
}

.collapsible-skills.expanded .hidden-skill {
    display: inline-flex;
    animation: fadeInSkill 0.3s ease forwards;
}

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

.show-more-btn {
    background: rgba(143, 188, 143, 0.15) !important;
    color: var(--primary-green) !important;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    border: 2px dashed var(--card-border) !important;
    padding: 0.7rem 1.5rem !important;
    transition: var(--transition-bounce);
    user-select: none;
}

.show-more-btn:hover {
    background: rgba(143, 188, 143, 0.25) !important;
    border-color: var(--primary-green) !important;
    transform: translateY(-5px) scale(1.1) !important;
    box-shadow: 0 5px 15px rgba(143, 188, 143, 0.4) !important;
}

.collapsible-skills.expanded .show-more-btn {
    background: rgba(212, 165, 116, 0.15) !important;
    color: var(--warm-gold) !important;
    border-color: var(--warm-gold) !important;
}

.collapsible-skills.expanded .show-more-btn::after {
    content: ' Show Less';
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== CONTACT FORM ===== */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-card {
    background: rgba(143, 188, 143, 0.08);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(143, 188, 143, 0.15), transparent);
    transition: left 0.6s ease;
}

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

.contact-card:hover {
    background: rgba(143, 188, 143, 0.15);
    border-color: var(--primary-green);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(143, 188, 143, 0.3), 0 8px 20px rgba(212, 165, 116, 0.2);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: float 3s ease-in-out infinite;
}

.contact-card h3 {
    color: var(--primary-green);
    font-size: 1.4rem;
    margin: 0.5rem 0;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.contact-link-arrow {
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-top: 0.5rem;
    transition: transform 0.3s ease;
}

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

.contact-location {
    text-align: center;
    padding: 2rem;
    background: rgba(143, 188, 143, 0.05);
    border-radius: 15px;
    border: 1px solid var(--card-border);
    margin-top: 1rem;
}

.contact-location p {
    margin: 0.5rem 0;
    font-size: 1.05rem;
    color: var(--text-light);
}

.contact-location strong {
    color: var(--primary-green);
}

/* Legacy form styles - kept for compatibility but not used */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

input, textarea {
    background: rgba(143, 188, 143, 0.08);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    background: rgba(143, 188, 143, 0.12);
    box-shadow: 0 0 0 4px rgba(143, 188, 143, 0.15), 0 0 0 6px rgba(212, 165, 116, 0.05);
}

button[type="submit"] {
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 1px;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(143, 188, 143, 0.4), 0 4px 15px rgba(212, 165, 116, 0.25);
}

/* ===== FOOTER ===== */
footer {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.7) 0%, rgba(13, 13, 13, 0.95) 100%);
    backdrop-filter: blur(15px) saturate(1.2);
    border-top: 1px solid var(--card-border);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

footer p {
    margin-bottom: 0.5rem;
}

.github-link {
    color: var(--primary-green);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.github-link:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(20px) saturate(1.2);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        border-left: 1px solid var(--card-border);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    nav ul.active {
        right: 0;
    }
    
    nav a {
        width: 100%;
        text-align: left;
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    section {
        padding: 1.5rem;
    }
    
    section h2 {
        font-size: 1.8rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .cert-grid, .project-list {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--dark-green), var(--primary-green), var(--accent-green));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: var(--bg-dark);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(143, 188, 143, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--accent-green), var(--warm-gold));
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(143, 188, 143, 0.5);
}

.back-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}
