:root {
    --white: #ffffff;
    --gray: #d6d6d6;
    --black: #111111;
    --muted: #4b4b4b;
    --card: #ffffff;
    --border: #e3e3e3;
    --shadow: 0 18px 45px rgba(17, 17, 17, 0.12);
}

body {
    color: var(--black);
    font-family: "Space Grotesk", "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
    min-height: 100vh;
    transition: background 220ms ease, color 220ms ease;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    transform: translateZ(0);
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 2px, transparent 2.8px),
        radial-gradient(circle, rgba(255, 255, 255, 0.6) 2px, transparent 2.8px);
    background-size: 36px 36px, 52px 52px;
    background-position: 0 0, 18px 22px;
    animation: twinkle 4s ease-in-out infinite;
    opacity: 0.55;
}

body::after {
    animation-duration: 6s;
    opacity: 0.35;
}

body:not(.dark)::before,
body:not(.dark)::after {
    background-image:
        radial-gradient(circle, rgba(0, 0, 0, 0.12) 2px, transparent 2.8px),
        radial-gradient(circle, rgba(0, 0, 0, 0.08) 2px, transparent 2.8px);
}

.container {
    max-width: 900px;
}

.eyebrow {
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--muted);
}

.name {
    font-family: "Unica One", "Space Grotesk", sans-serif;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--black);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    perspective: 900px;
    transform-style: preserve-3d;
    transition: transform 160ms ease, text-shadow 200ms ease;
}

.name-caret {
    width: 2px;
    height: 28px;
    background: var(--black);
    display: inline-block;
    animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

.profile-frame {
    width: 170px;
    height: 170px;
    margin: 14px auto 16px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(140deg, #ffffff, #e9e9e9);
    box-shadow: 0 26px 70px rgba(17, 17, 17, 0.18);
    transform-style: preserve-3d;
    perspective: 900px;
    transition: transform 120ms ease, box-shadow 250ms ease, background 220ms ease, border-color 220ms ease;
    position: relative;
    isolation: isolate;
}

.profile-frame::before,
.profile-frame::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    pointer-events: none;
}

.profile-frame::before {
    background: conic-gradient(from 180deg, #ffffff, #cfcfcf, #111111, #e9e9e9, #ffffff);
    filter: blur(0.4px);
    opacity: 0.85;
    z-index: -2;
}

.profile-frame::after {
    inset: -2px;
    border: 1px solid rgba(17, 17, 17, 0.25);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7),
        0 0 18px rgba(255, 255, 255, 0.35),
        0 0 40px rgba(140, 140, 140, 0.25);
    z-index: -1;
}

.profile-frame:hover {
    transform: translateY(-6px) rotateX(6deg) rotateY(-6deg);
    box-shadow: 0 32px 80px rgba(17, 17, 17, 0.22);
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--gray);
    transform: translateZ(24px);
    box-shadow: 0 18px 45px rgba(17, 17, 17, 0.22);
    filter: grayscale(100%);
    transition: filter 200ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.profile-frame:hover .profile-img {
    filter: grayscale(0%);
}

.card {
    background: rgba(255, 255, 255, 0.45);
    border: 1.5px solid rgba(0, 0, 0, 0.18);
    border-radius: 22px;
    box-shadow: 0 22px 55px rgba(17, 17, 17, 0.22);
    backdrop-filter: blur(22px) saturate(150%);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease, color 220ms ease;
    will-change: transform;
    transform-style: preserve-3d;
    perspective: 800px;
}

.soft-card {
    padding: 2px;
}

.card:hover {
    transform: translateY(-6px) rotateX(6deg) rotateY(-6deg);
    border-color: #2b2b2b;
    background: linear-gradient(135deg, #111111 0%, #3a3a3a 100%);
    box-shadow: 0 28px 70px rgba(17, 17, 17, 0.25);
}

.card:hover .card-title,
.card:hover .card-text,
.card:hover .list-group-item,
.card:hover .text-secondary,
.card:hover .review-text,
.card:hover .review-name {
    color: #ffffff !important;
}

.card:hover .list-group-item {
    border-color: rgba(255, 255, 255, 0.2);
}

.card-title {
    color: var(--black);
    letter-spacing: 1px;
}

.card-text,
.list-group-item,
.text-secondary {
    color: var(--muted) !important;
}

.list-group-item {
    background: transparent;
    border-color: var(--border);
}

.clean-list .list-group-item {
    padding-left: 0;
    padding-right: 0;
}

.footer {
    padding: 18px;
    background: linear-gradient(90deg, #111111 0%, #3a3a3a 100%);
    text-align: center;
    color: #ffffff;
    font-size: 14px;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(17, 17, 17, 0.2);
}

.display-5 {
    color: var(--black) !important;
}

.mode-toggle {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--black);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
    box-shadow: 0 10px 20px rgba(17, 17, 17, 0.08);
}

.mode-toggle:hover {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

body.dark {
    --white: #0b0b0b;
    --gray: #2a2a2a;
    --black: #f5f5f5;
    --muted: #b3b3b3;
    --card: #151515;
    --border: #2a2a2a;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    background: linear-gradient(180deg, #0b0b0b 0%, #141414 100%);
}

body.dark .profile-frame {
    background: linear-gradient(140deg, #0b0b0b, #1f1f1f);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

body.dark .profile-img {
    border-color: #2a2a2a;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
}

body.dark .review-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.35);
}

body.dark .ticker-item {
    background: #121212;
    border-color: #2a2a2a;
}

body.dark .card {
    background: rgba(12, 12, 12, 0.45);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}

body.dark .mode-toggle {
    background: #151515;
    color: #f5f5f5;
    border-color: #2a2a2a;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

body.dark .name-caret {
    background: #f5f5f5;
}

.ticker {
    overflow: hidden;
    padding: 12px 0;
}

.ticker-track {
    display: flex;
    gap: 0;
    white-space: nowrap;
    animation: ticker-scroll 16s linear infinite;
    padding: 4px 16px;
    width: max-content;
    will-change: transform;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-right: 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--black);
    background: #f8f8f8;
    transition: background 220ms ease, border-color 220ms ease, color 220ms ease, transform 180ms ease, box-shadow 180ms ease;
    transform-origin: center;
}

.ticker-item.pop {
    transform: translateY(-6px) scale(1.06);
    box-shadow: 0 12px 25px rgba(17, 17, 17, 0.2);
}

.tag-name {
    color: var(--black);
    border-color: var(--border);
    background: #ffffff;
    text-transform: none;
}

.review-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 16px 35px rgba(17, 17, 17, 0.08);
    transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.card:hover .review-card {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.card:hover.contact-card p,
.card:hover.contact-card .card-title {
    color: #ffffff !important;
}

.review-text {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.review-name {
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--black);
}

@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .name {
        letter-spacing: 2px;
        font-size: 32px;
    }

    .profile-frame {
        width: 140px;
        height: 140px;
        border-radius: 50%;
    }

    .card {
        border-radius: 18px;
    }

    .review-card {
        border-radius: 14px;
    }

    .ticker-track {
        animation-duration: 20s;
    }

    .ticker-item {
        font-size: 12px;
        padding: 5px 10px;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 28px;
    }

    .eyebrow {
        letter-spacing: 3px;
    }

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

    .review-text {
        font-size: 13px;
    }
}

.tag-react {
    color: #61dafb;
    border-color: rgba(97, 218, 251, 0.6);
    background: #ffffff;
}

.tag-next {
    color: #111111;
    border-color: #111111;
    background: #ffffff;
}

body.dark .tag-next {
    color: #ffffff;
    border-color: #ffffff;
    background: #111111;
}

.tag-php {
    color: #777bb4;
    border-color: rgba(119, 123, 180, 0.6);
    background: #ffffff;
}

.tag-mysql {
    color: #f29111;
    border-color: rgba(242, 145, 17, 0.6);
    background: #ffffff;
}

.tag-python {
    color: #3776ab;
    border-color: rgba(55, 118, 171, 0.6);
    background: #ffffff;
}

.tag-html {
    color: #e34f26;
    border-color: rgba(227, 79, 38, 0.6);
    background: #ffffff;
}

.tag-css {
    color: #1572b6;
    border-color: rgba(21, 114, 182, 0.6);
    background: #ffffff;
}

.tag-js {
    color: #f7df1e;
    border-color: rgba(247, 223, 30, 0.8);
    background: #ffffff;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes twinkle {
    0% {
        opacity: 0.2;
        filter: blur(0px);
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        filter: blur(0.6px);
        transform: scale(1.02);
    }
    100% {
        opacity: 0.2;
        filter: blur(0px);
        transform: scale(1);
    }
}
