/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-dark: #1f2937;
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-light: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    --gradient-text: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== GLASSMORPHISM UTILITIES ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-light);
}

.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.glass-btn:hover {
    background: var(--glass-bg);
    border-color: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

/* ===== NEUMORPHISM UTILITIES ===== */
.neumorphism {
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: 
        20px 20px 60px #0d0d1a,
        -20px -20px 60px #272742;
}

.neumorphism-inset {
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: 
        inset 20px 20px 60px #0d0d1a,
        inset -20px -20px 60px #272742;
}

/* ===== NAVIGATION ===== */
.glass-nav {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.glass-nav.scrolled {
    background: rgba(15, 15, 35, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand .brand-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: var(--text-primary);
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

#three-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    margin-top: 2rem;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.4);
}

.btn-outline-light {
    border: 2px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: var(--glass-bg);
    border-color: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-3px);
}

/* ===== PROFILE CARD ===== */
.profile-card {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 2;
    border: 3px solid var(--glass-border);
    box-shadow: var(--shadow-light);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.3;
    filter: blur(20px);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-arrow {
    color: var(--text-secondary);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ===== SECTION STYLES ===== */
.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background: var(--bg-secondary);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(99,102,241,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.about-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ===== SKILLS GRID ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-item {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.skill-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skill-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== STATS CARDS ===== */
.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-section {
    background: var(--bg-primary);
    position: relative;
}

.portfolio-card {
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.portfolio-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.card-front {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.card-back {
    background: var(--bg-tertiary);
    transform: rotateY(180deg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-image {
    position: relative;
    height: 60%;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

.card-icon {
    font-size: 3rem;
    color: white;
}

.card-content {
    padding: 1.5rem;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-category {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.card-back-content h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card-back-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.tech-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    background: var(--bg-secondary);
    position: relative;
}

.contact-form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: var(--shadow-light);
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

/* ===== SOCIAL LINKS ===== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-link {
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-primary);
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
}

.footer-text {
    color: var(--text-secondary);
    margin: 0;
}

.footer-highlight {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
        word-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        word-wrap: break-word;
    }
    
    .hero-description {
        font-size: 1rem;
        word-wrap: break-word;
    }
    
    .section-title {
        font-size: 2rem;
        word-wrap: break-word;
    }
    
    .section-subtitle {
        font-size: 1rem;
        word-wrap: break-word;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-item {
        padding: 1.5rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
        margin: 0 10px;
        width: calc(100% - 20px);
    }
    
    .social-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .social-link {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .profile-card {
        width: 250px;
        height: 250px;
    }
    
    .portfolio-card {
        height: 350px;
    }
    
    .card-back {
        padding: 1.5rem;
    }
    
    .tech-stack {
        gap: 0.3rem;
        flex-wrap: wrap;
    }
    
    .tech-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .navbar-nav .nav-link {
        margin: 0.2rem 0;
        padding: 0.8rem 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .col-lg-8, .col-lg-6, .col-lg-4, .col-md-6 {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
        word-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        word-wrap: break-word;
    }
    
    .hero-description {
        font-size: 0.95rem;
        word-wrap: break-word;
    }
    
    .section-title {
        font-size: 1.8rem;
        word-wrap: break-word;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        word-wrap: break-word;
    }
    
    .about-title {
        font-size: 2rem;
        word-wrap: break-word;
    }
    
    .about-text {
        font-size: 1rem;
        word-wrap: break-word;
    }
    
    .contact-form-container {
        padding: 1rem;
        margin: 0 5px;
        width: calc(100% - 10px);
    }
    
    .navbar-brand .brand-text {
        font-size: 1.2rem;
    }
    
    .profile-card {
        width: 200px;
        height: 200px;
    }
    
    .portfolio-card {
        height: 320px;
    }
    
    .card-back {
        padding: 1rem;
    }
    
    .card-back-content h4 {
        font-size: 1.2rem;
        word-wrap: break-word;
    }
    
    .card-back-content p {
        font-size: 0.9rem;
        word-wrap: break-word;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .skill-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .skill-item h4 {
        font-size: 1.1rem;
        word-wrap: break-word;
    }
    
    .skill-item p {
        font-size: 0.85rem;
        word-wrap: break-word;
    }
    
    .social-links {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .form-control {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    .btn-lg {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .col-lg-8, .col-lg-6, .col-lg-4, .col-md-6 {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 400px) {
    .container {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        word-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        word-wrap: break-word;
    }
    
    .section-title {
        font-size: 1.6rem;
        word-wrap: break-word;
    }
    
    .about-title {
        font-size: 1.8rem;
        word-wrap: break-word;
    }
    
    .contact-form-container {
        padding: 0.8rem;
        margin: 0;
        width: 100%;
    }
    
    .profile-card {
        width: 180px;
        height: 180px;
    }
    
    .portfolio-card {
        height: 300px;
    }
    
    .card-back {
        padding: 0.8rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .skill-item {
        padding: 1rem;
    }
    
    .skill-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .social-links {
        gap: 0.6rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .navbar-brand .brand-text {
        font-size: 1.1rem;
    }
    
    .hero-buttons .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .col-lg-8, .col-lg-6, .col-lg-4, .col-md-6 {
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.shadow-custom {
    box-shadow: var(--shadow-light);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
                var(--gradient-primary) border-box;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
