:root {
    --bg: #f3f4f6;
    --bg-elevated: #ffffff;
    --fg: #0a0d0f;
    --fg-muted: #5a6068;
    --primary: #3763d7;
    --primary-hover: #2c50b0;
    --border: rgba(55, 99, 215, 0.18);
    --shadow-sm: 0 1px 2px rgba(15, 22, 36, 0.04);
    --shadow-md: 0 6px 24px rgba(15, 22, 36, 0.08);
    --shadow-lg: 0 18px 48px rgba(15, 22, 36, 0.12);
    --radius: 14px;
    --max-width: 1100px;
    --font: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0d10;
        --bg-elevated: #14181d;
        --fg: #e9ecf1;
        --fg-muted: #98a0ac;
        --primary: #5a82e6;
        --primary-hover: #7a9cef;
        --border: rgba(120, 150, 230, 0.18);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--fg);
    background: var(--bg);
    background-image:
        radial-gradient(1200px 600px at 80% -10%, rgba(55, 99, 215, 0.10), transparent 60%),
        radial-gradient(800px 500px at -10% 30%, rgba(57, 206, 170, 0.08), transparent 60%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
}

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

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

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

header {
    padding: 3rem 0 1.5rem;
}

.logo-wrap {
    display: flex;
    justify-content: center;
}

.logo-wrap img {
    width: 100%;
    max-width: 520px;
    height: auto;
}

main {
    padding: 1rem 0 4rem;
}

section {
    margin: 3.5rem 0;
}

.intro {
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.intro h1 {
    font-size: clamp(1.8rem, 2.5vw + 1rem, 2.6rem);
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.intro h1 .accent {
    background: linear-gradient(120deg, var(--primary), #39ceaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.intro p {
    color: var(--fg-muted);
    font-size: 1.075rem;
    margin: 0;
}

.section-title {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin: 0 0 1.5rem;
    text-align: center;
    font-weight: 600;
}

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

.tech-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.25rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    box-shadow: var(--shadow-sm);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tech-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(55, 99, 215, 0.5);
}

.tech-card img {
    width: 38px;
    height: 38px;
}

.tech-card span {
    font-size: 0.92rem;
    color: var(--fg-muted);
}

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

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 200ms ease, box-shadow 200ms ease;
    height: 100%;
}

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

.project-thumb {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(55, 99, 215, 0.12), rgba(57, 206, 170, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-thumb img {
    max-width: 60%;
    max-height: 75%;
    object-fit: contain;
}

.project-body {
    padding: 1.25rem 1.25rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-body h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.project-body p {
    margin: 0;
    color: var(--fg-muted);
    font-size: 0.95rem;
}

.project-link {
    margin-top: auto;
    padding-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 3rem;
    margin-top: 4rem;
    color: var(--fg-muted);
    text-align: center;
}

.contact {
    margin: 0 0 1.25rem;
    font-size: 1rem;
}

.contact .email {
    color: var(--primary);
    font-weight: 500;
    margin-left: 0.4rem;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.socials a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
    font-size: 0.95rem;
}

.socials a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(55, 99, 215, 0.06);
}

.socials img,
.socials svg {
    width: 22px;
    height: 22px;
    display: block;
}

.analytics {
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.analytics a {
    color: var(--fg-muted);
    opacity: 0.7;
    transition: color 160ms ease, opacity 160ms ease;
}

.analytics a:hover {
    color: var(--primary);
    opacity: 1;
}

.copyright {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
}

@media (max-width: 600px) {
    header {
        padding: 2rem 0 0.5rem;
    }
    section {
        margin: 2.5rem 0;
    }
    .socials {
        flex-wrap: wrap;
    }
}
