/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #FECF75 0%, #FE7A2F 100%);
    --card-bg: rgba(0, 31, 63, 0.7);
    /* Navy blue with 70% opacity */
    --card-text-primary: #ffffff;
    --card-text-secondary: #d1d5db;
    /* Light gray */
    --text-primary: #001f3f;
    /* Navy Blue for primary text on body */
    --text-secondary: #004d4d;
    /* Teal darker for secondary on body */
    --accent-color: #001f3f;
    /* Navy Blue accent */
    --accent-gradient: linear-gradient(135deg, #001f3f 0%, #008080 100%);
    --card-hover-shadow: 0 10px 30px -10px rgba(0, 31, 63, 0.3);
    --border-color: rgba(255, 255, 255, 0.1);
    /* Light border for dark cards */
    --transition-speed: 0.3s;
}

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

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    background-attachment: fixed;
    /* Keeps the gradient fixed */
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

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

/* Header / Profile Section */
/* Header / Profile Section */
header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 100px 20px;
    /* Removed the radial gradient overlay to let the body orange gradient show through cleanly */
}

/* New Hero Layout: Flex row for desktop */
header .container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: 4rem;
    width: 100%;
}

.profile-section-wrapper {
    position: relative;
    order: 2;
    /* Image on the right */
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Generic shape behind profile */
.profile-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.2);
    /* Semi-transparent white to complement orange */
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    /* Blob shape */
    z-index: 0;
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    34% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }

    67% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}

.profile-img-container {
    width: 550px;
    /* Increased size significantly */
    height: 550px;
    /* Increased size significantly */
    border-radius: 0;
    /* Removed circular frame */
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    overflow: visible;
    /* Allow image to not be clipped if needed, though contain is safer */
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    /* Removed circular frame */
    object-fit: contain;
    /* Ensure full image is visible */
    border: none;
}

.hero-content {
    order: 1;
    /* Text on the left */
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align text */
}

/* Update hero text alignment */
.hero-content h1 {
    text-align: left;
}

.hero-params {
    margin: 0 0 2rem 0;
    text-align: left;
}

.social-links {
    justify-content: flex-start;
}

.profile-img-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin-bottom: 2rem;
    position: relative;
    padding: 4px;
    background: var(--accent-gradient);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #222;
    /* Placeholder bg */
    border: 4px solid var(--bg-color);
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    background-clip: text;
    /* Standard property */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.hero-content .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.hero-params {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.social-icon {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: transform 0.2s, color 0.2s;
}

.social-icon:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Navigation (Sticky) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    /* Light navbar */
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.navbar.visible {
    transform: translateY(0);
}

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

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* Section Common */
section {
    padding: 80px 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    /* Removed translate transform to simplify centering with text-align: center on block-level element if needed, 
       but keeping the original approach roughly. Actually, the original code had left: 50% and transform: translateX(-50%).
       We want to ensure it's centered. 
    */
    display: block;
    /* changed from inline-block to block for easier centering */
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Skills Section */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    color: var(--card-text-primary);
    /* Override text color */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Projects Section - Text Only */
.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    color: var(--card-text-primary);
}

.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

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

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

.project-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4da6ff;
    /* Lighter blue for better contrast on dark bg */
}

.project-link:hover {
    text-decoration: underline;
}

/* Publications Section */
.publication-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.publication-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 3px solid #4da6ff;
    /* Lighter accent */
    transition: transform 0.2s;
    color: var(--card-text-primary);
}

.publication-item:hover {
    transform: translateX(5px);
    background: rgba(0, 31, 63, 0.85);
    /* Slightly darker on hover */
}

.publication-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--card-text-primary);
}

.publication-item .meta {
    font-size: 0.9rem;
    color: var(--card-text-secondary);
    margin-bottom: 0.5rem;
}

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

.blog-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: white;
    /* Blog cards have text over images often, ensure white */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Text shadow for readability over images */
}

.blog-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

.blog-date {
    font-size: 0.85rem;
    color: #e5e7eb;
    /* Light gray */
    margin-bottom: 0.5rem;
    display: block;
}

.blog-card h3 {
    margin-bottom: 1rem;
    line-height: 1.4;
    flex-grow: 1;
}

.read-more {
    color: #4da6ff;
    /* Lighter blue */
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: auto;
    text-shadow: none;
}

/* Contact Section */
.contact-section {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
}

.contact-button {
    display: inline-block;
    background: var(--accent-gradient);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

    .nav-links {
        display: none;
        /* Mobile menu implementation deferred for simplicity, or use simple stack */
    }

    .navbar .container {
        justify-content: center;
    }

    /* Stack hero on mobile */
    header .container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 2rem;
    }

    .profile-section-wrapper {
        order: 1;
        /* Image on top for mobile */
        margin-bottom: 2rem;
    }

    .hero-content {
        order: 2;
        align-items: center;
    }

    .hero-content h1,
    .hero-params {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}