/* Modern Data Science Portfolio Theme */
:root {
    /* Color Palette - Premium Dark/Tech Theme */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #38bdf8;
    /* Sky Blue */
    --accent-secondary: #818cf8;
    /* Indigo */
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

/* Light Mode Variables */
body.light-mode {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-primary: #0284c7;
    --accent-secondary: #4f46e5;
    --accent-gradient: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
    min-height: calc(100vh - var(--header-height));
    display: none;
    /* Hidden by default for tabs */
    animation: fadeIn 0.5s ease-out;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

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

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.nav-btn:hover,
.nav-btn.active {
    color: var(--accent-primary);
    background: rgba(56, 189, 248, 0.1);
}

/* Hero Section */
.hero-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4rem;
    padding-top: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center -10px;
    /* Shift image up */
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-secondary);
    color: var(--text-primary);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Tech Stack Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    background: var(--bg-secondary);
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .marquee-container {
    border-color: rgba(0, 0, 0, 0.05);
}

.marquee-content {
    display: flex;
    gap: 3rem;
    animation: scroll 30s linear infinite;
    white-space: nowrap;
}

.marquee-content span {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Featured Section */
.featured-section {
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.featured-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .featured-card {
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.featured-content {
    flex: 1;
    padding: 3rem;
}

.featured-label {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.featured-image-container {
    flex: 1;
    height: 350px;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .featured-card {
        flex-direction: column-reverse;
    }

    .featured-image-container {
        width: 100%;
        height: 200px;
    }

    .featured-content {
        padding: 2rem;
    }
}

/* CV / Resume Section */
.resume-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.timeline-item {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-primary);
    transition: background 0.3s ease;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.timeline-role {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-company {
    color: var(--accent-primary);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--bg-card);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--accent-primary);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border for dark mode */
}

body.light-mode .project-card {
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    /* Enhanced shadow on hover */
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Separator for image */
}

body.light-mode .project-img {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

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

.blog-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card);
}

.blog-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--accent-primary);
    font-weight: 600;
    margin-top: 1rem;
}

/* Blog Content View */
.markdown-body {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.markdown-body img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    margin-top: 2rem;
}

.markdown-body .lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-weight: 300;
}

.markdown-body .card {
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.1);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin: 2rem 0;
}

.markdown-body .links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.markdown-body .links a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.markdown-body .links a:hover {
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
}

.markdown-body pre {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.markdown-body code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent-secondary);
}

.markdown-body pre code {
    color: var(--text-primary);
    background: none;
    padding: 0;
}

/* Contact Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-form {
    text-align: left;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--bg-card);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
}

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

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    min-width: 150px;
    transition: background 0.3s ease;
}

.contact-item:hover {
    background: var(--bg-card);
}

.contact-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--accent-primary);
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.modal-links {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-img {
        width: 250px;
        height: 250px;
    }

    .resume-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        /* Mobile menu implementation can be added later if needed, for now simple hiding or stacking */
    }

    /* Simple mobile nav for now */
    .nav-links {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        padding: 1rem;
        justify-content: space-around;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar {
        height: 60px;
    }

    .section {
        padding-bottom: 80px;
        /* Space for mobile nav */
    }
}