/* ---------- CORE THEME & LAYOUT ---------- */
html, body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.dark body {
    background-color: #020617;
    color: #ffffff;
}

html:not(.dark) body {
    background-color: #f8fafc;
    color: #0f172a;
}

/* ---------- TYPOGRAPHY ---------- */
.section-label {
    /* Removed fixed font-size so text-2xl works in HTML */
    letter-spacing: 0.8em !important; 
    font-weight: 700 !important;
    text-transform: uppercase;
    display: inline-block;
}

.handwritten-hero {
    font-family: 'Caveat', cursive;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    line-height: 1.05;
}

/* ---------- BIO SECTION ---------- */
.bio-card {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.bio-card p {
    margin-bottom: 3.5rem !important;
    line-height: 1.8;
}

.bio-card p:last-child {
    margin-bottom: 0 !important;
}

/* Bold text inherits main paragraph color */
.bio-card .font-bold {
    color: inherit !important;
}

/* ---------- GLASS CARDS ---------- */
.glass-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

html:not(.dark) .glass-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

html:not(.dark) .glass-card p { 
    color: #475569 !important; 
}

/* ---------- ROYAL GRADIENT SYSTEM ---------- */
.royal-border {
    border-left: 8px solid !important;
    border-image: linear-gradient(to bottom, #002366, #C41E3A) 1 100%;
}

.royal-title {
    background: linear-gradient(to right, #4169E1, #C41E3A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    width: 100%;
}

/* ---------- FOOTER THEME FIXES ---------- */
/* Global safety for the footer wrapper */
#footer-import > div {
    width: 100% !important;
}

/* Light Mode Defaults */
html:not(.dark) #footer-import .footer-bg {
    background-color: #f8fafc !important; /* Force light bg */
    border-top: 1px solid rgba(15, 23, 42, 0.1) !important;
}

html:not(.dark) #footer-import a {
    color: #1e293b !important; /* Dark slate links */
}

/* Dark Mode Overrides */
.dark #footer-import .footer-bg {
    background-color: #020617 !important; /* Force dark bg */
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.dark #footer-import a {
    color: #f8fafc !important; /* Light links */
}

/* Hover State */
#footer-import a:hover {
    color: #3b82f6 !important;
}

/* Force links to be readable if Tailwind inheritance fails */
html:not(.dark) #footer-import a {
    color: #1e293b !important;
}

html:not(.dark) #footer-import a:hover {
    color: #3b82f6 !important;
}

.dark #footer-import a {
    color: #f8fafc !important;
}

.dark #footer-import a:hover {
    color: #60a5fa !important;
}

/* ---------- UTILITIES ---------- */
.about-content-width {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}