/* --- Global Styles & Variables --- */
:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    /* A more vibrant, "tech" purple */
    --primary-color: #bb86fc;
    --primary-variant: #3700b3;
    --text-color: #e0e0e0;
    --text-secondary: #a0a0a0;
    --font-main: 'Inter', sans-serif;
    --font-code: 'Roboto Mono', monospace;
    --navbar-blur: 10px; /* For glassmorphism */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Custom Scrollbar (Fancy!) --- */
body::-webkit-scrollbar {
    width: 10px;
}
body::-webkit-scrollbar-track {
    background: var(--bg-color);
}
body::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 20px;
    border: 3px solid var(--bg-color);
}
body::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-variant);
}


.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto 0;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-color);
}

ul {
    list-style: none;
}

/* --- Navigation (Glassmorphism Effect) --- */
.navbar {
    /* Semi-transparent background */
    background: rgba(30, 30, 30, 0.75);
    /* The "frosted glass" blur */
    backdrop-filter: blur(var(--navbar-blur));
    -webkit-backdrop-filter: blur(var(--navbar-blur)); /* Safari support */
    
    border-bottom: 1px solid #333;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-code);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}
.nav-logo:hover {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 1rem;
    padding-bottom: 5px;
    position: relative; /* For the new hover underline effect */
}

/* Fancier nav link hover */
.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

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


/* --- Hero Section (Gradient Text & Typing) --- */
.hero {
    min-height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative; /* For the scroll-down arrow */
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 1));
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    /* Gradient Text Effect */
    background: -webkit-linear-gradient(45deg, var(--primary-color), #da62c4, #61dafb);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Text shadow for readability over black hole */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    min-height: 1.5rem; /* Reserve space for typing */
    /* Text shadow for readability over black hole */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.highlight {
    font-family: var(--font-code);
    font-weight: 700;
}

/* Blinking cursor for typing effect */
#typing-target::after {
    content: '_';
    font-weight: 700;
    animation: blink 0.7s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #000;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(187, 134, 252, 0.3);
}

.btn:hover {
    background: var(--primary-variant);
    color: var(--text-color);
    transform: translateY(-3px) scale(1.05);
}

.btn-secondary {
    display: inline-block;
    background: var(--surface-color);
    border: 2px solid var(--surface-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700;
    transition: all 0.3s ease;
}

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

/* --- Scroll Down Arrow --- */
.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}
.scroll-down span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid var(--text-secondary);
    border-right: 3px solid var(--text-secondary);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-15px) rotate(45deg);
    }
    60% {
        transform: translateY(-8px) rotate(45deg);
    }
}


/* --- Portfolio Sections (Slide-up Animation) --- */
.portfolio-section {
    padding: 6rem 0;
    opacity: 0; /* Hidden by default */
    transform: translateY(50px); /* Start 50px lower */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.portfolio-section.visible {
    opacity: 1;
    transform: translateY(0); /* Move to original position */
}

/* --- About Section --- */
.about-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.about-text {
    flex: 1;
}

.about-image {
    flex-shrink: 0;
    width: 500px;
    height: 500px;
    min-width: 500px;
    min-height: 500px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 4px solid var(--primary-color);
    background: var(--surface-color);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    /* Use browser's default high-quality scaling for photos */
    image-rendering: auto;
}


/* --- Skills Section (Interactive "Pills") --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.skill-category {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}
.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.skill-pill {
    font-family: var(--font-code);
    background: var(--bg-color);
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: default;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.skill-pill:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
}


/* --- Projects Section (NEW Hover Effect) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.5rem;
}

.project-tags {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--primary-variant);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-code);
}

.project-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.project-view-link {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}

.project-card:hover .project-view-link {
    transform: translateX(5px);
    color: var(--text-color);
}

/* THE FANCY HOVER EFFECT */
.project-card:hover .project-image img {
    transform: scale(1.1);
    filter: blur(3px) brightness(0.7);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(187, 134, 252, 0.3);
}


/* --- Education Section --- */
.education-entry {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
}
.education-entry p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}
.education-entry strong {
    color: var(--text-color);
}

/* --- Blog Section (Personal Page) --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(187, 134, 252, 0.3);
}

.blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.blog-card:hover img {
    transform: scale(1.05);
}

.blog-info {
    padding: 1.5rem;
}

.blog-date {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
    display: block;
    margin-bottom: 0.75rem;
}

.blog-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.blog-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Gallery Section (Personal Page) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(187, 134, 252, 0.4);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
    min-height: 280px;
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* --- Contact Section --- */
#contact {
    text-align: center;
}
#contact p {
    max-width: 600px;
    margin: 0 auto 2rem auto;
}
.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* --- Hero Simple (for Resume Page) --- */
.hero-simple {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 1));
}

.hero-title-simple {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* --- Resume Viewer --- */
.resume-viewer-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.resume-iframe {
    width: 100%;
    min-height: 80vh;
    height: 1200px;
    border: none;
    display: block;
    background: var(--bg-color);
}

/* --- Project Detail Pages --- */
.project-hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 1));
    border-bottom: 1px solid #333;
}

.back-link {
    display: inline-block;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

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

.project-header {
    max-width: 900px;
}

.project-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: -webkit-linear-gradient(45deg, var(--primary-color), #da62c4);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-tagline {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.project-header-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 0;
}

.project-image-section {
    margin-bottom: 4rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.project-main-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Training Process Image Section */
.training-image-section {
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    background: var(--surface-color);
    padding: 1.5rem;
}

.training-comparison-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--bg-color);
    padding: 1rem;
}

.image-caption {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
    margin: 0;
    padding-top: 0.5rem;
    border-top: 1px solid #333;
}

/* Personal/Trip Images */
.personal-image {
    max-width: 700px;
    width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    object-fit: cover;
}

/* Training Discussion Section */
.training-discussion {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--surface-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.discussion-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: var(--font-code);
}

.discussion-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.discussion-content p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.discussion-content p:last-child {
    margin-bottom: 0;
}

/* Metrics Table Styling */
.metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
}

.metrics-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-variant));
}

.metrics-table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.05rem;
    border-bottom: 2px solid rgba(187, 134, 252, 0.3);
}

.metrics-table th:first-child {
    padding-left: 1.5rem;
}

.metrics-table th:nth-child(2),
.metrics-table th:nth-child(3),
.metrics-table th:last-child {
    text-align: center;
}

.metrics-table th:last-child {
    padding-right: 1.5rem;
}

.metrics-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.metrics-table tbody tr:hover {
    background-color: rgba(187, 134, 252, 0.05);
}

.metrics-table tbody tr:last-child {
    border-bottom: none;
}

.metrics-table td {
    padding: 1.25rem 1rem;
    color: var(--text-secondary);
    vertical-align: top;
}

.metrics-table td:first-child {
    padding-left: 1.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.metrics-table td:last-child {
    padding-right: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.metrics-table tbody td:nth-child(2),
.metrics-table tbody td:nth-child(3) {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.metrics-table tbody td:last-child {
    text-align: center;
}

/* Highlight winning values */
.metrics-table td strong {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.15rem;
}

/* Training Details Section */
.training-details {
    margin-top: 3rem;
}

.details-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.75rem;
}

.details-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.project-section {
    margin-bottom: 4rem;
}

.project-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 0.75rem;
}

.project-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
}

.project-section-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.project-section-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Architecture List Styling */
.architecture-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.architecture-list li {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.architecture-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(187, 134, 252, 0.2);
}

.architecture-title {
    display: block;
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-family: var(--font-code);
    letter-spacing: 0.5px;
}

.architecture-description {
    display: block;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 0.5rem;
}

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

.feature-item {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(187, 134, 252, 0.2);
}

.feature-item h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.project-feature-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    border-radius: 6px;
    margin: 1rem 0;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: var(--bg-color);
    padding: 0.5rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-feature-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(187, 134, 252, 0.4);
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    margin-top: 0.75rem;
    flex-grow: 1;
}

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

.tech-category {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.tech-category h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    background: var(--bg-color);
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-code);
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
    transform: scale(1.05);
}

.project-links-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #333;
}

.project-external-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Project card link styling - colors inherit from card */
.project-card h3,
.project-card p,
.project-card .tag {
    color: inherit;
}

/* --- Image Lightbox Modal --- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    padding: 2rem;
    animation: zoomIn 0.3s ease;
    overflow-y: auto;
    gap: 1.5rem;
}

.lightbox-title {
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    padding: 1rem 2rem;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.lightbox-content {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    background: var(--surface-color);
    padding: 1rem;
    margin: 0 auto;
    flex-shrink: 0;
}

.lightbox-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    padding: 1.5rem 2rem;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 2px solid rgba(187, 134, 252, 0.3);
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    flex-shrink: 0;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 45px;
    color: var(--text-color);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 10000;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary-color);
    transform: rotate(90deg);
    background: rgba(187, 134, 252, 0.2);
}


/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid #333;
    color: var(--text-secondary);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
    h2 {
        font-size: 2rem;
    }

    .nav-menu {
        display: none; /* Simplistic mobile: hides menu. */
    }

    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-image {
        width: 300px;
        height: 300px;
        margin-bottom: 1rem;
    }

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

    .resume-viewer-container {
        max-width: 100%;
        border-radius: 0;
    }

    .resume-iframe {
        min-height: 60vh;
        height: 600px;
    }

    .blog-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .blog-card img,
    .gallery-item img {
        min-height: 200px;
    }

    /* Project Detail Page Responsive */
    .project-title {
        font-size: 2.5rem;
    }

    .project-tagline {
        font-size: 1.1rem;
    }

    .project-features {
        grid-template-columns: 1fr;
    }

    .tech-stack {
        grid-template-columns: 1fr;
    }

    .project-external-links {
        flex-direction: column;
    }

    .project-external-links .btn,
    .project-external-links .btn-secondary {
        width: 100%;
        text-align: center;
    }

    /* Responsive table styling */
    .metrics-table {
        font-size: 0.9rem;
    }

    .metrics-table th,
    .metrics-table td {
        padding: 0.75rem 0.5rem;
    }

    .metrics-table th:first-child,
    .metrics-table td:first-child {
        padding-left: 0.75rem;
    }

    .metrics-table th:last-child,
    .metrics-table td:last-child {
        padding-right: 0.75rem;
    }

    .metrics-table tbody td:nth-child(2),
    .metrics-table tbody td:nth-child(3) {
        font-size: 1rem;
    }

    .personal-image {
        max-width: 100%;
        margin: 1.5rem auto;
        border-radius: 8px;
    }

    .project-feature-image {
        max-height: 250px;
        margin: 0.75rem 0;
        padding: 0.25rem;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }

    .lightbox-content-wrapper {
        max-width: 95%;
        max-height: 90vh;
        padding: 1rem;
    }

    .lightbox-title {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }

    .lightbox-content {
        max-height: 50vh;
        padding: 0.5rem;
    }

    .lightbox-description {
        font-size: 1rem;
        padding: 1rem 1.5rem;
        margin-top: 1rem;
    }

    /* Architecture List Responsive */
    .architecture-list li {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .architecture-title {
        font-size: 1.15rem;
        margin-bottom: 0.5rem;
    }

    .architecture-description {
        font-size: 1rem;
    }

    /* Training Process Responsive */
    .training-image-section {
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .training-comparison-image {
        padding: 0.5rem;
    }

    .image-caption {
        font-size: 0.85rem;
        padding-top: 0.75rem;
    }

    .training-discussion {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .discussion-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .discussion-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .details-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Adjust distortion layers for mobile */
    #particles-js::before {
        width: 300px;
        height: 300px;
    }

    #particles-js::after {
        width: 450px;
        height: 450px;
    }
}

/* --- Particles.js Container --- */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    
    /* Base space background */
    background-color: #0a0a0a;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
    z-index: 1; /* Ensure it's behind the hero content */
    overflow: hidden;
}

/* Black Hole Effect - Realistic dark black hole with distortion */
#particles-js::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    
    /* Create realistic black hole with light-colored photon sphere ring */
    background: radial-gradient(ellipse 100% 95% at 50% 50%,
        #000000 0%,                    /* Pure black center (singularity) */
        #000000 32%,                   /* Black hole interior */
        #050505 35%,                   /* Event horizon - very dark */
        #0a0a0a 37%,                   /* Just inside event horizon */
        #100808 38%,                   /* Event horizon edge - subtle dark red */
        rgba(40, 10, 10, 0.4) 39%,    /* Dark red accretion disk inner */
        rgba(255, 220, 120, 0.5) 40%, /* Bright yellow/golden photon sphere ring */
        rgba(255, 240, 150, 0.4) 41%, /* Brighter yellow ring */
        rgba(255, 255, 180, 0.3) 42%,  /* Outer yellow/white ring */
        rgba(255, 250, 200, 0.2) 43%,  /* Extended light ring */
        rgba(60, 20, 15, 0.25) 44%,   /* Dark orange-red disk */
        rgba(80, 30, 20, 0.15) 46%,   /* Dimmer outer disk */
        rgba(50, 15, 10, 0.08) 50%,   /* Very faint disk edge */
        transparent 58%                /* Fade to transparent */
    );
    
    /* Glow effects with light yellow/golden colors for photon sphere */
    box-shadow: 
        0 0 60px rgba(255, 220, 120, 0.5),    /* Bright golden yellow inner glow */
        0 0 100px rgba(255, 240, 150, 0.4),   /* Brighter yellow glow */
        0 0 140px rgba(255, 255, 180, 0.3),   /* Outer yellow/white glow */
        0 0 180px rgba(255, 250, 200, 0.2),   /* Extended light halo */
        0 0 40px rgba(30, 10, 5, 0.3),        /* Dark inner glow for depth */
        0 0 80px rgba(40, 15, 10, 0.2),       /* Subtle outer glow */
        inset 0 0 100px rgba(0, 0, 0, 0.95);  /* Deep inner shadow */
    
    /* Subtle warp animation to simulate gravitational distortion */
    animation: blackhole-rotate 25s linear infinite, blackhole-warp 12s ease-in-out infinite;
    z-index: 2;
}

/* Rotating accretion disk animation */
@keyframes blackhole-rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Gravitational lensing distortion layer - warps space around black hole */
#particles-js::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    
    /* Create distortion rings with light-colored photon sphere effects */
    background: 
        radial-gradient(ellipse 80% 60% at 50% 50%,
            transparent 0%,
            transparent 55%,
            rgba(20, 10, 5, 0.08) 58%,   /* Distortion ring 1 */
            rgba(255, 220, 120, 0.15) 59%, /* Yellow/golden photon ring - horizontal */
            transparent 60%,
            rgba(25, 12, 8, 0.06) 63%,   /* Distortion ring 2 */
            rgba(255, 240, 150, 0.12) 64%, /* Bright yellow accent */
            transparent 66%,
            rgba(30, 15, 10, 0.04) 70%,  /* Distortion ring 3 */
            transparent 75%
        ),
        radial-gradient(ellipse 60% 80% at 50% 50%,
            transparent 0%,
            transparent 55%,
            rgba(15, 8, 5, 0.06) 58%,
            rgba(255, 230, 130, 0.15) 59%, /* Yellow/golden photon ring - vertical */
            transparent 62%,
            rgba(20, 10, 8, 0.05) 65%,
            rgba(255, 245, 160, 0.1) 66%,  /* Light yellow accent */
            transparent 70%
        );
    
    /* Create warping effect with blur filter */
    filter: blur(0.5px);
    
    /* Outer glow with light yellow/golden colors */
    box-shadow: 
        0 0 140px rgba(255, 220, 120, 0.2),  /* Bright golden yellow glow */
        0 0 220px rgba(255, 240, 150, 0.15),  /* Brighter yellow glow */
        0 0 120px rgba(20, 5, 5, 0.12),      /* Dark glow for depth */
        0 0 200px rgba(15, 5, 5, 0.08);      /* Dark distant glow */
    
    /* Animated distortion - creates warping effect */
    animation: blackhole-distort 8s ease-in-out infinite;
    z-index: 1;
}

@keyframes blackhole-rotate-reverse {
    0% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

/* Distortion animation - creates gravitational lensing warping effect */
@keyframes blackhole-distort {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        filter: blur(0.5px);
        border-radius: 50%;
    }
    25% {
        transform: translate(-50%, -50%) scale(1.05) rotate(2deg);
        filter: blur(0.8px);
        border-radius: 45% 55% 50% 50%;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.08) rotate(0deg);
        filter: blur(1px);
        border-radius: 55% 45% 50% 50%;
    }
    75% {
        transform: translate(-50%, -50%) scale(1.05) rotate(-2deg);
        filter: blur(0.8px);
        border-radius: 50% 50% 45% 55%;
    }
}

/* Subtle warp animation for the black hole itself */
@keyframes blackhole-warp {
    0%, 100% {
        border-radius: 50%;
        filter: blur(0px);
    }
    33% {
        border-radius: 48% 52% 51% 49%;
        filter: blur(0.3px);
    }
    66% {
        border-radius: 52% 48% 49% 51%;
        filter: blur(0.3px);
    }
}

/* Ensure hero content is above particles */
.hero .container {
    position: relative;
    z-index: 2;
}

.hero .scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2; /* Also needs to be above particles */
}

/* Re-adjust the hero background for when particles.js is active */
/* The background-image of the .hero is now handled by #particles-js */
.hero {
    /* Remove background image and just keep the gradient overlay if needed */
    background: linear-gradient(rgba(18, 18, 18, 0.4), rgba(18, 18, 18, 0.7)); /* Adjust transparency as desired */
}