:root {
    --bg-dark: #0a0a0a;
    --text-main: #f5f5f5;
    --text-muted: #888888;
    --border-color: #222222;
    --hover-bg: #1a1a1a;
    
    --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Oswald', sans-serif;
}

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

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

/* Background Neon Glows */
.neon-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

.glow-left {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.4), transparent 70%);
    top: -200px;
    left: -200px;
    animation: drift 15s infinite alternate ease-in-out;
}

.glow-right {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.3), transparent 70%);
    bottom: -150px;
    right: -150px;
    animation: drift 20s infinite alternate-reverse ease-in-out;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, -50px); }
}

/* Custom Interactive Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #38bdf8;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(56, 189, 248, 0.5);
    background-color: rgba(56, 189, 248, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Cursor Hover States for active elements */
.cursor-hover .cursor-dot {
    width: 0;
    height: 0;
    opacity: 0;
}

.cursor-hover .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    backdrop-filter: blur(2px);
}

/* Hide default cursor globally on desktop */
@media (pointer: fine) {
    body, a, button, .pill-nav, .project-stack-card {
        cursor: none !important;
    }
}



body {
    font-family: var(--font-sans);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #030712;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.86, 0, 0.07, 1);
}

#preloader.fade-out {
    transform: translateY(-100%);
}

.loader-text-wrapper {
    overflow: hidden;
    padding: 10px;
}

.loader-name {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.loader-name::before {
    content: 'Adarsh Dwivedi';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    color: #ffffff;
    -webkit-text-stroke: 0px transparent;
    border-right: 4px solid #38bdf8;
    overflow: hidden;
    animation: wipeText 2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes wipeText {
    0% { width: 0; }
    100% { width: 100%; border-color: transparent; }
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

/* Pill Navigation */
.pill-nav {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 0.5rem 1rem;
    z-index: 100;
}

.pill-nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.pill-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.pill-nav a:hover {
    color: var(--text-main);
}

.pill-nav a.active {
    background: #ffffff;
    color: #000000;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-top {
    margin-bottom: 2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10B981; /* Emerald Green */
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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

.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.6;
}

.profile-photo {
    width: 320px;
    height: 400px;
    border-radius: 24px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 2px solid rgba(56, 189, 248, 0.5);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.profile-photo:hover {
    transform: translateY(-5px);
    border-color: #38bdf8;
    box-shadow: 0 30px 60px rgba(56, 189, 248, 0.2);
}

/* Make sure the image behaves when user replaces the div with an img tag */
img.profile-photo {
    object-fit: cover;
    border: none;
    background: transparent;
}
img.profile-photo::after {
    display: none;
}

.hero-bottom {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease;
}

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

.about-flex {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.about-text {
    flex: 1.2;
}

.resume-card {
    flex: 1;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resume-card:hover {
    transform: translateY(-5px);
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.05);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-weight: 500;
}

.social-links a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* Sections General */
.section {
    padding: 120px 0;
    border-top: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.section-num {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-family: monospace;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

/* Projects Stack (Sticky Cards) */
.projects-stack {
    display: flex;
    flex-direction: column;
    padding-bottom: 50px;
}

.project-stack-card {
    position: sticky;
    border-radius: 24px;
    margin-bottom: 20px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.project-stack-card:hover {
    transform: translateY(-5px);
}

.card-inner {
    padding: 3rem;
    border-radius: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text-main);
    min-height: 400px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-num {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.project-tech {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.project-name {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.project-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 80%;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}

.project-date {
    font-weight: 600;
    color: var(--text-muted);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

/* Skills/Capabilities */
.skills-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.skill-group h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-group ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-group li {
    font-size: 1.1rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

/* List Layout (Milestones & Education) */
.list-layout {
    display: flex;
    flex-direction: column;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.list-item:hover {
    background: var(--hover-bg);
}

.list-content h4 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

.list-right {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

/* Accordion Component */
.accordion-item {
    flex-direction: column;
    cursor: none;
    padding: 0;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

.accordion-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.accordion-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease;
    opacity: 0;
    width: 100%;
}

.accordion-item.open .accordion-body {
    max-height: 300px;
    opacity: 1;
}

.accordion-content-inner {
    padding-bottom: 2rem;
    color: #9ca3af;
    line-height: 1.6;
    font-size: 1.05rem;
    border-top: 1px dashed rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

.cert-box {
    width: 140px;
    height: 90px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.cert-box:hover {
    transform: scale(1.05);
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.05);
}

.cert-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.list-item span {
    font-family: monospace;
    color: var(--text-muted);
    font-size: 1rem;
}

/* That's a wrap footer (Harsh Mishra Inspired) */
.wrap-footer {
    background-color: #f3f4f6; /* Premium soft white/gray */
    color: #111827;
    position: relative;
    padding: 10rem 5% 2rem 5%;
    overflow: hidden;
    text-align: center;
    border-radius: 60px 60px 0 0; /* Massive modern rounded top */
    margin-top: 5rem;
    box-shadow: 0 -20px 60px rgba(0,0,0,0.5); /* Drops shadow onto the black bg above */
}

.wrap-bg-text {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: clamp(8rem, 20vw, 25rem);
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
    letter-spacing: -0.05em;
}

.wrap-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wrap-sub {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.wrap-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: #111827;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.wrap-desc {
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    color: #4b5563;
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.wrap-phone {
    font-weight: 700;
    font-size: 1.2rem;
    color: #111827;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wrap-cta {
    background: #111827;
    color: #ffffff;
    padding: 1.2rem 3.5rem;
    border-radius: 100px;
    font-size: 1.2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    margin-bottom: 4rem;
    border: none;
    cursor: none; /* Let the custom cursor handle this */
}

.wrap-cta:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(17, 24, 39, 0.3);
    color: #ffffff;
}

.wrap-sm-text {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.wrap-socials {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 8rem;
}

.wrap-socials a {
    width: 55px;
    height: 55px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    font-size: 1.4rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    cursor: none;
}

.wrap-socials a:hover {
    transform: translateY(-8px) rotate(5deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.wrap-bottom-bar {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 3rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    text-align: left;
    font-size: 0.95rem;
    color: #6b7280;
    gap: 2rem;
}

.wrap-bottom-bar .wrap-made-with {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.back-to-top {
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease;
    cursor: none;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    .about-flex {
        flex-direction: column;
    }

    .hero-main {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        margin: 0 auto;
    }
    
    .profile-photo {
        width: 250px;
        height: 300px;
        margin: 0 auto;
    }

    .pill-nav {
        width: 90%;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .list-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .list-right {
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }
    
    .card-inner {
        padding: 2rem;
        min-height: 350px;
    }
}

/* Lightbox Modal */
.lightbox {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(3, 3, 3, 0.85);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #ffffff;
    font-size: 50px;
    font-family: var(--font-sans);
    font-weight: 300;
    cursor: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.lightbox-close:hover {
    color: #38bdf8;
    transform: rotate(90deg);
}

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

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

