/* Clean Corporate Dark Glassmorphism */
:root {
    --bg-main: #0b1121; /* Very dark navy/black */
    --bg-card: #141e33; /* Slightly lighter navy for cards */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1; /* Lightened from 94a3b8 for much better contrast */
    --accent-blue: #3b82f6; 
    --accent-blue-hover: #2563eb;
    --border-glass: rgba(255, 255, 255, 0.15); /* Brighter base borders */
    --font-primary: 'Inter', sans-serif;
}

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

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

#polygon-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    opacity: 0.7;
}

#cursor-smoke {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

/* Glass & Card Base */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.p-xl {
    padding: 2.5rem;
}

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

.section {
    padding: 60px 0;
}

.offset-bg {
    background: linear-gradient(180deg, rgba(11, 17, 33, 0) 0%, rgba(20, 30, 51, 0.3) 100%);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-live-demo {
    background: linear-gradient(135deg, #2563eb, #8b5cf6);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-live-demo::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #3b82f6, #a78bfa);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-live-demo:hover::before {
    opacity: 1;
}

.btn-live-demo:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
    color: white;
}

/* Typography Headers */
h1 { font-size: 4rem; font-weight: 700; letter-spacing: -1px; line-height: 1.1; margin-bottom: 24px; }
h2 { font-size: 2.2rem; font-weight: 600; margin-bottom: 8px; }
h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }

/* Sub-labels (e.g., above section headers) */
.sub-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.lead-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Section Header Layout */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.view-all-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 17, 33, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 16px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
}

.nav-subtitle {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 1rem;
    margin-left: 6px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
}

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

/* Global Background Orbs */
.global-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3; /* Behind the canvas */
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: floatOrb 15s infinite ease-in-out alternate;
}

.orb-1 { width: 500px; height: 500px; background: #3b82f6; top: -10%; right: -5%; }
.orb-2 { width: 400px; height: 400px; background: #8b5cf6; bottom: -10%; left: -10%; animation-delay: -5s; }
.orb-3 { width: 350px; height: 350px; background: #06b6d4; top: 40%; left: 20%; animation-delay: -10s; opacity: 0.1; }
.orb-4 { width: 450px; height: 450px; background: #ec4899; bottom: 20%; right: 10%; animation-delay: -7s; opacity: 0.1; }
.orb-5 { width: 600px; height: 600px; background: #10b981; top: 60%; left: 50%; transform: translateX(-50%); animation-delay: -2s; opacity: 0.08; }

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -50px) scale(1.1); }
    100% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #cbd5e1;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 20px;
}

#hero-tagline-1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    /* Animated Gradient Text Effect */
    background: linear-gradient(
        to right,
        #f8fafc 20%,
        var(--accent-blue) 40%,
        #8b5cf6 60%,
        #f8fafc 80%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textShine 4s linear infinite;
    display: inline-block;
    margin-bottom: 8px;
}

@keyframes textShine {
    to {
        background-position: 200% center;
    }
}

#hero-tagline-2 {
    color: var(--text-secondary);
    font-size: 1.4rem;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 90%;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 2rem;
}

/* Hero Stats (merged from About) */
.hero-stats {
    display: flex;
    gap: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-glass);
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-blue);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* Hero Visual Circular Profile */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.profile-circle-container {
    position: relative;
    width: 360px;
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 3;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: contrast(1.05) brightness(0.95);
}

.circle-ring-1, .circle-ring-2 {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05);
    z-index: 1;
}

.circle-ring-1 {
    width: 420px;
    height: 420px;
    background: rgba(255,255,255,0.01);
}

.circle-ring-2 {
    width: 480px;
    height: 480px;
    border: 1px dashed rgba(255,255,255,0.03);
    animation: rotate 40s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    background: linear-gradient(145deg, rgba(20, 30, 51, 0.9) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(145deg, rgba(20, 30, 51, 0.95) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 15px 40px -5px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.3), inset 0 0 15px rgba(59, 130, 246, 0.1);
}

.project-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-glass);
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tags span {
    font-size: 0.75rem;
    padding: 4px 10px;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.project-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex-grow: 1;
}

.btn-block {
    width: 100%;
    text-align: center;
    margin-top: auto;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
}

.about-stats {
    display: flex;
    gap: 32px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-glass);
}

.stat-item h4 {
    font-size: 2.2rem;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 3D Wireframe Globe Styles */
#skills-globe-container {
    width: 100%;
    height: 600px;
    position: relative;
    overflow: hidden;
    cursor: grab;
}

#skills-globe-container:active {
    cursor: grabbing;
}

.globe-label {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-primary);
    letter-spacing: 0.5px;
    background: rgba(15, 23, 42, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    backdrop-filter: blur(2px);
    transition: color 0.3s ease, transform 0.3s ease, background 0.3s ease;
    pointer-events: auto; /* Allow hovering the text */
}

.globe-label:hover {
    color: var(--accent-blue);
    background: rgba(15, 23, 42, 0.8);
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
    z-index: 10 !important;
}

/* Timeline */
.journey-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.journey-title {
    color: var(--text-primary);
    font-size: 1.3rem;
}

.timeline {
    border-left: 2px solid var(--border-glass);
    padding-left: 24px;
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
}

.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent-blue);
    margin-bottom: 6px;
    font-weight: 500;
}

.timeline-role {
    font-size: 1.15rem;
    margin-bottom: 2px;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.timeline-list {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-left: 16px;
}

.timeline-list li {
    margin-bottom: 6px;
}

/* Publications Section */
.publications-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pub-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: linear-gradient(145deg, rgba(20, 30, 51, 0.7) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.pub-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.pub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.pub-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.pub-link-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.pub-conference {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pub-conference i {
    color: var(--accent-blue);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.contact-method-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-method-icon {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background: rgba(255,255,255,0.02);
}

.contact-method-det h5 {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.contact-method-det a, .contact-method-det p {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05); /* Brighter background */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Brighter border */
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-glass);
    margin-top: 60px;
}

.footer-center {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-content, .about-grid, .journey-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .hero-text {
        text-align: center;
    }
    .hero-desc {
        max-width: 100%;
        margin: 0 auto 30px auto;
    }
    .hero-actions, .hero-stats {
        justify-content: center;
    }
    .profile-circle-container {
        width: 320px; 
        height: 320px;
        margin: 0 auto;
    }
    .circle-ring-1 { width: 360px; height: 360px; }
    .circle-ring-2 { width: 400px; height: 400px; }
    
    .hero-text h1 { font-size: 3.5rem; }
    #hero-tagline-1 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }
    .nav-container {
        flex-direction: column;
        gap: 12px;
    }
    .nav-menu {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        /* Hide scrollbar for a cleaner look */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .hero {
        padding-top: 140px; /* Leave space for double-row navbar */
    }
    .hero-text h1 { font-size: 2.8rem; }
    #hero-tagline-1 { font-size: 1.6rem; }
    #hero-tagline-2 { font-size: 1.1rem; }
    
    .profile-circle-container {
        width: 260px; height: 260px;
    }
    .circle-ring-1 { width: 280px; height: 280px; }
    .circle-ring-2 { width: 310px; height: 310px; }
    
    .section {
        padding: 60px 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .pub-header {
        flex-direction: column;
        gap: 12px;
    }
    .pub-link-btn {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 1rem;
    }
    .hero-text h1 { font-size: 2.2rem; }
    #hero-tagline-1 { font-size: 1.4rem; }
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    .hero-stat-number { font-size: 1.5rem; }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    .btn {
        text-align: center;
        width: 100%;
        justify-content: center;
    }
    .pub-card {
        padding: 20px;
    }
    .pub-title {
        font-size: 1.1rem;
    }
}
