:root {
    --bg-color: #ffffff;
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --accent-color: #818cf8;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
.dark-theme {
    --bg-color: #050506;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --card-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);
}

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

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.08) 0px, transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.dark-theme body {
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.15) 0px, transparent 50%);
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 120px 0;
}

.section-title {
    max-width: 700px;
    margin: 0 auto 5rem auto;
    text-align: center;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.dark-theme nav {
    background: rgba(5, 5, 6, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    text-decoration: none;
    z-index: 1002;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

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

/* --- Hamburger --- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1002;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: var(--transition);
}

/* --- Mobile Nav Overlay --- */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 1001;
    transition: var(--transition);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav a {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
}

/* --- Hamburger Animation --- */
.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* --- Hero Section Refactored --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-content {
    text-align: left;
}

.hero h1 {
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    line-height: 1;
    margin-bottom: 2rem;
    color: #000;
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-visual {
    width: 100%;
    aspect-ratio: 4/5;
    background: #f1f5f9;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.15);
    border: 12px solid #fff;
    animation: float 6s ease-in-out infinite;
}

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

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Buttons --- */
.btn-group {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 1.2rem 2.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 50px -10px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: #fff;
    color: var(--text-primary);
    border: 2px solid #f1f5f9;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

/* --- Cards --- */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.card {
    background: #fff;
    padding: 3rem;
    border-radius: 32px;
    border: 1px solid #f1f5f9;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-15px);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.12);
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card .date {
    display: block;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card ul li {
    list-style: none;
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    color: var(--text-secondary);
}

.card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 900;
}

/* --- Skills --- */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.skill-tag {
    background: #fff;
    padding: 1rem 2rem;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    color: var(--text-secondary);
}

.skill-tag:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* --- Masonry Gallery --- */
.portfolio-grid {
    columns: 3;
    column-gap: 2rem;
}

.portfolio-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.02);
    opacity: 0;
    transform: translateX(100px) scale(0.9);
}

.dark-theme .portfolio-item {
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-item.reveal {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.portfolio-item:hover {
    transform: translateY(-15px) scale(1.03) !important;
    box-shadow: 0 40px 80px -15px rgba(99, 102, 241, 0.25);
    z-index: 10;
}

.portfolio-item img {
    width: 100%;
    display: block;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(20px);
}

.lightbox.active { display: flex; }

.lightbox-content {
    position: relative;
    max-width: 85%;
    max-height: 85vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 20px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -70px;
    right: 0;
    font-size: 3rem;
    cursor: pointer;
    color: #fff;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 120%;
    left: -10%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.lightbox-btn {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    pointer-events: auto;
    color: #fff;
    transition: var(--transition);
}

.lightbox-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 5rem;
}

.contact-item {
    background: #fff;
    padding: 2rem;
    border-radius: 24px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #f1f5f9;
}

.contact-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    background: #fff;
    margin-bottom: 1.5rem;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding-top: 50px;
    }
    .hero-content {
        text-align: center;
        order: 2;
    }
    .hero-content p {
        margin: 0 auto 3rem auto;
    }
    .btn-group {
        justify-content: center;
    }
    .hero-visual {
        max-width: 400px;
        margin: 0 auto;
        order: 1;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    
    /* Center Logo on Mobile */
    nav .container {
        justify-content: space-between;
    }
    
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .section-title h2 { font-size: 2.2rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .portfolio-grid { columns: 2; }
}

@media (max-width: 480px) {
    .portfolio-grid { columns: 1; }
    .hero h1 { font-size: 2.8rem; }
    .btn-group { flex-direction: column; gap: 1rem; }
    .btn { width: 100%; text-align: center; }
}
