@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --bg: #0c111d;
    --bg-soft: #11182a;
    --surface: #171f33;
    --surface-2: #1e2942;
    --text: #f4f7ff;
    --muted: #b2bdd3;
    --accent: #38bdf8;
    --accent-2: #22d3ee;
    --stroke: rgba(148, 163, 184, 0.22);
    --radius: 14px;
    --shadow-lg: 0 20px 45px rgba(9, 12, 20, 0.45);
    --shadow-sm: 0 10px 24px rgba(5, 8, 16, 0.28);
    --motion-smooth: 300ms cubic-bezier(0.22, 1, 0.36, 1);
    --motion-fast: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background:
        radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.16), transparent 35%),
        radial-gradient(circle at 90% 15%, rgba(56, 189, 248, 0.14), transparent 32%),
        linear-gradient(165deg, #0a0f1c 0%, #0c111d 50%, #10192d 100%);
}

a {
    color: inherit;
}

section {
    padding: 88px 9% 46px;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 14px 9%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: #070f22;
}

.logo {
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #f8fbff;
}

.logo span {
    color: #1f8bff;
}

#check {
    display: none;
}

.menu-btn {
    display: none;
    cursor: pointer;
    font-size: 30px;
    color: var(--text);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 26px;
}

.navbar a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: #c8d3e9;
    padding: 8px 14px;
    border-radius: 8px;
    transition: color var(--motion-fast), background-color var(--motion-fast), transform var(--motion-fast);
}

.navbar a:hover,
.navbar a.active {
    color: var(--accent);
    background: rgba(31, 139, 255, 0.15);
}

.navbar a:hover {
    transform: translateY(-1px);
}

.home {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 54px;
    align-items: center;
    min-height: 100vh;
    padding-top: 140px;
}

.home-content h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.15rem, 5vw, 3.7rem);
    line-height: 1.08;
    margin-bottom: 16px;
}

.home-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.02rem, 2.2vw, 1.4rem);
    color: #8fdafc;
    font-weight: 500;
    margin-bottom: 18px;
    max-width: 720px;
}

.home-content p {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 34px;
    max-width: 700px;
}

.home-img {
    justify-self: center;
    width: min(380px, 86vw);
    aspect-ratio: 4 / 5;
    border-radius: 30px;
    padding: 10px;
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.48), rgba(56, 189, 248, 0.2));
    box-shadow: var(--shadow-lg);
}

.home-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-box {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-box a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 152px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.94rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.btn-box a:first-child {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #061222;
    border-color: rgba(34, 211, 238, 0.65);
    letter-spacing: 0.02em;
    box-shadow: 0 12px 22px rgba(34, 211, 238, 0.24);
}

.btn-box a:first-child:hover {
    box-shadow: 0 16px 30px rgba(34, 211, 238, 0.33);
}

.btn-box a:nth-child(2) {
    background: rgba(149, 163, 184, 0.08);
    border-color: rgba(56, 189, 248, 0.4);
    color: #d5ebff;
}

.btn-box a:hover {
    transform: translateY(-2px);
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    text-align: center;
    margin-bottom: 28px;
    letter-spacing: 0.01em;
}

.text-blue {
    color: var(--accent);
}

.about-content {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
    color: var(--muted);
    background: linear-gradient(165deg, rgba(23, 31, 51, 0.94), rgba(17, 24, 42, 0.92));
    border-radius: var(--radius);
    padding: 30px 42px;
}

.about-content p {
    font-size: 1.08rem;
    margin-bottom: 14px;
    line-height: 1.95;
    color: #dbe7ff;
    text-align: justify;
    text-justify: inter-word;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-content::before,
.about-content::after {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    width: 2px;
    border-radius: 99px;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0.9), rgba(34, 211, 238, 0.16));
}

.about-content::before {
    left: 16px;
}

.about-content::after {
    right: 16px;
}

.education-card {
    max-width: 820px;
    margin: 0 auto;
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
    background: linear-gradient(170deg, rgba(23, 31, 51, 0.95), rgba(19, 27, 43, 0.9));
    box-shadow: var(--shadow-sm);
}

.education-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    color: #8fdafc;
    margin-bottom: 14px;
}

.education-card span {
    display: block;
    margin-bottom: 12px;
    color: #9daccc;
    font-size: 0.95rem;
}

.education-card p {
    color: var(--muted);
    margin-top: 10px;
}

.edu-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.12);
    margin-bottom: 14px;
}

.edu-badge i {
    font-size: 1rem;
    color: #8fdafc;
}

.edu-badge span {
    margin: 0;
    color: #dcefff;
    font-size: 0.92rem;
    font-weight: 600;
}

.edu-details {
    display: grid;
    gap: 10px;
}

.edu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.edu-item i {
    font-size: 1rem;
    color: #86d3fa;
}

.edu-item span {
    margin: 0;
    color: #c9d8f0;
    font-size: 0.92rem;
}

.skills-container {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}

.skill-category {
    padding: 22px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(165deg, rgba(18, 27, 42, 0.96), rgba(21, 31, 49, 0.88));
    box-shadow: 0 18px 38px rgba(7, 10, 18, 0.28);
}

.skill-category-header {
    margin-bottom: 18px;
}

.skill-category-label {
    display: inline-flex;
    margin-bottom: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ecf6ff;
}

.skill-category-header p {
    color: #98aac8;
    font-size: 0.92rem;
    line-height: 1.6;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}

.skill {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    min-height: 122px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(160deg, rgba(22, 31, 48, 0.88), rgba(27, 39, 61, 0.8));
    box-shadow: 0 10px 20px rgba(5, 8, 16, 0.2);
    color: #d7e8ff;
    padding: 18px;
    border-radius: 16px;
    font-size: 0.96rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transform: translateY(0) scale(1);
    transition: transform var(--motion-smooth), border-color var(--motion-fast), box-shadow var(--motion-smooth), background-color var(--motion-fast);
}

.skill span {
    white-space: normal;
    line-height: 1.4;
    font-family: 'Space Grotesk', sans-serif;
}

.skill-icons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.skill-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 6px;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
}

.skill > .skill-icon {
    width: 34px;
    height: 34px;
}

.skill:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 18px 34px rgba(6, 10, 18, 0.38);
}

.skill::before,
.project-card::before,
.contact-card::before {
    content: "";
    position: absolute;
    inset: 0;
    left: -120%;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.12) 50%, transparent 65%);
    transition: left 650ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.skill:hover::before,
.project-card:hover::before,
.contact-card:hover::before {
    left: 120%;
}

.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 22px;
}

.project-card {
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--stroke);
    background: linear-gradient(160deg, rgba(21, 30, 47, 0.95), rgba(24, 34, 56, 0.86));
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transform: translateY(0) scale(1);
    transition: transform var(--motion-smooth), border-color var(--motion-fast), box-shadow var(--motion-smooth);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 20px 36px rgba(6, 10, 18, 0.4);
}

.project-img {
    width: 100%;
    height: 188px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 14px;
    background: #0c1322;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.project-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin: 4px 0 8px;
    font-size: 1.1rem;
}

.tagline {
    display: block;
    margin-bottom: 8px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: #8ed7fb;
}

.project-description {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 14px;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.36);
    background: rgba(148, 163, 184, 0.08);
    color: #d8e7fd;
    font-size: 0.76rem;
    font-weight: 600;
}

.card-links {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.card-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform var(--motion-fast), background-color var(--motion-fast), box-shadow var(--motion-fast);
}

.card-links a:first-child {
    background: rgba(244, 247, 255, 0.94);
    color: #0f1d33;
}

.card-links .view-link {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.5);
    color: #d9f2ff;
}

.card-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 16px rgba(6, 10, 18, 0.28);
}

.github-footer {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.btn-github {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.14);
    color: #d7f3ff;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    transition: background-color var(--motion-fast), transform var(--motion-fast), box-shadow var(--motion-fast);
}

.btn-github:hover {
    transform: translateY(-3px);
    background: rgba(56, 189, 248, 0.24);
    box-shadow: 0 14px 22px rgba(11, 18, 31, 0.35);
}

.contact-section {
    padding-top: 84px;
}

.contact-grid {
    max-width: 1050px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(160deg, rgba(21, 30, 47, 0.95), rgba(23, 34, 54, 0.88));
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transform: translateY(0) scale(1);
    transition: transform var(--motion-smooth), border-color var(--motion-fast), box-shadow var(--motion-smooth);
}

.contact-card i {
    font-size: 1.4rem;
    color: #8fdafc;
}

.contact-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    color: #eaf4ff;
}

.contact-card p {
    color: #b8c7e1;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.contact-card:hover {
    transform: translateY(-7px) scale(1.015);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 18px 34px rgba(6, 10, 18, 0.38);
}

footer {
    margin-top: 36px;
    padding: 34px 9% 24px;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(12, 18, 31, 0.72);
}

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

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    margin: 0;
    font-size: 1.35rem;
    color: #eaf5ff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(148, 163, 184, 0.12);
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    transform: translateY(0) scale(1);
    transition: transform var(--motion-fast), filter var(--motion-fast), box-shadow var(--motion-fast);
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.08);
    filter: brightness(1.08);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.32);
}

.btn-box a,
.card-links a,
.btn-github,
.social-links a {
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0ms !important;
        scroll-behavior: auto !important;
    }
}

.social-btn.facebook {
    background: #1877f2;
}

.social-btn.telegram {
    background: #24a1de;
}

.social-btn.x {
    background: #0f172a;
}

.social-btn.instagram {
    background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.social-btn.linkedin {
    background: #0a66c2;
}

.social-btn.github {
    background: #111827;
}

.social-btn.phone {
    background: #16a34a;
}

footer p {
    color: #9fb0cd;
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    section {
        padding: 78px 6% 40px;
    }

    .header {
        padding: 14px 6%;
    }

    .logo {
        font-size: 1.8rem;
    }

    .home {
        grid-template-columns: 1fr;
        gap: 30px;
        min-height: auto;
    }

    .home-img {
        order: -1;
    }
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
        z-index: 1002;
    }

    .navbar {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        flex-direction: column;
        justify-content: center;
        background: rgba(7, 15, 34, 0.98);
        transition: left 0.35s ease;
    }

    #check:checked ~ .navbar {
        left: 0;
    }

    .navbar a {
        font-size: 1.2rem;
        min-width: 160px;
        text-align: center;
    }

    .btn-box a {
        width: 100%;
    }

    .project-container {
        grid-template-columns: 1fr;
    }

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

    .skills-container {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 30px 6% 20px;
    }
}

@media (max-width: 480px) {
    section {
        padding: 72px 5% 34px;
    }

    .home-content h1 {
        font-size: 2rem;
    }

    .home-content h3 {
        font-size: 0.98rem;
    }

    .education-card,
    .project-card {
        padding: 16px;
    }

    .edu-badge {
        border-radius: 12px;
        width: 100%;
        justify-content: flex-start;
    }

    .about-content {
        padding: 18px 18px;
    }

    .about-content p {
        font-size: 1rem;
        line-height: 1.8;
    }

    .about-content::before,
    .about-content::after {
        display: none;
    }

    .skill-category {
        padding: 18px;
    }

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

    .skill {
        min-height: 110px;
        padding: 16px;
    }
}
