:root {
    --bg-main: #020202;
    --bg-surface: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-light: #f5f5f7;
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    --whatsapp: #25D366;
}

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

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main); color: var(--text-primary);
    line-height: 1.5; overflow-x: hidden;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

body.loading { overflow: hidden; height: 100vh; }

/* Loader */
.loader {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #000; z-index: 99999; display: flex; align-items: center; justify-content: center;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
}
.loader-text { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 4rem); font-style: italic; opacity: 0; animation: fadeInOut 2.5s ease-in-out forwards; }
@keyframes fadeInOut { 0% { opacity: 0; filter: blur(10px); } 40% { opacity: 1; filter: blur(0); } 80% { opacity: 1; filter: blur(0); } 100% { opacity: 0; filter: blur(10px); transform: scale(1.05); } }

/* Scroll Progress */
.scroll-progress { position: fixed; top: 0; left: 0; width: 0%; height: 3px; background: var(--text-primary); z-index: 10001; transition: width 0.1s ease; }

/* Cursor */
.cursor { position: fixed; top: 0; left: 0; width: 6px; height: 6px; background: var(--text-primary); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width 0.2s, height 0.2s, background-color 0.2s; }
.cursor-follower { position: fixed; top: 0; left: 0; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; pointer-events: none; z-index: 9998; transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, background-color 0.3s, mix-blend-mode 0.3s; }
.cursor.hovered { width: 0; height: 0; }
.cursor-follower.hovered { width: 64px; height: 64px; background-color: var(--text-primary); border-color: transparent; mix-blend-mode: difference; }

/* Backgrounds */
.noise-bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; 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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E"); pointer-events: none; z-index: -1; }
.bg-surface { background: var(--bg-surface); border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
.glass { background: var(--glass-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: 20px; }

/* Transitions */
.page-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: var(--text-primary); z-index: 10000; transform: scaleY(0); transform-origin: top; transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1); }
.page-overlay.active { transform: scaleY(1); transform-origin: bottom; }

/* Layout */
.container { max-width: 1300px; margin: 0 auto; padding: 0 5vw; }
.section-padding { padding: 9vw 0; }
.pt-0 { padding-top: 0; }
.mt-4 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }

h1, h2, h3, h4, .logo { letter-spacing: -0.03em; font-weight: 600; }
.text-gradient { background: linear-gradient(135deg, #fff 0%, #444 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo span { color: var(--text-secondary); font-weight: 400; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem 2rem; border-radius: 100px; font-weight: 500; font-size: 0.95rem; text-decoration: none; border: none; outline: none; transition: var(--transition-fast); }
.btn-primary { background: var(--text-primary); color: var(--bg-main); }
.btn-primary:hover { background: #e0e0e0; transform: scale(1.02); }
.btn-secondary { background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-primary); }
.btn-secondary:hover { background: rgba(255,255,255,0.05); }
.btn-outline { background: transparent; border: 1px solid var(--glass-border); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--text-primary); }
.text-sm { font-size: 0.85rem; padding: 0.75rem 1.5rem; }
.w-100 { width: 100%; }

/* Button FX */
.pulse-glow { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
.glow-on-hover:hover { box-shadow: 0 0 20px rgba(255,255,255,0.2); }
.btn-whatsapp { background: rgba(37, 211, 102, 0.1); color: var(--whatsapp); border: 1px solid rgba(37, 211, 102, 0.2); }
.btn-whatsapp:hover { background: var(--whatsapp); color: #fff; }

.icon-button { background: transparent; border: none; color: var(--text-secondary); font-size: 1.25rem; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; transition: var(--transition-fast); }
.icon-button:hover { background: var(--glass-bg); color: var(--text-primary); }

/* Header */
header { position: fixed; top: 0; left: 0; width: 100%; padding: 2rem 0; z-index: 100; transition: padding 0.4s ease, background 0.4s ease; border-bottom: 1px solid transparent; }
header.scrolled { padding: 1rem 0; background: rgba(2, 2, 2, 0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.25rem; color: #fff; text-decoration: none; }
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.menu-btn { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; }
.mobile-menu { display: none; }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 100px; }
.hero-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 6vw; align-items: center; }
.hero-name { font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 1.5rem; opacity: 0; }
.hero-title { font-size: clamp(3rem, 5.5vw, 6rem); line-height: 1.05; margin-bottom: 2rem; }
.hero-subtitle { font-size: 1.2rem; margin-bottom: 3rem; opacity: 0; color: var(--text-secondary); }
.hero-buttons { opacity: 0; display: flex; gap: 1rem; }
.hero-portrait { position: relative; opacity: 0; height: 100%; display: flex; align-items: center; justify-content: flex-end; }
.portrait-wrapper { position: relative; width: 100%; max-width: 450px; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; transform-style: preserve-3d; }
.cinematic-glow { position: absolute; top: -20%; left: -20%; width: 140%; height: 140%; background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%); z-index: 1; pointer-events: none; }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(15%) contrast(1.05); }

/* Global Animations */
.reveal-text-line { overflow: hidden; line-height: 1.1; }
.reveal-text-line span { display: inline-block; transform: translateY(100%); opacity: 0; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s linear; }
.hero-title.visible .reveal-text-line span { transform: translateY(0); opacity: 1; }
.reveal-element { opacity: 0; transform: translateY(40px); transition: opacity var(--transition-slow), transform var(--transition-slow); }
.reveal-element.visible { opacity: 1; transform: translateY(0); }
.reveal-img.visible { opacity: 1; transform: translateX(0); transition: opacity var(--transition-slow), transform var(--transition-slow); }
.floating-slow { animation: float 8s ease-in-out infinite; }
@keyframes float { 0% { transform: scale(1.02) translateY(0); } 50% { transform: scale(1.05) translateY(-8px); } 100% { transform: scale(1.02) translateY(0); } }

/* About Section */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 5vw; align-items: center; }
.section-title { font-size: clamp(2.5rem, 4vw, 3.5rem); margin-bottom: 1.5rem; line-height: 1.1; }
.section-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 3rem; }
.about-paragraph { font-size: 1.15rem; color: var(--text-secondary); display: flex; flex-direction: column; gap: 1.5rem; }

/* Timeline */
.timeline { display: flex; justify-content: space-between; align-items: center; position: relative; max-width: 400px; margin-top: 3rem; }
.timeline-step { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; z-index: 2; }
.timeline-step span { font-size: 0.85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; transition: color 0.3s; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--glass-bg); border: 2px solid var(--glass-border); transition: 0.3s; }
.dot.active { background: var(--text-primary); border-color: var(--text-primary); box-shadow: 0 0 10px rgba(255,255,255,0.5); }
.timeline-step:hover span { color: var(--text-primary); }
.timeline-line { flex-grow: 1; height: 2px; background: var(--glass-border); margin: 0 -10px; z-index: 1; margin-bottom: 1.5rem; transition: background 1s; }
.timeline-line.active-line { background: var(--text-primary); }

.about-stats-col { border: 1px solid var(--glass-border); padding: 3rem; border-radius: 20px; background: rgba(5,5,5,0.5); }
.stat-item { display: flex; justify-content: space-between; align-items: baseline; }
.stat-num { font-size: 2.5rem; font-weight: 600; font-family: 'Playfair Display', serif; }
.stat-lbl { color: var(--text-secondary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.divider { height: 1px; background: var(--glass-border); margin: 1.5rem 0; width: 100%; }

/* Tilt FX globally */
.tilt-card { transform-style: preserve-3d; perspective: 1000px; }

/* Skills Grid */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 4rem; }
.skill-card {
    padding: 3rem 2rem; border-radius: 16px; border: 1px solid var(--glass-border);
    background: transparent; transition: transform 0.1s linear, background 0.3s;
    display: flex; flex-direction: column; align-items: flex-start;
}
.skill-card:hover { background: var(--glass-bg); border-color: rgba(255,255,255,0.15); }
.skill-card i { font-size: 2rem; color: var(--text-primary); margin-bottom: 1.5rem; }
.skill-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.skill-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* Startups - What I'm building */
.startups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.startup-card {
    padding: 3rem; border: 1px solid var(--glass-border); border-radius: 16px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    transition: transform var(--transition-fast), border-color 0.3s;
}
.startup-card:hover { transform: translateY(-10px) scale(1.02); border-color: rgba(255,255,255,0.2); }
.startup-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--glass-bg); border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 1.5rem; color: var(--text-primary); }
.startup-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.startup-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Projects (Focus) */
.projects { padding-top: 8rem; }
.projects-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; }
.project-box {
    display: flex; flex-direction: column; gap: 2rem;
    align-items: flex-start; border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 4vw; background: rgba(5,5,5,0.3);
    transition: transform 0.1s linear;
}

.project-img-container {
    width: 100%; border-radius: 16px; overflow: hidden; aspect-ratio: 4/3;
    position: relative; border: 1px solid rgba(255,255,255,0.05); background: #111;
}
.project-img-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); transform-origin: top; }
.project-box:hover .project-img-container img { transform: scale(1.05); }

.project-content h3 { font-size: 2.5rem; margin-bottom: 1rem; font-family: 'Playfair Display', serif; }
.project-content .project-desc { font-size: 1.05rem; color: var(--text-secondary); margin-bottom: 2rem; line-height: 1.6; }
.project-highlights { list-style: none; margin-bottom: 2.5rem; display: flex; flex-direction: column; gap: 0.8rem; }
.project-highlights li { display: flex; align-items: center; gap: 0.75rem; color: var(--text-primary); font-size: 0.95rem; }
.project-highlights i { color: var(--text-secondary); font-size: 1.2rem; }
.project-actions { display: flex; gap: 1rem; }

/* Features / Why Choose Me */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; max-width: 900px; margin: 0 auto; }
.feature-item { padding: 3rem; background: var(--bg-main); border: 1px solid var(--glass-border); border-radius: 16px; text-align: center; }
.feature-item:hover { background: var(--glass-bg); }
.feature-item i { font-size: 2.5rem; margin-bottom: 1rem; color: var(--text-secondary); }
.feature-item h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-item p { color: var(--text-secondary); font-size: 0.9rem; }

/* Testimonials Slider (Pure CSS approach + simple flex) */
.testimonial-slider { overflow: hidden; max-width: 900px; margin: 0 auto; padding: 2rem 0; cursor: grab; }
.testimonial-slider:active { cursor: grabbing; }
.testimonial-track { display: flex; gap: 2rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2rem; }
.testimonial-track::-webkit-scrollbar { display: none; }
.test-card { min-width: 100%; scroll-snap-align: center; padding: 4rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.test-icon { font-size: 2.5rem; color: rgba(255,255,255,0.1); margin-bottom: 2rem; }
.test-text { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 3vw, 2rem); font-style: italic; margin-bottom: 2.5rem; line-height: 1.4; color: var(--text-primary); }
.test-author strong { font-size: 1.1rem; display: block; }
.test-author span { font-size: 0.9rem; color: var(--text-secondary); }

/* Contact Section & Forms */
.contact-card { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding: 5rem; }
.clean-form { display: flex; flex-direction: column; gap: 2rem; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.clean-form input, .clean-form textarea, .clean-form select { width: 100%; padding: 1.5rem 0; background: transparent; border: none; border-bottom: 1px solid var(--glass-border); color: var(--text-primary); font-family: inherit; font-size: 1.05rem; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.clean-form input:focus, .clean-form textarea:focus, .clean-form select:focus { outline: none; border-bottom-color: var(--text-primary); }
.clean-form select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right center; background-size: 1.2rem; cursor: pointer; }
.clean-form select option { background: var(--bg-surface); color: var(--text-primary); padding: 1rem; }
.form-label { display: block; font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--text-secondary); text-align: left; }
.glass-pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 100px; font-size: 0.85rem; color: var(--text-secondary); background: var(--glass-bg); border: 1px solid var(--glass-border); }

/* Footer */
.footer { padding: 4rem 0 2rem; border-top: 1px solid var(--glass-border); }
.footer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; }
.footer-tag { color: var(--text-secondary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; color: var(--text-secondary); font-size: 0.9rem; }
.socials { display: flex; gap: 1rem; }
.socials a { color: var(--text-secondary); font-size: 1.25rem; transition: color var(--transition-fast); }
.socials a:hover { color: var(--text-primary); }

/* Responsive Updates */
@media (max-width: 1024px) {
    .project-box { gap: 3rem; padding: 6vw; }
    .hero-layout, .about-grid { grid-template-columns: 1fr; }
    .hero-layout { text-align: center; gap: 3rem; }
    .hero-buttons { justify-content: center; }
    .hero-portrait { justify-content: center; }
    .timeline { margin: 3rem auto; }
}
@media (max-width: 768px) {
    .cursor, .cursor-follower { display: none !important; }
    body { cursor: auto; } * { cursor: auto; }
    .nav-links, .nav-cta { display: none; }
    .menu-btn { display: block; }
    .mobile-menu { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-main); padding: 2rem; flex-direction: column; gap: 2rem; text-align: center; border-bottom: 1px solid var(--glass-border); z-index: 99; }
    .mobile-menu.active { display: flex; }
    .mobile-menu a { color: var(--text-primary); text-decoration: none; font-size: 1.2rem; }
    
    /* Structure overrides */
    .section-padding { padding: 5rem 0; }
    .contact-card, .features-grid, .input-row { grid-template-columns: 1fr; padding: 1.5rem; gap: 2rem; }
    .contact-card { padding: 2rem; }
    .about-stats-col { padding: 2rem; }
    
    /* Text sizing */
    .hero-title { font-size: clamp(2.5rem, 10vw, 3.5rem); }
    .section-title { font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.2; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 2rem; }
    .project-content h3 { font-size: 2rem; }
    .test-text { font-size: 1.2rem; margin-bottom: 1.5rem; }
    
    /* Elements & Forms */
    .test-card { padding: 2rem; }
    .projects-grid { gap: 2.5rem; }
    .project-box { padding: 6vw; padding-top: 8vw; border-radius: 16px; }
    .form-card { padding: 2rem !important; }
    .form-success { padding: 3rem 1.5rem !important; }
    .glass-pill { font-size: 0.8rem !important; padding: 0.5rem 1rem; }
    
    /* Buttons */
    .hero-buttons, .contact-buttons { flex-direction: column; width: 100%; gap: 1rem; }
    .hero-buttons .btn, .contact-buttons .btn { width: 100%; justify-content: center; }
    .project-actions { flex-wrap: wrap; }
    .project-actions .btn { flex-grow: 1; text-align: center; justify-content: center; }

    /* Footer */
    .footer { padding: 3rem 0; }
    .footer-top, .footer-bottom { flex-direction: column; text-align: center; gap: 1.5rem; justify-content: center; }
    .footer-tag { margin-top: 1rem; }
}
