@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- Global Resets & Typography --- */
*, ::before, ::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #111827; /* Dark background */
    color: #e5e7eb; /* Light text */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem; /* Consistent horizontal padding */
}

.highlight-text {
    color: #2dd4bf; /* Teal accent */
}

/* --- Animations --- */
@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-down {
    animation: fade-in-down 0.6s ease-out forwards;
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
    animation-delay: 0.2s;
}

/* --- Header --- */
.main-header {
    background-color: #1f2937; /* Darker grey */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #374151;
}

.nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 640px) { /* sm breakpoint */
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2dd4bf;
    padding: 0.5rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.site-title:hover {
    color: #5eead4;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    gap: 1rem;
    font-size: 0.95rem;
}

@media (min-width: 640px) {
    .nav-links {
        font-size: 1rem;
        gap: 1.5rem;
    }
}

.nav-links a {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #d1d5db;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
    color: #2dd4bf;
    background-color: rgba(45, 212, 191, 0.1); /* Subtle teal background */
}

/* --- Hero Section --- */
.hero-section {
    padding: 5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
}

@media (min-width: 768px) { /* md breakpoint */
    .hero-section {
        flex-direction: row;
        text-align: left;
        padding: 6rem 1.5rem;
        gap: 4rem;
    }
}

.hero-content {
    flex: 2; /* Takes more space on larger screens */
}

.hero-heading {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (min-width: 640px) { /* sm breakpoint */
    .hero-heading { font-size: 3rem; }
}
@media (min-width: 768px) { /* md breakpoint */
    .hero-heading { font-size: 3.75rem; }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #d1d5db;
    margin-bottom: 2rem;
    line-height: 1.6;
}

@media (min-width: 640px) {
    .hero-subtitle { font-size: 1.25rem; }
}

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

@media (min-width: 768px) {
    .social-links {
        justify-content: flex-start;
    }
}

.social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 9999px; /* Fully rounded */
    background-color: #374151; /* Gray-700 equivalent */
    color: #d1d5db; /* Gray-300 equivalent */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-icon-btn .social-icon { /* Targeting the Font Awesome icon inside */
    font-size: 1.5rem; /* Default size for social icons */
}

.social-icon-btn:hover {
    background-color: #0d9488; /* Teal-600 equivalent on hover */
    color: #fff;
    transform: scale(1.08);
}

.hero-image-wrapper {
    flex: 1; /* Takes less space than content on larger screens */
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-photo {
    width: 10rem; /* 160px */
    height: 10rem;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #14b8a6; /* Teal-500 equivalent */
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

@media (min-width: 640px) {
    .profile-photo {
        width: 12rem; /* 192px */
        height: 12rem;
    }
}
@media (min-width: 768px) {
    .profile-photo {
        width: 13rem; /* 208px */
        height: 13rem;
    }
}

/* --- Section Headings --- */
.section-heading {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 640px) {
    .section-heading { font-size: 2.25rem; }
}

.section-icon {
    color: #2dd4bf;
    font-size: 1.75rem; /* Default size for section heading icons */
    margin-right: 0.5rem;
}

@media (min-width: 768px) {
    .section-icon {
        font-size: 2rem;
        margin-right: 0.75rem;
    }
}

/* --- Skills Section --- */
.skills-section {
    background-color: #1f2937; /* Darker grey */
    padding: 3rem 0;
    border-top: 1px solid #374151;
    border-bottom: 1px solid #374151;
}

.skills-grid {
    display: grid;
    /* Use fixed column width and let grid handle fitting */
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* Min 160px, max 1fr */
    gap: 1.5rem;
    justify-items: center; /* Center items in their grid cells */
}

@media (min-width: 640px) {
    .skills-grid { gap: 2rem; }
}
/* You can further refine grid-template-columns for larger breakpoints if needed */


.skill-card {
    background-color: #374151; /* Dark gray */
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid #4b5563; /* Gray-600 */
    /* Fixed size for uniform appearance */
    width: 170px; /* Increased fixed width */
    height: 170px; /* Increased fixed height */
}

.skill-card:hover {
    transform: translateY(-5px) scale(1.02);
    background-color: #4b5563; /* Slightly lighter gray on hover */
}

.skill-icon {
    color: #2dd4bf; /* Teal accent */
    font-size: 3rem; /* Increased size for skill icons */
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.skill-card:hover .skill-icon {
    color: #5eead4; /* Lighter teal on hover */
}

.skill-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    text-align: center; /* Ensure name is centered */
}

/* --- Projects Section --- */
.projects-section {
    padding: 3rem 0;
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center cards when they don't fill a row */
    align-items: stretch; /* Ensures cards in a row have same height */
    gap: 2rem; /* Creates consistent spacing between cards */
}

@media (min-width: 768px) {
    .projects-grid {
        gap: 2.5rem; /* Larger gap for md breakpoint */
    }
}

.project-card {
    background-color: #1f2937; /* Darker grey */
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #374151; /* Gray-700 */
    flex: 1 1 calc(100% - 2rem); /* Full width on small screens, accounting for gap */
    max-width: 100%;
}

@media (min-width: 640px) { /* sm breakpoint: 2 columns */
    .project-card {
        flex: 1 1 calc(50% - 2rem); /* 2 columns, accounting for gap */
        max-width: calc(50% - 2rem);
    }
}

@media (min-width: 1024px) { /* lg breakpoint: 3 columns */
    .project-card {
        flex: 1 1 calc(33.333% - 2.5rem); /* 3 columns, accounting for gap */
        max-width: calc(33.333% - 2.5rem);
    }
}

.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
}

.project-image {
    width: 100%;
    height: 12rem; /* Fixed height for consistency */
    object-fit: cover;
    border-bottom: 1px solid #374151;
}

@media (min-width: 640px) {
    .project-image { height: 14rem; }
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.project-description {
    font-size: 0.95rem;
    color: #9ca3af; /* Gray-400 */
    margin-bottom: 1rem;
}

.project-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .project-actions {
        flex-direction: row;
        flex-wrap: wrap; /* Allow buttons to wrap */
        gap: 0.75rem; /* Adjust gap for row layout */
    }
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem; /* 10px 16px */
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    width: 100%; /* Full width on small screens */
}

.action-button svg {
    width: 1.125rem; /* 18px */
    height: 1.125rem;
    margin-right: 0.5rem;
}

/* Specific button styles */
.btn-primary {
    background-color: #0d9488; /* Teal-600 */
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #0f766e; /* Darker teal */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #374151; /* Gray-700 */
    color: #d1d5db; /* Gray-300 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: #4b5563; /* Darker gray */
    color: #fff;
    transform: translateY(-2px);
}

.btn-enhance {
    background-color: #9333ea; /* Purple-600 */
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-enhance:hover {
    background-color: #7e22ce; /* Darker purple */
    transform: translateY(-2px);
}

.btn-enhance:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner for loading state */
.spinner {
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
  width: 1rem;
  height: 1rem;
  color: currentColor; /* Inherit color from button text */
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* --- Contact Section --- */
.contact-section {
    background-color: #1f2937;
    padding: 3rem 0;
    border-top: 1px solid #374151;
}

.contact-content {
    max-width: 48rem; /* Equivalent to max-w-3xl */
    text-align: center;
}

.contact-intro {
    font-size: 1rem;
    color: #d1d5db;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .contact-intro { font-size: 1.125rem; }
}

.contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .contact-details { gap: 1rem; }
}

.contact-item {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #fff;
}

@media (min-width: 640px) {
    .contact-item { font-size: 1.25rem; }
}

.contact-icon {
    color: #2dd4bf;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

@media (min-width: 640px) {
    .contact-icon {
        width: 1.5rem;
        height: 1.5rem;
        margin-right: 0.75rem;
    }
}

.contact-link {
    color: #2dd4bf;
    transition: text-decoration 0.2s ease;
}

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

.contact-social-links {
    margin-top: 1.5rem;
}

/* --- Footer --- */
.main-footer {
    background-color: #111827;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    text-align: center;
    color: #6b7280; /* Gray-500 */
    border-top: 1px solid #1f2937;
}

.main-footer p {
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .main-footer p { font-size: 1rem; }
}

.footer-note {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

@media (min-width: 640px) {
    .footer-note { margin-top: 0.5rem; font-size: 0.875rem; }
}
