/* ===================================
   TheTechBiscuit Theme CSS
   Base styles & tokens
   =================================== */

/* Base Resets & Smooth Scrolling */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

@media (max-width: 768px) {
    html { font-size: 15px; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    a, button, .nav-link, .cta-button, .read-more, .tab-link {
        -webkit-tap-highlight-color: rgba(242, 166, 90, 0.2);
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    body { -webkit-overflow-scrolling: touch; }
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    border-radius: 0 0 8px 0;
    transition: top 0.3s ease;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

/* Focus & selection */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}
::selection { background-color: var(--accent); color: #fff; }
::-moz-selection { background-color: var(--accent); color: #fff; }

/* Images */
img { display: block; max-width: 100%; height: auto; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* Utilities */
.is-hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

/* Base typography & spacing */
body {
    font-family: var(--font-sans);
    color: var(--text);
    background: linear-gradient(160deg, #0c121d 0%, #0c1422 45%, #0a101a 100%);
    line-height: 1.8;
    font-size: 1rem;
    font-weight: var(--normal-font-weight);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 0;
    margin: 0;
}

a { color: var(--text); transition: color var(--transition-smooth); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.25;
    color: var(--heading-color);
    margin-bottom: 0.85rem;
    font-weight: var(--bold-font-weight);
    letter-spacing: -0.01em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; position: relative; padding-bottom: 0.35rem; }
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
    border-radius: 999px;
}
h3 { font-size: 1.75rem; color: var(--text); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; letter-spacing: 0.02em; }
h6 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }

p { line-height: 1.8; margin-bottom: 1.25rem; }
em { font-style: italic; color: var(--text-light); }
strong { font-weight: 700; color: var(--secondary); }

/* Root tokens */
:root{
    /* Color Palette */
    --text:#eaf0f9;
    --text-light:#cbd7ea;
    --text-lighter:#a6b7d5;
    --text-lightest:#7f93b5;
    --background:#0c121d;
    --background-strong:#090e17;
    --background-alt:#0f1826;
    --surface:#131c2a;
    --surface-2:#192437;
    --surface-3:#0f1a2b;
    --accent:#f2a65a;
    --accent-2:#ff7f50;
    --accent-hover:#f5b779;
    --secondary:#7dd3fc;
    --secondary-hover:#9de3ff;
    --success:#4ade80;
    --warn:#f59e0b;
    --border-color:#223348;
    --border-strong:#304661;
    --card-bg:#121b2a;
    --card-bg-strong:#0d1422;
    --footer-bg:#0a111c;
    --footer-text:#a6b7d5;
    --footer-border:#1e2b3e;
    --heading-color:#f8fbff;

    /* Shadows */
    --shadow-sm:0 4px 10px rgba(0, 0, 0, 0.25);
    --shadow-md:0 10px 28px rgba(0, 0, 0, 0.32);
    --shadow-lg:0 18px 40px rgba(0, 0, 0, 0.4);
    --shadow-xl:0 26px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow:0 0 40px rgba(242, 166, 90, 0.4);
    --shadow-color:rgba(0, 0, 0, 0.25);

    /* Spacing */
    --base-spacing:1.2em;
    --half-spacing:0.6em;
    --double-spacing:2.4em;
    --spacing-xs:0.5rem;
    --spacing-sm:1rem;
    --spacing-md:1.5rem;
    --spacing-lg:2rem;
    --spacing-xl:3rem;

    /* Typography */
    --normal-font-weight:400;
    --medium-font-weight:500;
    --semibold-font-weight:600;
    --bold-font-weight:700;
    --font-sans:'Lato',sans-serif;
    --font-heading:'Montserrat',sans-serif;
    --line-height-tight:1.2;
    --line-height-normal:1.6;
    --line-height-relaxed:1.8;

    /* Border Radius */
    --border-radius-sm:0.35rem;
    --border-radius:0.6rem;
    --border-radius-md:0.9rem;
    --border-radius-lg:1.2rem;
    --border-radius-xl:1.6rem;

    /* Transitions */
    --transition-fast:0.15s ease;
    --transition-base:0.2s ease;
    --transition-smooth:0.3s ease;

    /* Special */
    --glow-accent:0 0 25px rgba(242, 166, 90, 0.5);
    --glass-bg:rgba(19, 28, 42, 0.8);
    --glass-border:1px solid rgba(255, 255, 255, 0.08);
    --gradient-hero:radial-gradient(circle at 20% 20%, rgba(255, 127, 80, 0.25), transparent 28%), radial-gradient(circle at 80% 10%, rgba(125, 211, 252, 0.25), transparent 30%), linear-gradient(135deg, #0b1220 0%, #0f1b2f 50%, #0a111c 100%);
    --gradient-card:linear-gradient(145deg, rgba(242,166,90,0.12), rgba(125,211,252,0.08));
    --gradient-border:linear-gradient(120deg, rgba(242,166,90,0.7), rgba(125,211,252,0.6));
}
