/* style.css */
:root {
    --primary-color: #6366f1; /* Modern Indigo */
    --secondary-color: #8b5cf6; /* Modern Violet */
    --accent-color: #ec4899; /* Pink accent */
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f3f4f6;
    --surface-color: #ffffff;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --text-color: #f3f4f6;
    --text-light: #9ca3af;
    --bg-color: #0f172a; /* Slate 900 */
    --surface-color: #1e293b; /* Slate 800 */
    --card-bg: #1e293b;
    --border-color: #334155;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, .logo {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* CONTAINER */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

body.dark-mode header {
    background: rgba(15, 23, 42, 0.7);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s;
}

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

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

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

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

#mode-toggle, .menu-toggle {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mode-toggle:hover, .menu-toggle:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--primary-color);
}

body.dark-mode #mode-toggle:hover {
    background-color: rgba(255,255,255,0.1);
}

.menu-toggle {
    display: none;
}

/* HERO SECTION */
#home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.home-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.home-content {
    flex: 1;
    z-index: 1;
}

.greeting {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
}

.home-content h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.home-buttons {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.btn {
    padding: 0.9rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    border-color: var(--border-color);
    color: var(--text-color);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

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

.social-links-hero a {
    font-size: 1.6rem;
    color: var(--text-light);
    transition: var(--transition);
}

.social-links-hero a:hover {
    color: var(--primary-color);
    transform: translateY(-3px) scale(1.1);
}

.home-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.img-wrapper {
    position: relative;
    width: 380px;
    height: 380px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    border: 5px solid var(--surface-color);
    box-shadow: var(--shadow);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% { border-radius: 60% 40% 30% 70%/60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40%/50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70%/60% 30% 70% 40%; }
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-light);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 10;
}

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

/* SECTIONS */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

/* ABOUT */
#about {
    background-color: var(--surface-color);
}

.about-content {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
    text-align: left;
    border: 1px solid var(--border-color);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.about-text strong {
    color: var(--primary-color);
}

/* PROJECTS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--surface-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

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

.card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.btn-sm {
    padding: 0.6rem 1.4rem;
    background: white;
    color: #333;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.project-card:hover .btn-sm {
    transform: translateY(0);
}

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

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

.card-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex: 1;
}

.tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tags span {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
}

/* CONTACT */
.contact-container {
    max-width: 700px;
    text-align: center;
}

.contact-desc {
    margin-bottom: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.contact-form {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
    text-align: left;
    border: 1px solid var(--border-color);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    background: transparent;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-light);
    pointer-events: none;
    transition: 0.3s ease;
    background: var(--surface-color);
    padding: 0 5px;
}

/* Floating Label Animation */
.form-group input:focus,
.form-group input:not(:placeholder-shown),
.form-group textarea:focus,
.form-group textarea:not(:placeholder-shown) {
    border-color: var(--primary-color);
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 10px;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.send-btn {
    width: 100%;
    justify-content: center;
    font-size: 1.1rem;
    padding: 1rem;
}

/* FOOTER */
footer {
    padding: 3rem 0;
    text-align: center;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.footer-socials {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-socials a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: 0.3s;
}

.footer-socials a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ANIMATIONS */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 968px) {
    .home-content h1 {
        font-size: 3rem;
    }
    
    .img-wrapper {
        width: 320px;
        height: 320px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--surface-color);
        flex-direction: column;
        padding: 3rem 2rem;
        gap: 2rem;
        text-align: center;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-links.nav-active {
        transform: translateX(0);
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }

    .home-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .home-content {
        padding-top: 0;
    }

    .home-buttons {
        justify-content: center;
    }
    
    .social-links-hero {
        justify-content: center;
    }

    .img-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .home-content h1 {
        font-size: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 2rem;
    }
}
