*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --card-bg: #ffffff;
    --card-border: #e5e5e5;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --link-color: #c45a3b;
    --link-hover: #a3482f;
    --hero-overlay: rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #f0f0f0;
        --text-muted: #999999;
        --card-bg: #252525;
        --card-border: #333333;
        --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
        --link-color: #e8967f;
        --link-hover: #f0b8a8;
        --hero-overlay: rgba(0, 0, 0, 0.4);
    }
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.hero {
    position: relative;
    height: 280px;
    background-image: url('images/hero.jpg');
    background-size: cover;
    background-position: center 40%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

.hero h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.02em;
}

.hero p {
    margin: 0.5rem 0 0;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

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

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: var(--card-border);
}

.card-image-phone {
    object-fit: contain;
    background: #1a1a1a;
}

.card-content {
    padding: 1.5rem;
}

.card-content h2 {
    margin: 0 0 0.75rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
}

.card-content p {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card-link {
    display: inline-block;
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.card-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .hero {
        height: 220px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

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

    main {
        padding: 2rem 1rem;
    }
}
