:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #161b26;
    --accent: #3b82f6; /* Electric Blue */
    --accent-glow: rgba(59, 130, 246, 0.15);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border: #242b3d;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Navigation */
nav {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

/* Page Headers */
.page-header {
    padding: 5rem 0 3rem 0;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.page-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 800px;
}

/* Section Styling */
section.content-block {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
}

section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 2rem;
    height: 2px;
    background-color: var(--accent);
}

/* Contact Specific Layouts */
.contact-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 4rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-card strong {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-family: var(--font-mono);
}

.contact-card a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s ease;
    word-break: break-all;
}

.contact-card a:hover {
    color: var(--accent);
}

.affiliation-box {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border: 1px dashed var(--border);
    padding: 2rem;
    border-radius: 8px;
}

.affiliation-box p {
    color: var(--text-muted);
    line-height: 1.7;
}

.affiliation-box p strong {
    color: var(--text-main);
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Research Specific Layouts */
.research-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 850px;
}

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

.tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
}

.publication-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

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

.publication-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.pub-journal {
    color: var(--text-main);
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.pub-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
}

.btn-link:hover {
    opacity: 0.8;
}

.patent-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.patent-item {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

.patent-no {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .page-header h1 {
        font-size: 2.5rem;
    }
    .publication-card {
        padding: 1.5rem;
    }
    .nav-links {
        gap: 1rem;
    }
    .nav-links a {
        font-size: 0.85rem;
    }
}

/* Experience Timeline Styles */
.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.exp-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
}

.exp-timeframe {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.exp-details h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.exp-company {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.exp-responsibilities {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.exp-responsibilities li {
    color: var(--text-muted);
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.95rem;
}

.exp-responsibilities li::before {
    content: "↳";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
}

@media (max-width: 768px) {
    .exp-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .exp-timeframe {
        margin-bottom: 0.25rem;
    }
}

/* Projects Grid Styles */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 5rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.25rem 2rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.05);
}

.project-card h2 {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: inline-block;
}

/* Overriding global section heading behavior inside cards */
.project-card h2::after {
    display: none;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.project-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

@media (max-width: 640px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Resume Viewport Styles */
.resume-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding-bottom: 6rem;
}

.resume-viewer-frame {
    width: 100%;
    max-width: 950px;
    height: 850px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.resume-viewer-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.resume-action-bar {
    display: flex;
    justify-content: center;
    width: 100%;
}

.resume-action-bar .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    background-color: var(--accent);
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.resume-action-bar .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

@media (max-width: 768px) {
    .resume-viewer-frame {
        height: 500px; /* Shorter heights for medium screens */
    }
}

@media (max-width: 480px) {
    .resume-viewer-frame {
        display: none; /* Hides iframe preview entirely on small mobile to force clean fallback button access */
    }
    .resume-section {
        padding-top: 2rem;
    }
}

/* Individual Project Page Layouts */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 3rem;
    transition: transform 0.2s ease;
}

.back-link:hover {
    transform: translateX(-4px);
}

.project-title-section {
    padding: 2rem 0 3rem 0;
}

.project-title-section h1 {
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.project-subtitle-tag {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Two Column Layout for Core Project Specs */
.project-core-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 2rem;
}

.project-main-desc {
    font-size: 1.1rem;
    color: var(--text-main);
    line-height: 1.7;
}

.project-image-wrapper {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.project-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    border-radius: 4px;
}

/* Technical Split Content Columns */
.tech-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.tech-list-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
}

.tech-list-box h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    font-family: var(--font-sans);
}

.tech-list-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tech-list-box ul li {
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
    padding-left: 1.25rem;
}

.tech-list-box ul li::before {
    content: "▪";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
    top: 1px;
}

.result-highlight-box {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border: 1px dashed var(--border);
    padding: 2rem;
    border-radius: 8px;
}

.result-meta-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-top: 1.5rem;
    display: block;
}

.result-meta-value {
    font-size: 1.05rem;
    color: var(--text-main);
    font-weight: 500;
}

.resource-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.resource-card-link {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 1.25rem 1.75rem;
    border-radius: 6px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.resource-card-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

@media (max-width: 968px) {
    .project-core-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .project-image-wrapper {
        order: -1;
    }
    .tech-split-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}