:root {
    --bg-primary: #000000;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --card-hover: rgba(255, 255, 255, 0.1);
    --focus-color: rgba(255, 255, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image: url('bg.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    padding-top: clamp(2rem, 8vw, 6rem);
    padding-bottom: clamp(1rem, 3vw, 2rem);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    z-index: -1;
    animation: gradientShift 20s ease infinite;
}

.glass-orb {
    position: fixed;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.04) 0%, transparent 60%),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.02) 0%, transparent 80%);
    filter: blur(32px) contrast(1.1);
    z-index: -10;
    will-change: transform;
    transform: translateZ(0);
}

.orb-1 {
    width: clamp(280px, 35vw, 550px);
    height: clamp(280px, 35vw, 550px);
    top: clamp(-140px, -12vw, -180px);
    left: clamp(-140px, -12vw, -180px);
    animation: floatOrb1 25s ease-in-out infinite;
    opacity: 0.7;
}

.orb-2 {
    width: clamp(220px, 30vw, 450px);
    height: clamp(220px, 30vw, 450px);
    bottom: clamp(-60px, -8vw, -80px);
    right: clamp(-60px, -8vw, -80px);
    animation: floatOrb2 30s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes gradientShift {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

@keyframes floatOrb1 {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(100px, 100px);
    }
}

@keyframes floatOrb2 {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-100px, -100px);
    }
}

.spawned-orb {
    width: clamp(180px, 22vw, 280px);
    height: clamp(180px, 22vw, 280px);
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 60%, transparent);
    filter: blur(20px);
    z-index: -5;
    animation: orbFade 2.5s ease-out forwards;
    pointer-events: none;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes orbFade {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    25% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.click-ripple {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 40%, transparent);
    pointer-events: none;
    z-index: -3;
    animation: rippleWave 0.8s ease-out forwards;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes rippleWave {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(5);
        opacity: 0;
    }
}

.particle {
    position: fixed;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: -2;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes particleBurst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

.container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(1rem, 3vw, 2rem);
    min-height: 100vh;
    padding: clamp(1rem, 4vw, 2rem);
    max-width: 1800px;
    margin: 0 auto;
    contain: layout style;
    will-change: transform;
    align-items: center;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.left-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile {
    height: auto;
    contain: content;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem; 
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


.about {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    max-width: 600px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.glass-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.8rem 1.5rem;
    border-radius: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    user-select: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    cursor: pointer;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.glass-button:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.18));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    border-color: rgba(255, 255, 255, 0.25);
}

.glass-button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition-duration: 0.1s;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.14));
}

.glass-button:focus-visible,
.glass-link:focus-visible,
.project-card:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.glass-button::before,
.glass-button::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.glass-button::before {
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

.glass-button:hover::before {
    left: 100%;
}

.glass-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.glass-button:active::after {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.8);
    transition-duration: 0.2s;
}

.glass-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    width: fit-content;
    display: block;
    opacity: 1;
}



.glass-link::after {
    opacity: 0;
}

.glass-link[data-copied="true"]::after {
    opacity: 1;
}

.glass-link {
    position: relative;
}

.glass-link::after {
    cursor: default;
    content: 'Copied!';
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.glass-link[data-copied="true"] {
    animation: linkPulse 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.glass-link[data-copied="true"]::after {
    animation: bouncyFeedback 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes linkPulse {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.05);
    }
    60% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bouncyFeedback {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0.8) translateX(-10px);
    }
    20% {
        opacity: 1;
        transform: translateY(-50%) scale(1.1) translateX(0);
    }
    30% {
        transform: translateY(-50%) scale(0.95) translateX(0);
    }
    40% {
        transform: translateY(-50%) scale(1.02) translateX(0);
    }
    50%, 80% {
        opacity: 1;
        transform: translateY(-50%) scale(1) translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) scale(0.9) translateX(10px);
    }
}

.projects {
    height: fit-content;
    max-height: 100%;
    overflow-y: auto;
    contain: content;
}

.projects h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
    perspective: 1000px;
}

.project-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 1.75rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    height: 200px;
    display: flex;
    flex-direction: column;
    contain: layout style paint;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    will-change: transform;
    transform: translateZ(0);
}

.project-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    transform: translateY(-3px) rotateX(1deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    border-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: 0.8s;
}

.project-card:hover::after {
    left: 100%;
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.project-link {
    color: var(--text-primary);
    font-size: 0.9rem;
    opacity: 0.8;
    align-self: flex-start;
    margin-top: auto;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.project-card:hover h3 {
    background: linear-gradient(to right, #fff, #fff);
    -webkit-background-clip: text;
    background-clip: text;
}

.project-card:hover p {
    color: rgba(255, 255, 255, 0.85);
}

.project-card:hover .project-link {
    opacity: 1;
    transform: translateX(5px);
}

.projects::-webkit-scrollbar {
    width: 6px;
}

.projects::-webkit-scrollbar-track {
    background: transparent;
}

.projects::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 0.8fr 1fr;
        gap: clamp(1rem, 2.5vw, 1.5rem);
    }
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        height: auto;
        overflow-y: auto;
        gap: clamp(1.5rem, 3vw, 2rem);
    }

    .profile, .projects {
        height: auto;
    }

    .projects {
        overflow-y: visible;
    }

    .left-panel {
        order: 1;
    }

    .right-panel {
        order: 2;
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .glass-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .orb-1, .orb-2 {
        opacity: 0.5;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    .social-links {
        flex-direction: column;
        gap: 1rem;
    }

    .project-card {
        min-height: 140px;
        padding: 1.5rem;
    }

    .glass-button {
        padding: 0.8rem 1.5rem;
        text-align: center;
    }

    .about {
        margin-bottom: 2rem;
    }

    .orb-1, .orb-2 {
        opacity: 0.3;
        filter: blur(20px);
    }

    .spawned-orb {
        opacity: 0.5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card,
    .glass-button,
    .glass-link,
    .glass-button::before,
    .glass-button::after {
        transition: none;
        transform: none;
        animation: none;
    }

    .glass-button:hover,
    .glass-button:active {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.12));
    }

    .glass-button::before,
    .glass-button::after {
        display: none;
    }

    .project-card:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
}

body.home-page {
    padding-top: 0;
    padding-bottom: 0;
}
