/* Global base styles */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    animation: fadeIn 0.5s ease;
}

/* Smooth fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Main content wrapper for consistent width and alignment */
.page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem 1.25rem;
}

/* Headings */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Paragraphs */
p {
    line-height: 1.6;
    margin-bottom: 0.9rem;
}

/* Links */
a {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    color: #ff6f61;
    text-decoration: underline;
}

/* Navbar hover (Quarto bootstrap navbar) */
.navbar-nav .nav-link:hover {
    color: #ff6f61 !important;
}

/* Subtle heading hover */
h1:hover,
h2:hover,
h3:hover {
    color: #ff6f61;
    transition: color 0.2s ease;
}

/* Hero layout */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.hero-content {
    flex: 1 1 60%;
}

.hero-title {
    font-size: 2.4rem;
    margin-bottom: 0.4rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: #6c757d;
    margin-bottom: 1.2rem;
}

.hero-text {
    margin-bottom: 1.2rem;
}

/* Hero buttons */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.hero-btn {
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid #0d6efd;
    background: #0d6efd;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-btn.secondary {
    background: transparent;
    color: #0d6efd;
}

.hero-btn:hover {
    background: #ff6f61;
    border-color: #ff6f61;
    color: #fff;
    transform: translateY(-1px);
}

/* Hero photo */
.hero-photo {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
}

.hero-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 0, 0, 0.08);
}

/* Section titles */
.section-title {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

/* Skills grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.skill-card {
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.skill-card:hover {
    background: rgba(255, 111, 97, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Featured projects */
.featured-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.featured-card {
    padding: 1.1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.featured-card:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.featured-card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

/* Project cards (projects page) */
.project-card {
    padding: 1.4rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 1.8rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Project images */
.project-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 0.9rem;
    display: block;
}

/* Contact list */
.contact-list {
    list-style: none;
    padding-left: 0;
}

.contact-list li {
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

/* Dark mode tweaks */
body.quarto-dark .project-card,
body.quarto-dark .featured-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

body.quarto-dark .skill-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

body.quarto-dark .project-card:hover,
body.quarto-dark .featured-card:hover,
body.quarto-dark .skill-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        align-items: center;
    }

    .hero-photo {
        align-self: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .page-wrapper {
        padding: 2rem 1rem 2.5rem 1rem;
    }
}

/* Make images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Footer */
.site-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    font-size: 0.95rem;
    color: #6c757d;
}

.footer-links {
    margin-bottom: 0.8rem;
}

.footer-links a {
    margin: 0 0.6rem;
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    color: #ff6f61;
    text-decoration: underline;
}

.footer-icons {
    margin-bottom: 0.8rem;
}

.footer-icons a {
    margin: 0 0.4rem;
    font-size: 1.4rem;
    color: #0d6efd;
    transition: color 0.2s ease;
}

.footer-icons a:hover {
    color: #ff6f61;
}

.footer-copy {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Dark mode footer */
body.quarto-dark .site-footer {
    border-top-color: rgba(255, 255, 255, 0.15);
}

body.quarto-dark .footer-links a {
    color: #9ec5ff;
}

body.quarto-dark .footer-icons a {
    color: #9ec5ff;
}

body.quarto-dark .footer-links a:hover,
body.quarto-dark .footer-icons a:hover {
    color: #ff6f61;
}

/* Mobile layout: photo below text */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-photo {
        order: 2;
        /* photo goes below */
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 1.2rem;
    }

    .hero-content {
        order: 1;
        /* text goes above */
        width: 100%;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

    .page-wrapper {
        padding: 1.8rem 1rem 2.5rem 1rem;
    }
}

/* --------------------------------------------- */
/* 1. Improved vertical rhythm & section spacing */
/* --------------------------------------------- */

.section-title {
    margin-top: 3rem;
    margin-bottom: 1.2rem;
}

.page-wrapper p,
.page-wrapper ul,
.page-wrapper .featured-projects,
.page-wrapper .skills-grid {
    margin-bottom: 1.8rem;
}

/* --------------------------------------------- */
/* 2. Smooth fade-in animation for sections      */
/* --------------------------------------------- */

.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

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

/* Apply fade-in to major blocks */
.hero,
.featured-projects,
.skills-grid,
.site-footer {
    animation: fadeInUp 0.6s ease forwards;
}

/* --------------------------------------------- */
/* 3. Featured projects: cleaner card spacing    */
/* --------------------------------------------- */

.featured-card {
    padding: 1.3rem;
    border-radius: 14px;
    line-height: 1.55;
}

.featured-card h3 {
    margin-bottom: 0.5rem;
}

/* --------------------------------------------- */
/* 4. Tools grid: more balanced spacing          */
/* --------------------------------------------- */

.skills-grid {
    gap: 1rem;
}

.skill-card {
    padding: 0.9rem 1rem;
    font-size: 1rem;
}

/* --------------------------------------------- */
/* 5. Hero section refinements                   */
/* --------------------------------------------- */

.hero {
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2.6rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.hero-text {
    font-size: 1.05rem;
    margin-bottom: 1.4rem;
    line-height: 1.65;
}

/* --------------------------------------------- */
/* 6. Mobile layout: photo BELOW text (Option B) */
/* --------------------------------------------- */

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-content {
        order: 1;
        width: 100%;
    }

    .hero-photo {
        order: 2;
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 1.4rem;
    }

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

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .page-wrapper {
        padding: 1.8rem 1rem 2.5rem 1rem;
    }
}

/* --------------------------------------------- */
/* 7. Footer spacing refinements                 */
/* --------------------------------------------- */

.site-footer {
    margin-top: 3.5rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.footer-links a {
    margin: 0 0.7rem;
}

.footer-icons a {
    margin: 0 0.5rem;
    font-size: 1.45rem;
}

/* -------------------------------------------------- */
/* PAGE TITLES (About, Projects, Contact)             */
/* -------------------------------------------------- */

.quarto-title-block,
.quarto-title-block .title,
.page-title {
    text-align: center !important;
}

.quarto-title-block .title,
.page-title {
    font-size: 2.4rem !important;
    font-weight: 600 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

/* Optional: section headers inside pages */
.section-title {
    text-align: center !important;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
}