/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */

:root {
    /* Primary Colors */
    --md-sys-color-primary: rgb(0 48 152);
    --md-sys-color-on-primary: rgb(255 255 255);
    --md-sys-color-primary-container: rgb(18 69 197);
    --md-sys-color-on-primary-container: rgb(181 195 255);
    --md-sys-color-inverse-primary: rgb(182 196 255);

    /* Primary Fixed */
    --md-sys-color-primary-fixed: rgb(220 225 255);
    --md-sys-color-on-primary-fixed: rgb(0 21 80);
    --md-sys-color-primary-fixed-dim: rgb(182 196 255);
    --md-sys-color-on-primary-fixed-variant: rgb(0 57 179);

    /* Secondary Colors */
    --md-sys-color-secondary: rgb(79 92 142);
    --md-sys-color-on-secondary: rgb(255 255 255);
    --md-sys-color-secondary-container: rgb(183 196 253);
    --md-sys-color-on-secondary-container: rgb(67 80 129);

    /* Secondary Fixed */
    --md-sys-color-secondary-fixed: rgb(220 225 255);
    --md-sys-color-on-secondary-fixed: rgb(7 23 71);
    --md-sys-color-secondary-fixed-dim: rgb(183 196 253);
    --md-sys-color-on-secondary-fixed-variant: rgb(55 68 117);

    /* Tertiary Colors */
    --md-sys-color-tertiary: rgb(102 0 128);
    --md-sys-color-on-tertiary: rgb(255 255 255);
    --md-sys-color-tertiary-container: rgb(129 38 155);
    --md-sys-color-on-tertiary-container: rgb(242 173 255);

    /* Tertiary Fixed */
    --md-sys-color-tertiary-fixed: rgb(252 215 255);
    --md-sys-color-on-tertiary-fixed: rgb(52 0 67);
    --md-sys-color-tertiary-fixed-dim: rgb(242 175 255);
    --md-sys-color-on-tertiary-fixed-variant: rgb(116 22 143);

    /* Error Colors */
    --md-sys-color-error: rgb(186 26 26);
    --md-sys-color-on-error: rgb(255 255 255);
    --md-sys-color-error-container: rgb(255 218 214);
    --md-sys-color-on-error-container: rgb(147 0 10);

    /* Surface Colors */
    --md-sys-color-surface: rgb(250 248 255);
    --md-sys-color-on-surface: rgb(26 27 35);
    --md-sys-color-surface-variant: rgb(224 225 243);
    --md-sys-color-on-surface-variant: rgb(67 70 84);
    --md-sys-color-surface-dim: rgb(217 217 228);
    --md-sys-color-surface-bright: rgb(250 248 255);
    --md-sys-color-inverse-surface: rgb(47 48 56);
    --md-sys-color-inverse-on-surface: rgb(240 240 251);

    /* Surface Containers */
    --md-sys-color-surface-container-lowest: rgb(255 255 255);
    --md-sys-color-surface-container-low: rgb(243 242 254);
    --md-sys-color-surface-container: rgb(238 237 248);
    --md-sys-color-surface-container-high: rgb(232 231 242);
    --md-sys-color-surface-container-highest: rgb(226 225 236);

    /* Background Colors */
    --md-sys-color-background: rgb(250 248 255);
    --md-sys-color-on-background: rgb(26 27 35);

    /* Outline & Border */
    --md-sys-color-outline: rgb(116 118 134);
    --md-sys-color-outline-variant: rgb(196 197 214);
    --std-outline: 1px solid var(--blue-gray-700);

    /* Utility Colors */
    --md-sys-color-surface-tint: rgb(40 83 210);
    --md-sys-color-shadow: rgb(0 0 0);
    --md-sys-color-scrim: rgb(0 0 0);

    /* Animation & Transitions */
    --std-easing: cubic-bezier(0.28, 0.55, 0.01, 0.95);
}

/* ============================================
   FONT FACE DECLARATIONS
   ============================================ */

/* Bitcount - Display/Heading Font */
@font-face {
    font-family: "Bitcount";
    src: url("../fonts/BitcountSingle-VariableFont.woff2")
        format("woff2-variations");
    font-weight: 100 900;
    font-display: swap;
}

/* Lexend - UI/Subheading Font */
@font-face {
    font-family: "Lexend";
    src: url("../fonts/Lexend-VariableFont.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-display: swap;
}

/* Noto Sans - Body Font (Regular) */
@font-face {
    font-family: "Noto Sans";
    src: url("../fonts/NotoSans-VariableFont.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Noto Sans - Body Font (Italic) */
@font-face {
    font-family: "Noto Sans";
    src: url("../fonts/NotoSans-Italic-VariableFont.woff2")
        format("woff2-variations");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* Merriweather - Serif Font (Regular) */
@font-face {
    font-family: "Merriweather";
    src: url("../fonts/Merriweather.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Merriweather - Serif Font (Italic) */
@font-face {
    font-family: "Merriweather";
    src: url("../fonts/Merriweather-Italic.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* ============================================
   BASE RESETS
   ============================================ */

html {
    background-color: var(--md-sys-color-primary);
}

body {
    margin: 0;
    background-color: var(--md-sys-color-primary);
}

h1,
h2,
h3,
h4,
h5,
p {
    margin: 0;
}

a {
    text-decoration: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

/* Heading Styles */
h1 {
    font-family: "Bitcount", sans-serif;
    font-weight: 500;
    font-size: 3rem;
    color: var(--md-sys-color-on-primary);
}

h2,
h3,
h4,
h5 {
    font-family: "Lexend", sans-serif;
    font-weight: 500;
    color: var(--md-sys-color-on-primary);
}

/* Body Text */
p {
    font-family: "Merriweather", serif;
    color: var(--md-sys-color-primary-fixed);
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* ============================================
   BUTTON COMPONENTS
   ============================================ */

button,
.a-button {
    display: inline-block;
    width: fit-content;
    height: fit-content;
    padding: 0.8rem 1.2rem;
    font-family: "Lexend", sans-serif;
    color: var(--md-sys-color-on-primary-fixed);
    background-color: var(--md-sys-color-primary-fixed);
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 0 var(--md-sys-color-primary-fixed-dim);
    transition: all 0.1s var(--std-easing);
    cursor: pointer;
}

button:hover,
.a-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 0 var(--md-sys-color-primary-fixed-dim);
}

button:active,
.a-button:active {
    transform: translateY(4px);
    background-color: var(--md-sys-color-primary-fixed-dim);
    box-shadow: 0 0 0 var(--md-sys-color-primary-fixed-dim);
}

/* Button Variants */
.btn-tertiary {
    color: var(--md-sys-color-on-tertiary);
    background-color: var(--md-sys-color-tertiary);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.material-symbols-outlined {
    color: inherit;
}

.hidden {
    display: none;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.sidebar-container {
    position: fixed;
    z-index: 1001;
}

.sidebar-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    padding: 0.8rem;
    margin: 0;
    border: none;
    border-radius: 2rem;
}

.sidebar-scrim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--std-easing);
}

.sidebar-scrim.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-menu {
    position: fixed;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: center;
    gap: 1rem;
    width: 280px;
    height: 100dvh;
    padding: 1.5rem;
    background-color: var(--md-sys-color-primary-container);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
    text-transform: capitalize;
    transform: translateX(104%);
    transition: transform 0.5s var(--std-easing);
}

.sidebar-menu.active {
    transform: translateX(0);
    transition: transform 0.3s var(--std-easing);
    pointer-events: auto;
}

.sidebar-item {
    font-family: "Bitcount", sans-serif;
    font-size: 3rem;
    color: var(--md-sys-color-on-primary-container);
    transition: all 0.1s var(--std-easing);
}

.sidebar-item:hover {
    color: var(--md-sys-color-tertiary-fixed);
    transform: translateX(8px);
}
