/* --- Base Styles --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #111827;
    color: #f3f4f6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

h1, h2, h3, h4, p {
    margin: 0;
}

img {
    max-width: 100%;
    display: block;
}

/* --- JS-Required Utility Classes --- */
.hidden {
    display: none !important; /* Use !important to ensure it overrides other display properties */
}

.section-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.section-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.active-filter {
    background-color: #2563eb !important; /* Blue-600 */
    color: #ffffff !important;
}


/* --- Layout --- */
.container {
    max-width: 1280px; /* Corresponds to Tailwind's default container-like max-width */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;   /* px-4 */
    padding-right: 1rem;  /* px-4 */
}

.py-section {
    padding-top: 4rem;    /* py-16 */
    padding-bottom: 4rem; /* py-16 */
}

.py-section-large {
    padding-top: 6rem;    /* py-24 */
    padding-bottom: 6rem; /* py-24 */
}

.section-header {
    margin-bottom: 2rem;
}

/* --- Header & Navigation --- */
#main-header {
    background-color: rgba(17, 24, 39, 0.7); /* bg-gray-900/70 */
    backdrop-filter: blur(10px); /* backdrop-blur-lg */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.logo {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700; /* font-bold */
    color: #ffffff;
}

.main-nav {
    display: none; /* hidden */
    gap: 2rem; /* space-x-8 */
}

.nav-link {
    color: #d1d5db; /* text-gray-300 */
    transition: color 0.3s;
}

.nav-link:hover {
    color: #60a5fa; /* hover:text-blue-400 */
}

.menu-toggle {
    display: block; /* md:hidden */
    color: #ffffff;
    background: none;
    border: none;
    font-size: 1.5rem; /* text-2xl */
    z-index: 50;
    cursor: pointer;
}

.menu-toggle .h-6 {
    width: 1.5rem;
    height: 1.5rem;
}

.mobile-menu-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #111827; /* bg-gray-900 */
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 2rem; /* space-y-8 */
    font-size: 1.5rem; /* text-2xl */
}

.mobile-link {
    color: #d1d5db; /* text-gray-300 */
    transition: color 0.3s;
}

.mobile-link:hover {
    color: #60a5fa; /* hover:text-blue-400 */
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-weight: 700; /* font-bold */
    padding: 0.75rem 1.5rem; /* py-3 px-6 */
    border-radius: 0.5rem; /* rounded-lg */
    transition: background-color 0.3s;
    text-align: center;
    width: 100%; /* w-full */
}

.btn-primary {
    background-color: #2563eb; /* bg-blue-600 */
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #1d4ed8; /* hover:bg-blue-700 */
}

.btn-secondary {
    background-color: #374151; /* bg-gray-700 */
    color: #ffffff;
}
.btn-secondary:hover {
    background-color: #4b5563; /* hover:bg-gray-600 */
}


/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 48rem; /* max-w-3xl */
    text-align: center; /* text-center */
}

#hero h1 {
    font-size: 2.25rem; /* text-4xl */
    line-height: 1.1; /* leading-tight */
    font-weight: 900; /* font-black */
    color: #ffffff;
}

#hero h2 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    color: #60a5fa; /* text-blue-400 */
    margin-top: 0.5rem; /* mt-2 */
}

#hero p {
    margin-top: 1.5rem; /* mt-6 */
    font-size: 1.125rem; /* text-lg */
    color: #d1d5db; /* text-gray-300 */
}

.hero-buttons {
    margin-top: 2rem; /* mt-8 */
    display: flex;
    flex-direction: column; /* flex-col */
    justify-content: center; /* justify-center */
    gap: 1rem; /* gap-4 */
}

/* --- About Section --- */
#about h3 {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700; /* font-bold */
    margin-bottom: 2rem; /* mb-8 */
    text-align: center; /* text-center */
}

.about-grid {
    display: grid;
    gap: 2.5rem; /* gap-10 */
}

.about-text {
    font-size: 1.125rem; /* text-lg */
    line-height: 1.75; /* leading-relaxed */
    color: #d1d5db; /* text-gray-300 */
}

.about-text p {
    margin-bottom: 1rem; /* mb-4 */
}

.about-skills {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* space-y-6 */
}

.skill-group h4 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    color: #ffffff;
    margin-bottom: 0.5rem; /* mb-2 */
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* gap-2 */
}

.skill-tag {
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    padding: 0.25rem 0.75rem; /* px-3 py-1 */
    border-radius: 9999px; /* rounded-full */
}
/* Skill Tag Colors */
.skill-tag.tech {
    background-color: #374151; /* bg-gray-700 */
    color: #e5e7eb; /* text-gray-200 */
}
.skill-tag.creative {
    background-color: rgba(30, 64, 175, 0.5); /* bg-blue-900/50 */
    color: #93c5fd; /* text-blue-300 */
}
.skill-tag.research {
    background-color: rgba(79, 70, 229, 0.2); /* bg-indigo-600/20 */
    color: #a5b4fc; /* text-indigo-300 */
}

/* --- Projects Section --- */
#projects h3 {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700; /* font-bold */
    margin-bottom: 1rem; /* mb-4 */
}
#projects .section-header p {
    color: #9ca3af; /* text-gray-400 */
    margin-bottom: 2rem; /* mb-8 */
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem; /* gap-3 */
    margin-bottom: 2.5rem; /* mb-10 */
    justify-content: center; /* justify-center */
}

.filter-btn {
    background-color: #374151; /* bg-gray-700 */
    color: #ffffff;
    font-weight: 500; /* font-medium */
    padding: 0.5rem 1rem; /* py-2 px-4 */
    border: none;
    border-radius: 0.5rem; /* rounded-lg */
    cursor: pointer;
    transition: background-color 0.3s;
}
.filter-btn:hover {
    background-color: #2563eb; /* hover:bg-blue-600 */
}

#projects-grid {
    display: grid;
    grid-template-columns: 1fr; /* grid-cols-1 */
    gap: 2rem; /* gap-8 */
}

.card-inner {
    background-color: #1f2937; /* bg-gray-800 */
    border-radius: 0.5rem; /* rounded-lg */
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover .card-inner {
    transform: translateY(-5px); /* Enhanced hover */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.card-inner img {
    width: 100%;
    height: 12rem; /* h-48 */
    object-fit: cover;
}

.card-content {
    padding: 1.5rem; /* p-6 */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* flex-grow */
}

.card-content h4 {
    font-weight: 700; /* font-bold */
    font-size: 1.25rem; /* text-xl */
    color: #ffffff;
    margin-bottom: 0.5rem; /* mb-2 */
}

.card-content p {
    color: #9ca3af; /* text-gray-400 */
    font-size: 0.875rem; /* text-sm */
    margin-bottom: 1rem; /* mb-4 */
    flex-grow: 1; /* flex-grow */
}

.card-content .journal-name {
    font-weight: 500;
    color: #a5b4fc; /* text-indigo-400 */
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* gap-2 */
    margin-bottom: 1rem; /* mb-4 */
}

.card-tag {
    font-size: 0.75rem; /* text-xs */
    font-weight: 500; /* font-medium */
    padding: 0.25rem 0.625rem; /* px-2.5 py-1 */
    border-radius: 9999px; /* rounded-full */
}
/* Card Tag Colors (re-using skill colors) */
.card-tag.tech {
    background-color: #374151;
    color: #e5e7eb;
}
.card-tag.creative {
    background-color: rgba(30, 64, 175, 0.5);
    color: #93c5fd;
}
.card-tag.research {
    background-color: rgba(79, 70, 229, 0.2);
    color: #a5b4fc;
}

.card-links {
    display: flex;
    gap: 1rem; /* space-x-4 */
}

.card-link {
    color: #60a5fa; /* text-blue-400 */
    font-weight: 600; /* font-semibold */
    align-self: flex-start;
    transition: color 0.3s;
}
.card-link:hover {
    color: #3b82f6; /* hover:text-blue-500 */
}

/* --- Contact Section --- */
.contact-content {
    text-align: center;
}

.contact-content h3 {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700; /* font-bold */
    margin-bottom: 1rem; /* mb-4 */
}

.contact-content p {
    color: #9ca3af; /* text-gray-400 */
    max-width: 42rem; /* max-w-2xl */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem; /* mb-8 */
}

.contact-email {
    font-size: 1.25rem; /* text-xl */
    color: #60a5fa; /* text-blue-400 */
    font-family: monospace;
    word-break: break-all;
    transition: color 0.3s;
}
.contact-email:hover {
    color: #3b82f6; /* hover:text-blue-500 */
}

/* --- Footer --- */
#main-footer {
    border-top: 1px solid #1f2937; /* border-gray-800 */
}

.footer-container {
    padding-top: 2rem; /* py-8 */
    padding-bottom: 2rem; /* py-8 */
    display: flex;
    flex-direction: column; /* flex-col */
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: #6b7280; /* text-gray-500 */
}

.social-links {
    display: flex;
    gap: 1.5rem; /* space-x-6 */
    margin-top: 1rem; /* mt-4 */
}

.social-link {
    color: #9ca3af; /* text-gray-400 */
    transition: color 0.3s;
}
.social-link:hover {
    color: #ffffff; /* hover:text-white */
}
.social-link svg {
    width: 1.5rem; /* w-6 */
    height: 1.5rem; /* h-6 */
}

/* --- Media Queries (Responsiveness) --- */

/* Small screens (sm: 640px) */
@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;   /* sm:px-6 */
        padding-right: 1.5rem;  /* sm:px-6 */
    }

    .btn {
        width: auto; /* sm:w-auto */
    }

    #hero h1 {
        font-size: 3rem; /* sm:text-5xl */
    }
    #hero h2 {
        font-size: 1.5rem; /* sm:text-2xl */
    }
    .hero-content {
        text-align: left; /* sm:text-left */
    }
    .hero-buttons {
        flex-direction: row; /* sm:flex-row */
        justify-content: flex-start; /* sm:justify-start */
    }
    
    #about h3 {
        text-align: left; /* sm:text-left */
    }

    .section-header {
        text-align: left; /* sm:text-left */
    }
    .filter-controls {
        justify-content: flex-start; /* sm:justify-start */
    }
    
    .contact-email {
        font-size: 1.5rem; /* sm:text-2xl */
    }
}

/* Medium screens (md: 768px) */
@media (min-width: 768px) {
    .main-nav {
        display: flex; /* md:flex */
    }
    .menu-toggle {
        display: none; /* md:hidden */
    }

    #hero h1 {
        font-size: 4.5rem; /* md:text-7xl */
    }
    #hero h2 {
        font-size: 1.875rem; /* md:text-3xl */
    }

    .about-grid {
        grid-template-columns: repeat(5, 1fr); /* md:grid-cols-5 */
    }
    .about-text {
        grid-column: span 3 / span 3; /* md:col-span-3 */
    }
    .about-skills {
        grid-column: span 2 / span 2; /* md:col-span-2 */
    }

    #projects-grid {
        grid-template-columns: repeat(2, 1fr); /* md:grid-cols-2 */
        gap: 2.5rem; /* md:gap-10 */
    }

    .footer-container {
        flex-direction: row; /* md:flex-row */
    }
    .social-links {
        margin-top: 0; /* md:mt-0 */
    }
}

/* Large screens (lg: 1024px) */
@media (min-width: 1024px) {
    #about p {
        font-size: 1.125rem; /* 18px */
    }

    #projects-grid {
        grid-template-columns: repeat(3, 1fr); /* lg:grid-cols-3 */
    }
}