@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Manrope:wght@500;600;700;800&display=swap");

:root {
    --bg: #efefef;
    --text: #181818;
    --muted: #4b4b4b;
    --line: #d3d3d3;
    --accent: #1d4f91;
    --max-width: 1140px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 7.2rem;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.6;
    background:
        radial-gradient(circle at 90% 10%, rgba(157, 184, 221, 0.2), transparent 24%),
        radial-gradient(circle at 12% 26%, rgba(29, 79, 145, 0.1), transparent 22%),
        var(--bg);
}

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

.site-header {
    position: fixed;
    top: 0.8rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: min(var(--max-width), 92vw);
    margin: 0;
    padding: 0.7rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(239, 239, 239, 0.9);
    backdrop-filter: blur(6px);
}

#logo {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-family: "Manrope", "Inter", Arial, sans-serif;
    font-weight: 700;
}

#top-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 0.35rem;
}

#top-menu a {
    display: inline-block;
    padding: 0.52rem 0.8rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    color: #383838;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#top-menu a:hover,
#top-menu li.active a {
    background: #ffffff;
    border-color: #d9d9d9;
    color: #121212;
}

#top-menu a:focus-visible,
.mission-linkedin:focus-visible,
.project-text a:focus-visible,
.contact-form button:focus-visible,
.contact-form input:focus-visible,
.contact-form textarea:focus-visible,
.contact-item a:focus-visible {
    outline: 2px solid #4f76aa;
    outline-offset: 2px;
}

main {
    width: min(var(--max-width), 92vw);
    margin: 0 auto;
    padding-top: 5.8rem;
}

.section {
    padding: 4.2rem 0;
    border-top: 1px solid var(--line);
    scroll-margin-top: 7.2rem;
}

.section:first-of-type {
    border-top: none;
}

.section h2 {
    margin: 0 0 1.7rem;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.03;
}

.section-home {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 2.2rem;
    align-items: center;
    position: relative;
}

.hero-content {
    min-width: 0;
}

.subtitle {
    margin: 0 0 1.1rem;
    font-size: 0.96rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #555;
}

.intro {
    margin: 0 0 1.1rem;
    font-size: 1rem;
    color: #222;
    text-wrap: pretty;
}

.mission {
    margin: 0;
    padding: 0.8rem 0.95rem;
    border-left: 3px solid #202020;
    background: rgba(255, 255, 255, 0.45);
    font-size: 0.98rem;
}

.mission-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.55rem;
    padding: 0.24rem 0.55rem;
    border: 1px solid #c9c9c9;
    border-radius: 999px;
    background: #fff;
    color: #1d4f91;
    font-size: 0.9rem;
    vertical-align: middle;
}

.mission-linkedin:hover {
    border-color: #9db8dd;
    background: #f7fbff;
}

.profile-img {
    width: clamp(220px, 28vw, 320px);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 8px;
    justify-self: end;
    border: 1px solid #e0e0e0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

#skills .skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.7rem;
}

.skills-list li {
    background: #f9f9f9;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    padding: 0.68rem 0.72rem;
    font-size: 0.95rem;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.project-card {
    grid-column: span 4;
    background: linear-gradient(180deg, #fbfbfb, #f7f7f7);
    border: 1px solid #d6d6d6;
    border-radius: 14px;
    min-height: 230px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    min-width: 0;
    display: flex;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #111, #4b4b4b);
    opacity: 0.1;
}

.project-card:hover {
    transform: translateY(-2px);
    border-color: #c7c7c7;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.project-text {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.project-text h3 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.75rem;
    line-height: 1;
    letter-spacing: 0.01em;
}

.project-text p {
    margin: 0;
    color: #2f2f2f;
    font-size: 0.94rem;
    line-height: 1.55;
}

.project-text a {
    text-decoration: none;
    color: var(--accent);
    border-bottom: 1px solid rgba(29, 79, 145, 0.35);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.project-text a:hover {
    color: #12396d;
    border-color: rgba(18, 57, 109, 0.75);
}

#contact .section-contact-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.8rem;
    align-items: start;
}

.contact-form {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    background: #fafafa;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    font: inherit;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    background: white;
    color: #171717;
    padding: 0.78rem 0.85rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #6e8db8;
    box-shadow: 0 0 0 3px rgba(157, 184, 221, 0.3);
}

.contact-form button {
    justify-self: start;
    border: 1px solid #222;
    border-radius: 999px;
    background: #111;
    color: #fff;
    padding: 0.7rem 1rem;
    font: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.contact-form button:hover {
    transform: translateY(-1px);
    background: #2d2d2d;
}

.contact-meta {
    padding: 0.4rem 0;
}

.contact-meta h3 {
    margin: 0 0 1rem;
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    line-height: 1;
}

.contact-item {
    margin-bottom: 1.3rem;
}

.contact-item .label {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #555;
}

.contact-item p,
.contact-item a {
    margin: 0;
    font-size: 1.05rem;
    color: #1f1f1f;
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .section-home {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .profile-img {
        justify-self: start;
        width: min(360px, 100%);
    }

    .project-card {
        grid-column: span 6;
        min-height: 0;
    }

    #contact .section-contact-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
        top: 0.5rem;
        padding: 0.65rem 0;
    }

    #top-menu {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .section {
        padding: 2.9rem 0;
    }

    .project-card {
        grid-column: span 12;
        min-height: 0;
    }

    .project-text h3 {
        font-size: 1.7rem;
    }

    .contact-form {
        padding: 0.8rem;
    }

    main {
        padding-top: 7rem;
    }
}
