/* General Styles */
body {
    background-color: #111827; /* bg-gray-900 */
    color: #f3f4f6; /* text-gray-100 */
    font-family: sans-serif; /* font-sans */
    overflow-x: hidden; /* Prevent horizontal scroll caused by animations */
}

/* Matrix Background - Replaced with Canvas */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind everything */
    opacity: 0.1; /* Subtle effect */
    background-color: #111827; /* Match body background */
}

/* Navigation */
nav {
    background-color: #1f2937; /* bg-gray-800 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-lg */
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 0 1rem; /* Add horizontal padding */
}

nav .container {
    padding-left: 0; /* Remove container padding inside nav */
    padding-right: 0;
}

nav a {
    color: #d1d5db; /* text-gray-300 */
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block; /* Needed for transform */
    padding: 0.5rem 0; /* Add some padding for easier clicking */
}

nav a:hover {
    color: #34d399; /* hover:text-emerald-400 */
    transform: scale(1.1);
}

/* Mobile Menu Specific Styles */
#mobile-menu {
    background-color: #1f2937; /* Match nav background */
    border-top: 1px solid #374151; /* Add a separator */
}

#mobile-menu a {
    display: block; /* Make links full width */
    padding: 0.75rem 1rem; /* Adjust padding */
    border-radius: 0.375rem; /* rounded-md */
    transition: background-color 0.2s ease, color 0.2s ease;
}

#mobile-menu a:hover {
    background-color: #374151; /* bg-gray-700 */
    color: #ffffff; /* text-white */
    transform: none; /* Override general nav link hover */
}

/* Main Content Area */
main.container {
    padding-top: 3rem; /* py-12 */
    padding-bottom: 3rem; /* py-12 */
}

/* Section Spacing */
section {
    margin-bottom: 4rem; /* mb-16 */
}

/* Skill Tags */
.skill-tag {
    padding: 0.25rem 0.75rem; /* px-3 py-1 */
    background-color: #374151; /* bg-gray-700 */
    border-radius: 9999px; /* rounded-full */
    font-size: 0.875rem; /* text-sm */
    color: #34d399; /* text-emerald-400 */
    transition: all 0.3s ease;
    display: inline-block; /* Ensure tags behave correctly */
    margin: 0.25rem; /* Add some margin */
    border: 1px solid transparent;
}

.skill-tag:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 6px 12px rgba(52, 211, 153, 0.2);
    background-color: #4b5563; /* Slightly lighter on hover */
    border-color: #34d399;
}

/* Section Cards */
.section-card {
    background-color: #1f2937; /* bg-gray-800 */
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    padding: 1.5rem; /* p-6 or p-8 */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease;
    border: 1px solid transparent; /* Prepare for hover border */
}

@media (min-width: 768px) { /* md breakpoint */
    .section-card {
        padding: 2rem; /* p-8 on larger screens */
    }
}

.section-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 255, 0, 0.15);
    border-color: rgba(52, 211, 153, 0.5); /* Add subtle border on hover */
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem; /* gap-6 */
}

@media (min-width: 768px) { /* md breakpoint */
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid {
        gap: 2rem; /* gap-8 on larger screens */
    }
}

/* About Section Specifics */
#about .grid > div {
    margin-bottom: 1.5rem; /* Add space between columns on mobile */
}
@media (min-width: 768px) {
    #about .grid > div {
        margin-bottom: 0;
    }
}

/* Experience/Projects/Labs Section Titles */
#experience h2, #projects h2, #labs h2 {
    margin-bottom: 2rem; /* mb-8 */
}

/* Contact Section */
#contact .section-card {
    text-align: center;
}
#contact .max-w-md {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}
#contact .space-y-4 > * + * {
    margin-top: 1rem;
}
#contact .pt-4 {
    padding-top: 1rem;
}
#contact .space-x-6 > * + * {
    margin-left: 1.5rem;
}

/* Footer */
footer {
    background-color: #1f2937; /* bg-gray-800 */
    border-top: 1px solid rgba(52, 211, 153, 0.2); /* border-emerald-400/20 */
    padding-top: 1.5rem; /* py-6 */
    padding-bottom: 1.5rem; /* py-6 */
    text-align: center;
}

footer p {
    font-size: 0.875rem; /* text-sm */
    color: #9ca3af; /* text-gray-400 */
}

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

::-webkit-scrollbar-track {
    background: #1f2937; /* bg-gray-800 */
}

::-webkit-scrollbar-thumb {
    background: #10b981; /* emerald-500 */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669; /* emerald-600 */
}

/* Headings */
h1, h2, h3 {
    color: #34d399; /* text-emerald-400 */
    transition: color 0.3s ease;
    font-weight: 700; /* font-bold */
}
h1 {
    font-size: 2.25rem; /* text-4xl */
    margin-bottom: 1.5rem; /* mb-6 */
}
@media (min-width: 768px) {
    h1 {
        font-size: 3rem; /* md:text-5xl */
    }
}
h2 {
    font-size: 1.875rem; /* text-3xl */
    margin-bottom: 1.5rem; /* mb-6 */
}
h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    margin-bottom: 0.75rem; /* mb-3 */
    color: #d1d5db; /* text-gray-300 - Adjusted for better hierarchy */
}
h2:hover, h3:hover {
    color: #6ee7b7;
}

/* Links */
a {
    transition: color 0.3s ease;
}
a:hover {
    color: #6ee7b7; /* Lighter emerald */
}

/* Basic Layout Classes (Mimicking Tailwind) */
.container {
    max-width: 72rem; /* max-w-6xl */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem; /* px-4 */
    padding-right: 1rem; /* px-4 */
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem; /* sm:px-6 */
        padding-right: 1.5rem; /* sm:px-6 */
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem; /* lg:px-8 */
        padding-right: 2rem; /* lg:px-8 */
    }
}

/* Add more custom styles and animations below */

/* Fade-in sections on scroll */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Hero Section Enhancement */
.hero-title span {
    display: inline-block;
    transition: transform 0.4s ease, color 0.3s ease;
    animation: subtle-float 3s ease-in-out infinite alternate;
}

.hero-title span:nth-child(1) {
    animation-delay: 0s;
    color: #34d399; /* text-emerald-400 */
}
.hero-title span:nth-child(2) {
    animation-delay: 0.5s;
    color: #d1d5db; /* text-gray-300 */
}

.hero-title span:hover {
    transform: scale(1.05) rotate(-2deg);
    color: #a7f3d0; /* Lighter emerald */
    animation-play-state: paused; /* Pause float on hover */
}

@keyframes subtle-float {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-5px);
    }
}

/* Project/Lab Card Tags */
.project-tag {
    padding: 0.25rem 0.75rem; /* px-3 py-1 */
    background-color: #064e3b; /* bg-emerald-900 */
    border-radius: 9999px; /* rounded-full */
    font-size: 0.75rem; /* text-xs */
    color: #a7f3d0; /* text-emerald-300 */
    display: inline-block;
    margin: 0.1rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.project-tag:hover {
    transform: scale(1.1);
    background-color: #047857; /* emerald-700 */
}

/* Contact Icons */
.contact-icon svg {
    width: 2rem; /* w-8 */
    height: 2rem; /* h-8 */
    transition: transform 0.3s ease, filter 0.3s ease;
}

.contact-icon:hover svg {
    transform: scale(1.25) rotate(10deg);
    filter: drop-shadow(0 0 5px #34d399);
}

/* Certification List Items */
.certification-item {
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex; /* Use flex for alignment */
    align-items: flex-start; /* Align items to the top */
    color: #d1d5db; /* text-gray-300 */
}

.certification-item + .certification-item {
    margin-top: 0.75rem; /* space-y-3 */
}

.certification-item:hover {
    transform: translateX(5px);
    color: #6ee7b7;
}

.certification-item svg {
    transition: transform 0.3s ease;
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
    color: #34d399; /* text-emerald-400 */
    margin-right: 0.5rem; /* mr-2 */
    margin-top: 0.125rem; /* mt-0.5 - adjust for alignment */
    flex-shrink: 0;
}

.certification-item:hover svg {
    transform: scale(1.2);
}

/* Experience List Items */
.experience-item {
    display: flex;
    color: #d1d5db; /* text-gray-300 */
}

.experience-item + .experience-item {
    margin-top: 0.75rem; /* space-y-3 */
}

.experience-item span:first-child {
    color: #34d399; /* text-emerald-400 */
    margin-right: 0.5rem; /* mr-2 */
    flex-shrink: 0;
}


