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

:root {
    --bg-yellow: #facc15;
    --bg-black: #000000;
    --text-black: #000000;
    --text-white: #ffffff;
    --border-color: #000000;
    --radius-main: 32px;
    --radius-card: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-yellow);
    color: var(--text-black);
    line-height: 1.5;
    padding: 20px;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
}

body.loading {
    overflow: hidden;
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease-in-out, visibility 0.6s;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preloader-content .spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--bg-yellow);
    border-top: 6px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.preloader-content p {
    color: var(--bg-yellow);
    font-weight: 900;
    letter-spacing: 4px;
    font-size: 0.8rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Skip Loader Styles */
.skip-loader #preloader {
    display: none !important;
}

.skip-loader body {
    opacity: 1 !important;
    overflow: auto !important;
}

body.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}

body.loaded {
    opacity: 1;
}

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

/* Neural Network Background Canvas */
#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Floating Code Snippets */
.floating-code {
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.05); /* Very low opacity */
    white-space: pre;
    pointer-events: none;
    z-index: -1;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.container, header {
    max-width: 1200px;
    margin: 0 auto 15px auto;
    background: var(--bg-yellow);
    border: 3px solid var(--bg-black); /* Matching contact section */
    border-radius: var(--radius-main);
    padding: 15px 30px;
    position: relative;
    z-index: 1;
}

header {
    /* Header specific styles if any */
}

.container {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Header & Nav */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-black);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 15px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-black);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-links li a:hover {
    background: var(--bg-black);
    color: var(--bg-yellow);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 30px;
    text-align: justify;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 30px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    display: inline-block;
}

.primary-btn {
    background: var(--bg-black);
    color: var(--bg-yellow);
}

.primary-btn:hover {
    transform: translate(-4px, -4px);
    box-shadow: 4px 4px 0 var(--border-color);
}

.secondary-btn {
    background: transparent;
    color: var(--text-black);
}

.secondary-btn:hover {
    background: rgba(0,0,0,0.05);
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius-card);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.02);
}

/* Stats Grid (The Blocks) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-block {
    background: var(--bg-black);
    color: var(--text-white);
    padding: 30px;
    border-radius: var(--radius-card);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition);
}

.stat-block:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bg-yellow);
}

.stat-label {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}
/* Timeline Section */
/* Section Headers with View All Buttons */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    margin-bottom: 0 !important;
}

.view-all-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-black);
    color: var(--bg-yellow);
    padding: 8px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: 2px solid var(--bg-black);
}

.view-all-btn:hover {
    background: var(--bg-yellow);
    color: var(--bg-black);
    transform: translateY(-2px);
}

.view-all-btn i {
    font-size: 0.8rem;
}

.timeline-section h2 {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--bg-black);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 40px; /* Length of the horizontal connecting line */
    height: 4px; /* Thickness same as vertical line */
    background-color: var(--bg-black);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::after {
    right: 0; /* Sticks out to the right toward the center line */
}

.right::after {
    left: 0; /* Sticks out to the left toward the center line */
}

/* Status Indicators inside the cards */
.status-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid var(--bg-black);
}

/* Completed Status - Green Tick */
.status-completed {
    background-color: #22c55e;
    position: relative;
}

.status-completed::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
    color: white;
    width: auto !important; /* Resetting the line style */
    height: auto !important;
    background: transparent !important;
}

/* Active Status - Orange Blinking */
.status-active {
    background-color: #f97316;
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(249, 115, 22, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
}

.timeline-content {
    padding: 20px;
    background-color: var(--bg-black);
    color: var(--text-white);
    position: relative;
    border-radius: var(--radius-card);
    display: flex;
    align-items: center;
    gap: 20px;
}

.experience-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: white;
    padding: 5px;
    border-radius: 12px;
    flex-shrink: 0;
}

.experience-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.timeline-content h3 {
    color: var(--bg-yellow);
    font-weight: 900;
    margin-bottom: 2px;
    font-size: 1.1rem;
}

.timeline-content p {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.timeline-content .date {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    display: block;
    margin-top: 10px;
    opacity: 0.8;
}

.know-more {
    align-self: flex-start;
    margin-top: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bg-yellow);
    text-decoration: underline;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.know-more:hover {
    color: var(--text-white);
    transform: translateX(5px);
}

@media screen and (max-width: 600px) {
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        left: 0 !important; /* Force all items to start from left */
    }
    .timeline-item::after {
        left: 31px !important;
        width: 39px !important; /* Distance from 31px line to start of card (70px padding - 31px = 39px) */
        right: auto !important;
    }
    .right {
        left: 0%;
    }
}

/* Contact Section */
.contact-container {
    padding: 0;
    background: transparent;
    border: none;
}

.contact-wrapper {
    display: flex;
    gap: 40px;
    align-items: stretch;
    width: 100%;
    background: var(--bg-yellow); /* Yellow Box */
    color: var(--text-black);    /* Black Text */
    padding: 60px;
    border-radius: var(--radius-main);
    border: 3px solid var(--bg-black); /* Black Border */
}

.contact-left, .contact-right {
    flex: 1;
    min-width: 0;
}

.contact-form {
    background: transparent;
    padding: 0;
}

.contact-form h2 {
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: var(--text-black);
    text-align: left;
}

.contact-form form {
    width: 100%;
    display: grid;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-black);
    letter-spacing: 1px;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: white;
    border: 2px solid var(--bg-black);
    padding: 18px;
    color: var(--text-black);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 700; /* Making it bold to match theme */
    font-size: 1.1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--bg-black);
}

.form-group textarea {
    min-height: 150px;
    resize: none; /* Removing the resize handle */
}

.contact-form .btn.primary-btn {
    background: var(--bg-black);
    color: var(--bg-yellow);
    width: auto;
    min-width: 200px;
    margin: 20px 0 0 0;
    border: none;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 30px;
}

.contact-form .btn.primary-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.quote-container {
    padding: 0 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 2px solid rgba(0, 0, 0, 0.1);
}

.quote-icon {
    font-size: 3rem;
    color: var(--bg-black);
    opacity: 0.8;
    margin-bottom: 20px;
}

.quote-text {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--text-black);
    margin-bottom: 20px;
    text-align: justify;
}

.quote-author {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-black);
    text-align: right;
}

@media (max-width: 992px) {
    .contact-wrapper {
        flex-direction: column;
        padding: 30px 20px; /* Reduced from 40px */
        gap: 20px; /* Reduced gap between quote and form */
    }
    .contact-right {
        order: -1; /* Keep quote on top */
    }
    .quote-container {
        border-left: none;
        border-top: none; /* Removed the line divider */
        padding: 0 0 10px 0; /* Minimal bottom padding */
        margin-top: 0; /* Removed top margin */
        text-align: center;
    }
    .quote-text {
        font-size: 1.5rem;
    }
}

/* Minimal Footer */
footer {
    max-width: 1200px;
    margin: 40px auto 20px auto;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid var(--bg-black);
    position: relative;
    z-index: 1;
}

.footer-left p {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-black);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-right {
    display: flex;
    gap: 20px;
}

.icon-link {
    font-size: 1.2rem;
    color: var(--text-black);
    transition: var(--transition);
}

.icon-link:hover {
    color: var(--bg-black);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    .hero {
        grid-template-columns: 1fr;
    }
    .hero-image {
        order: -1;
    }
    .nav-links {
        display: none; /* Add mobile menu later if needed */
    }
    .contact-form {
        max-width: 95%;
        padding: 40px 20px;
    }
}

/* Featured Projects Section */
.projects-section h2 {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
}

.featured-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.featured-project-card {
    background: white;
    border: 3px solid var(--bg-black);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    width: 100%;
}

@media (max-width: 768px) {
    .featured-project-card {
        max-width: 100%;
    }
}

.featured-project-card:hover {
    transform: translate(-8px, -8px);
    box-shadow: 8px 8px 0px var(--bg-black);
}

.project-links .know-more {
    text-decoration: none !important;
    font-size: 0.85rem !important;
    transition: var(--transition);
}

.project-links .know-more:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.featured-project-card.coming-soon {
    border: 3px dashed #cbd5e1;
    background: #f8fafc;
    box-shadow: none;
    cursor: default;
}

.featured-project-card.coming-soon:hover {
    transform: none;
    box-shadow: none;
}

.project-image {
    width: 100%;
    height: 300px;
    border-bottom: 3px solid var(--bg-black);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: var(--transition);
}

.featured-project-card:hover .project-image img {
    transform: scale(1.05);
}

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

.project-content h3 {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-black);
}

.project-content p {
    font-size: 1rem;
    color: var(--text-black);
    line-height: 1.4;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.project-tags span {
    background: var(--bg-black);
    color: var(--bg-yellow);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* GitHub Contributions Section */

.github-container {
    background: var(--bg-yellow);
    border: 3px solid var(--bg-black);
    border-radius: var(--radius-main);
    padding: 40px;
    margin-bottom: 15px;
}

.github-section h2 {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 30px;
}

/* GitHub Chart Styling */
.github-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.github-chart img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 4px; /* Soften the corners of the heatmap boxes slightly */
}

.chart-wrapper {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 2px solid var(--bg-black);
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    overflow: visible; /* Allow tooltips to float outside */
    position: relative;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.github-stats {
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Custom GitHub Tooltip */
#github-tooltip {
    position: absolute;
    background: var(--bg-yellow);
    border: 2px solid var(--bg-black);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bg-black);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
    white-space: nowrap;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

/* Tooltip Arrow */
#github-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--bg-black);
}

.github-stats a {
    color: var(--bg-black);
    text-decoration: underline;
    transition: var(--transition);
}

.github-stats a:hover {
    color: #30a14e; /* GitHub Green */
}

@media (max-width: 768px) {
    .github-container {
        padding: 20px;
    }
}

/* Documentation Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border: 3px solid var(--bg-black);
    width: 80%;
    max-width: 900px;
    height: 80vh;
    border-radius: var(--radius-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlide {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px 30px;
    background: var(--bg-black);
    color: var(--bg-yellow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 1px;
}

.close-modal {
    color: var(--bg-yellow);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    transform: scale(1.2) rotate(90deg);
}

.markdown-body {
    padding: 40px;
    overflow-y: auto;
    flex-grow: 1;
    background: #fff;
    color: #24292e;
}

/* Loader for modal */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--bg-black);
    border-radius: 50%;
    animation: spin-modal 1s linear infinite;
}

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

