@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
    --bg: #0b1220;
    --bg-secondary: #111a2b;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-strong: rgba(255, 255, 255, 0.1);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #38bdf8;
    --primary-strong: #0ea5e9;
    --ring: rgba(56, 189, 248, 0.35);
    --border: rgba(148, 163, 184, 0.25);
    --shadow: 0 15px 30px rgba(2, 6, 23, 0.35);
    --radius: 16px;
    --container: min(1040px, calc(100% - 2.5rem));
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    width: 100%;
    color: var(--text);
    font-family: "Poppins", sans-serif;
    background:
        radial-gradient(circle at 0% 0%, #0f2f52 0%, transparent 45%),
        radial-gradient(circle at 100% 15%, #14324f 0%, transparent 35%),
        linear-gradient(145deg, var(--bg), #050a14 90%);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

header,
main,
.contact-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

nav {
    width: var(--container);
    max-width: 100%;
    margin-top: 1.25rem;
    padding: 1.1rem 1.25rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem 1rem;
    position: sticky;
    top: 0.75rem;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    justify-self: start;
}

nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem 0.95rem;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

nav ul a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav ul a:hover {
    color: #dbeafe;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    justify-self: end;
    flex-shrink: 0;
}

.nav-icon-link {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0.45rem;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #bae6fd;
    text-decoration: none;
    transition: transform 0.25s ease, background 0.25s ease, color 0.2s ease;
}

.nav-icon-link:hover {
    transform: translateY(-2px);
    background: rgba(14, 165, 233, 0.25);
    color: #f0f9ff;
}

.nav-icon-link .material-icons {
    font-size: 22px;
}

nav img {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 0.45rem;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    transition: transform 0.25s ease, background 0.25s ease;
}

nav img:hover {
    transform: translateY(-2px);
    background: rgba(14, 165, 233, 0.25);
}

.intro,
.icons-container,
.projects-title,
.projects-container,
.hobies-container,
.title-contact,
.contact-meta,
.form-contact,
.social-contact,
.data-skills-list {
    width: var(--container);
}

.intro {
    margin-top: 3rem;
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.intro h1 {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.intro p {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.hr {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.hr hr {
    border: none;
    width: 65px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

.hr strong {
    color: var(--text);
    font-weight: 500;
}

strong {
    color: var(--primary);
}

.data-skills-list {
    padding: 1rem 0;
}

.data-skills-list ul {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-skills-list ul li {
    margin-left: 1rem;
    list-style-type: circle;
}

.icons-container {
    margin-top: 1rem;
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.icons-container h2 {
    margin-bottom: 1rem;
}

.icons-container > div:last-child {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 0.75rem;
    align-items: center;
}

.icons-container img {
    width: 54px;
    height: 54px;
    margin: 0 auto;
    padding: 0.55rem;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.icons-container img:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(14, 165, 233, 0.12);
}

main {
    margin-top: 1.5rem;
}

.projects-title,
.experience-title,
.title-contact {
    margin-top: 1.2rem;
}

.projects-title h2,
.experience-title h2,
.title-contact h2,
.hobies-container h2,
.icons-container h2 {
    font-size: clamp(1.25rem, 3.2vw, 1.8rem);
    margin-bottom: 0.25rem;
}

.projects-container {
    padding: 1.25rem 0 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
}

.experience-title,
.experience-container {
    width: var(--container);
}

.experience-container {
    margin-top: 0.5rem;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-left: 2.4rem;
}

.experience-container::before {
    content: "";
    position: absolute;
    top: 0.35rem;
    bottom: 0.35rem;
    left: 0.95rem;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(56, 189, 248, 0.85),
        rgba(56, 189, 248, 0.25)
    );
}

.experience-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    color: var(--text-muted);
}

.experience-card::before {
    content: "";
    position: absolute;
    left: -1.95rem;
    top: 1.35rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #38bdf8;
    border: 3px solid #0b1220;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4);
}

.experience-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.55rem;
}

.experience-head img {
    width: 56px;
    height: 56px;
    padding: 0.35rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.3);
    object-fit: contain;
    object-position: center;
    display: block;
}

.experience-head h4 {
    color: #f8fafc;
    margin-bottom: 0.15rem;
}

.experience-card p {
    line-height: 1.55;
}

.experience-card p + p {
    margin-top: 0.2rem;
}

.experience-card > p:first-of-type {
    margin-top: 0.35rem;
    font-weight: 500;
    color: #cbd5e1;
}

.experience-card ul {
    margin-top: 0.6rem;
    padding-left: 1.1rem;
}

.experience-card li {
    margin: 0.3rem 0;
    line-height: 1.5;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.4);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0;
}

.project-details {
    padding: 1rem;
    color: var(--text-muted);
}

.project-card h4 {
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.project-details p {
    line-height: 1.6;
    min-height: 74px;
}

.project-details small.project-role {
    color: #7dd3fc;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.project-tags {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tags span {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: #bae6fd;
    font-size: 0.75rem;
    line-height: 1.2;
}

.project-details a {
    margin-top: 0.8rem;
    width: 100%;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    color: var(--primary);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.project-details a:hover {
    color: #e0f2fe;
    background: rgba(14, 165, 233, 0.3);
    transform: translateY(-1px);
}

.project-details i {
    font-size: 1.1rem;
}

.hobies-container {
    margin-top: 0.5rem;
    padding: 1.35rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.hobies-container ul {
    width: 100%;
}

.hobies-container li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0;
    color: var(--text-muted);
}

.hobies-container img {
    width: 24px;
    height: 24px;
}

.contact-container {
    margin-top: 0.8rem;
}

.contact-meta {
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.contact-meta p + p {
    margin-top: 0.45rem;
}

.contact-meta strong {
    color: #e2e8f0;
}

.contact-locale {
    margin-top: 0.55rem;
    font-size: 0.88rem;
    color: #94a3b8;
}

.contact-cv-link {
    display: inline-flex;
    align-items: center;
    margin-top: 0.35rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.08);
    transition: background 0.2s ease, color 0.2s ease;
}

.contact-cv-link:hover {
    background: rgba(14, 165, 233, 0.22);
    color: #e0f2fe;
}

.form-contact {
    margin-top: 0.4rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.form-contact > div {
    width: 100%;
    margin-bottom: 0.35rem;
}

.form-contact label {
    display: block;
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.form-contact input,
.form-contact textarea {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text);
    font-size: 0.95rem;
    font-family: "Poppins", sans-serif;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-contact input:focus,
.form-contact textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--ring);
}

.form-contact textarea {
    resize: vertical;
    min-height: 140px;
}

.form-contact button {
    width: 100%;
    margin-top: 0.2rem;
    padding: 0.8rem;
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 10px;
    color: #ecfeff;
    background: linear-gradient(90deg, #0284c7, #0ea5e9);
    font-size: 0.95rem;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.form-contact button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.social-contact {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem 1.1rem 1.35rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(8px);
}

.social-contact p:first-child {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.social-contact p:nth-child(2) {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.social-contact p:nth-child(2) a {
    display: inline-block;
}

.social-contact a {
    text-decoration: none;
    color: var(--text);
}

.social-contact i {
    width: 42px;
    height: 42px;
    margin: 0 0.22rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

.social-contact a:focus-visible i {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
}

.social-contact i:hover {
    color: #dbeafe;
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.15);
    transform: translateY(-2px);
}

footer {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
    padding: 1.1rem 1rem 1.25rem;
    color: var(--text-muted);
    background: rgba(2, 6, 23, 0.86);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

footer strong {
    color: #bae6fd;
}

footer p {
    margin: 0.2rem 0;
}

footer p:last-child {
    font-size: 0.9rem;
    color: #93c5fd;
}

footer a {
    color: #bae6fd;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media screen and (min-width: 1300px) {
    :root {
        --container: min(1120px, calc(100% - 3.5rem));
    }

    .projects-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 900px) {
    :root {
        --container: min(720px, calc(100% - 2rem));
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    nav {
        grid-template-columns: 1fr;
        justify-items: center;
        border-radius: 22px;
        padding: 0.9rem 1rem;
        text-align: center;
    }

    .nav-brand {
        justify-self: center;
        white-space: normal;
        text-align: center;
        max-width: 100%;
    }

    nav ul {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        gap: 0.55rem 0.75rem;
    }

    .nav-actions {
        justify-self: center;
    }

    .experience-container {
        padding-left: 2rem;
    }

    .intro,
    .icons-container,
    .hobies-container,
    .contact-meta,
    .form-contact,
    .social-contact {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media screen and (max-width: 640px) {
    :root {
        --container: min(500px, calc(100% - 1.3rem));
    }

    nav {
        padding: 0.8rem 0.85rem;
        margin-top: 0.8rem;
    }

    .nav-brand {
        font-size: 1rem;
    }

    nav ul {
        gap: 0.5rem;
    }

    nav ul a {
        font-size: 0.78rem;
    }

    nav img,
    .nav-icon-link {
        width: 40px;
        height: 40px;
    }

    .nav-icon-link .material-icons {
        font-size: 19px;
    }

    .intro,
    .icons-container,
    .hobies-container {
        padding: 1.2rem;
    }

    .projects-container {
        gap: 1rem;
    }

    .experience-container {
        padding-left: 1.55rem;
    }

    .experience-container::before {
        left: 0.65rem;
    }

    .experience-card::before {
        left: -1.35rem;
    }

    .experience-head {
        align-items: flex-start;
    }

    .experience-head img {
        width: 48px;
        height: 48px;
    }

    .project-details p {
        min-height: auto;
    }

    .project-tags span {
        font-size: 0.7rem;
    }

    .social-contact i {
        width: 38px;
        height: 38px;
        font-size: 1.08rem;
    }

    .project-card img {
        height: 205px;
    }
}

@media screen and (max-width: 420px) {
    :root {
        --container: min(340px, calc(100% - 1rem));
    }

    body {
        font-size: 15px;
    }

    :root {
        --radius: 12px;
    }

    .intro {
        margin-top: 1.4rem;
        padding: 0.95rem;
    }

    .intro h1 {
        font-size: 1.55rem;
    }

    .intro p,
    .project-details p,
    .experience-card p,
    .experience-card li {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .icons-container {
        padding: 0.95rem;
    }

    .icons-container > div:last-child {
        grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
        gap: 0.5rem;
    }

    .icons-container img {
        width: 45px;
        height: 45px;
        padding: 0.45rem;
    }

    .experience-container {
        padding-left: 1.35rem;
        gap: 0.75rem;
    }

    .experience-container::before {
        left: 0.52rem;
    }

    .experience-card::before {
        left: -1.18rem;
        width: 10px;
        height: 10px;
    }

    .experience-card,
    .project-card,
    .form-contact,
    .hobies-container,
    .social-contact {
        padding: 0.85rem;
    }

    .project-details {
        padding: 0.85rem;
    }

    .project-card h4,
    .experience-head h4 {
        font-size: 0.98rem;
    }

    .project-tags {
        gap: 0.3rem;
    }

    .project-tags span {
        padding: 0.18rem 0.4rem;
        font-size: 0.67rem;
    }

    .project-details a {
        font-size: 0.86rem;
        padding: 0.55rem 0.7rem;
    }

    .social-contact p:nth-child(2) {
        font-size: 0.84rem;
    }

    .social-contact i {
        width: 34px;
        height: 34px;
        margin: 0 0.12rem;
        font-size: 1rem;
    }

    .intro p,
    .project-details p {
        font-size: 0.92rem;
    }

    footer {
        font-size: 0.86rem;
    }
}

@media screen and (max-width: 340px) {
    :root {
        --container: calc(100% - 0.7rem);
    }

    nav {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
        gap: 0.5rem;
    }

    nav ul {
        gap: 0.35rem 0.5rem;
    }

    nav ul a {
        font-size: 0.7rem;
    }

    .experience-container {
        padding-left: 1.15rem;
    }

    .experience-container::before {
        left: 0.42rem;
    }

    .experience-card::before {
        left: -1.04rem;
    }
}

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 250;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ecfeff;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    border: 1px solid rgba(56, 189, 248, 0.45);
    box-shadow: var(--shadow);
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.back-to-top--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top .material-icons {
    font-size: 26px;
}

.back-to-top:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .back-to-top {
        transition: none;
        transform: none;
    }

    .back-to-top--visible {
        transform: none;
    }
}