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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --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);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body {
    margin: 0;
}

/* Dark Mode */
.dark-mode {
    --text-dark: #f3f4f6;
    --text-light: #d1d5db;
    --bg-light: #111827;
    --bg-white: #1f2937;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.dark-mode .main-header,
.dark-mode .portfolio-section,
.dark-mode .contact-form-wrapper {
    background: var(--bg-white);
}

.dark-mode .hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
}

/* Sidebar Layout */
.layout-sidebar {
    display: flex;
    min-height: 100vh;
}

.sidebar-header {
    width: 280px;
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    right: 0;
    z-index: 1000;
}

.sidebar-header-content {
    padding: 0 1.5rem;
}

.sidebar-logo {
    height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 1rem;
}

.sidebar-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.sidebar-header .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-header .sidebar-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
}

.sidebar-header .sidebar-nav a:hover,
.sidebar-header .sidebar-nav a.active {
    background: var(--primary-color);
    color: white;
}

.main-wrapper {
    flex: 1;
    margin-right: 280px;
    width: calc(100% - 280px);
}

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

/* Header */
.main-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.header-logo {
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.site-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

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

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

/* Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: var(--gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    width: 100%;
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
}

.hero-text {
    text-align: center;
    padding: 4rem 0;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

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

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Portfolio Section */
.portfolio-section {
    padding: 5rem 0;
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
    font-weight: 700;
}

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

.portfolio-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

/* Card Styles */
.modern-card {
    border-radius: 16px;
    background: linear-gradient(145deg, var(--bg-white), var(--bg-light));
}

.classic-card {
    border-radius: 4px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
}

.minimal-card {
    border-radius: 0;
    box-shadow: none;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
}

.card-image {
    height: 250px;
    background: var(--border-color);
    overflow: hidden;
    position: relative;
}

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

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

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.no-projects {
    text-align: center;
    color: var(--text-light);
    font-size: 1.25rem;
    grid-column: 1 / -1;
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.125rem;
}

.contact-item .icon {
    font-size: 1.5rem;
}

.contact-form-wrapper {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Main Content */
.main-content {
    flex: 1;
    width: 100%;
}

/* Footer */
.main-footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
}

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

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}

.main-footer p {
    opacity: 0.8;
}

/* Auth Pages */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-box {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.auth-box form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    /* Sidebar responsive */
    .sidebar-header {
        width: 100%;
        position: relative;
        height: auto;
        padding: 1rem 0;
    }
    
    .main-wrapper {
        margin-right: 0;
        width: 100%;
    }
    
    .layout-sidebar {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .auth-box {
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

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

.portfolio-card {
    animation: fadeIn 0.5s ease;
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}
