/* ===== VARIABLES & RESET ===== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #94a3b8;
    --accent-color: #f59e0b;
    --text-dark: #f1f5f9;
    --text-light: #cbd5e1;
    --bg-light: #0f172a;
    --bg-white: #1e293b;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: var(--transition);
}

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

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.1rem;
}

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

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.75rem;
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

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

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

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

.btn-secondary:hover {
    background-color: #475569;
}

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

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

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    box-shadow: var(--shadow);
}

.header-content h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.header-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* ===== NAVIGATION ===== */
nav {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.nav-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    display: block;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(30deg);
    background-color: var(--bg-light);
}

/* Bottom Navigation for Mobile */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.75rem;
    transition: var(--transition);
    flex: 1;
    padding: 0.5rem;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--primary-color);
}

.bottom-nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border-radius: var(--border-radius);
    font-weight: 500;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    flex-direction: column;
    padding: 1rem;
}

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

.mobile-menu a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.mobile-menu a:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* ===== SECTIONS ===== */
section {
    padding: 3rem 0;
    margin-bottom: 60px; /* Space for bottom nav */
}

section:nth-child(even) {
    background-color: var(--bg-white);
}

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

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

/* ===== SKILLS SECTION ===== */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-category {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.skill-item {
    margin-bottom: 1.25rem;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.skill-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* ===== PROJECTS SECTION ===== */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.project-img {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-img img,
.project-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-img-link {
    display: block;
    position: relative;
    height: 100%;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-img-link:hover .project-overlay {
    opacity: 1;
}

.view-project-text {
    color: white;
    font-weight: 600;
}

.project-content {
    padding: 1.5rem;
}

.project-description {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.project-features,
.tech-stack,
.value-proposition,
.user-benefits,
.solution-section {
    margin-bottom: 1.5rem;
}

.features-list,
.value-list,
.solution-list,
.highlights-list {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.features-list li,
.value-list li,
.solution-list li,
.highlights-list li {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

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

.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag.backend {
    background-color: #dbeafe;
    color: #1e40af;
}

[data-theme="dark"] .tag.backend {
    background-color: #1e3a8a;
    color: #dbeafe;
}

.tag.frontend {
    background-color: #f0f9ff;
    color: #0369a1;
}

[data-theme="dark"] .tag.frontend {
    background-color: #0c4a6e;
    color: #f0f9ff;
}

.tag.security {
    background-color: #fef2f2;
    color: #dc2626;
}

[data-theme="dark"] .tag.security {
    background-color: #7f1d1d;
    color: #fef2f2;
}

.tag.mobile {
    background-color: #f0fdf4;
    color: #166534;
}

[data-theme="dark"] .tag.mobile {
    background-color: #14532d;
    color: #f0fdf4;
}

.tag.api {
    background-color: #faf5ff;
    color: #7c3aed;
}

[data-theme="dark"] .tag.api {
    background-color: #5b21b6;
    color: #faf5ff;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* User Benefits Section */
.user-benefits h4,
.solution-section h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.benefit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.benefit-icon {
    font-size: 1.5rem;
}

.benefit-text {
    flex: 1;
    color: var(--text-dark);
}

/* ===== CONTACT SECTION ===== */
.contact-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info h3,
.contact-form h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    background-color: var(--bg-white);
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

/* ===== FOOTER ===== */
footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 60px; /* Space for bottom nav */
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ===== DESKTOP STYLES ===== */
@media (min-width: 768px) {
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Header */
    header .container {
        flex-direction: row;
        text-align: left;
        gap: 2rem;
    }
    
    /* Navigation */
    .nav-toggle {
        display: none;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .mobile-menu {
        display: none !important;
    }
    
    /* Skills */
    .skills-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .skill-category {
        flex: 1;
        min-width: 300px;
    }
    
    /* Projects */
    .benefit-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Contact */
    .contact-container {
        flex-direction: row;
    }
    
    .contact-info,
    .contact-form {
        flex: 1;
    }
    
    /* Sections */
    section {
        margin-bottom: 0;
    }
    
    footer {
        margin-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .project-actions {
        flex-wrap: nowrap;
    }
    
    .project-actions .btn {
        flex: 1;
    }
}