/* ============================================================
   Theme Variables — Light (default, recruiter-friendly)
   ============================================================ */
:root {
    --primary:       #6244C5;
    --primary-hover: #4f35a8;
    --secondary:     #FFC448;
    --bg:            #F4F3FB;
    --surface:       #FFFFFF;
    --text:          #0E0F1A;
    --text-soft:     #3A3C50;
    --muted:         #636677;
    --border:        #D8D5EE;
    --light:         #F5F5FA;
    --dark:          #12141D;
}

/* Dark mode — html[data-theme="dark"] has specificity 0,1,1 which beats :root 0,1,0 */
html[data-theme="dark"] {
    --primary:       #9580E8;
    --primary-hover: #7f68d4;
    --secondary:     #FFC448;
    --bg:            #0D0F18;
    --surface:       #161927;
    --text:          #ECEEF5;
    --text-soft:     #C5C9D8;
    --muted:         #8B92A8;
    --border:        #272B3D;
    color-scheme: dark;
}

/* Explicit overrides so Bootstrap's hardcoded body color can't win */
html[data-theme="dark"] body {
    background-color: #0D0F18;
    color: #ECEEF5;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] span:not(.tech-tag):not(.badge-custom):not(.section-label):not(.timeline-date):not(.open-dot) {
    color: inherit;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.75;
    transition: background-color .3s, color .3s;
}

/* All themed surfaces transition smoothly */
.navbar, .tech-card, .case-card, .contact-card, .metric-item,
.timeline-content, .section-alt, .rec-card, .site-footer {
    transition: background-color .3s, border-color .3s, color .3s;
}

.body-text  { color: var(--text-soft); }
.section-pad { padding-top: 5rem; padding-bottom: 5rem; }

.section-alt { background-color: var(--surface); }

.section-label {
    display: block;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--primary);
}

/* ============================================================
   Spinner
   ============================================================ */
#spinner {
    background-color: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    font-weight: 600;
    border-radius: 8px;
    transition: all .3s;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff !important;
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff !important;
}

.btn-square, .btn-sm-square, .btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

.btn-square    { width: 38px; height: 38px; }
.btn-sm-square { width: 32px; height: 32px; }
.btn-lg-square { width: 48px; height: 48px; }

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
    display: none;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
}

.navbar .navbar-nav .nav-link {
    padding: 20px 15px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: color .25s;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar .navbar-toggler {
    border-color: var(--border);
}

[data-theme="dark"] .navbar .navbar-toggler-icon {
    filter: invert(1);
}

.brand-center {
    background-color: var(--secondary);
    border-radius: 6px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link { padding: 10px 0; }
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--border);
    border-radius: 50px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .3s, color .3s;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================================
   Hero
   ============================================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
    padding-bottom: 3rem;
    background: url(../img/bg-header.png) left top no-repeat;
    background-size: cover;
    background-color: var(--bg);
}

[data-theme="dark"] .hero-section {
    background-image: none;
}

.hero-role {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--text-soft);
}

.hero-summary {
    font-size: .975rem;
    color: var(--text-soft);
    max-width: 520px;
    line-height: 1.8;
}

.hero-img {
    max-height: 500px;
    width: auto;
    max-width: 100%;
    filter: drop-shadow(0 20px 48px rgba(98, 68, 197, .18));
}

.hero-open-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-soft);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: .45rem 1rem;
}

.open-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(34,197,94,.2);
    animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
    50%       { box-shadow: 0 0 0 6px rgba(34,197,94,.05); }
}

.typed-text-output {
    font-size: 1rem;
    font-weight: 600;
}

.typed-cursor {
    font-size: 1.2rem;
    color: var(--primary);
}

/* ============================================================
   Thought leadership badge
   ============================================================ */
.thought-leadership-badge {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: .875rem;
    color: var(--text-soft);
    line-height: 1.6;
}

.thought-leadership-badge strong { color: var(--text); }

/* ============================================================
   Impact Metrics Strip
   ============================================================ */
.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.metric-item {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: transform .3s, box-shadow .3s, border-color .3s;
}

.metric-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(98, 68, 197, .14);
    border-color: var(--primary);
}

.metric-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: .35rem;
}

.metric-arrow { font-size: .85rem; opacity: .6; }

.metric-label {
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1.4;
}

.metric-label small {
    display: block;
    margin-top: .2rem;
    text-transform: none;
    letter-spacing: 0;
    font-size: .68rem;
}

/* ============================================================
   Tech Stack Cards
   ============================================================ */
.tech-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
}

.tech-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(98, 68, 197, .12);
    border-color: var(--primary);
    transition: transform .3s, box-shadow .3s, border-color .3s;
}

.tech-card-icon {
    width: 46px;
    height: 46px;
    background-color: var(--bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.tech-card-title {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: .85rem;
    color: var(--text);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.tech-tag {
    display: inline-block;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: .22rem .65rem;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    transition: background-color .2s, border-color .2s, color .2s;
}

.tech-tag:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.tech-tag-sm { padding: .16rem .5rem; font-size: .68rem; }

/* ============================================================
   Experience Timeline
   ============================================================ */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
    opacity: .3;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -2.5rem;
    top: 8px;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border: 3px solid var(--bg);
    border-radius: 50%;
    outline: 2px solid var(--primary);
    flex-shrink: 0;
}

.timeline-dot-edu {
    background-color: var(--secondary);
    outline-color: var(--secondary);
}

.timeline-content {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
}

.timeline-content:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 18px rgba(98, 68, 197, .08);
    transition: border-color .3s, box-shadow .3s;
}

.timeline-date {
    font-size: .75rem;
    font-weight: 700;
    color: var(--muted);
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: .22rem .75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.timeline-bullets {
    margin: .75rem 0 0 0;
    padding-left: 1.2rem;
    color: var(--text-soft);
    font-size: .875rem;
    line-height: 1.7;
}

.timeline-bullets li { margin-bottom: .4rem; }

.timeline-bullets strong { color: var(--text); font-weight: 700; }

/* ============================================================
   Project Case-Study Cards — no images, styled headers
   ============================================================ */
.case-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(98, 68, 197, .13);
    border-color: var(--primary);
    transition: transform .3s, box-shadow .3s, border-color .3s;
}

/* Gradient header (replaces screenshot) */
.case-card-header {
    padding: 2.5rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.case-card-header-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: .75rem;
}

.case-card-header-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(255,255,255,.75);
}

.case-header-health     { background: linear-gradient(135deg, #6244C5, #9B59B6); }
.case-header-retail     { background: linear-gradient(135deg, #3d2a8a, #6244C5); }
.case-header-fintech    { background: linear-gradient(135deg, #6244C5, #2176ae); }
.case-header-enterprise { background: linear-gradient(135deg, #5837bf, #FFC448); }

.case-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.case-card-body h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.case-bullets {
    list-style: none;
    padding: 0;
    margin: .75rem 0 0 0;
    font-size: .865rem;
    color: var(--text-soft);
    flex: 1;
    line-height: 1.65;
}

.case-bullets li {
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: .5rem;
}

.case-bullets li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: .72rem;
    top: .22rem;
}

.case-bullets strong { color: var(--text); font-weight: 700; }

.badge-custom {
    display: inline-block;
    padding: .28rem .7rem;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 700;
    background-color: var(--bg);
    color: var(--muted);
    border: 1px solid var(--border);
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-primary-custom {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============================================================
   Recommendations
   ============================================================ */
.rec-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.rec-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(98, 68, 197, .1);
    transition: border-color .3s, box-shadow .3s;
}

.rec-quote-icon {
    font-size: 1.5rem;
    color: var(--primary);
    opacity: .5;
}

.rec-quote {
    font-size: .9rem;
    color: var(--text-soft);
    line-height: 1.75;
    font-style: italic;
    margin: 0;
    flex: 1;
}

.rec-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.rec-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 800;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rec-name {
    font-size: .875rem;
    font-weight: 700;
    color: var(--text);
}

.rec-role {
    font-size: .75rem;
    color: var(--muted);
    margin-top: .1rem;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-sub {
    font-size: .95rem;
    color: var(--text-soft);
    line-height: 1.7;
}

.contact-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem 1.5rem;
}

.contact-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(98, 68, 197, .1);
    transform: translateY(-3px);
    transition: border-color .3s, box-shadow .3s, transform .3s;
}

.contact-icon {
    width: 54px;
    height: 54px;
    background-color: var(--bg);
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0 auto 1rem;
}

.contact-card h5 {
    font-weight: 700;
    color: var(--text);
    margin-bottom: .4rem;
}

.contact-card p { color: var(--text); margin-bottom: .25rem; }

.contact-caption {
    display: block;
    font-size: .75rem;
    color: var(--muted);
    margin-top: .25rem;
}

.contact-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    word-break: break-all;
    transition: color .2s;
}

.contact-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
}

.footer-text { color: var(--muted); }

/* ============================================================
   Back to Top
   ============================================================ */
.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
    transition: background-color .3s, transform .3s;
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-3px);
}

/* ============================================================
   Text utility overrides (ensure theme-aware)
   ============================================================ */
.text-primary { color: var(--primary) !important; }

html[data-theme="dark"] .text-muted          { color: var(--muted)     !important; }
html[data-theme="dark"] .text-primary        { color: var(--primary)   !important; }
html[data-theme="dark"] .navbar              { background-color: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .section-alt        { background-color: var(--surface); }
html[data-theme="dark"] .tech-card          { background-color: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .case-card          { background-color: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .timeline-content   { background-color: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .rec-card           { background-color: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .contact-card       { background-color: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .metric-item        { background-color: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .tech-card-icon     { background-color: var(--bg);      border-color: var(--border); }
html[data-theme="dark"] .contact-icon       { background-color: var(--bg);      border-color: var(--border); }
html[data-theme="dark"] .tech-tag           { background-color: var(--bg);      border-color: var(--border); color: var(--text); }
html[data-theme="dark"] .timeline-date      { background-color: var(--bg);      border-color: var(--border); color: var(--muted); }
html[data-theme="dark"] .badge-custom       { background-color: var(--bg);      border-color: var(--border); color: var(--muted); }
html[data-theme="dark"] .hero-open-badge    { background-color: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .thought-leadership-badge { background-color: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .site-footer        { background-color: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .spinner            { background-color: var(--bg); }

/* ============================================================
   Spacing kept for WOW delay classes
   ============================================================ */
.py-6 { padding-top: 6rem; padding-bottom: 6rem; }
