@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@500;600;700;800&display=swap');

:root {
    --bg: #060816;
    --bg-soft: #0b1020;
    --card: rgba(15, 22, 40, 0.56);
    --card-strong: rgba(17, 25, 44, 0.76);
    --line: rgba(170, 196, 255, 0.16);
    --text: #f4f7ff;
    --muted: #b0bdd7;
    --blue: #61a8ff;
    --violet: #8a82ff;
    --cyan: #67e8ff;
    --shadow: 0 16px 40px rgba(3, 8, 20, 0.38);
    --r-xl: 26px;
    --r-lg: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    background:
        radial-gradient(circle at 10% -10%, rgba(129, 124, 255, 0.18), transparent 34%),
        radial-gradient(circle at 86% 0%, rgba(103, 232, 255, 0.14), transparent 30%),
        radial-gradient(circle at 72% 90%, rgba(97, 168, 255, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(8, 12, 28, 0.96), rgba(6, 8, 22, 1)),
        var(--bg);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at center, black 36%, transparent 88%);
    opacity: 0.45;
}

.portfolio-home {
    width: min(1360px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 0 0 4.5rem;
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

@media (min-width: 1700px) {
    .portfolio-home {
        width: min(1480px, calc(100% - 2.4rem));
    }
}

.portfolio-home h1,
.portfolio-home h2,
.portfolio-home h3 {
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
}

.portfolio-loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    background: rgba(5, 8, 18, 0.84);
    backdrop-filter: blur(16px);
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.portfolio-loader span {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: #7de7ff;
    border-right-color: #7d82ff;
    animation: loaderSpin 0.8s linear infinite;
}

.portfolio-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

.portfolio-top-nav {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    margin: 1rem 0 1.5rem;
    padding: 0.72rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(10, 15, 30, 0.58);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(2, 6, 16, 0.3);
}

.portfolio-brand {
    font-weight: 700;
    font-size: 0.95rem;
}

.portfolio-nav-links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 0.65rem;
}

.portfolio-nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.84rem;
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
    transition: 0.18s ease;
}

.portfolio-nav-links a:hover,
.portfolio-nav-links a.active {
    background: rgba(90, 122, 255, 0.22);
    color: var(--text);
}

.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(15, 22, 40, 0.78), rgba(9, 12, 24, 0.82)),
        var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 18px 48px rgba(3, 8, 18, 0.35);
    padding: 2.1rem;
    backdrop-filter: blur(18px);
}

.hero__spotlight {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--spot-x, 50%) var(--spot-y, 25%), rgba(133, 192, 255, 0.15), transparent 26%);
    pointer-events: none;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(40px);
    pointer-events: none;
}

.hero::before {
    width: 190px;
    height: 190px;
    top: -95px;
    left: -70px;
    background: rgba(127, 121, 255, 0.2);
}

.hero::after {
    width: 210px;
    height: 210px;
    right: -90px;
    bottom: -90px;
    background: rgba(103, 232, 255, 0.18);
}

.hero__content {
    position: relative;
    z-index: 2;
}

.hero__content>* {
    animation: riseIn 0.55s ease both;
}

.hero__content>*:nth-child(2) {
    animation-delay: 0.05s;
}

.hero__content>*:nth-child(3) {
    animation-delay: 0.1s;
}

.hero__content>*:nth-child(4) {
    animation-delay: 0.15s;
}

.hero__content>*:nth-child(5) {
    animation-delay: 0.2s;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__eyebrow {
    margin: 0;
    color: var(--cyan);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.hero__title {
    margin: 0.8rem 0 0.6rem;
    font-size: clamp(2.2rem, 4.3vw, 4rem);
    line-height: 1.02;
    max-width: 12ch;
}

.hero__subtitle {
    margin: 0;
    color: #c6d5f3;
    font-size: 1.02rem;
    font-weight: 600;
}

.hero__meta {
    margin: 0.72rem 0 0;
    color: var(--muted);
    max-width: 52ch;
}

.typing-wrap {
    margin: 0.95rem 0 0;
    color: #cfdbf3;
    font-size: 0.9rem;
}

.typing {
    min-height: 1.3em;
    color: #a4f6ff;
    border-right: 2px solid rgba(164, 246, 255, 0.82);
    padding-right: 0.24rem;
    white-space: nowrap;
    animation: cursorBlink 0.9s steps(1) infinite;
}

@keyframes cursorBlink {
    50% {
        border-right-color: transparent;
    }
}

.hero__cta {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.portfolio-btn {
    text-decoration: none;
    border-radius: 999px;
    padding: 0.72rem 1.18rem;
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.portfolio-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.portfolio-btn--primary {
    color: #061229;
    border: 0;
    background: linear-gradient(120deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 28px rgba(53, 165, 255, 0.34);
}

.portfolio-btn--secondary {
    border: 1px solid rgba(162, 194, 255, 0.45);
    color: var(--text);
    background: rgba(14, 22, 40, 0.66);
}

.hero__image-wrap {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
}

.hero__image {
    width: min(320px, 100%);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(185, 207, 255, 0.42);
    box-shadow: 0 20px 40px rgba(6, 12, 24, 0.42);
    animation: floatPortrait 7s ease-in-out infinite;
}

.hero__badge {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.48rem 0.85rem;
    border-radius: 999px;
    background: rgba(12, 18, 34, 0.72);
    border: 1px solid rgba(141, 185, 255, 0.22);
    font-size: 0.78rem;
    color: #d4e6ff;
}

@keyframes floatPortrait {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.section-block {
    margin-top: 1rem;
    padding: 1.65rem;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(12, 18, 34, 0.56);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 28px rgba(2, 6, 16, 0.18);
}

.section-title {
    margin: 0;
    font-size: 1.42rem;
}

.section-subtitle {
    margin: 0.35rem 0 1rem;
    color: var(--muted);
    max-width: 56ch;
}

.skill-grid,
.projects-grid,
.metrics-grid,
.contact-grid {
    display: grid;
    gap: 0.95rem;
}

.skill-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.skill-card {
    border: 1px solid rgba(145, 181, 255, 0.14);
    background: rgba(17, 25, 42, 0.5);
    border-radius: var(--r-lg);
    padding: 0.95rem;
    transition: 0.2s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(10, 20, 42, 0.24);
}

.skill-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    color: #09152e;
    background: linear-gradient(135deg, #68d9ff, #9eb0ff);
    margin-bottom: 0.68rem;
}

.skill-card h3 {
    margin: 0 0 0.2rem;
    font-size: 0.97rem;
}

.skill-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.projects-section {
    background: rgba(11, 17, 31, 0.62);
    border-color: rgba(120, 170, 255, 0.22);
    box-shadow: 0 14px 30px rgba(8, 18, 40, 0.22);
}

.project-card {
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid rgba(150, 188, 255, 0.16);
    background: rgba(14, 21, 39, 0.7);
    transition: 0.2s ease;
    will-change: transform, box-shadow;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(7, 16, 35, 0.3);
}

.project-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.project-content {
    padding: 0.95rem 1rem 1rem;
}

.project-content h3 {
    margin: 0 0 0.42rem;
    font-size: 1rem;
}

.project-points {
    margin: 0 0 0.72rem 1rem;
    padding: 0;
}

.project-points li {
    margin: 0 0 0.26rem;
    color: #d8e7ff;
    font-size: 0.86rem;
}

.tech-tags {
    margin-top: 0.12rem;
    display: flex;
    gap: 0.42rem;
    flex-wrap: wrap;
}

.tech-tags span {
    font-size: 0.7rem;
    font-weight: 700;
    color: #d9ecff;
    border: 1px solid rgba(145, 190, 255, 0.28);
    border-radius: 999px;
    padding: 0.2rem 0.52rem;
    background: rgba(12, 18, 34, 0.58);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.tech-tags span:hover {
    transform: translateY(-2px);
    border-color: rgba(180, 214, 255, 0.7);
    background: rgba(22, 31, 56, 0.88);
}

.project-actions {
    margin-top: 0.7rem;
    display: flex;
    gap: 0.48rem;
    flex-wrap: wrap;
}

.project-btn {
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid rgba(150, 188, 255, 0.28);
    color: var(--text);
    padding: 0.46rem 0.82rem;
    font-size: 0.78rem;
    font-weight: 700;
    transition: 0.22s ease;
}

.project-btn:hover {
    transform: scale(1.03);
}

.project-btn.primary {
    color: #071328;
    border: 0;
    background: linear-gradient(120deg, #7fe5ff, #7a7dff);
}

.metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
    text-align: left;
    border: 1px solid rgba(140, 178, 255, 0.16);
    border-radius: var(--r-lg);
    background: rgba(16, 23, 40, 0.5);
    padding: 0.95rem;
}

.metric-value {
    margin: 0;
    font-size: 1.08rem;
    color: #bce6ff;
}

.metric-label {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

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

.contact-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-links li+li {
    margin-top: 0.62rem;
}

.contact-links a {
    text-decoration: none;
    color: #d9e8ff;
    display: inline-flex;
    gap: 0.48rem;
    align-items: center;
    font-weight: 600;
}

.contact-form {
    display: grid;
    gap: 0.72rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(150, 188, 255, 0.3);
    border-radius: 12px;
    background: rgba(8, 14, 26, 0.56);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    padding: 0.7rem;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.form-status {
    margin: 0.2rem 0 0;
    min-height: 1.2rem;
    font-size: 0.82rem;
    color: #9cc4ff;
}

.fade-in {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero__image,
    .typing,
    .portfolio-loader span,
    .hero__content>*,
    .portfolio-btn,
    .project-btn,
    .tech-tags span,
    .skill-card,
    .project-card,
    .fade-in {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 1000px) {

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

    .skill-grid,
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-top-nav {
        border-radius: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .portfolio-nav-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    .portfolio-home {
        width: calc(100% - 1rem);
    }

    .hero,
    .section-block {
        padding: 1.05rem;
    }

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

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