/* CSS Variables */
:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a2e;
    --color-text-muted: #6b7280;
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-accent: #0891b2;
    --color-border: #e5e7eb;
    --color-success: #059669;
    --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

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

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

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

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

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.5px;
}

.logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    margin-right: 10px;
}

.logo img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    color: var(--color-text-muted);
    transition: var(--transition);
}

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

/* Hero Section */
.hero {
    padding: 120px 0;
    background: linear-gradient(135deg, #184d71 0%, #fafafa 100%);
    text-align: center;
    border-bottom-left-radius: 100% 25%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-bg);
    margin-bottom: 40px;
}

/* Scroll Arrow */
.scroll-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    transition: var(--transition);
    animation: bounce 2s infinite;
}

.scroll-arrow:hover {
    background: var(--color-primary-dark);
    transform: scale(1.1);
    animation-play-state: paused;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

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

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

/* Section Styles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
    text-align: center;
}

/* Projects Section */
.projects {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

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

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

.project-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f3f4f6;
}

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

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

.project-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.project-content {
    padding: 24px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.project-link:hover {
    gap: 8px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 2px dashed var(--color-border);
}

/* Contact Section */
.contact {
    padding: 88px 0 100px;
    background: linear-gradient(180deg, #f3f4f6 0%, var(--color-surface) 28%);
    border-top: 1px solid var(--color-border);
}

.contact-inner {
    max-width: 920px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.contact-intro {
    padding-right: clamp(0px, 3vw, 1rem);
}

.contact-kicker {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.contact-headline {
    font-size: clamp(1.65rem, 3.5vw, 2.125rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--color-text);
}

.contact-lead {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--color-text-muted);
    max-width: 34ch;
}

.contact-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: clamp(1.25rem, 4vw, 2rem);
    box-shadow: var(--shadow-sm);
}

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

.contact-messages {
    margin: 0 0 0.25rem;
}

.contact-toast {
    margin: 0;
    padding: 12px 14px 12px 16px;
    border-radius: 10px;
    font-size: 0.9375rem;
    line-height: 1.45;
    border-left: 3px solid transparent;
}

.contact-toast--success {
    background: #f0fdf9;
    color: #0d5745;
    border-left-color: #34d399;
}

.contact-toast--error {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: #f87171;
}

.contact-toast--warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: #fbbf24;
}

.contact-toast--info,
.contact-toast--debug {
    background: #eff6ff;
    color: #1e40af;
    border-left-color: #60a5fa;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-panel .form-group label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--color-text);
    letter-spacing: 0.01em;
}

.form-group label {
    font-weight: 500;
    font-size: 0.95rem;
}

.contact-panel .form-group input,
.contact-panel .form-group textarea {
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
    color: var(--color-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.contact-panel .form-group input::placeholder,
.contact-panel .form-group textarea::placeholder {
    color: #9ca3af;
}

.contact-panel .form-group input:hover,
.contact-panel .form-group textarea:hover {
    border-color: #d1d5db;
    background: var(--color-surface);
}

.contact-panel .form-group input:focus,
.contact-panel .form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group input,
.form-group textarea {
    padding: 14px 16px;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    transition: var(--transition);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-panel .form-group textarea {
    min-height: 132px;
    line-height: 1.5;
}

.btn-contact {
    width: 100%;
    justify-content: center;
    margin-top: 0.25rem;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    background: var(--color-text);
    color: #fff;
    transition: background 0.2s ease, transform 0.15s ease;
}

.btn-contact:hover {
    background: #2d2d44;
}

.btn-contact:active {
    transform: scale(0.99);
}

.btn-contact:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

/* Messages (global, e.g. admin) */
.messages {
    margin-bottom: 8px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.alert-success {
    background: #ecfdf5;
    color: var(--color-success);
    border: 1px solid #a7f3d0;
}

/* Footer */
.footer {
    padding: 48px 0;
    background: var(--color-text);
    color: white;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

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

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

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

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 80px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        align-items: stretch;
    }

    .contact-intro {
        padding-right: 0;
        text-align: center;
    }

    .contact-lead {
        max-width: none;
        margin: 0 auto;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

