/* Theme switcher + dark mode. Light mode keeps the original palette. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Switcher button */
.theme-toggle
{
    position: fixed;
    top: 0.9rem;
    inset-inline-end: 0.9rem;
    z-index: 1050;
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    padding: 0;
    border: 2px solid #FEBAB9;
    border-radius: 50%;
    background-color: #542120;
    color: #FEBAB9;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { background-color: #FEBAB9; color: #542120; }
.theme-toggle:focus-visible { outline: 3px solid #6EE7A0; outline-offset: 2px; }
.theme-toggle svg { width: 1.3rem; height: 1.3rem; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Shared consistency fixes (both themes) */
.skill-card-title span { color: var(--main-color-light); }
.contact-link:hover { color: #FEBAB9 !important; }
#process .card:hover,
#experience .card:hover { transform: none; }
.cta-btn
{
    display: inline-block;
    width: fit-content !important;
    padding: 0.6rem 1.8rem;
    border-radius: 20px;
    background-color: #FEBAB9;
    color: #542120;
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.cta-btn:hover { background-color: white; color: #542120; }

/* Dark mode */
[data-theme="dark"] { color-scheme: dark; --main-color-light: #FEBAB9; }
[data-theme="dark"] body { background-color: #1B1212; color: #EBDCDC; }
[data-theme="dark"] .background-color-main { background-color: #3A1616; }
[data-theme="dark"] .description h2.color-main { color: #542120; }
[data-theme="dark"] .skill-card,
[data-theme="dark"] #about .skill-card { background-color: #2B1A1A; color: #EBDCDC; }
[data-theme="dark"] .card { --bs-card-bg: #2B1A1A; background-color: #2B1A1A; border-color: #7A4443 !important; }
[data-theme="dark"] .card-title::after { background-color: #FEBAB9; }
[data-theme="dark"] #contact { background-color: #6B3534; }
[data-theme="dark"] .navbar-toggler { background-color: #FEBAB9; }

/* ---- Spacing: the divider line sits midway between the title and the text below it ---- */
.section-sub { margin-top: 2.5rem; }
.section-sub + .section-content { margin-top: 0 !important; padding-top: 2.5rem; }

/* ---- One corner radius for the landing pill and the buttons ---- */
.description h2,
.hire-btn,
.cta-btn { border-radius: 14px; }

/* ---- Results: wide, short cards instead of circles ---- */
.stats-row
{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    padding: 0 3rem 1rem;
}
.stat-card
{
    flex: 1 1 200px;
    max-width: 260px;
    padding: 1rem 1.25rem !important;
}
.stat-card .skill-card-title span { font-size: 2rem; line-height: 1.1; }
.stat-source
{
    margin-top: 0.3rem;
    font-size: 0.85rem;
    text-align: center;
    opacity: 0.75;
}

/* ---- Project cards ---- */
.project-icon { width: 1.7rem; height: 1.7rem; flex: none; }
.project-note { font-size: 0.9rem !important; opacity: 0.8; }
.card.case-study:hover { transform: none; }
.case-study .card-body p { margin-bottom: 0.6rem; }

/* ---- About ---- */
.about-facts
{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.fact
{
    display: flex;
    flex-direction: column;
    padding: 0.55rem 0.9rem;
    border: 2px dashed var(--main-color-light);
    border-radius: 1rem;
    background-color: white;
    color: #2B0F0F;
    font-size: 1rem;
    line-height: 1.3;
}
.fact-label { font-size: 0.85rem; font-weight: 600; color: var(--main-color-light); }
.about-lead { font-size: 1.2rem; line-height: 1.6; text-align: start; margin-bottom: 0; }
.about-subhead { margin: 1.2rem 0 0.3rem; font-size: 1.1rem; font-weight: 700; }
.about-text { margin: 0; font-size: 1.05rem; line-height: 1.7; text-align: start; }
.about-note
{
    margin: 1.4rem 0 0;
    padding: 0.9rem 1.1rem;
    border-inline-start: 4px solid var(--main-color-light);
    border-radius: 0 0.75rem 0.75rem 0;
    background-color: rgba(254, 186, 185, 0.35);
    font-size: 1rem;
    line-height: 1.6;
    text-align: start;
}
.about-note a, .contact-note a { color: inherit; font-weight: 600; text-underline-offset: 3px; }
[data-theme="dark"] .fact { background-color: #2B1A1A; color: #EBDCDC; }
[data-theme="dark"] .about-note { background-color: rgba(254, 186, 185, 0.12); }

/* ---- Contact ---- */
.contact-grid
{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
    max-width: 36rem;
    margin: 0 auto;
    padding: 2rem 1rem 1rem;
}
.contact-method { display: flex; align-items: center; gap: 0.75rem; }
.contact-logo { width: 2rem !important; height: 2rem; flex: none; }
.contact-link { line-height: 1.2; overflow-wrap: anywhere; }
.contact-note { margin-top: 1rem; text-align: center; }
.contact-note a { color: #FEBAB9; }
@media (max-width: 47.9375em)
{
    .contact-grid { grid-template-columns: 1fr; }
    .about-facts { grid-template-columns: 1fr; }
    .stats-row { padding: 0 1rem 1rem; }
}

/* ---- Final touches ---- */
.fun-line .first-part,
.fun-line .second-part { font-size: 2.4rem; }
@media (max-width: 47.9375em)
{
    .fun-line .first-part,
    .fun-line .second-part { font-size: 1.8rem; }
}
#about .section-content { padding-top: 3.5rem; }
.contact-grid
{
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 1rem 3rem;
    max-width: none;
}
.contact-link { overflow-wrap: normal; white-space: nowrap; }
@media (max-width: 47.9375em)
{
    .contact-grid { grid-template-columns: auto; justify-items: start; }
}
@media (max-width: 23em)
{
    .contact-link { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 47.9375em)
{
    .section-sub + .section-content { padding-top: 2rem !important; }
}
