/* Global Variables & Theme Config */
:root {
    /* Force dark mode variables by default */
    --primary-color: #3b82f6;       /* Lighter Tech Blue */
    --secondary-color: #2563eb;
    --accent-color: #fbbf24;        /* Amber Amber */
    --text-main: #f8fafc;           /* Light Text */
    --text-muted: #94a3b8;          /* Slate 400 */
    --bg-main: #090d16;             /* Dark Background */
    --bg-card: #111827;             /* Dark Card */
    --bg-nav: rgba(9, 13, 22, 0.9);
    --border-color: #1f2937;        /* Gray 800 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
    --transition: all 0.2s ease-in-out;

    /* Light mode code commented out for now
    --primary-color: #2563eb;
    --secondary-color: #1d4ed8;
    --accent-color: #d97706;
    --text-main: #0f172a;
    --text-muted: #475569;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.9);
    --border-color: #cbd5e1;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 4px 12px rgba(15, 23, 42, 0.08);
    */
}

/* Commented out theme-specific dark block since dark variables are default in :root
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #2563eb;
    --accent-color: #fbbf24;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bg-main: #090d16;
    --bg-card: #111827;
    --bg-nav: rgba(9, 13, 22, 0.9);
    --border-color: #1f2937;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
}
*/

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    transition: background-color 0.2s ease, color 0.2s ease;
}

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

p {
    max-width: 72ch; /* Best reading line length */
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
}

.logo a {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
    display: flex;
    align-items: center;
}

.theme-toggle-btn:hover {
    color: var(--primary-color);
}

/* Mobile Nav Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.2s;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem 0;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 24px 24px;
}

.hero-content {
    text-align: left;
    max-width: 800px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-family: var(--font-mono);
    color: var(--accent-color);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0 0 2rem 0;
    max-width: 600px;
}

.adityalab-intro {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 0 0 2rem 0;
    max-width: 650px;
    text-align: left;
    box-shadow: var(--shadow);
}

.hero-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-socials {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
}

.hero-socials a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}

.hero-socials a:hover {
    color: var(--primary-color);
}

/* Philosophy Section */
.philosophy {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.philosophy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.philosophy-card:hover {
    border-color: var(--primary-color);
}

.philosophy-card h3 {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.philosophy-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Sections Global */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.3px;
}

.section-subtitle-description {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 600px;
    margin: -1rem auto 2rem auto;
    line-height: 1.6;
}

/* Active Status Section */
.status-section {
    padding: 3rem 0;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.status-card-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.status-card-box:hover {
    border-color: var(--border-color); /* Flat minimal feel */
}

.status-card-box h3 {
    font-family: var(--font-mono);
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.status-card-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Journey / About Section */
.about {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 auto;
}

/* Timeline Growth */
.growth-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.growth-timeline div {
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
    transition: var(--transition);
}

.growth-timeline div:hover {
    border-left-color: var(--primary-color);
}

.growth-timeline strong {
    font-family: var(--font-mono);
    color: var(--accent-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.growth-timeline p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    line-height: 1.6;
}

/* Core Stack Box */
.core-stack-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.2rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-tag {
    background: var(--bg-main);
    color: var(--text-main);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    border: 1px solid var(--border-color);
}

/* Case Studies Details/Summary */
details.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

details.project-card[open] {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

details.project-card summary {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    user-select: none;
    transition: background 0.15s ease;
}

details.project-card summary::-webkit-details-marker {
    display: none;
}

details.project-card summary:hover {
    background-color: rgba(37, 99, 235, 0.02);
}

[data-theme="dark"] details.project-card summary:hover {
    background-color: rgba(59, 130, 246, 0.03);
}

details.project-card summary::after {
    content: '\f0fe'; /* Plus Square */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--primary-color);
    transition: transform 0.2s;
}

details.project-card[open] summary::after {
    content: '\f146'; /* Minus Square */
}

.project-summary-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 90%;
}

.project-summary-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.project-summary-title-wrapper h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.project-summary-header .project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tech-tag {
    background: var(--bg-main);
    color: var(--text-muted);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    border: 1px solid var(--border-color);
}

.case-study-content {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.case-study-content h4 {
    font-family: var(--font-mono);
    color: var(--primary-color);
    font-size: 0.85rem;
    margin: 1.5rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-study-content h4:first-of-type {
    margin-top: 0;
}

.case-study-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Compact Metadata Panel */
.project-metadata-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.project-metadata-panel div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.project-metadata-panel span.meta-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-metadata-panel span.meta-value {
    color: var(--text-main);
    font-weight: 600;
}

.project-metadata-panel a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.project-metadata-panel a:hover {
    text-decoration: underline;
}

/* ASCII System Flowcharts style */
.ascii-art {
    font-family: var(--font-mono);
    background-color: var(--bg-main);
    color: var(--text-main);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    font-size: 0.78rem;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre;
    margin: 1rem 0;
}

[data-theme="dark"] .ascii-art {
    background-color: #0b0f19;
}

/* Code element inside case studies */
code {
    font-family: var(--font-mono);
    background-color: rgba(37, 99, 235, 0.06);
    color: var(--primary-color);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.85em;
}

[data-theme="dark"] code {
    background-color: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
}

/* Engineering Journal Section styles */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.note-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.note-card:hover {
    border-color: var(--primary-color);
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.note-tag {
    background: var(--bg-main);
    color: var(--primary-color);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.note-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.note-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
}

/* Roadmap columns */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Button & Call to Actions rules */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    font-family: var(--font-sans);
    height: 40px; /* Fixed height for all CTAs */
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-main);
    border-color: var(--primary-color);
}

/* Contact Section styling */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-item a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

.contact-socials {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.85rem;
}

.social-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Contact Form input elements */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg-card);
    color: var(--text-main);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

#message {
    resize: none;
    min-height: 180px;
}

/* Contact Form Status Messages */
.status-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.status-message.success {
    background-color: rgba(16, 185, 129, 0.08); /* Subtle green */
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.status-message.error {
    background-color: rgba(239, 68, 68, 0.08); /* Subtle red */
    border: 1px solid #ef4444;
    color: #ef4444;
}

[data-theme="dark"] .status-message.success {
    background-color: rgba(16, 185, 129, 0.12);
}

[data-theme="dark"] .status-message.error {
    background-color: rgba(239, 68, 68, 0.12);
}

/* Footer Section */
.footer {
    background: var(--bg-main);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

/* Mobile & Responsive Rules */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 57px;
        flex-direction: column;
        background-color: var(--bg-card);
        width: 100%;
        text-align: center;
        transition: 0.25s ease-in-out;
        border-bottom: 1px solid var(--border-color);
        gap: 0;
        padding: 1.5rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 0.8rem 0;
        width: 100%;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat-card,
    .core-stack-box {
        flex: 1 1 200px;
    }
}
