/* --- Core Reset & Root Properties --- */
:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #121216;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --glass-bg: rgba(18, 18, 22, 0.6);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: rgba(0, 0, 0, 0.4);
    --nav-height: 70px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --accent-color: #4f46e5;
    --accent-hover: #3730a3;
    --text-main: #0f172a;
    --text-muted: #475569;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-shadow: rgba(15, 23, 42, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Premium Glassmorphism Architecture --- */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
}

/* --- Buttons & UI Controls --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.primary-btn {
    background-color: var(--accent-color);
    color: #ffffff !important;
    border: none;
}

.primary-btn:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--accent-color);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* --- Navigation Menu --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: transparent;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    height: 65px;
}

.nav-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
}

.logo span {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color);
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: color 0.3s ease;
}

.theme-btn:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition-smooth);
}

/* --- Hero Layout --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.07) 0%, transparent 50%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.hero-content h2 {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.typing-text-container {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-main);
}

.typing-text {
    color: var(--accent-color);
    border-right: 2px solid var(--accent-color);
    padding-right: 4px;
    animation: blink 0.75s step-end infinite;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    margin-bottom: 36px;
}

.hero-socials {
    display: flex;
    gap: 20px;
}

.hero-socials a {
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: color 0.3s, transform 0.3s;
}

.hero-socials a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img-wrapper {
    width: 320px;
    height: 420px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-img-wrapper:hover .profile-img {
    transform: scale(1.04);
}

/* --- About Configuration --- */
.about-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.personal-info {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.info-label {
    font-weight: 600;
    color: var(--text-main);
    width: 100px;
    display: inline-block;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stat-card {
    padding: 24px;
    text-align: center;
}

.stat-card h3 {
    font-size: 2.2rem;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Technical Expertise Blocks --- */
.skills-section {
    padding: 100px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.skills-category {
    padding: 32px;
}

.skills-category h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-color);
}

.skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skills-list li {
    color: var(--text-muted);
    position: relative;
    padding-left: 16px;
    font-size: 0.95rem;
}

.skills-list li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    top: -2px;
}

/* --- Timeline Architecture --- */
.education-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--glass-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 28px;
    position: relative;
    width: 45%;
    margin-bottom: 24px;
}

.timeline-item.left { left: 0; }
.timeline-item.right { left: 55%; }

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -31px;
    background-color: var(--bg-primary);
    border: 2px solid var(--accent-color);
    top: 34px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.right::after {
    left: -31px;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 6px;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.timeline-content h4 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.gpa {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.timeline-content p:not(.gpa) {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Professional Experience Layout --- */
.experience-section {
    padding: 100px 0;
}

.experience-container {
    max-width: 850px;
    margin: 0 auto;
}

.work-card {
    padding: 40px;
}

.work-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.work-title-group h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.work-title-group h4 {
    color: var(--accent-color);
    font-weight: 500;
}

.work-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.work-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.work-details li {
    color: var(--text-muted);
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
}

.work-details li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* --- Portfolio Application Cards --- */
.projects-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.project-info {
    padding: 32px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tech span {
    font-size: 0.8rem;
    padding: 4px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: var(--text-muted);
}

.project-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.project-bullets li {
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    padding-left: 14px;
}

.project-bullets li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

.project-links {
    margin-top: auto;
}

.proj-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.proj-link:hover {
    color: var(--accent-color);
}

/* --- Professional Carousel Infrastructure --- */
.certifications-section {
    padding: 100px 0;
}

.carousel-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.carousel-container {
    overflow: hidden;
    width: 100%;
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
}

.cert-card {
    min-width: calc(50% - 12px);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cert-img-holder {
    width: 100%;
    height: 260px;
    background: #000;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}

.cert-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

.cert-card:hover .cert-img-holder img {
    transform: scale(1.02);
}

.cert-details {
    padding: 24px;
}

.cert-details h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    line-height: 1.4;
}

.issuer {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.carousel-control {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    backdrop-filter: blur(8px);
}

.carousel-control:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.carousel-control.prev { left: -22px; }
.carousel-control.next { right: -22px; }

/* --- Hackathon Panel Layout --- */
.achievement-highlight {
    padding: 60px 0;
    background-color: var(--bg-secondary);
}

.highlight-card {
    display: flex;
    gap: 32px;
    padding: 40px;
    align-items: center;
}

.highlight-icon {
    font-size: 3rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

.highlight-content h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.highlight-content p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- Contact & Validation Layout --- */
.contact-section {
    padding: 100px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
}

.contact-info-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.contact-info-panel h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    line-height: 1.3;
}

.contact-info-panel p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.method-item {
    display: flex;
    gap: 16px;
    align-items: center;
}

.method-item i {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.method-item h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method-item a, .method-item p {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    margin-bottom: 0;
}

.method-item a:hover {
    color: var(--accent-color);
}

.contact-form-panel {
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.light-theme .form-group input, .light-theme .form-group textarea {
    background: rgba(0, 0, 0, 0.03);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    display: none;
    margin-top: 4px;
}

.submit-btn {
    width: 100%;
    justify-content: center;
}

.form-status-box {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.form-status-box.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: block;
}

/* --- Footer Area --- */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 32px 0;
    background-color: var(--bg-secondary);
}

.footer-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* --- Interface Utilities --- */
.back-to-top-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 99;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* --- Scroll Reveal Parameters --- */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* --- Responsive Adaptations --- */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
    .hero-content p {
        margin: 0 auto 36px;
    }
    .hero-btns {
        justify-content: center;
    }
    .hero-socials {
        justify-content: center;
    }
    .hero-image-container {
        order: -1;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .timeline::after {
        left: 24px;
    }
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 40px;
    }
    .timeline-item::after {
        left: 16px !important;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .cert-card {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 40px 0;
        gap: 24px;
        transition: var(--transition-smooth);
        border-top: 1px solid var(--glass-border);
    }
    .nav-menu.active {
        left: 0;
    }
    .navbar.scrolled .nav-menu {
        top: 65px;
        height: calc(100vh - 65px);
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .work-header {
        flex-direction: column;
        gap: 12px;
    }
    .work-meta {
        align-items: flex-start;
    }
    .highlight-card {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Premium Animated Custom Cursor Core Layout --- */
html, body {
    /* Hide the default system pointer completely across the page */
    cursor: none !important;
}

/* The core sharp inner tracking center pinpoint */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none; /* Allows clicks to pass through safely */
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* The smooth fluid trailing aura ring */
.cursor-outline {
    width: 26px;
    height: 26px;
    border: 2px solid var(--accent-color);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    /* Uses hardware acceleration for ultra-smooth rendering transitions */
    transition: transform 0.08s ease-out, width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
}

/* --- Dynamic Morph States On Hover Interactions --- */
body.cursor-hovering .cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
}

body.cursor-hovering .cursor-outline {
    width: 44px;
    height: 44px;
    background-color: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* --- Elegant Screen Border Sparkle --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 4px solid transparent;
    border-image: linear-gradient(45deg, #6366f1, transparent, #a5b4fc, transparent, #6366f1) 1;
    z-index: 99999;
    pointer-events: none;
    animation: borderSparkle 6s linear infinite;
    opacity: 0.7;
}

@keyframes borderSparkle {
    0% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(180deg) brightness(1.3); opacity: 0.9; }
    100% { filter: hue-rotate(360deg) brightness(1); }
}