:root {
    --bg: #171b27;
    --bg-2: #1b2130;
    --surface: #232938;
    --surface-2: #262c3c;
    --surface-3: #202634;
    --text: #f2f5fb;
    --muted: #dde4ef;
    --soft: #b8c1d2;
    --accent: #d7efff;
    --line: rgba(255, 255, 255, 0.04);
    --shadow: 0 12px 28px rgba(0, 0, 0, 0.24);

    --radius-lg: 24px;
    --radius-xl: 30px;
    --radius-full: 999px;

    --nav-height: 120px;
    --content-width: 1680px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.03), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, #141924 100%);
    color: var(--text);
    font-family: "Inter", sans-serif;
}

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

.page {
    width: min(calc(100% - 28px), 100%);
    margin: 0 auto;
}

.navbar {
    min-height: var(--nav-height);
    margin-top: 30px;
    background: linear-gradient(180deg, #202637 0%, #1f2635 100%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 88px;
}

.brand {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.8rem, 3vw, 4.1rem);
    line-height: 1;
    font-weight: 500;
    color: #eef2fb;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 58px;
}

.nav-links a {
    font-size: clamp(1.4rem, 1.25vw, 1.95rem);
    font-weight: 400;
    color: #d7e4f2;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    opacity: 0.82;
    transform: translateY(-1px);
}

.main-content {
    width: min(88%, var(--content-width));
    margin: 34px auto 0;
    padding-bottom: 36px;
}

.panel {
    background: linear-gradient(180deg, #262b3a 0%, #232837 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.projects-panel {
    min-height: 540px;
    padding: 34px 50px 42px;
}

.section-title {
    text-align: center;
    color: var(--accent);
    font-size: clamp(2.15rem, 2.1vw, 3.4rem);
    font-weight: 800;
    letter-spacing: 0.03em;
    margin-bottom: 28px;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 18px;
    padding: 8px 8px 0;
}

.project-item {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.project-item:last-child {
    border-bottom: none;
}

.project-item h3 {
    color: #f3f6fc;
    font-size: clamp(1.35rem, 1.38vw, 1.95rem);
    font-weight: 400;
    margin-bottom: 6px;
    line-height: 1.24;
}

.project-item p {
    color: var(--muted);
    font-size: clamp(1rem, 0.97vw, 1.25rem);
    line-height: 1.32;
}

.project-link {
    color: #f3f6fc;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
    cursor: pointer;
}

.project-link:hover {
    color: #d7efff;
    text-decoration: underline;
    text-underline-offset: 4px;
    transform: translateX(2px);
}

.project-link:active {
    transform: translateX(0);
}

.project-link:focus-visible {
    outline: 2px solid rgba(215, 239, 255, 0.65);
    outline-offset: 4px;
    border-radius: 6px;
}

.bottom-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1.05fr 1.1fr;
    gap: 28px;
}

.about-card,
.contact-card {
    min-height: 278px;
    padding: 34px 38px;
    position: relative;
    overflow: hidden;
}

.card-title {
    color: var(--accent);
    font-size: clamp(2rem, 1.95vw, 2.9rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.about-card p {
    max-width: 760px;
    color: #edf1f8;
    font-size: clamp(1.1rem, 1.16vw, 1.75rem);
    line-height: 1.55;
}

.contact-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    height: 100%;
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-list {
    list-style: none;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #eff4ff;
    font-size: clamp(1.1rem, 1.14vw, 1.7rem);
    line-height: 1.35;
    word-break: break-word;
}

.icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d9ecff;
    font-size: 1.9rem;
}

.profile-area {
    width: 240px;
    min-width: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-frame {
    width: 190px;
    height: 190px;
    padding: 8px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 28px rgba(0,0,0,0.24);
    position: relative;
}

.profile-frame::before {
    content: "";
    position: absolute;
    inset: -10px 10px 10px -10px;
    border-radius: 30px;
    background: rgba(255,255,255,0.025);
    z-index: 0;
}

.profile-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

@media (max-width: 1200px) {
    .navbar {
        padding: 24px 40px;
    }

    .main-content {
        width: min(94%, var(--content-width));
    }

    .profile-area {
        width: 220px;
        min-width: 220px;
    }

    .profile-frame {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 980px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        min-height: auto;
    }

    .nav-links {
        gap: 28px;
        flex-wrap: wrap;
    }

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

    .contact-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-area {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        padding-top: 8px;
    }
}

@media (max-width: 640px) {
    .page {
        width: min(calc(100% - 12px), 100%);
    }

    .navbar {
        margin-top: 12px;
        padding: 18px;
    }

    .main-content {
        width: calc(100% - 12px);
        margin-top: 12px;
        padding-bottom: 18px;
    }

    .projects-panel,
    .about-card,
    .contact-card {
        padding: 22px 18px 24px;
        border-radius: 22px;
    }

    .projects-grid {
        row-gap: 24px;
        padding: 4px 0 0;
    }

    .contact-list li {
        font-size: 1rem;
    }

    .profile-frame {
        width: 160px;
        height: 160px;
        border-radius: 22px;
    }

    .profile-img {
        border-radius: 16px;
    }
}
