:root {
    /* VSCode-inspired "Low-key" Palette */
    --bg-color: #0d1117;
    /* Deep Slate (GitHub Dark / VSCode feel) */
    --text-primary: #c9d1d9;
    /* Soft Grey/White */
    --text-secondary: #8b949e;
    /* Muted Grey */

    /* Accents: Soft Teal & Blue (No more neon) */
    --accent-cyan: #58a6ff;
    /* Soft Blue (like keywords) */
    --accent-purple: #bc8cff;
    /* Soft Purple (like logic) */

    --glass-bg: rgba(255, 255, 255, 0.03);
    /* Subtle glass */

    /* Typography: All Code, All the Time */
    --font-heading: 'Roboto Mono', monospace;
    --font-body: 'Roboto Mono', monospace;
}

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

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

#tech-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    /* Reduced opacity for subtlety */
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    /* Cleaner look */
    letter-spacing: -1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-cyan);
}

/* Hero */
#hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    padding-top: 40px;
}

.hero-profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-bottom: 30px;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 20px rgba(79, 240, 248, 0.2);
    /* No grayscale, full color */
}

.hero-content h2 {
    font-family: var(--font-heading);
    color: var(--accent-cyan);
    font-size: 1.1rem;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.hero-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-tech {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: all 0.3s;
    background: transparent;
    border-radius: 2px;
}

.btn-tech:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(79, 240, 248, 0.1);
}

/* Sections */
.section {
    padding: 100px 0;
    margin-top: 0;
}

/* Force specific layout for Projects page */
.projects-page .content-wrapper {
    display: block;
    /* Use standard block flow */
    min-height: auto;
}

.projects-page .section {
    padding-top: 10px !important;
    /* Minimal padding */
    padding-bottom: 40px;
}

.projects-page footer {
    margin-top: 50px;
    padding: 20px 0;
    text-align: center;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
}

.section-title span {
    font-family: var(--font-heading);
    color: var(--accent-cyan);
    font-size: 1.2rem;
    margin-right: 15px;
}

.section-title h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

/* About Grid - Modified since img is moved */
.about-grid {
    display: block;
    /* Single column now */
    max-width: 800px;
}

.bio p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category h4 {
    margin-bottom: 20px;
    color: var(--accent-purple);
    font-family: var(--font-heading);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    transition: border-color 0.3s;
}

.tag:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Timeline */
.timeline {
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    padding-left: 30px;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -41px;
    top: 1px;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
}

.date {
    font-family: var(--font-heading);
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.role {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.company {
    color: var(--accent-purple);
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

/* Contact */
.social-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 50px 0;
}

.social-btn {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-heading);
    border-bottom: 1px solid transparent;
    padding-bottom: 5px;
    transition: all 0.3s;
}

.social-btn:hover {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
}

footer {
    text-align: center;
    color: #555;
    font-size: 0.8rem;
    margin-top: 100px;
    font-family: var(--font-heading);
}

/* Mobile */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    nav {
        display: none;
        /* Ideally replace with mobile menu for full production code */
    }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 8px;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
}

.project-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.project-card .date {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-purple);
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

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

.project-links a {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    text-decoration: none;
    margin-right: 15px;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s;
}

.project-links a:hover {
    border-bottom-color: var(--accent-cyan);
}

.project-card iframe {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 4px;
}

/* Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    /* Above overlay */
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-toggle:hover span {
    background: var(--accent-cyan);
}

.overlay-menu {
    position: fixed;
    top: 0;
    left: -100%;
    /* Hidden on left side */
    width: 300px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    border-right: 1px solid var(--glass-bg);
    /* Changed border to right */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.4s ease;
    /* Animate left property */
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.overlay-menu.active {
    left: 0;
    /* Slide in to 0 */
}

.overlay-menu ul {
    flex-direction: column;
    text-align: center;
    gap: 40px;
}

.overlay-menu a {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.overlay-menu a.active {
    color: var(--accent-cyan);
}

/* Hero Socials */
.hero-socials {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    justify-content: center;
    /* Centered */
}

.social-icon {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid var(--glass-bg);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.02);
}

/* Thesis Page Styles */
.thesis-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
    padding-bottom: 50px;
}

.thesis-container h1,
.thesis-container h2 {
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    margin-top: 40px;
    margin-bottom: 20px;
}

.thesis-container h1 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--glass-bg);
    padding-bottom: 10px;
}

.thesis-container h2 {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.thesis-container p,
.thesis-container li {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1rem;
}

.thesis-container ul {
    list-style: none;
    padding-left: 20px;
}

.thesis-container li::before {
    content: ">";
    color: var(--accent-purple);
    font-family: var(--font-heading);
    margin-right: 10px;
}

.thesis-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--glass-bg);
    border-radius: 4px;
    margin: 0;
    /* Handled by grid gap */
    cursor: zoom-in;
    /* Value add: zoom cursor */
    transition: transform 0.3s, box-shadow 0.3s;
}

.thesis-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    border-color: var(--accent-cyan);
}

.thesis-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    /* Increased gap */
    margin-bottom: 40px;
    align-items: center;
    /* Vertical alignment */
    justify-items: center;
    /* Horizontal alignment */
}

/* Lightbox Styles */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}

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

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.4);
    border-radius: 4px;
}

/* Thesis Table */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    color: var(--text-secondary);
}

.table th,
.table td {
    padding: 12px;
    border: 1px solid var(--glass-bg);
    text-align: left;
}

.table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-cyan);
    font-family: var(--font-heading);
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.thesis-iframe {
    width: 100%;
    height: 80vh;
    border: 1px solid var(--accent-cyan);
    background: #fff;
    margin-top: 30px;
}

/* Education Section */
.education-grid {
    display: grid;
    gap: 30px;
    margin-top: 20px;
}

.edu-card {
    background: var(--glass-bg);
    padding: 25px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-purple);
}

.edu-card h4 {
    margin-bottom: 5px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.edu-card .school {
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Project HUD Styles */
.hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    /* JS will toggle flex */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.hud-overlay.active {
    opacity: 1;
}

.hud-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: rgba(13, 17, 23, 0.95);
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    padding: 40px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.hud-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.hud-close:hover {
    color: var(--accent-cyan);
}

.hud-content h3 {
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    margin-bottom: 5px;
    font-size: 1.8rem;
}

.hud-content .date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.hud-media-wrapper iframe,
.hud-media-wrapper img {
    width: 100%;
    border-radius: 4px;
    border: 1px solid var(--glass-bg);
    margin-bottom: 20px;
    min-height: 300px;
    /* Ensure space for video */
}

/* Update Project Cards for Interaction */
.project-card {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    /* Fixed Dimensions */
    height: 450px;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 40px;
    /* Space for Read more */
}

.project-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.project-card::after {
    content: "Read more ➜";
    position: absolute;
    bottom: 12px;
    left: 20px;
    /* Match padding usually */
    color: var(--accent-cyan);
    font-size: 0.9rem;
    font-family: var(--font-heading);
    opacity: 0.8;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 243, 255, 0.15);
    border-color: var(--accent-cyan);
}

.project-card:hover::after {
    opacity: 1;
    text-decoration: underline;
}

/* Hero Icons Hover */
.social-icon:hover {
    color: var(--bg-color) !important;
    background: var(--accent-cyan);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 0 15px var(--accent-cyan);
    border-color: var(--accent-cyan);
}

/* Profile Picture Tech Pulse */
.hero-profile-img {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.hero-profile-img:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(88, 166, 255, 0.4);
    transform: scale(1.05);
    /* Removed rotate(5deg) */
}

/* Contact Email Hover */
.contact-email a {
    position: relative;
    transition: all 0.3s;
}

/* Project Links Icons */
.project-links {
    position: absolute;
    bottom: 12px;
    /* Moved down slightly */
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 10;
}

.project-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-links a:hover {
    color: var(--accent-cyan);
    transform: scale(1.2);
    text-shadow: 0 0 10px var(--accent-cyan);
}

/* Typing Animation Cursor */
.cursor {
    display: inline-block;
    width: 10px;
    background-color: var(--accent-cyan);
    animation: blink 1s infinite;
    margin-left: 5px;
}

/* Dream Highlight */
.dream-highlight {
    color: var(--accent-cyan);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.contact-email a:hover {
    color: var(--accent-purple) !important;
    text-shadow: 0 0 15px rgba(188, 140, 255, 0.6);
    transform: scale(1.05);
}

.edu-card .year {
    color: var(--text-secondary);
    font-size: 0.85rem;
}