/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --primary-green: #00A86B;
    --primary-green-light: #00D4AA;
    --primary-green-dark: #00995a;
    
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #f1f3f4;
    
    --text-dark: #1a1a1a;
    --text-gray: #5f6368;
    --text-light: #80868b;
    
    --border-light: #e8eaed;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    
    /* Navbar colors for light mode */
    --navbar-bg: rgba(0, 168, 107, 0.95);
    --navbar-text: rgba(255, 255, 255, 0.9);
    --navbar-hover-bg: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] {
    --bg-white: #1a1a1a;
    --bg-light: #2d2d2d;
    --bg-gray: #3c3c3c;
    
    --text-dark: #ffffff;
    --text-gray: #b0b0b0;
    --text-light: #808080;
    
    --border-light: #404040;
    
    /* Navbar colors for dark mode */
    --navbar-bg: rgba(0, 0, 0, 0.95);
    --navbar-text: rgba(255, 255, 255, 0.9);
    --navbar-hover-bg: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.header-left .greeting {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--navbar-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: white;
    background: var(--navbar-hover-bg);
    transform: translateY(-1px);
}

.nav-link i {
    font-size: 1rem;
    color: var(--primary-green-light);
}

.nav-link:hover i {
    color: white;
}

.nav-link span {
    display: none;
}

/* Show text on larger screens */
@media (min-width: 768px) {
    .nav-link span {
        display: inline;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Mobile menu toggle for smaller screens */
@media (max-width: 767px) {
    .header-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--navbar-bg);
        flex-direction: column;
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-light);
        z-index: 999;
    }
    
    .header-nav.mobile-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        padding: 1rem;
        border-radius: var(--border-radius);
        min-width: auto;
        justify-content: center;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link i {
        font-size: 1.2rem;
        min-width: 24px;
        margin-right: 0.5rem;
    }
    
    .nav-link span {
        display: inline !important;
        font-size: 1rem;
        color: white;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 20px;
        height: 16px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }
    
    .mobile-menu-toggle span {
        width: 100%;
        height: 2px;
        background: white;
        border-radius: 1px;
        transition: all 0.3s ease;
        transform-origin: center;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }
}

/* Hide mobile menu toggle on larger screens */
@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.theme-toggle {
    background: var(--navbar-hover-bg);
    border: none;
    color: var(--navbar-text);
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.theme-toggle i {
    font-size: 1.2rem;
}

/* ===== HERO SECTION ===== */
.hero {
    background: var(--primary-green);
    padding: 6rem 0 6rem 0;
    text-align: center;
    color: white;
    margin-top: 70px; /* Account for fixed header */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

.hero-link {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.hero-link:hover {
    opacity: 0.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

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

.hero-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.hero-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    background: var(--bg-white);
}

.content-section {
    padding: 4rem 0;
}

.content-section:nth-child(even) {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ABOUT SECTION ===== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.text-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.text-link:hover {
    text-decoration: underline;
}



/* ===== SKILLS SECTION ===== */
.skills-content {
    max-width: 1000px;
    margin: 0 auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
}

.category-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.skill-item:hover {
    background: var(--bg-gray);
    transform: translateY(-2px);
}

.skill-item i {
    font-size: 2rem;
    color: var(--primary-green);
}

.skill-item span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
}



/* ===== CONTACT SECTION ===== */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    justify-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 400px;
}

.contact-item {
    display: grid;
    grid-template-columns: 50px 1fr;
    align-items: center;
    gap: 1rem;
    width: 100%;
    text-align: left;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    grid-column: 1;
}

.contact-details {
    grid-column: 2;
}

.contact-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.contact-details a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
}

.contact-details a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    color: white;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-light);
    padding: 3rem 0;
    border-top: 1px solid var(--border-light);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

/* Mobile footer adjustments */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 0;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        width: 100%;
    }
    
    .footer-info {
        text-align: center;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

.footer-info h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-info p {
    color: var(--text-gray);
    font-size: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-green-dark);
    transform: translateY(-1px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        justify-items: center;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .contact-info {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
        text-align: center;
        width: 100%;
        grid-template-columns: 50px 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .social-links {
        flex-direction: row;
        justify-content: center;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .social-links {
        flex-direction: row;
        justify-content: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        justify-content: center;
    }
    
    /* Ensure mobile styles are properly applied */
    .hero {
        padding: 4rem 0 4rem 0;
    }
    
    .hero-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.3rem);
    }
    
    .content-section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .skill-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .skill-item {
        padding: 0.75rem;
    }
    
    .skill-item i {
        font-size: 1.5rem;
    }
    
    .skill-item span {
        font-size: 0.8rem;
    }
    
    .contact-icon,
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0 4rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .content-section {
        padding: 3rem 0;
    }
    
    .skill-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

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

.skill-category,
.project-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.skill-category:nth-child(1) { animation-delay: 0.1s; }
.skill-category:nth-child(2) { animation-delay: 0.2s; }
.skill-category:nth-child(3) { animation-delay: 0.3s; }

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }
.project-card:nth-child(7) { animation-delay: 0.7s; }
.project-card:nth-child(8) { animation-delay: 0.8s; }

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
/* Ensure proper viewport handling */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Fix mobile touch targets */
@media (max-width: 768px) {
    .nav-link,
    .theme-toggle,
    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Ensure proper spacing on mobile */
    .header-content {
        padding: 0 1rem;
        height: 70px;
    }
    
    /* Improve mobile performance */
    .header {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
    
    /* Ensure mobile menu is above other content */
    .header-nav {
        z-index: 1000;
    }
}

/* ===== FOCUS STYLES ===== */
*:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* ===== SELECTION STYLES ===== */
::selection {
    background: rgba(0, 168, 107, 0.3);
    color: inherit;
}

::-moz-selection {
    background: rgba(0, 168, 107, 0.3);
    color: inherit;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== PRINT STYLES ===== */
@media print {
    .header {
        display: none;
    }
    
    .hero {
        background: white !important;
        color: black !important;
        padding: 2rem 0;
    }
    
    .skill-category,
    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
} 