/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Fira+Code:wght@400;500;600&display=swap');

/* CSS Variables - Light Mode */
:root {
    --primary: oklch(0.35 0.15 260);
    --primary-foreground: oklch(0.98 0 0);
    --accent: oklch(0.65 0.22 142);
    --accent-foreground: oklch(0.98 0 0);
    --secondary: oklch(0.92 0.01 260);
    --secondary-foreground: oklch(0.15 0.02 260);
    --muted: oklch(0.95 0.005 0);
    --muted-foreground: oklch(0.5 0.01 0);
    --background: oklch(0.99 0 0);
    --foreground: oklch(0.15 0.02 0);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.15 0.02 0);
    --border: oklch(0.92 0.004 286.32);
}

/* Dark Mode */
body.dark {
    --primary: oklch(0.45 0.12 260);
    --primary-foreground: oklch(0.98 0 0);
    --background: oklch(0.08 0.01 0);
    --foreground: oklch(0.95 0.005 0);
    --card: oklch(0.12 0.01 0);
    --card-foreground: oklch(0.95 0.005 0);
    --secondary: oklch(0.18 0.01 260);
    --secondary-foreground: oklch(0.85 0.005 0);
    --muted: oklch(0.2 0.01 0);
    --muted-foreground: oklch(0.7 0.005 0);
    --border: oklch(1 0 0 / 10%);
}

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

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(var(--background), 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .navbar-content {
        height: 5rem;
    }
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.navbar-brand:hover {
    opacity: 0.8;
}

@media (min-width: 768px) {
    .navbar-brand {
        font-size: 2.25rem;
    }
}

/* Desktop Menu */
.desktop-menu {
    display: none;
    align-items: center;
    gap: 2rem;
}

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

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

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

/* Theme Toggle */
.theme-toggle {
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1.5px solid #D4A843;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    color: var(--foreground);
}

.theme-toggle:hover {
    background-color: var(--secondary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Mobile Menu Controls */
.mobile-menu-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .mobile-menu-controls {
        display: none;
    }
}

.mobile-menu-btn {
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.mobile-menu-btn:hover {
    background-color: var(--secondary);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.mobile-menu.active {
    display: flex;
}

.mobile-nav-link {
    padding: 0.75rem 0;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.mobile-nav-link:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .hero {
        padding: 5rem 0;
    }
}

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

@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

.hero-title .highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    font-weight: 500;
}

.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--primary);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(var(--foreground), 0.8);
    line-height: 1.8;
    max-width: 28rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img-wrapper {
    position: relative;
    width: 100%;
    max-width: 20rem;
    height: 24rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.dark .profile-img-wrapper {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.profile-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(var(--primary), 0.2), transparent);
}

/* Tech Section */
.tech-section {
    margin-top: 2rem;
}

.tech-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

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

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    background-color: oklch(0.4 0.15 260);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary), 0.3);
}

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

@media (min-width: 768px) {
    .btn-secondary:hover {
        background-color: oklch(0.55 0.2 142);
        color: #fff;
        border-color: oklch(0.55 0.2 142);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.btn-link {
    background: none;
    color: var(--primary);
    padding: 0;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.btn-link:hover:not(:disabled) {
    color: var(--accent);
}

.btn-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-contact {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-contact.email {
    background-color: var(--primary-foreground);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-contact.email:hover {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: #1a1a1a;
}

.btn-contact.linkedin,
.btn-contact.instagram,
.btn-contact.youtube,
.btn-contact.whatsapp {
    background-color: transparent;
    color: var(--primary-foreground);
    border-color: var(--primary-foreground);
}

@media (min-width: 768px) {

    .btn-contact.linkedin:hover,
    .btn-contact.instagram:hover,
    .btn-contact.youtube:hover,
    .btn-contact.whatsapp:hover {
        background-color: oklch(0.55 0.2 142);
        color: #fff;
        border-color: oklch(0.55 0.2 142);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Sections */
.about,
.portfolio {
    padding: 3rem 0;
}

@media (min-width: 768px) {

    .about,
    .portfolio {
        padding: 5rem 0;
    }
}

.about {
    background-color: rgba(var(--secondary), 0.3);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

/* About Section */
.about-container {
    max-width: 56rem;
}

.about-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-subtitle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.375rem;
    font-weight: 600;
}

.about-icon {
    color: var(--primary);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.about-item:nth-child(2) .about-icon {
    color: var(--accent);
}

.about-text {
    color: rgba(var(--foreground), 0.8);
    line-height: 1.8;
    font-size: 1.125rem;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    padding: 1.5rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card:hover {
    border-color: #22c55e;
    animation: projectGlow 1.5s ease-in-out infinite;
}

body.dark .project-card:hover {
    animation: projectGlowDark 1.5s ease-in-out infinite;
}

@keyframes projectGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(34, 197, 94, 0.35);
    }
}

@keyframes projectGlowDark {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
    }
    50% {
        box-shadow: 0 4px 24px rgba(34, 197, 94, 0.5);
    }
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.project-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.project-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.project-status.completed {
    background-color: rgba(var(--accent), 0.2);
    color: var(--accent);
}

.project-status.developing {
    background-color: rgba(var(--secondary), 0.5);
    color: var(--secondary-foreground);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.project-description {
    color: rgba(var(--foreground), 0.7);
    font-size: 1rem;
}

/* Contact Section */
.contact {
    background-color: var(--primary);
    color: var(--primary-foreground);
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .contact {
        padding: 5rem 0;
    }
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    max-width: 56rem;
    margin: 0 auto;
}

.contact-title {
    font-size: 2rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .contact-title {
        font-size: 2.25rem;
    }
}

.contact-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

@media (max-width: 640px) {
    .contact-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-contact {
        width: 100%;
        justify-content: center;
    }
}

/* Footer */
.footer {
    background-color: var(--card);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.footer-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

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

.footer-links a {
    color: var(--foreground);
    transition: color 0.3s ease;
}

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

.footer-links svg {
    width: 20px;
    height: 20px;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 40;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--primary), 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.scroll-top-btn:hover {
    background-color: oklch(0.4 0.15 260);
    transform: scale(1.1);
}

body.dark .scroll-top-btn {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Utility Classes */
.highlight {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}