@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --primary-color: #e67e22;
    --primary-glow: rgba(230, 126, 34, 0.15);
    --bg-base: #03060f;
    --bg-card: rgba(10, 15, 30, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(230, 126, 34, 0.35);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- Base Setups & Typography --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-base);
    min-height: 100vh;
    position: relative;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* --- Lovable Animated Moving Mesh Engine --- */
.mesh-layer {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #060a17 0%, var(--bg-base) 100%);
}
.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.4;
    will-change: transform;
}
.blob-orange {
    width: 650px; height: 650px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -200px; left: -150px;
    animation: moveBlobOne 28s infinite alternate ease-in-out;
}
.blob-purple {
    width: 550px; height: 550px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    bottom: -150px; right: -100px;
    animation: moveBlobTwo 22s infinite alternate ease-in-out;
}

@keyframes moveBlobOne {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(120px, 90px) scale(1.1); }
}
@keyframes moveBlobTwo {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-90px, -110px) scale(1.05); }
}

.grid-overlay-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.008) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.008) 1px, transparent 1px);
    background-size: 45px 45px;
    z-index: -2;
    pointer-events: none;
}

/* Dynamic Interactive Tracking Background Dot */
.lovable-cursor-glow {
    position: fixed;
    width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(230, 126, 34, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: left, top;
}

/* --- High-Fidelity Navigation Bar --- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 1.2rem 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9000;
    background: rgba(3, 6, 15, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
}
.logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-primary);
}
.accent-dot { color: var(--primary-color); }
.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.25s ease;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 50%; width: 0; height: 2px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

#menu-toggle { display: none; }
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 9500;
}
.hamburger-menu span {
    display: block;
    width: 22px; height: 2px;
    background-color: var(--text-primary);
    transition: all 0.25s ease;
}

/* --- Frosted Card Layout Matrix --- */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 12px;
    transition: border 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 4%;
}
.page-section { padding: 110px 0; }
.section-header { text-align: center; margin-bottom: 4.5rem; }
.section-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(to bottom, #ffffff 60%, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 550px;
    margin: 0 auto;
}

/* --- Hero Frame --- */
.first-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding-top: 80px;
}
.hero-content { flex: 1; max-width: 650px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(230, 126, 34, 0.05);
    border: 1px solid rgba(230, 126, 34, 0.15);
    color: var(--primary-color);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.3px;
}
.pulse-dot {
    width: 6px; height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(230, 126, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0); }
}
.heading {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1rem;
}
.name-gradient {
    background: linear-gradient(to right, #ffffff, #c2d1f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.subheading {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}
.specilization { color: var(--primary-color); font-weight: 600; }
.para { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 2.5rem; max-width: 540px; }
.cta-group { display: flex; gap: 1.25rem; }
.resume-button, .secondary-button {
    text-decoration: none;
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.resume-button {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 20px rgba(230, 126, 34, 0.15);
}
.resume-button:hover {
    background-color: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(230, 126, 34, 0.3);
}
.secondary-button {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.secondary-button:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.hero-image-wrapper { flex: 0 0 auto; }
.hero-image-container {
    width: 330px; height: 330px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    padding: 10px;
    background: rgba(255, 255, 255, 0.005);
    position: relative;
    box-shadow: 0 20px 45px rgba(0,0,0,0.6);
}
.profile-image { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* --- Asymmetrical Bento Grid Specification --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 1.2rem;
}
.bento-card {
    position: relative;
    overflow: hidden;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.bento-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 10px 25px rgba(230,126,34,0.02);
}
.feature-large { grid-column: span 2; grid-row: span 2; }
.feature-medium { grid-column: span 2; grid-row: span 1; }
.feature-small { grid-column: span 1; grid-row: span 1; }

.bento-icon { font-size: 1.6rem; color: var(--text-secondary); margin-bottom: 1rem; }
.highlight-orange { color: var(--primary-color); }
.bento-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.bento-content p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5; }
.progress-wrapper {
    background: rgba(255,255,255,0.03);
    height: 4px; border-radius: 10px;
    margin-top: 1rem; overflow: hidden; width: 100%;
}
.progress-bar {
    height: 100%; background: var(--primary-color); width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Project Cards Layout --- */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}
.project-card {
    padding: 2.25rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    transform-style: preserve-3d;
    perspective: 1000px;
}
.project-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.card-glow, .bento-card-glow {
    position: absolute;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(230,126,34,0.06) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px; right: -100px;
    pointer-events: none;
}
.project-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-folder-icon { font-size: 1.4rem; color: var(--text-secondary); opacity: 0.6; }
.project-tag { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--primary-color); letter-spacing: 0.5px; }
.project-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 600; margin-bottom: 0.75rem; }
.project-description { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55; margin-bottom: 2rem; }
.project-links { display: flex; gap: 1rem; }
.project-link-btn { padding: 0.55rem 1.2rem; font-size: 0.85rem; font-weight: 600; border-radius: 4px; text-decoration: none; transition: all 0.2s ease; }
.primary-link { background-color: var(--text-primary); color: var(--bg-base); }
.secondary-link { background: transparent; color: var(--text-secondary); border: 1px solid var(--glass-border); }
.secondary-link:hover { border-color: rgba(255,255,255,0.15); color: var(--text-primary); }

/* --- Timeline Track --- */
.timeline-wrapper { position: relative; max-width: 820px; margin: 0 auto; width: 100%; }
.timeline-backline {
    position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(to bottom, transparent, var(--glass-border) 10%, var(--glass-border) 90%, transparent);
    transform: translateX(-50%);
}
.timeline-item { display: flex; justify-content: flex-end; width: 50%; position: relative; margin-bottom: 3.5rem; padding-right: 40px; }
.timeline-item.item-right { margin-left: 50%; justify-content: flex-start; padding-right: 0; padding-left: 40px; }
.timeline-dot {
    position: absolute; right: -5px; top: 32px; width: 10px; height: 10px; border-radius: 50%;
    background-color: var(--bg-base); border: 1px solid var(--primary-color); z-index: 10; box-shadow: 0 0 6px var(--primary-color);
}
.timeline-item.item-right .timeline-dot { left: -5px; }
.education-card { padding: 2rem; width: 100%; }
.edu-date { font-size: 0.82rem; font-weight: 600; color: var(--primary-color); display: block; margin-bottom: 0.4rem; }
.education-title { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 0.4rem; }
.education-degree { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 1rem; }
.edu-meta-row { border-top: 1px solid rgba(255,255,255,0.03); padding-top: 0.8rem; display: flex; }
.edu-stat-badge { font-size: 0.82rem; font-weight: 500; background: rgba(255,255,255,0.03); padding: 2px 8px; border-radius: 4px; }

/* --- Formspree Integration Interface --- */
.contact-box-container { width: 100%; max-width: 680px; margin: 0 auto 3rem auto; }
.contact-form-container { padding: 3rem 2.25rem; }
.contact-form { display: flex; flex-direction: column; gap: 2.2rem; }
.form-double-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group-field { position: relative; width: 100%; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 0.7rem 0; background: transparent; border: none;
    border-bottom: 1px solid var(--glass-border); color: var(--text-primary);
    font-size: 0.95rem; font-family: var(--font-body); transition: border-color 0.2s ease;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-color); }
.form-group-field label {
    position: absolute; left: 0; top: 0.7rem; color: var(--text-secondary);
    pointer-events: none; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); font-size: 0.95rem;
}
.contact-form input:focus ~ label,
.contact-form input:not(:placeholder-shown) ~ label,
.contact-form textarea:focus ~ label,
.contact-form textarea:not(:placeholder-shown) ~ label { top: -14px; font-size: 0.75rem; color: var(--primary-color); font-weight: 500; }
.submit-button { background-color: var(--primary-color); color: white; border: none; padding: 0.85rem; font-size: 0.95rem; font-weight: 600; border-radius: 4px; cursor: pointer; transition: all 0.25s ease; }
.submit-button:hover { background-color: #d35400; }

.contact-social-icons { display: flex; gap: 1.2rem; justify-content: center; }
.social-icon-wrapper {
    width: 48px; height: 48px; border-radius: 50%; background: var(--glass-bg); border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--text-secondary);
    text-decoration: none; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.social-icon-wrapper:hover { transform: translateY(-3px); color: #fff; }
.instagram:hover { border-color: #E4405F; box-shadow: 0 0 12px rgba(228,64,95,0.15); }
.linkedin:hover { border-color: #0077B5; box-shadow: 0 0 12px rgba(0,119,181,0.15); }
.gmail:hover { border-color: #DB4437; box-shadow: 0 0 12px rgba(219,68,55,0.15); }

/* --- Footer Infrastructure --- */
.premium-footer { text-align: center; padding: 2.5rem 0; border-top: 1px solid var(--glass-border); color: var(--text-secondary); font-size: 0.82rem; margin-top: 4.5rem; }

/* --- Performance Hardware Animations --- */
.fade-in-up { opacity: 0; transform: translateY(20px); animation: fadeInUpAnim 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.hero-content .fade-in-up:nth-child(1) { animation-delay: 0.04s; }
.hero-content .fade-in-up:nth-child(2) { animation-delay: 0.08s; }
.hero-content .fade-in-up:nth-child(3) { animation-delay: 0.12s; }
.hero-content .fade-in-up:nth-child(4) { animation-delay: 0.16s; }
.hero-content .fade-in-up:nth-child(5) { animation-delay: 0.2s; }

@keyframes fadeInUpAnim { to { opacity: 1; transform: translateY(0); } }

.scroll-reveal .stagger-animate {
    opacity: 0; transform: translateY(25px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-reveal.active .stagger-animate { opacity: 1; transform: translateY(0); }
.scroll-reveal.active .stagger-animate:nth-child(1) { transition-delay: 0.03s; }
.scroll-reveal.active .stagger-animate:nth-child(2) { transition-delay: 0.06s; }
.scroll-reveal.active .stagger-animate:nth-child(3) { transition-delay: 0.09s; }
.scroll-reveal.active .stagger-animate:nth-child(4) { transition-delay: 0.12s; }
.scroll-reveal.active .stagger-animate:nth-child(5) { transition-delay: 0.15s; }

/* --- Viewports Responsive System --- */
@media screen and (max-width: 1024px) {
    .first-page { flex-direction: column; justify-content: center; text-align: center; gap: 3rem; padding-top: 120px; }
    .heading { font-size: 3.1rem; }
    .hero-image-container { width: 270px; height: 270px; }
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-large { grid-column: span 2; }
    .feature-small { grid-column: span 1; }
    .cta-group { justify-content: center; }
    .timeline-backline { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 0; }
    .timeline-item.item-right { margin-left: 0; padding-left: 50px; }
    .timeline-dot { left: 15px !important; right: auto !important; }
}

@media screen and (max-width: 768px) {
    .hamburger-menu { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
        background: rgba(3, 6, 15, 0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; align-items: center; gap: 2.5rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    #menu-toggle:checked ~ .nav-links { right: 0; }
    #menu-toggle:checked ~ .hamburger-menu span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    #menu-toggle:checked ~ .hamburger-menu span:nth-child(2) { opacity: 0; }
    #menu-toggle:checked ~ .hamburger-menu span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .bento-grid { grid-template-columns: 1fr; }
    .feature-large, .feature-medium, .feature-small { grid-column: span 1; }
    .form-double-row { grid-template-columns: 1fr; gap: 2.2rem; }
}