:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 30, 0.7);
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #14b8a6;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.15);
    --glow: rgba(99, 102, 241, 0.5);
    --terminal-green: #00ff41;
    --terminal-bg: rgba(0, 0, 0, 0.8);
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: rgba(15, 23, 42, 0.15);
    --terminal-bg: rgba(255, 255, 255, 0.9);
    --terminal-green: #059669;
}

body.dark-mode .star {
    background: #0f172a;
    opacity: 0.6;
}

body.dark-mode .gradient-orb {
    opacity: 0.2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* Performance optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            rgba(99, 102, 241, 0.1) 0%,
            rgba(236, 72, 153, 0.1) 25%,
            rgba(20, 184, 166, 0.1) 50%,
            rgba(99, 102, 241, 0.1) 75%,
            rgba(236, 72, 153, 0.1) 100%);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Animated Background */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
    /* GPU acceleration */
    will-change: opacity;
    transform: translateZ(0);
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* Gradient Orbs */
.gradient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* Main Container */
.container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.content-wrapper {
    max-width: 800px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.status-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Theme Toggle */
.theme-toggle-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    animation: fadeIn 1s ease-out 0.5s both;
}

.theme-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: absolute;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

body.dark-mode .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

body.dark-mode .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Main Title */
.main-title {
    margin-bottom: 1.5rem;
}

.greeting {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    animation: fadeIn 1s ease-out 0.2s both;
}

.name {
    display: block;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 1s ease-out 0.4s both, glow 3s ease-in-out infinite, glitch 5s infinite;
    position: relative;
}

.name::before,
.name::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.name::before {
    animation: glitchTop 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    transform: translate(-2px, -2px);
    opacity: 0.8;
}

.name::after {
    animation: glitchBottom 2.5s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    transform: translate(2px, 2px);
    opacity: 0.8;
}

@keyframes glitch {

    0%,
    90%,
    100% {
        transform: translate(0);
    }

    91% {
        transform: translate(-2px, 2px);
    }

    93% {
        transform: translate(2px, -2px);
    }

    95% {
        transform: translate(-2px, -2px);
    }

    97% {
        transform: translate(2px, 2px);
    }
}

@keyframes glitchTop {

    0%,
    90%,
    100% {
        transform: translate(0);
    }

    92% {
        transform: translate(-3px, -3px);
    }

    94% {
        transform: translate(3px, 3px);
    }
}

@keyframes glitchBottom {

    0%,
    90%,
    100% {
        transform: translate(0);
    }

    91% {
        transform: translate(3px, 3px);
    }

    93% {
        transform: translate(-3px, -3px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes glow {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 40px rgba(236, 72, 153, 0.6));
    }
}

/* Role Badge */
.role-container {
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out 0.6s both;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.role-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.code-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-light);
}

/* 3D Rotating Cube */
.cube-container {
    perspective: 1000px;
    width: 120px;
    height: 120px;
    margin: 2rem auto;
    animation: fadeIn 1s ease-out 0.8s both;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}

.cube-face {
    position: absolute;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.3));
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.cube-face.front {
    transform: rotateY(0deg) translateZ(60px);
}

.cube-face.back {
    transform: rotateY(180deg) translateZ(60px);
}

.cube-face.right {
    transform: rotateY(90deg) translateZ(60px);
}

.cube-face.left {
    transform: rotateY(-90deg) translateZ(60px);
}

.cube-face.top {
    transform: rotateX(90deg) translateZ(60px);
}

.cube-face.bottom {
    transform: rotateX(-90deg) translateZ(60px);
}

@keyframes rotateCube {
    from {
        transform: rotateX(0deg) rotateY(0deg);
    }

    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* Terminal Container */
.terminal-container {
    max-width: 700px;
    margin: 0 auto 3rem;
    background: var(--terminal-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    animation: fadeIn 1s ease-out 1s both;
}

.terminal-header {
    background: rgba(30, 30, 40, 0.9);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.terminal-button.red {
    background: #ff5f56;
}

.terminal-button.yellow {
    background: #ffbd2e;
}

.terminal-button.green {
    background: #27c93f;
}

.terminal-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.8;
}

.terminal-line {
    color: var(--terminal-green);
    margin: 0;
}

.prompt {
    color: var(--primary-light);
    margin-right: 0.5rem;
}

.command {
    color: var(--terminal-green);
}

.cursor {
    color: var(--terminal-green);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

.terminal-output {
    margin-top: 1rem;
    color: var(--text-secondary);
    line-height: 2;
}

.success {
    color: var(--terminal-green);
    margin-right: 0.5rem;
}

/* Description */
.description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 1s ease-out 0.8s both;
}

/* Progress Section */
.progress-section {
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 1s both;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-light);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50px;
    width: 0%;
    transition: width 2s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Tech Stack */
.tech-stack {
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 1.2s both;
}

.tech-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.tech-item {
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: fadeInScale 0.6s ease-out both;
    animation-delay: var(--delay);
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tech-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tech-item span {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out 1.4s both;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.button-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transition: transform 0.4s ease;
}

.button-text,
.button-icon {
    position: relative;
    z-index: 2;
}

.button-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    z-index: 1;
    transition: left 0.6s ease;
}

.cta-button:hover .button-shine {
    left: 100%;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.cta-button.primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.6), 0 0 40px rgba(236, 72, 153, 0.4);
}

.cta-button.primary:active {
    transform: translateY(-2px) scale(1.02);
}

.cta-button.secondary {
    background: rgba(20, 20, 30, 0.6);
    color: var(--text-primary);
    border: 2px solid var(--primary);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.cta-button.secondary:hover {
    border-color: var(--accent);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 60px rgba(20, 184, 166, 0.4);
    background: rgba(20, 184, 166, 0.1);
}

.cta-button.secondary:active {
    transform: translateY(-2px) scale(1.02);
}

.cta-button.accent {
    background: linear-gradient(135deg, var(--accent) 0%, #0d9488 100%);
    color: white;
    border: none;
    box-shadow: 0 10px 40px rgba(20, 184, 166, 0.4);
}

.cta-button.accent:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 60px rgba(20, 184, 166, 0.6), 0 0 40px rgba(20, 184, 166, 0.4);
}

.cta-button.accent:active {
    transform: translateY(-2px) scale(1.02);
}

.button-icon {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.cta-button:hover .button-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Social Media */
.social-media {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out 1.6s both;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-primary);
}

.social-link svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.social-link:nth-child(1):hover {
    border-color: #333;
    box-shadow: 0 10px 30px rgba(51, 51, 51, 0.4);
}

.social-link:nth-child(2):hover {
    border-color: #0077b5;
    box-shadow: 0 10px 30px rgba(0, 119, 181, 0.4);
}

.social-link:nth-child(3):hover {
    border-color: #1da1f2;
    box-shadow: 0 10px 30px rgba(29, 161, 242, 0.4);
}

.social-link:nth-child(4):hover {
    border-color: #e1306c;
    box-shadow: 0 10px 30px rgba(225, 48, 108, 0.4);
}

.social-link:hover svg {
    transform: scale(1.2) rotate(5deg);
}

/* Footer */
.footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    animation: fadeIn 1s ease-out 1.6s both;
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .name {
        font-size: 2.5rem;
    }

    .greeting {
        font-size: 1.25rem;
    }

    .description {
        font-size: 1rem;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .cta-section {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-button {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .name {
        font-size: 2rem;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }
}