/* ============================================================
   Self-contained utility layer.
   Replaces the runtime Tailwind CDN so the site needs no
   external scripts to style itself. Covers exactly the
   utilities used across the site's HTML.
   Terminal palette:
     bg     #000000
     text   #00FF00
     accent #FFFF00
     dim    #005500
   ============================================================ */

/* ---- Minimal reset (Tailwind Preflight essentials) ---- */
*, *::before, *::after { box-sizing: border-box; border-width: 0; border-style: solid; }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
body { margin: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
a { color: inherit; text-decoration: inherit; }
button { font-family: inherit; font-size: 100%; margin: 0; padding: 0; background: transparent; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, canvas { display: block; vertical-align: middle; }
textarea { font-family: inherit; font-size: 100%; margin: 0; }
input { font-family: inherit; }

/* ---- Color variables ---- */
:root {
    --term-bg: #000000;
    --term-text: #00FF00;
    --term-accent: #FFFF00;
    --term-dim: #005500;
}

/* ---- Typography family ---- */
.font-mono { font-family: 'Courier New', monospace; }
.font-bold { font-weight: 700; }

/* ---- Font sizes ---- */
.text-xs  { font-size: 0.75rem; line-height: 1rem; }
.text-sm  { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg  { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl  { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.leading-tight { line-height: 1.25; }

/* ---- Text colors ---- */
.text-terminal-bg     { color: var(--term-bg); }
.text-terminal-text   { color: var(--term-text); }
.text-terminal-accent { color: var(--term-accent); }
.text-terminal-dim    { color: var(--term-dim); }
.text-terminal-text\/70 { color: rgba(0, 255, 0, 0.70); }
.text-terminal-text\/60 { color: rgba(0, 255, 0, 0.60); }

/* ---- Background colors ---- */
.bg-terminal-bg        { background-color: var(--term-bg); }
.bg-terminal-text      { background-color: var(--term-text); }
.bg-terminal-accent    { background-color: var(--term-accent); }
.bg-terminal-dim       { background-color: var(--term-dim); }
.bg-terminal-bg\/70    { background-color: rgba(0, 0, 0, 0.70); }
.bg-terminal-bg\/50    { background-color: rgba(0, 0, 0, 0.50); }
.bg-terminal-accent\/20 { background-color: rgba(255, 255, 0, 0.20); }

/* ---- Borders ---- */
.border    { border-width: 1px; }
.border-b  { border-bottom-width: 1px; }
.border-t  { border-top-width: 1px; }
.border-l-2 { border-left-width: 2px; }
.border-terminal-accent     { border-color: var(--term-accent); }
.border-terminal-accent\/40 { border-color: rgba(255, 255, 0, 0.40); }
.border-terminal-accent\/30 { border-color: rgba(255, 255, 0, 0.30); }
.border-terminal-accent\/20 { border-color: rgba(255, 255, 0, 0.20); }
.border-terminal-accent\/50 { border-color: rgba(255, 255, 0, 0.50); }
.border-terminal-text\/30   { border-color: rgba(0, 255, 0, 0.30); }
.rounded { border-radius: 0.25rem; }

/* ---- Layout / display ---- */
.block        { display: block; }
.inline-block { display: inline-block; }
.inline       { display: inline; }
.flex         { display: flex; }
.grid         { display: grid; }
.hidden       { display: none; }

.flex-col  { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---- Gaps ---- */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* ---- Spacing between children ---- */
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-8 > * + * { margin-top: 2rem; }

/* ---- Positioning ---- */
.relative { position: relative; }
.absolute { position: absolute; }
.top-0    { top: 0; }
.left-0   { left: 0; }
.z-10     { z-index: 10; }

/* ---- Sizing ---- */
.w-1    { width: 0.25rem; }
.w-4    { width: 1rem; }
.w-6    { width: 1.5rem; }
.w-3\.5 { width: 0.875rem; }
.w-full { width: 100%; }
.h-4    { height: 1rem; }
.h-6    { height: 1.5rem; }
.h-3\.5 { height: 0.875rem; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-3xl    { max-width: 48rem; }
.min-w-\[140px\] { min-width: 140px; }

/* ---- Margins ---- */
.mx-auto { margin-left: auto; margin-right: auto; }
.mr-1 { margin-right: 0.25rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }

/* ---- Padding ---- */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pt-6 { padding-top: 1.5rem; }
.pl-3 { padding-left: 0.75rem; }
.pl-4 { padding-left: 1rem; }
.pl-6 { padding-left: 1.5rem; }

/* ---- Text alignment / misc ---- */
.text-center { text-align: center; }
.underline   { text-decoration: underline; }
.overflow-hidden   { overflow: hidden; }
.overflow-x-hidden { overflow-x: hidden; }
.cursor-pointer    { cursor: pointer; }
.resize-y          { resize: vertical; }
.backdrop-blur-sm  { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.15s;
}

/* ---- Container ---- */
.container { width: 100%; }
@media (min-width: 640px)  { .container { max-width: 640px; } }
@media (min-width: 768px)  { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }
@media (min-width: 1536px) { .container { max-width: 1536px; } }

/* ---- Hover states ---- */
.hover\:text-terminal-accent:hover { color: var(--term-accent); }
.hover\:bg-terminal-accent\/30:hover { background-color: rgba(255, 255, 0, 0.30); }

/* ---- Group hover ---- */
.group:hover .group-hover\:text-terminal-accent { color: var(--term-accent); }

/* ---- Focus states (forms) ---- */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-1:focus { box-shadow: 0 0 0 1px var(--term-accent); }
.focus\:ring-terminal-accent:focus { box-shadow: 0 0 0 1px var(--term-accent); }
.focus\:border-terminal-accent:focus { border-color: var(--term-accent); }

/* ---- Responsive: sm (>=640px) ---- */
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:flex-row    { flex-direction: row; }
    .sm\:items-center { align-items: center; }
    .sm\:gap-6       { gap: 1.5rem; }
}

/* ---- Responsive: md (>=768px) ---- */
@media (min-width: 768px) {
    .md\:hidden    { display: none; }
    .md\:p-8       { padding: 2rem; }
    .md\:pl-6      { padding-left: 1.5rem; }
    .md\:gap-4     { gap: 1rem; }
    .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
    .md\:text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
    .md\:text-4xl  { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ====== Site custom styles (after utilities) ====== */
/* Terminal-inspired styles */
body {
    line-height: 1.6;
}

a {
    transition: color 0.2s ease;
}

/* Matrix background canvas */
#matrix-bg {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
    display: block;
}

/* Glowing text effect */
.glow-text {
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5), 0 0 20px rgba(0, 255, 0, 0.25), 0 0 40px rgba(0, 255, 0, 0.1);
}

/* Terminal blinking cursor effect */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cursor-blink::after {
    content: '█';
    animation: blink 1s step-end infinite;
    color: #00FF00;
}

/* Card styling */
.card {
    display: block;
    border: 1px solid rgba(0, 255, 0, 0.2);
    padding: 1.25rem;
    border-radius: 4px;
    background: rgba(0, 255, 0, 0.03);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    border-color: rgba(255, 255, 0, 0.5);
    background: rgba(0, 255, 0, 0.07);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.1), inset 0 0 15px rgba(0, 255, 0, 0.03);
    transform: translateY(-2px);
}

/* Nav link active state */
.nav-link.active {
    color: #FFFF00;
}

.nav-link.active::before {
    content: '>';
    margin-right: 2px;
}

.nav-link.active::after {
    content: '<';
    margin-left: 2px;
}

/* Divider */
.divider {
    border-top: 1px solid rgba(255, 255, 0, 0.2);
    position: relative;
}

.divider::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 60px;
    height: 1px;
    background: #FFFF00;
    box-shadow: 0 0 8px rgba(255, 255, 0, 0.5);
}

/* Typing line animation */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

.typing-line {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 1.2s steps(40) forwards;
}

/* Scanline effect overlay */
.scanlines::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* Flicker animation */
@keyframes flicker {
    0%, 97%, 100% { opacity: 1; }
    98% { opacity: 0.7; }
    99% { opacity: 0.9; }
}

.flicker {
    animation: flicker 4s infinite;
}

/* Terminal prompt styling */
.prompt {
    color: #FFFF00;
}

.prompt::before {
    content: '$ ';
}

/* Responsive adjustments */
@media (max-width: 640px) {
    nav {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Print styles */
@media print {
    body {
        background-color: white !important;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }

    #matrix-bg,
    .scanlines::before {
        display: none !important;
    }
}

/* Matrix toggle button */
.matrix-toggle-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 50;
    color: rgba(0, 255, 0, 0.3);
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(255, 255, 0, 0.15);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
    font-size: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.matrix-toggle-btn:hover {
    color: #FFFF00;
    border-color: rgba(255, 255, 0, 0.4);
}

.matrix-toggle-btn .toggle-label {
    font-size: 0.6rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.matrix-toggle-btn:hover .toggle-label {
    opacity: 1;
}

.matrix-toggle-btn.off {
    color: rgba(85, 85, 85, 0.5);
    border-color: rgba(85, 85, 85, 0.2);
}

.matrix-toggle-btn.off:hover {
    color: #FFFF00;
    border-color: rgba(255, 255, 0, 0.4);
}

/* Matrix canvas transition */
#matrix-bg {
    transition: opacity 0.5s ease;
}

#matrix-bg.hidden-matrix {
    opacity: 0 !important;
    pointer-events: none;
}

/* Meeting schedule card */
.schedule-card {
    border: 1px solid rgba(0, 255, 0, 0.2);
    padding: 1rem 1.25rem;
    border-radius: 4px;
    background: rgba(0, 255, 0, 0.03);
}

/* Resource link card */
.resource-card {
    border: 1px solid rgba(0, 255, 0, 0.15);
    padding: 1.25rem;
    border-radius: 4px;
    background: rgba(0, 255, 0, 0.03);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.resource-card:hover {
    border-color: rgba(255, 255, 0, 0.4);
    background: rgba(0, 255, 0, 0.07);
    transform: translateY(-2px);
}

/* Mobile menu */
#mobile-nav {
    display: none;
}

#mobile-nav.open {
    display: flex;
}

/* Horizontal scroll for mobile nav */
@media (max-width: 768px) {
    #nav-links {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #005500 transparent;
    }
    
    #nav-links::-webkit-scrollbar {
        height: 3px;
    }
    
    #nav-links::-webkit-scrollbar-thumb {
        background: #005500;
        border-radius: 3px;
    }
}
/* ---- neofetch easter egg ---- */
.neofetch-prompt-line {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--term-accent);
    margin: 0;
}

.neofetch-prompt-line .neofetch-cmd { margin-left: 0.4rem; }

.neofetch-output {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.35;
    margin-top: 0.75rem;
    white-space: pre;
    overflow-x: auto;
}

.neofetch-output .nf-line {
    opacity: 0;
    animation: nfFadeIn 0.18s ease-out forwards;
}

@keyframes nfFadeIn {
    from { opacity: 0; transform: translateY(2px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nf-logo  { color: var(--term-text); }
.nf-title { color: var(--term-accent); font-weight: 700; }
.nf-rule  { color: var(--term-dim); }
.nf-key   { color: var(--term-accent); font-weight: 700; }
.nf-val   { color: var(--term-text); }

.nf-palette { display: inline-flex; gap: 2px; }
.nf-block {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 1px;
}

/* On small screens, let the block scroll horizontally rather than wrap. */
@media (max-width: 640px) {
    .neofetch-output { font-size: 0.7rem; }
}

/* ============================================================
   Officers block (about page)
   Only the image files in images/officers/ need to change to
   update headshots — the frame handles cropping and sizing.
   ============================================================ */
.officer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

@media (min-width: 640px) {
    .officer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.officer-card {
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 4px;
    background: rgba(0, 255, 0, 0.03);
    padding: 0.85rem;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.officer-card:hover {
    border-color: rgba(255, 255, 0, 0.4);
    background: rgba(0, 255, 0, 0.06);
}

/* Square frame; any aspect ratio of source image is cropped to fit. */
.officer-photo {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 0, 0.25);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.officer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Delete the next two lines to show headshots in full colour. */
    filter: grayscale(100%) contrast(1.05) brightness(0.95);
    transition: filter 0.4s ease;
}

.officer-card:hover .officer-photo img {
    filter: none;
}

/* Shown by script.js when an image file is missing or fails to load. */
.officer-photo.no-photo::after {
    content: " .--.\A|o_o|\A|:_/|";
    white-space: pre;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    line-height: 1.2;
    color: var(--term-dim);
    text-align: center;
}

.officer-role {
    color: var(--term-accent);
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

.officer-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-top: 0.15rem;
}

.officer-note {
    font-size: 0.8rem;
    color: rgba(0, 255, 0, 0.6);
    margin-top: 0.25rem;
}
