:root {
    --bg-dark: #0a0a0f;
    --text-main: #f5f5f7;
    --text-muted: #a1a1aa;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Glassmorphism Utilities */
.glass-nav, .glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.2);
}

/* Typography & Layout */
.section-padding {
    padding: 5rem 10%;
}

.section-heading {
    margin-bottom: 4rem;
    text-align: center;
}

.section-heading h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.heading-line {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Preloader & Opening Animation */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease, visibility 1s ease;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.preloader-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.profile-reveal {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    animation: revealProfile 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.5s;
    box-shadow: 0 0 30px var(--accent-glow);
    border: 2px solid var(--accent);
}

.profile-reveal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.glitch {
    font-size: 3rem;
    font-weight: 800;
    opacity: 0;
    animation: fadeInDown 1s forwards 1.5s;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0;
    animation: fadeInUp 1s forwards 2s;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: var(--transition);
}

nav.scrolled {
    padding: 1rem 10%;
    background: rgba(10, 10, 15, 0.85);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--accent-glow);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 8rem;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.name {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title {
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 2rem;
}

.intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 3rem;
}

.btn-glow {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: var(--accent);
    color: #fff;
    border-radius: 30px;
    font-weight: 600;
    font-family: var(--font-heading);
    box-shadow: 0 0 20px var(--accent-glow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.8);
    transform: translateY(-3px);
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.hero-image-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.hero-image {
    width: 400px;
    height: 500px;
    object-fit: cover;
    border-radius: 30px;
    z-index: 2;
    border: 1px solid var(--glass-border);
    position: relative;
    transform-style: preserve-3d;
}

.hero-image-glow {
    position: absolute;
    width: 400px;
    height: 500px;
    background: var(--accent);
    border-radius: 30px;
    filter: blur(80px);
    opacity: 0.3;
    z-index: 1;
    animation: pulseGlow 4s infinite alternate;
}

.floating-element {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    color: var(--accent);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.el-1 {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    top: 10%;
    right: 5%;
    animation: float 6s ease-in-out infinite;
}

.el-2 {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    bottom: 15%;
    left: 10%;
    animation: float 5s ease-in-out infinite reverse;
}

/* Summary Section */
.summary-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    text-align: center;
}

/* Education Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background: var(--glass-border);
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: calc(50% - 30px);
    margin-bottom: 2rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: calc(50% + 30px);
}

.timeline-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--bg-dark);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
    font-size: 1.2rem;
    top: 20px;
    z-index: 1;
    box-shadow: 0 0 15px var(--accent-glow);
}

.timeline-item:nth-child(odd) .timeline-icon {
    right: -55px;
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -55px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.timeline-content .location {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.timeline-content .date {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.9), rgba(10, 10, 15, 0.2));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-overlay i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    transform: translateY(20px);
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-overlay i {
    transform: translateY(0);
    opacity: 1;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: var(--accent);
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--transition);
}

.info-item:hover i {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 15px var(--accent-glow);
}

.info-item h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.info-item p {
    color: var(--text-muted);
}

.social-links h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-main);
}

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

.social-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    font-weight: 500;
}

.social-btn i {
    font-size: 1.5rem;
}

.social-btn:hover {
    transform: translateX(10px);
}

.whatsapp:hover { background: #25D366; color: #fff; border-color: #25D366; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4); }
.email:hover { background: #EA4335; color: #fff; border-color: #EA4335; box-shadow: 0 5px 15px rgba(234, 67, 53, 0.4); }
.facebook:hover { background: #1877F2; color: #fff; border-color: #1877F2; box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4); }
.linkedin:hover { background: #0A66C2; color: #fff; border-color: #0A66C2; box-shadow: 0 5px 15px rgba(10, 102, 194, 0.4); }

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes revealProfile {
    0% { opacity: 0; transform: scale(0.8) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulseGlow {
    0% { opacity: 0.2; transform: scale(0.95); }
    100% { opacity: 0.4; transform: scale(1.05); }
}

/* Reveal on scroll classes */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 991px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }
    
    .hero-text {
        order: 2;
    }
    
    .hero-image-wrapper {
        order: 1;
    }
    
    .intro {
        margin: 0 auto 3rem;
    }
    
    .name {
        font-size: 3.5rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 80px;
        left: 0 !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-icon,
    .timeline-item:nth-child(even) .timeline-icon {
        left: 5px;
        right: auto;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Add a hamburger menu for mobile in a real app, keeping simple here for now */
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .hero-image {
        width: 300px;
        height: 400px;
    }
    
    .hero-image-glow {
        width: 300px;
        height: 400px;
    }
    
    .section-padding {
        padding: 4rem 5%;
    }
}
