/* ===================================
   GLASSMORPHISM PORTFOLIO - SHADY BLACK NIGHT MODE
   =================================== */

/* CSS Variables for Themes */
:root {
    /* Night Mode - Shady Black */
    --bg-primary: #050505;
    --bg-secondary: #121212;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-cyan: #0ea5e9;
    --accent-purple: #8b5cf6;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glow-cyan: rgba(14, 165, 233, 0.3);
    --glow-purple: rgba(139, 92, 246, 0.3);
}

[data-theme="light"] {
    /* Day Mode - Soft Slate White */
    --bg-primary: #f8fafc;
    --bg-secondary: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-cyan: #2563eb;
    --accent-purple: #7c3aed;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(37, 99, 235, 0.2);
    --shadow: 0 8px 32px rgba(37, 99, 235, 0.1);
    --glow-cyan: rgba(37, 99, 235, 0.15);
    --glow-purple: rgba(124, 58, 237, 0.15);
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* Radial Gradient Background Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, var(--glow-purple) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, var(--glow-cyan) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
    opacity: 0.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ===================================
   GLASSMORPHISM CARDS
   =================================== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 0;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero-content .name {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-content .specialization {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Theme Toggle */
.top-actions {
    position: fixed;
    top: 32px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

.resume-agent-button {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #ffffff;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.resume-agent-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px var(--glow-cyan);
    filter: brightness(1.08);
}

.theme-toggle {
    position: static;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.toggle-icon {
    font-size: 1.5rem;
}

/* ===================================
   SECTION TITLES
   =================================== */
.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    padding: 100px 0;
}

.about-card {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-card h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-card p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ===================================
   EDUCATION SECTION
   =================================== */
.education {
    padding: 100px 0;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.education-item {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.education-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.education-item:hover::before {
    opacity: 0.3;
}

.edu-icon {
    font-size: 3rem;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

.education-item h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.education-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.education-link:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 18px var(--glow-cyan);
}

.education-item .institution {
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

.education-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===================================
   CERTIFICATIONS SECTION
   =================================== */
.certifications {
    padding: 100px 0;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.certification-item {
    text-align: center;
    position: relative;
}

.cert-icon {
    font-size: 3rem;
    color: var(--accent-purple);
    margin-bottom: 20px;
}

.certification-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.certification-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===================================
   BENTO GRID - PROJECT SHOWCASE
   =================================== */
.work-showcase {
    padding: 100px 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    grid-auto-rows: minmax(250px, auto);
}

/* Projects Grid for Learning Projects and Extensions */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.projects-grid .project-card {
    min-height: 300px;
}

/* Large Featured Card */
.project-card.large {
    grid-column: span 2;
    grid-row: span 2;
    position: relative;
}

.project-card.featured {
    background: var(--glass-bg);
    position: relative;
    overflow: hidden;
}

.project-card.featured:hover {
    box-shadow: 0 20px 60px var(--glow-purple);
}

.glow-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, var(--glow-cyan) 0%, transparent 70%);
    opacity: 0.2;
    pointer-events: none;
}

/* ===================================
   WORK SHOWCASE SECTIONS
   =================================== */
.work-showcase {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.learning-projects {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.extensions {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.live-apps {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin: -32px auto 32px;
    max-width: 640px;
    font-size: 1.05rem;
}

.project-context {
    margin-top: auto;
    margin-bottom: 14px;
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.live-app-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 126px;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 22px var(--glow-cyan);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.project-link:hover .live-app-button {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px var(--glow-purple);
    filter: brightness(1.08);
}

/* Project Cards */
.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3D Hover Effect */
.project-card:hover {
    transform: translateY(-12px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.project-icon {
    font-size: 3rem;
    color: var(--accent-cyan);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.project-card:hover .project-icon {
    color: var(--accent-purple);
}

.project-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-card-info {
    position: relative;
}

.info-icon-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.info-icon-button img {
    width: 16px;
    height: 16px;
    display: block;
}

.info-icon-button:hover {
    transform: scale(1.08);
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 12px var(--glow-cyan);
}

.info-icon-button:focus-visible,
.modal-close:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

.render-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 20px;
}

.chatbot-embed {
    margin: 24px 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tech-tags span {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tech-tags span:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--glow-cyan);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1100;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    width: min(560px, 100%);
    position: relative;
    transform: translateY(10px);
    transition: transform 0.25s ease;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-content p {
    color: var(--text-secondary);
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.08);
    border-color: var(--accent-cyan);
}

/* ===================================
   TECH STACK SECTION
   =================================== */
.tech-stack {
    padding: 100px 0;
}

.tech-bar {
    max-width: 1000px;
    margin: 0 auto;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.tech-item {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 40px var(--glow-cyan);
    border-color: var(--accent-cyan);
}

.tech-item i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tech-item span {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatingGlow {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.6;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Scroll-triggered animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .project-card.large {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .hero {
        min-height: 80vh;
    }
    
    .top-actions {
        top: 20px;
        right: 20px;
        gap: 8px;
    }

    .resume-agent-button {
        padding: 10px 14px;
        font-size: 0.84rem;
    }

    .theme-toggle {
        width: 50px;
        height: 50px;
    }
    
    .glass {
        padding: 24px;
    }
    
    .education-grid,
    .certifications-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 16px;
    }
    
    section {
        padding: 60px 0 !important;
    }
}

@media (max-width: 480px) {
    .hero-content .name {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .glass {
        padding: 20px;
    }
    
    .project-card h3 {
        font-size: 1.25rem;
    }
}

/* ===================================
   3D TILT EFFECT (Enhanced)
   =================================== */
[data-tilt] {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

[data-tilt]:hover {
    transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(1.02);
}
