/* ==========================================================================
   theme.css — modernization + light/dark layer
   Loaded LAST, after bootstrap.min.css. Overrides styles.css / responsive.css.
   Removing the <link> to this file restores the previous look exactly.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */

:root {
    color-scheme: light;

    --bg-page:        #eceef2;
    --bg-surface:     #ffffff;
    --bg-surface-2:   #f6f7f9;
    --bg-tint:        #fff1e8;

    --text-strong:    #14171c;
    --text-body:      #4a5261;
    --text-muted:     #78818f;

    --border:         rgba(20, 23, 28, .10);
    --border-strong:  rgba(20, 23, 28, .18);

    --accent:         #e4550f;
    --accent-hover:   #c9430a;
    --accent-ink:     #ffffff;
    --accent-soft:    rgba(228, 85, 15, .14);

    --shadow-sm:  0 1px 2px rgba(16, 20, 28, .05), 0 2px 6px rgba(16, 20, 28, .05);
    --shadow-md:  0 2px 4px rgba(16, 20, 28, .05), 0 8px 20px rgba(16, 20, 28, .09);
    --shadow-lg:  0 4px 8px rgba(16, 20, 28, .06), 0 18px 44px rgba(16, 20, 28, .13);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Dark defaults for visitors with a dark OS, before/without JS */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --bg-page:        #0e1116;
        --bg-surface:     #171b22;
        --bg-surface-2:   #1e232c;
        --bg-tint:        rgba(255, 131, 71, .13);

        --text-strong:    #eef1f5;
        --text-body:      #b2bac6;
        --text-muted:     #8892a1;

        --border:         rgba(255, 255, 255, .10);
        --border-strong:  rgba(255, 255, 255, .18);

        --accent:         #ff8347;
        --accent-hover:   #ffa070;
        --accent-ink:     #1a0c04;
        --accent-soft:    rgba(255, 131, 71, .16);

        --shadow-sm:  0 1px 2px rgba(0, 0, 0, .34), 0 2px 6px rgba(0, 0, 0, .28);
        --shadow-md:  0 2px 4px rgba(0, 0, 0, .36), 0 8px 20px rgba(0, 0, 0, .40);
        --shadow-lg:  0 4px 8px rgba(0, 0, 0, .40), 0 18px 44px rgba(0, 0, 0, .50);
    }
}

/* Explicit choice always wins */
:root[data-theme="dark"] {
    color-scheme: dark;

    --bg-page:        #0e1116;
    --bg-surface:     #171b22;
    --bg-surface-2:   #1e232c;
    --bg-tint:        rgba(255, 131, 71, .13);

    --text-strong:    #eef1f5;
    --text-body:      #b2bac6;
    --text-muted:     #8892a1;

    --border:         rgba(255, 255, 255, .10);
    --border-strong:  rgba(255, 255, 255, .18);

    --accent:         #ff8347;
    --accent-hover:   #ffa070;
    --accent-ink:     #1a0c04;
    --accent-soft:    rgba(255, 131, 71, .16);

    --shadow-sm:  0 1px 2px rgba(0, 0, 0, .34), 0 2px 6px rgba(0, 0, 0, .28);
    --shadow-md:  0 2px 4px rgba(0, 0, 0, .36), 0 8px 20px rgba(0, 0, 0, .40);
    --shadow-lg:  0 4px 8px rgba(0, 0, 0, .40), 0 18px 44px rgba(0, 0, 0, .50);
}


/* ---------- 2. Base ---------- */

html body {
    background-color: var(--bg-page);
    color: var(--text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body p {
    color: var(--text-body);
    font-size: 16px;
    line-height: 1.7;
}

body h1, body h2, body h3, body h4, body h5, body h6 {
    color: var(--text-strong);
    letter-spacing: -.011em;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

::-moz-selection { color: var(--accent-ink); background: var(--accent); }
::selection      { color: var(--accent-ink); background: var(--accent); }

/* styles.css sets `* { outline: 0 !important }`, which kills keyboard focus
   rings entirely. Restore a visible one for keyboard users only. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent) !important;
    outline-offset: 3px;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}


/* ---------- 3. Layout shell ---------- */

section {
    background-color: var(--bg-page);
}

.common_bg {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 40px 24px;
}

/* The rotated accent wedge behind the card */
.homecolor-box {
    background: linear-gradient(150deg, var(--accent) 0%, var(--accent-hover) 100%);
    box-shadow: none;
    opacity: .92;
}
:root[data-theme="dark"] .homecolor-box { opacity: .6; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .homecolor-box { opacity: .6; }
}


/* ---------- 4. Typography ---------- */

/* `text-transform: capitalize` was Title-Casing full sentences
   ("I Help CEOs, Founders And Business Owners…"). Removed. */
h1.common-title,
h2.common-title,
h5.common-title {
    text-transform: none;
    word-spacing: normal;
}

h1.common-title {
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -.025em;
    color: var(--text-strong);
    margin-bottom: 10px;
}

h2.common-title {
    font-size: clamp(1.05rem, 1.9vw, 1.4rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--accent);
    letter-spacing: -.005em;
    margin-bottom: 14px;
}

h5.common-title {
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 62ch;
    margin-left: auto;
    margin-right: auto;
}

.lorem-text {
    text-align: left;
    max-width: 74ch;
    margin: 28px auto 0;
}

.section-title { padding: 44px 0 26px; }
.section-title .common-title span { color: var(--accent); }

/* Section headings share h1.common-title with the hero name; scale them back
   so "Alex Conesa" stays the largest thing on the page. */
.section-title h1.common-title {
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    letter-spacing: -.02em;
    margin-bottom: 0;
}

.animated-bar {
    background-color: var(--accent);
    height: 3px;
    width: 64px;
    margin-top: 14px;
    border-radius: 999px;
}
/* The two sliding highlights need to match the card, not hardcoded white */
.animated-bar:before,
.animated-bar:after { background-color: var(--bg-surface); }

.experience-list li {
    color: var(--text-body);
    padding-left: 32px;
    margin-bottom: 12px;
}
.experience-list li::before {
    background: var(--accent-soft);
    color: var(--accent);
    width: 21px;
    height: 21px;
    font-size: 10px;
    top: 5px;
}


/* ---------- 5. Navigation rail ---------- */

.navigation {
    background-color: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
}

.navigation ul li a .icon {
    font-size: 21px;
    color: var(--text-muted);
    transition: color .25s var(--ease), transform .25s var(--ease);
}
.navigation ul li a:hover .icon {
    color: var(--accent);
    transform: translateY(-2px);
}
.navigation ul li.active a .icon { color: var(--accent); }

/* Active-item bubble: the ::before/::after fake the notch by casting a
   page-coloured shadow, so both must follow the page background. */
li.active {
    border: 6px solid var(--bg-page);
    background-color: var(--bg-surface);
}
li.active::before,
li.active::after { box-shadow: -10px 1px 0 0 var(--bg-page); }

.social__tooltip {
    background-color: var(--text-strong);
    color: var(--bg-surface);
    font-size: .8rem;
    font-weight: 600;
    padding: .4rem .7rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}
.social__tooltip::after { background-color: var(--text-strong); }


/* ---------- 6. Rail tools: theme toggle + language switch ---------- */

.rail-tools {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    width: 44px;
}

.rail-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    padding: 0;
    cursor: pointer;
    transition: color .2s var(--ease), border-color .2s var(--ease),
                background-color .2s var(--ease), transform .2s var(--ease);
}
.rail-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background-color: var(--bg-tint);
    transform: translateY(-1px);
}
.rail-btn[aria-current="true"] {
    color: var(--accent-ink);
    background-color: var(--accent);
    border-color: var(--accent);
}

/* Show the icon for the theme you'd switch TO */
.rail-btn .icon-sun  { display: none; }
.rail-btn .icon-moon { display: block; }
:root[data-theme="dark"] .rail-btn .icon-sun  { display: block; }
:root[data-theme="dark"] .rail-btn .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .rail-btn .icon-sun  { display: block; }
    :root:not([data-theme="light"]) .rail-btn .icon-moon { display: none; }
}

.lang-switch {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}
.lang-switch .rail-btn {
    height: 30px;
    font-size: 12px;
}


/* ---------- 7. Service cards ---------- */

.services-box .service-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 28px 24px 24px;
    text-align: left;
    transition: transform .28s var(--ease), box-shadow .28s var(--ease),
                border-color .28s var(--ease);
}
.services-box .service-item:hover {
    background: var(--bg-surface);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

/* Was a permanent 10s rotateY loop on every icon — distracting and dated.
   Now a static tinted chip that responds to hover. */
.services-box .service-item i {
    animation: none;
    width: 52px;
    height: 52px;
    line-height: 52px;
    font-size: 21px;
    text-align: center;
    border-radius: var(--radius-sm);
    background: var(--bg-tint);
    color: var(--accent);
    margin-bottom: 18px;
    transition: transform .28s var(--ease);
}
.services-box .service-item:hover i { transform: scale(1.06) rotate(-4deg); }

.services-box .service-item h4 { margin-bottom: 10px; }

.service-line {
    color: var(--text-strong);
    font-size: 1.02rem;
    font-weight: 700;
    text-transform: none;
    line-height: 1.35;
}
.service-line::after { background-color: var(--accent); }

.services-box .service-item p {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 0;
}


/* ---------- 8. Testimonials ---------- */

#testimonial .item { padding: 40px 0 10px; }

.testimonial-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 26px 24px 22px;
    transition: box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.testimonial-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.testimonial-item .quote {
    color: var(--accent);
    opacity: .22;
    font-size: 38px;
    top: 14px;
    left: 20px;
}

.testimonial-item .testimonial-img {
    max-width: 76px;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--bg-surface);
    overflow: hidden;
}
.testimonial-item .testimonial-img img { border-radius: 50%; }

.testimonial-item .testimonial-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-strong);
    margin-left: 0;
}
.testimonial-item .testimonial-position {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-left: 0;
    margin-top: 2px;
}
/* Long quotes are hard to read ragged-both-sides; keep the header centred
   but set the quote itself left-aligned. */
.testimonial-item p {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.68;
    color: var(--text-body);
    text-align: left;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    width: 100%;
}
.testimonial-item .testimonial-a-linkedin {
    color: var(--text-muted);
    font-size: 18px;
}
.testimonial-item .testimonial-a-linkedin:hover { color: var(--accent); }

#testimonial .owl-nav button.owl-prev,
#testimonial .owl-nav button.owl-next {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}
#testimonial .owl-nav button.owl-prev:hover,
#testimonial .owl-nav button.owl-next:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

#testimonial .owl-dot span { background: var(--border-strong); opacity: 1; }
#testimonial .owl-dot.active span { background: var(--accent); }


/* ---------- 9. Contact ---------- */

.contact-section .contact-info .info-description {
    color: var(--text-muted);
    font-size: 1.05rem;
}
.contact-section .contact-info .list-info .info-icon {
    font-size: 17px;
    margin-right: 24px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg-tint);
    flex: 0 0 44px;
}
.contact-section .contact-info .list-info .info-icon i {
    color: var(--accent);
    left: 50%;
    transform: translate(-50%, -50%);
}
.contact-section .contact-info .list-info .info-details .info-type {
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.contact-section .contact-info .list-info .info-details .info-value,
.contact-section .contact-info .list-info .info-details .info-value a {
    color: var(--text-strong);
    font-size: 1.05rem;
    font-weight: 600;
}
.contact-section .contact-info .list-info .info-details .info-value a:hover {
    color: var(--accent);
}

.fixed-block .social-icons a {
    color: var(--text-muted);
    font-size: 26px;
}
.fixed-block .social-icons a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}
.contact-section .social-icons::before { background-color: var(--border); }

.profile-photo img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}


/* ---------- 10. Responsive ---------- */

@media only screen and (max-width: 991px) {
    .common_bg { padding: 28px 26px 20px; }
    .section-title { padding: 32px 0 20px; }
}

@media only screen and (max-width: 769px) {
    .common_bg { padding: 20px 18px 16px; }
    body p { font-size: 15px; }
    .lorem-text { margin-top: 20px; }
}

@media only screen and (max-width: 576px) {
    .common_bg {
        padding: 18px 16px 14px;
        border-radius: var(--radius-md);
    }

    /* Rail becomes a bottom bar. styles/responsive.css hardcoded #111 / #212121
       here (left over from a dark template), which showed as a dark blob on
       the light page — re-tie it to the theme. */
    .navigation {
        border: 1px solid var(--border);
        border-bottom: 0;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        flex-direction: row;
        gap: 0;
        padding: 0 10px;
    }
    .navigation ul { width: auto; }
    .navigation ul li a .icon { color: var(--text-muted); }

    li.active {
        background-color: var(--bg-surface);
        border: 6px solid var(--bg-page);
    }
    li.active::before { box-shadow: 1px -10px 0 0 var(--bg-page); }
    li.active::after  { box-shadow: -10px 1px 0 0 transparent; }

    .rail-tools {
        flex-direction: row;
        width: auto;
        margin-top: 0;
        margin-left: 10px;
        padding-top: 0;
        padding-left: 12px;
        border-top: 0;
        border-left: 1px solid var(--border);
        gap: 6px;
    }
    .lang-switch { flex-direction: row; }
    .lang-switch .rail-btn { height: 34px; width: 34px; }

    .services-box .service-item { padding: 20px 18px; }
    .section-title { padding: 24px 0 16px; }
}


/* ---------- 11. Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .animated-bar:before,
    .animated-bar:after { display: none; }
}
