@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url('https://fonts.cdnfonts.com/css/product-sans');
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400..900&display=swap');

:root {
    --bg-color: #0f1013;
    --card-bg: rgba(30, 30, 36, 0.4);
    --text-main: #f0f0f0;
    --text-dim: #9aa0a6;
    --accent-red: rgb(176, 0, 0);
    --card-shadow: rgba(0, 0, 0, 0.4);
    --card-shadow-hover: rgba(0, 0, 0, 0.6);
    --border-color: rgba(255, 255, 255, 0.05);
    --nav-bg: rgba(30, 30, 36, 0.4);
    --nav-hover: rgba(35, 35, 42, 0.7);
}

.light-mode {
    --bg-color: #fcfcfe;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #141416;
    --text-dim: #6e6e73;
    --accent-red: #d32f2f;
    --card-shadow: rgba(0, 0, 0, 0.06);
    --card-shadow-hover: rgba(0, 0, 0, 0.1);
    --border-color: rgba(0, 0, 0, 0.06);
    --nav-bg: rgba(255, 255, 255, 0.7);
    --nav-hover: rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background-color: rgba(176, 0, 0, 0.4);
    color: var(--text-main);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    background-color: var(--bg-color);
    color: var(--text-main);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--accent-red);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 120px 20px 40px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.content-fading {
    opacity: 0 !important;
    transform: translateY(5px);
}

@media (min-width: 900px) {
    .container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    #about {
        grid-column: 1 / 3;
    }

    #terminal-card {
        grid-column: 1 / 3;
    }

    #about .card-body {
        align-items: center;
        gap: 40px;
    }

    .avatar {
        width: 140px;
        height: 140px;
    }

    #about h2 {
        font-size: 34px;
    }
}

.card {
    background-color: var(--card-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 24px var(--card-shadow);
    transition: box-shadow 0.2s ease-in-out, transform 0.3s ease;
    border-radius: 18px;
    padding: 30px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.card>* {
    position: relative;
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.15) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image:
        linear-gradient(to right, transparent 0%, black 30%, black 70%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, black 30%, black 70%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
    -webkit-mask-composite: source-in;
}

@keyframes highlightBounce {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 24px var(--card-shadow);
        border-color: rgba(255, 255, 255, 0.05);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 8px 32px var(--accent-red);
        border-color: var(--accent-red);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 24px var(--card-shadow);
        border-color: rgba(255, 255, 255, 0.05);
    }
}

.card-highlight {
    animation: highlightBounce 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.avatar {
    border-radius: 50%;
    border: 2px solid #555;
    width: 110px;
    height: 110px;
    object-fit: cover;
    margin-top: 10px;
    transition: width 0.3s, height 0.3s;
}

.card h2 {
    font-size: 30px;
}

.card p {
    font-size: 16px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    line-height: 1.3;
}

@media (hover: hover) {
    .card:hover {
        box-shadow: 0 6px 32px var(--card-shadow-hover);
        transform: scale(1.02);
    }
}

.about-me {
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-me img {
    width: 20px;
    height: 20px;
    filter: invert(1);
    opacity: 0.7;
}

.about-me p {
    padding-top: 2px;
    font-family: "Consolas", monospace;
    font-size: 16px;
    color: var(--text-dim);
}

.card-body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

@media (max-width: 768px) {
    .card-body {
        flex-direction: column;
        align-items: flex-start;
    }
}


.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
    width: 100%;
}

@media (max-width: 360px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skill-group-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    opacity: 0.6;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.skill-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--c) 18%, #1a1a22);
    border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
    color: var(--c);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.skill-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.skill-name-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.skill-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.skill-name:hover {
    color: var(--accent-red);
}

.skill-level {
    font-size: 11px;
    color: var(--text-dim);
    opacity: 0.6;
}

.skill-bar-bg {
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent-red), rgba(176, 0, 0, 0.5));
    transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card.is-visible .skill-bar {
    width: var(--w);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



#skills {
    align-self: stretch;
}

#projects {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
}

.projects-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin-top: 5px;
    flex: 1;
}

.project-card-fill {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    flex-direction: column;
}

.project-card {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.project-card:hover {
    transform: translateY(-3px);
    background: var(--nav-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px var(--card-shadow-hover);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.project-avatar {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 20px;
    color: var(--text-main);
    margin: 0;
}

.project-content p {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 15px;
    flex: 1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    font-size: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    color: #ccc;

}

.my-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.open-button {
    padding: 12px 24px;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 550;
    color: rgb(255, 255, 255);
    background-color: var(--accent-red);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-top: 5px;
}

.open-button:hover {
    transform: scale(1.02);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.overlay-content {
    background-color: rgba(30, 30, 36, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.overlay-content h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--text-main);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: white !important;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.theme-btn:hover {
    color: var(--text-main);
    transform: scale(1.1);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

.light-mode .sun-icon {
    display: block;
}

.light-mode .moon-icon {
    display: none;
}

.light-mode .gemini-blob {
    opacity: 0.4;
    filter: blur(100px) saturate(1.5);
}

.light-mode .about-me img,
.light-mode .datetime-icon {
    filter: invert(0);
    opacity: 0.8;
}

.light-mode #terminal-card {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.light-mode .term-titlebar {
    background: #f1f1f1;
    border-bottom: 1px solid #ddd;
    color: #666;
}

.light-mode #terminal {
    background: #fafafa;
    color: #333;
}

.light-mode .terminal-input {
    color: #333;
}

.light-mode .t-prompt {
    color: #d32f2f;
}

.light-mode .t-path {
    color: #1565c0;
}

.light-mode .t-sep {
    color: #888;
}

.light-mode .terminal-response {
    color: #2e7d32;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.social-link.telegram {
    background-color: #2CA5E0;
}

.social-link.github {
    background-color: #333;
}

.social-link.discord {
    background-color: #5865F2;
}

.social-link.email {
    background-color: #EA4335;
}

.close-button {
    padding: 10px 24px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-dim);
    background: #2a2a35;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.close-button:hover {
    background: #3f3f4e;
    color: #fff;
}

.hidden {
    display: none !important;
}


#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.8, 0, 0.2, 1);
    overflow: hidden;
}

#preloader.hidden-preloader {
    opacity: 0;
    pointer-events: none;
}

#petal-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.loader-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}


.loader-logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: loaderPulse 1.5s infinite ease-in-out alternate;
}

@keyframes loaderPulse {
    0% {
        opacity: 0.6;
        transform: scale(0.98);
        text-shadow: 0 0 0px transparent;
    }

    100% {
        opacity: 1;
        transform: scale(1.02);
        color: #fff;
        text-shadow: 0 0 12px rgba(176, 0, 0, 0.6);
    }
}

.loader-bar-bg {
    width: 160px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
    animation: loadingBar 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes loadingBar {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}


.top-nav-wrapper {
    position: fixed;
    font-family: 'Product Sans', 'Google Sans', 'Golos Text', 'Inter', sans-serif;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1500px;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.nav-pill {
    background-color: var(--nav-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    border-radius: 100px;
    padding: 12px 25px;
    pointer-events: auto;
    display: flex;
    align-items: center;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.nav-pill:hover {
    box-shadow: 0 6px 32px var(--card-shadow-hover);
    background-color: var(--nav-hover);
}

.left-pill {
    gap: 30px;
}

.right-pill {
    gap: 15px;
}

.time-date-display {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
    padding: 0;
}

.lang-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: var(--text-main);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.lang-btn:hover {
    color: var(--text-main);
    transform: translateY(-1px);
}

.lang-btn:hover::after {
    width: 70%;
}

.pill-separator {
    color: var(--text-dim);
    font-size: 14px;
    opacity: 0.5;
}

.datetime-icon {
    width: 20px;
    height: 20px;
    filter: invert(1);
    opacity: 0.7;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-logo:hover {
    color: var(--accent-red);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-item {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: var(--text-main);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-main);
}

.nav-item.active::after {
    width: 100%;
}

.nav-item:hover::after {
    width: 70%;
}

.nav-item:hover {
    color: var(--text-main);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .top-nav-wrapper {
        width: calc(100% - 20px);
        top: 15px;
        justify-content: space-between;
    }

    .time-date-display {
        display: none;
    }

    .pill-separator {
        display: none;
    }

    .lang-btn {
        font-size: 14px;
        line-height: normal;
    }

    .nav-pill {
        padding: 0 16px;
        height: 44px;
    }

    .left-pill {
        gap: 10px;
        width: auto;
    }

    .nav-logo {
        display: none;

    }

    .nav-links {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .nav-item {
        font-size: 14px;
        white-space: nowrap;
    }

    .card {
        padding: 20px;
    }

    .card h2 {
        font-size: 24px;
        word-break: break-word;

    }

    .card p {
        font-size: 14px;
    }

    .card {
        padding: 20px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .nav-pill {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .overlay-content {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .gemini-blob {
        filter: blur(60px);
    }

    .avatar {
        width: 80px;
        height: 80px;
    }

    .gemini-blob-1 {
        width: 85vw;
        height: 85vw;
    }

    .gemini-blob-2 {
        width: 75vw;
        height: 75vw;
    }

    .gemini-blob-3 {
        width: 85vw;
        height: 85vw;
    }

    .gemini-blob-4 {
        width: 65vw;
        height: 65vw;
    }
}


.gemini-aurora {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -2;
    background-color: var(--bg-color);
}

.parallax-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    pointer-events: none;
}

.gemini-blob {
    position: absolute;
    filter: blur(120px);
    opacity: 0.7;
    will-change: transform, border-radius;
    transform: translateZ(0);

    animation: float 25s infinite ease-in-out alternate, morph 10s infinite cubic-bezier(0.4, 0, 0.2, 1) alternate;
}

.gemini-blob-1 {
    width: 35vw;
    height: 35vw;
    background-color: rgba(161, 91, 245, 0.45);

    top: -5%;
    left: 0%;
    animation-delay: 0s, -2s;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.gemini-blob-2 {
    width: 25vw;
    height: 25vw;
    background-color: rgba(66, 133, 244, 0.45);

    bottom: -5%;
    right: 10%;
    animation-delay: -5s, -4s;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.gemini-blob-3 {
    width: 30vw;
    height: 30vw;
    background-color: rgba(234, 67, 53, 0.35);

    top: 40%;
    left: 45%;
    animation-delay: -10s, -6s;
    border-radius: 50% 50% 20% 80% / 25% 80% 20% 75%;
}

.gemini-blob-4 {
    width: 20vw;
    height: 20vw;
    background-color: rgba(251, 188, 5, 0.25);

    bottom: 30%;
    left: 15%;
    animation-delay: -15s, -8s;
    border-radius: 80% 20% 60% 40% / 30% 60% 40% 70%;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(15vw, -10vh) scale(1.2) rotate(45deg);
    }

    66% {
        transform: translate(-10vw, 15vh) scale(0.8) rotate(-45deg);
    }

    100% {
        transform: translate(10vw, 5vh) scale(1.1) rotate(90deg);
    }
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    34% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }

    67% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}


.site-footer {
    width: 100%;
    margin-top: 60px;
    padding: 60px 20px 30px;
    background: linear-gradient(to top, var(--bg-color), transparent);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 30px;
    margin-bottom: 20px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.footer-left p {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.back-to-top {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(176, 0, 0, 0.4);
}

.footer-bottom {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}


.minimal-contacts {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .minimal-contacts {
        justify-content: center;
    }
}

.min-contact {
    color: var(--text-dim);
    transition: color 0.3s ease;
    text-transform: lowercase;
    position: relative;
    padding-bottom: 2px;
}

.min-contact::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 1px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-red);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.min-contact:hover {
    color: var(--text-main);
}

.min-contact:hover::after {
    width: 100%;
}

.min-separator {
    color: rgba(255, 255, 255, 0.15);
    font-size: 13px;
    user-select: none;
}

#dot-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    filter: blur(4px);
    opacity: 0.5;
}


.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.typewriter-cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent-red);
    font-weight: bold;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

#terminal-card {
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 0 1px #111, 0 20px 60px rgba(0, 0, 0, 0.8);
    transition: box-shadow 0.3s ease;
}

#terminal-card:hover {
    box-shadow: 0 0 0 1px #222, 0 20px 60px rgba(0, 0, 0, 0.9);
}

.light-mode #terminal-card {
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.light-mode #terminal-card:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
}

#terminal-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px);
    pointer-events: none;
    z-index: 10;
}

.term-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid #222;
    user-select: none;
}

.light-mode .term-titlebar {
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
}

.term-dots {
    display: flex;
    gap: 7px;
    align-items: center;
}

.term-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    opacity: 0.85;
}

.dot-red {
    background: #ff5f57;
}

.dot-yellow {
    background: #febc2e;
}

.dot-green {
    background: #28c840;
}

.term-title {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    color: #555;
    letter-spacing: 0.5px;
}

#terminal {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13.5px;
    line-height: 1.65;
    cursor: text;
    padding: 16px 20px 14px;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    position: relative;
    z-index: 1;
    color: #ccc;
}

.light-mode #terminal {
    background: #fdfdfd;
    color: #444;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    max-height: 340px;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.terminal-output::-webkit-scrollbar {
    width: 4px;
}

.terminal-output::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.terminal-line {
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0;
    color: #aaa;
}

.light-mode .terminal-line {
    color: #777;
}

.terminal-response {
    white-space: pre;
    word-break: break-word;
    color: #39ff14;
    padding: 0 0 10px 0;
    margin: 0;
    font-size: 13px;
    opacity: 0.92;
}

.terminal-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding-top: 6px;
}

.terminal-prompt-label {
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e8e8e8;
    font-family: inherit;
    font-size: inherit;
    caret-color: #39ff14;
    min-width: 0;
}

.light-mode .terminal-input {
    color: #222;
    caret-color: #2e7d32;
}

.t-prompt {
    color: #39ff14;
    font-weight: 700;
}

.t-sep {
    color: #555;
}

.t-path {
    color: #5af;
}

.t-cmd {
    color: #39ff14;
    font-weight: 600;
}

.t-accent {
    color: #39ff14;
}

.t-dim {
    color: #555;
}

.t-error {
    color: #ff4444;
}

.t-warn {
    color: #febc2e;
}

.t-input-echo {
    color: #ddd;
}

.light-mode .t-input-echo {
    color: #555;
}

.t-link {
    color: #5af;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
}

.t-link:hover {
    color: #9df;
}

@media (min-width: 900px) {
    #terminal-card {
        grid-column: 1 / 3;
    }
}

@media (max-width: 768px) {
    #terminal {
        font-size: 12.5px;
        min-height: 220px;
        padding: 12px 14px;
    }

    .terminal-output {
        max-height: 260px;
    }
}

.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20, 20, 25, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 100;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.light-mode .toast {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
}