:root {
    --primary: #889759;
    --primary-light: #A3B075;
    --secondary: #3a7567;
    --accent: #D4A574;
    --light: #F5F5F5;
    --dark: #2A2B2A;
    --darker: #1A1A1A;
    --text-light: #FFFFFF;
    --text-dark: #1A1A1A;
    --gray: #8D8D92;
    --gray-light: #D7D6D6;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --radius: 8px;
}

.dark-mode {
    --primary: #7c7c7c;
    --primary-light: #FF8FA3;
    --secondary: #3a7567;
    --accent: #dab86b;
    --light: #1A1A1A;
    --dark: #F5F5F5;
    --darker: #2A2B2A;
    --text-light: #F5F5F5;
    --text-dark: #1A1A1A;
    --gray: #5D5E60;
    --gray-light: #36413E;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light);
    overflow-x: hidden;
    transition: var(--transition);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.dark-mode h1, 
.dark-mode h2, 
.dark-mode h3, 
.dark-mode h4 {
    color: var(--text-light);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

h2:after {
    content: '';
    position: absolute;
    width: 60%;
    height: 4px;
    background: var(--primary);
    bottom: -10px;
    left: 0;
    border-radius: 10px;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.dark-mode p {
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

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

.btn:hover:before {
    left: 100%;
}

.btn:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

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

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

/* Enhanced Animated Toggle Button */
.theme-toggle {
    position: relative;
    width: 70px;
    height: 35px;
    background: var(--primary);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: none;
    overflow: hidden;
}

.theme-toggle:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 31px;
    height: 31px;
    background: white;
    border-radius: 50%;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 2;
}

.theme-toggle.active:before {
    transform: translateX(35px) rotate(180deg);
}

.theme-toggle-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    color: white;
    z-index: 1;
}

.theme-toggle-icons i {
    font-size: 16px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.theme-toggle .fa-sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.theme-toggle .fa-moon {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

.theme-toggle.active .fa-sun {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

.theme-toggle.active .fa-moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease, visibility 1s ease;
}

.splash-content {
    text-align: center;
}

.splash-logo {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.splash-text {
    font-size: 1.5rem;
    color: var(--text-light);
    animation: fadeIn 2s ease;
    font-weight: 400;
}

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

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: var(--primary);
    animation: loading 3s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: var(--light);
    box-shadow: var(--shadow);
}

.dark-mode header {
    background: var(--darker);
}

header.scrolled {
    padding: 15px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 40px;
}

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

.dark-mode .nav-links a {
    color: var(--text-light);
}

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

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

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

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-dark);
    transition: var(--transition);
    z-index: 1001;
}

.dark-mode .hamburger {
    color: var(--text-light);
}

.hamburger:hover {
    transform: scale(1.1);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--light);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        z-index: 999;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .dark-mode .nav-links {
        background: var(--darker);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 20px 0;
    }

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

    .hamburger {
        display: block;
    }
    
    .theme-toggle {
        margin-left: 0;
        margin-top: 20px;
    }
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    background: var(--light);
    position: relative;
    overflow: hidden;
}

.dark-mode .hero {
    background: var(--darker);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
    animation: slideInLeft 1s ease;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: slideInLeft 1.2s ease;
    min-height: 120px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    animation: slideInLeft 1.4s ease;
}

.hero-image {
    position: relative;
    text-align: center;
    animation: slideInRight 1s ease;
}

.profile-img {
    width: 100%;
    max-width: 400px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
    border: 5px solid var(--primary);
    transition: var(--transition);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* About Section */
.about {
    background: var(--light);
}

.dark-mode .about {
    background: var(--darker);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.skill {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
    animation: bounceIn 1s ease;
}

.skill:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--primary-light);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Projects Section */
.projects {
    background: var(--gray-light);
}

.dark-mode .projects {
    background: var(--gray);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    animation: zoomIn 0.8s ease;
}

.dark-mode .project-card {
    background: var(--darker);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-img {
    height: 220px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

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

.project-content {
    padding: 25px;
}

.project-content h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.project-tag {
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.project-tag:hover {
    transform: scale(1.1);
    background: var(--primary-light);
}

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

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    padding: 15px;
    border-radius: var(--radius);
}

.contact-item:hover {
    background: rgba(138, 154, 91, 0.05);
    transform: translateX(10px);
}

.dark-mode .contact-item:hover {
    background: rgba(255, 101, 132, 0.05);
}

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

.contact-item:hover .contact-icon {
    transform: rotate(15deg) scale(1.1);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--light);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow);
    animation: bounce 2s infinite;
}

.dark-mode .social-link {
    background: var(--darker);
    color: var(--text-light);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px) scale(1.1);
    animation: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

.contact-form {
    background: var(--light);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: slideInUp 1s ease;
}

.dark-mode .contact-form {
    background: var(--darker);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.dark-mode .form-group label {
    color: var(--text-light);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: var(--light);
    color: var(--text-dark);
}

.dark-mode .form-control {
    background: var(--darker);
    border-color: var(--gray);
    color: var(--text-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138, 154, 91, 0.2);
    transform: scale(1.02);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

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

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25D366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: var(--shadow);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3); }
    50% { box-shadow: 0 3px 15px rgba(37, 211, 102, 0.5); }
    100% { box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3); }
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    animation: none;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 50px 0 20px;
    text-align: center;
}

.dark-mode footer {
    background: #0d0d0d;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
}

.footer-links {
    display: flex;
    gap: 30px;
    list-style: none;
    margin-bottom: 30px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.footer-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

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

.footer-links a:hover {
    color: var(--accent);
}

.copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    color: rgba(255, 255, 255, 0.7);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Typing Animation */
.typing-container {
    position: relative;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background-color: var(--primary);
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content, .about-content, .contact-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .hero-btns {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
}

@media (max-width: 576px) {
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}