:root {
    --bg-light: #f8f9fa;
    --bg-gradient-1: #e0c3fc;
    --bg-gradient-2: #8ec5fc;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --accent: #6366f1;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-hand: 'Caveat', cursive;
    
    --radius-sm: 12px;
    --radius-md: 24px;
    --radius-lg: 32px;
    
    --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.1);
    
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-light);
}

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

/* Background Gradients & Noise */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(224, 195, 252, 0.3), transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(142, 197, 252, 0.3), transparent 50%);
    z-index: -2;
    pointer-events: none;
}

.background-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.section {
    padding: 120px 0;
}

.section-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 3rem;
    letter-spacing: -1px;
}

.serif-title {
    font-family: var(--font-heading);
    font-size: 2rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1000px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.nav-content {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mode-toggle {
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-toggle span {
    background: var(--text-main);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

.resume-link {
    font-weight: 600 !important;
    color: var(--text-main) !important;
}

/* Background Marquee */
.background-marquee {
    position: absolute;
    top: 20vh;
    left: 0;
    width: 100vw;
    overflow: hidden;
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

.background-marquee .marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
}

.background-marquee span {
    font-family: var(--font-body);
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.08);
    margin-right: 2rem;
    text-transform: uppercase;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

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

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

.hero-text {
    flex: 1;
}

.greeting {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: -10px;
}

.name {
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.8;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 40px rgba(0,0,0,0.1));
    animation: float 6s ease-in-out infinite;
}

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

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.btn-link {
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid var(--text-main);
    padding-bottom: 4px;
}

.polaroid-scatter {
    position: relative;
    height: 500px;
}

.polaroid {
    position: absolute;
    background: white;
    padding: 1rem 1rem 3rem 1rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.polaroid:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 10;
    box-shadow: var(--shadow-hover);
}

.polaroid img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    filter: sepia(0.2) contrast(1.1);
}

.polaroid-caption {
    font-family: var(--font-hand);
    font-size: 2rem;
    text-align: center;
    position: absolute;
    bottom: 10px;
    width: 100%;
    left: 0;
    color: #333;
}

.p-1 {
    top: 50px;
    left: 20px;
    transform: rotate(-10deg);
}

.p-2 {
    top: 100px;
    right: 20px;
    transform: rotate(8deg);
}

/* Projects / Bento Grid */
.projects-intro {
    max-width: 600px;
    margin-bottom: 4rem;
}

.projects-intro p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 2rem;
}

.bento-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.bento-content {
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.bento-content h3 {
    font-family: var(--font-body);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.bento-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.tags {
    display: flex;
    gap: 0.5rem;
}

.tags span {
    background: var(--bg-light);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.view-link {
    position: absolute;
    bottom: -2rem;
    left: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.bento-item:hover .view-link {
    opacity: 1;
    transform: translateY(0);
}

.bento-item img {
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.bento-item:hover img {
    transform: scale(1.02) translateY(-10px);
}

/* Specific Bento Sizes */
.bento-item.tall {
    grid-row: span 2;
}

.bento-item.wide {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
}

.bento-item.wide img {
    width: 50%;
}

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

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 150px;
    height: 100%;
    width: 2px;
    background: rgba(0,0,0,0.1);
}

.timeline-item {
    display: flex;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-date {
    width: 150px;
    font-weight: 600;
    color: var(--text-muted);
    padding-top: 0.5rem;
    padding-right: 2rem;
    text-align: right;
}

.timeline-content {
    flex: 1;
    padding-left: 3rem;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content h3 {
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-muted);
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 6rem;
    padding-bottom: 3rem;
}

.footer .large {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin: 2rem 0 3rem 0;
}

.btn-primary {
    display: inline-block;
    background: var(--text-main);
    color: white;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.contact-email {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.status {
    color: var(--text-muted);
    margin-bottom: 4rem;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }
    
    .hero-subtitle {
        margin: 0 auto;
    }
    
    .about-container {
        grid-template-columns: 1fr;
    }
    
    .polaroid-scatter {
        height: 400px;
        margin-top: 2rem;
    }
    
    .p-1 { left: 50%; transform: translateX(-60%) rotate(-10deg); }
    .p-2 { right: 50%; transform: translateX(60%) rotate(8deg); }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-item.tall {
        grid-row: auto;
    }
    
    .bento-item.wide {
        grid-column: auto;
        flex-direction: column;
    }
    
    .bento-item.wide img {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    
    .timeline::before { left: 0; }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-date {
        width: auto;
        text-align: left;
        padding-bottom: 1rem;
    }
    
    .timeline-content {
        padding-left: 2rem;
    }
    
    .timeline-content::before {
        left: -5px;
        top: 0;
    }
}
