/* ============================================
   CSS Variables & Theme System
   ============================================ */

/* Default theme: Dark */
:root {
    /* Primary Colors */
    --color-primary: #ef476f;
    --color-secondary: #ffd166;
    --color-accent: #06ffa5;
    --color-background: #01212b;
    --color-surface: #0a2f3d;
    --color-text: #ffffff;
    --color-text-secondary: #b0b0b0;
    --color-border: #1a3a4a;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] {
    /* Primary Colors */
    --color-primary: #6ce5b1;
    --color-secondary: #f3eeea;
    --color-accent: #ed8299;
    --color-background: #ffffff;
    --color-surface: #f8f9fa;
    --color-text: #1a1a1a;
    --color-text-secondary: #666666;
    --color-border: #e0e0e0;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

:root[data-theme="dark"] {
    /* Primary Colors */
    --color-primary: #ef476f;
    --color-secondary: #ffd166;
    --color-accent: #06ffa5;
    --color-background: #01212b;
    --color-surface: #0a2f3d;
    --color-text: #ffffff;
    --color-text-secondary: #b0b0b0;
    --color-border: #1a3a4a;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Reset & Base Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: sticky;
    top: 0;
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(var(--color-background), 0.95);
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.theme-toggle {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-surface);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--color-border);
    }

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

    .menu-toggle {
        display: flex;
    }
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    padding: 8rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-background) 100%);
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    top: 50%;
    left: 10%;
    animation-delay: -10s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    bottom: 20%;
    right: 15%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) rotate(180deg) scale(0.9);
    }
    75% {
        transform: translate(20px, 10px) rotate(270deg) scale(1.05);
    }
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 71, 111, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(239, 71, 111, 0);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat .stat-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

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

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

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

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

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

.btn-glow {
    box-shadow: 0 0 20px rgba(239, 71, 111, 0.4);
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 0 40px rgba(239, 71, 111, 0.6);
    transform: translateY(-3px);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* ============================================
   Sections
   ============================================ */

.projects, .services, .about, .contact {
    padding: 6rem 0;
}

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

.section-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 1.2rem;
    margin-bottom: 4rem;
}

/* ============================================
   Projects Grid
   ============================================ */

.projects {
    background-color: var(--color-surface);
}

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

.project-card {
    background-color: var(--color-background);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.project-image {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    padding: 2rem;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.project-screenshot {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mockup-screen {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    width: 90%;
    height: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.mockup-screen.mobile {
    width: 180px;
    height: 320px;
    border-radius: 20px;
    border: 8px solid #1a1a1a;
}

.mockup-content {
    color: #1a1a1a;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.terminal-line {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.terminal-line.green {
    color: #10b981;
}

.code-line {
    margin-bottom: 0.4rem;
}

.keyword {
    color: #ef476f;
    font-weight: 600;
}

.function {
    color: #6ce5b1;
    font-weight: 600;
}

.comment {
    color: #999999;
    font-style: italic;
}

.dashboard-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.dashboard-stat {
    display: inline-block;
    margin: 0.5rem 1rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #6ce5b1;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
}

.mobile-header {
    background-color: #6ce5b1;
    color: #ffffff;
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    margin: -1.5rem -1.5rem 1rem;
}

.mobile-button {
    background-color: #6ce5b1;
    color: #ffffff;
    padding: 1rem;
    margin: 0.75rem 0;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.mobile-button.secondary {
    background-color: #e0e0e0;
    color: #1a1a1a;
}

.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #666;
}

.form-field input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.success-message {
    background-color: #10b981;
    color: #ffffff;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    margin-top: 1rem;
}

.emoji-display {
    font-size: 4rem;
    margin: 2rem 0 1rem;
}

.quote-text {
    color: #666;
    font-style: italic;
}

.website-header {
    background-color: #6ce5b1;
    color: #ffffff;
    padding: 1rem;
    font-weight: 700;
    margin: -1.5rem -1.5rem 1rem;
}

.website-content {
    padding: 1rem;
}

.content-block {
    background-color: #e0e0e0;
    height: 40px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.content-block.small {
    height: 20px;
    width: 70%;
}

.kanban-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.kanban-item {
    background-color: #f3eeea;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #6ce5b1;
}

.mockup-content.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.project-content p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

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

.tech-tag {
    background-color: var(--color-surface);
    color: var(--color-text);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
}

.project-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.project-link-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* ============================================
   Services Grid
   ============================================ */

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

.service-card {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.service-card p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.service-card.service-featured {
    background: linear-gradient(135deg, var(--color-surface), var(--color-background));
    border: 2px solid var(--color-primary);
    position: relative;
    overflow: hidden;
}

.service-card.service-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.service-card.service-featured:hover {
    box-shadow: 0 0 30px rgba(239, 71, 111, 0.2);
}

/* ============================================
   About Section
   ============================================ */

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.about-image {
    display: flex;
    justify-content: center;
}

.avatar-placeholder {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 800;
    color: #ffffff;
    box-shadow: var(--shadow-lg);
}

.avatar-animated {
    animation: avatarGlow 3s ease-in-out infinite;
}

@keyframes avatarGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(239, 71, 111, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(6, 255, 165, 0.6);
    }
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

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

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.skill-category h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.skill-category p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Contact Section
   ============================================ */

.contact {
    background-color: var(--color-surface);
    text-align: center;
}

.contact-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-content p {
    color: var(--color-text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.contact-note {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    opacity: 0.8;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background-color: var(--color-background);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0;
}

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

.footer-content p {
    color: var(--color-text-secondary);
}

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

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* ============================================
   Animations
   ============================================ */

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

.project-card,
.service-card {
    animation: fadeIn 0.6s ease-out;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .projects, .services, .about, .contact {
        padding: 3rem 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Accessibility
   ============================================ */

.btn:focus,
.nav-link:focus,
.theme-toggle:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
