:root {
    /* Dark theme colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent-purple: #8b5cf6;
    --accent-blue: #3B82F6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

[data-theme="light"] {
    /* Light theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-purple: #7c3aed;
    --accent-blue: #2563eb;
    --accent-cyan: #0891b2;
    --accent-green: #059669;
    --accent-orange: #d97706;
    --accent-red: #dc2626;
    --border-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: all 0.3s ease;
    position: relative;
}

/* Dashed Grid Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, var(--border-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0, 0 0;
    mask-image:
        repeating-linear-gradient(to right,
            black 0px,
            black 3px,
            transparent 3px,
            transparent 8px),
        repeating-linear-gradient(to bottom,
            black 0px,
            black 3px,
            transparent 3px,
            transparent 8px);
    -webkit-mask-image:
        repeating-linear-gradient(to right,
            black 0px,
            black 3px,
            transparent 3px,
            transparent 8px),
        repeating-linear-gradient(to bottom,
            black 0px,
            black 3px,
            transparent 3px,
            transparent 8px);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
    z-index: -2;
    opacity: 1;
}

/* Animated gradient overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {

    0%,
    100% {
        transform: translateX(0) translateY(0) scale(1);
    }

    33% {
        transform: translateX(-20px) translateY(-10px) scale(1.05);
    }

    66% {
        transform: translateX(10px) translateY(20px) scale(0.95);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto auto auto;
    gap: 20px;
    margin-bottom: 40px;
}

/* Glassmorphism Card Base */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow:
        0 8px 32px var(--shadow-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px var(--shadow-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Grid Areas */
.hero-card {
    grid-column: 1 / 8;
    grid-row: 1;
    background: var(--glass-bg);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    border-radius: 20px;
    animation: shimmer 3s ease-in-out infinite;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    50% {
        transform: translate(-50%, -50%) rotate(180deg);
    }
}

.hero-card .content {
    position: relative;
    z-index: 2;
}

.contact-card {
    grid-column: 8 / 13;
    grid-row: 1;
}

.about-card {
    grid-column: 1 / 6;
    grid-row: 2;
}

.skills-card {
    grid-column: 6 / 13;
    grid-row: 2;
}

.experience-card {
    grid-column: 1 / 9;
    grid-row: 3;
}

.achievements-card {
    grid-column: 9 / 13;
    grid-row: 3;
}

.projects-card {
    grid-column: 1 / 13;
    grid-row: 4;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.1;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 500;
}

.description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-secondary);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
    color: var(--text-primary);
}

.contact-link {
    color: var(--text-primary) !important;
    text-decoration: none;
}

.contact-link:hover {
    color: var(--accent-blue) !important;
}

.contact-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent-blue);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.skill-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.skill-category:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.skill-category h4 {
    color: var(--accent-blue);
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--text-muted);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: var(--text-secondary);
}

/* Experience */
.experience-item {
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border-left: 4px solid var(--accent-blue);
    transition: all 0.3s ease;
}

.experience-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(8px);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.experience-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.experience-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
}

.experience-list {
    list-style: none;
}

.experience-list li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.experience-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: bold;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-tech {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 16px;
    font-weight: 500;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-features {
    list-style: none;
}

.project-features li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.project-features li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

/* Achievements */
.achievement-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--accent-green);
    transition: all 0.3s ease;
}

.achievement-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.achievement-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.achievement-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Floating Elements */
.floating-theme-toggle {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 32px var(--shadow-color);
}

.floating-theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-color);
}

.floating-links {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-tag {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 32px var(--shadow-color);
}

.link-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-color);
    background: rgba(255, 255, 255, 0.1);
}

.link-tag svg {
    width: 16px;
    height: 16px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in:nth-child(1) {
    animation-delay: 0.1s;
}

.fade-in:nth-child(2) {
    animation-delay: 0.2s;
}

.fade-in:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in:nth-child(4) {
    animation-delay: 0.4s;
}

.fade-in:nth-child(5) {
    animation-delay: 0.5s;
}

.fade-in:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .hero-card {
        grid-column: 1 / 6;
    }

    .contact-card {
        grid-column: 6 / 9;
    }

    .about-card {
        grid-column: 1 / 5;
    }

    .skills-card {
        grid-column: 5 / 9;
    }

    .experience-card {
        grid-column: 1 / 9;
    }

    .achievements-card {
        grid-column: 1 / 9;
        grid-row: 4;
    }

    .projects-card {
        grid-column: 1 / 9;
        grid-row: 5;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hero-card,
    .contact-card,
    .about-card,
    .skills-card,
    .experience-card,
    .achievements-card,
    .projects-card {
        grid-column: 1;
        grid-row: auto;
    }

    h1 {
        font-size: 2.5rem;
    }

    .glass-card {
        padding: 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .floating-links {
        flex-direction: row;
        bottom: 16px;
        right: 16px;
    }

    .floating-theme-toggle {
        bottom: 16px;
        left: 16px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .glass-card {
        padding: 16px;
    }

    .floating-links {
        flex-direction: column;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Selection */
::selection {
    background: var(--accent-blue);
    color: white;
}

/* Ripple effect styles */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}