/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&display=swap');

/* ============================================
   DANIEL NOURI'S BLOG - MODERN CSS
   ============================================
   Single unified stylesheet
   No Bootstrap dependency
   Modern CSS: Grid, Flexbox, Custom Properties
   Mobile-first responsive design
   ============================================ */

/* ============================================
   TABLE OF CONTENTS
   ============================================
   1. CSS Reset & Normalization
   2. CSS Custom Properties (Design Tokens)
   3. Base Typography
   4. Layout System
   5. Components
      - Navbar
      - Homepage
      - Social Icons
      - Blog Posts
      - Callouts (Epigraphs & Admonitions)
      - Figures & Captions
      - Code Blocks
   6. Utility Classes
   7. Responsive Media Queries
   8. Print Styles
   9. Accessibility & Motion Preferences
   ============================================ */


/* ============================================
   1. CSS RESET & NORMALIZATION
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style-position: inside;
}

button {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}


/* ============================================
   2. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================ */

:root {
  /* Colors */
  --color-brand: #74cfae;
  --color-text: #333;
  --color-text-light: #666;
  --color-text-muted: #999;
  --color-link: #222;
  --color-link-hover: #000;
  --color-background: #fff;
  --color-background-alt: #f5f5f5;
  --color-border: #eee;
  --color-border-dark: #ccc;

  /* Spacing Scale (8px baseline grid) */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2rem;     /* 32px */
  --space-2xl: 3rem;    /* 48px */
  --space-3xl: 4rem;    /* 64px */

  /* Typography Scale */
  --font-family-base: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-heading: 'Raleway', var(--font-family-base);
  --font-family-mono: 'Fira Code', 'Monaco', 'Consolas', 'Courier New', monospace;

  --font-size-base: 1.125rem;  /* 18px */
  --font-size-sm: 0.875rem;    /* 14px */
  --font-size-xs: 0.75rem;     /* 12px */

  /* Modular scale (1.25 ratio) */
  --font-size-h1: 2.441rem;    /* ~39px */
  --font-size-h2: 1.953rem;    /* ~31px */
  --font-size-h3: 1.563rem;    /* ~25px */
  --font-size-h4: 1.25rem;     /* ~20px */
  --font-size-h5: 1rem;        /* 16px */
  --font-size-h6: 0.875rem;    /* 14px */

  --line-height-base: 1.6;
  --line-height-heading: 1.2;

  /* Layout */
  --container-max-width: 900px;
  --content-max-width: 800px;
  --navbar-height: 64px;

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


/* ============================================
   3. BASE TYPOGRAPHY
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Raleway:wght@400;600;700&display=swap');

html {
  font-size: clamp(16px, 4vw, 18px);
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-background);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 600;
  line-height: var(--line-height-heading);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-h1);
  letter-spacing: -0.01em;
  margin-top: var(--space-2xl);
}

h2 {
  font-size: var(--font-size-h2);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--font-size-h3);
}

h4 {
  font-size: var(--font-size-h4);
}

h5 {
  font-size: var(--font-size-h5);
}

h6 {
  font-size: var(--font-size-h6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Paragraphs */
p {
  margin-bottom: var(--space-md);
}

/* Links */
a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-link-hover);
}

a:focus {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* Lists */
ul, ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-sm);
}

/* Inline elements */
strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

/* Horizontal rule */
hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-2xl) 0;
}


/* ============================================
   4. LAYOUT SYSTEM
   ============================================ */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* Row */
.row {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

/* Columns - Mobile first */
[class*="col-"] {
  width: 100%;
}

/* Page wrapper */
#page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main_block {
  flex: 1;
  padding: var(--space-xl) 0;
}

#prose_block {
  width: 100%;
}


/* ============================================
   5. COMPONENTS
   ============================================ */

/* ----- Navbar ----- */
.navbar {
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Terminal Prompt Styling */
.terminal-prompt {
  font-family: var(--font-family-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text) !important;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  transition: opacity var(--transition-base);
  white-space: nowrap;
}

.terminal-prompt:hover {
  opacity: 0.8;
}

.prompt-icon {
  color: var(--color-brand);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
}

.prompt-path {
  color: var(--color-brand);
  font-weight: 700;
}

.prompt-symbol {
  color: var(--color-brand);
  margin-left: var(--space-xs);
}

.prompt-cursor {
  display: inline-block;
  width: 0.65em;
  height: 1em;
  background-color: var(--color-brand);
  vertical-align: text-bottom;
  margin-left: var(--space-xs);
  opacity: 0;
}

.navbar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border-dark);
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.navbar-toggle:hover {
  background-color: var(--color-background-alt);
}

.navbar-toggle:focus {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.navbar-toggle .icon-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  margin: 4px 0;
  transition: all var(--transition-base);
}

.navbar-collapse {
  display: flex;
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  align-items: center;
}

.navbar-nav a {
  font-family: var(--font-family-mono);
  font-size: 0.95rem;
  color: var(--color-text);
  font-weight: 400;
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.navbar-nav a:hover {
  background-color: var(--color-background-alt);
  color: var(--color-link-hover);
}

.navbar-nav .active a {
  color: var(--color-brand);
  font-weight: 600;
}


/* ----- Homepage ----- */
#hello {
  padding: var(--space-xl) var(--space-md);
}

.homepage-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.homepage-content p {
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.homepage-content ul.blog-highlights {
  list-style: none;
  padding: 0;
  margin-top: var(--space-xl);
}

.homepage-content ul.blog-highlights li {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.homepage-content ul.blog-highlights li:last-child {
  border-bottom: none;
}

.homepage-content ul.blog-highlights a {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-link);
  transition: color var(--transition-base);
}

.homepage-content ul.blog-highlights a:hover {
  color: var(--color-brand);
}


/* ----- Social Icons Section ----- */
#social {
  background-color: var(--color-background-alt);
  padding: var(--space-3xl) var(--space-md);
  margin-top: var(--space-3xl);
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--color-background);
  color: var(--color-text);
  font-size: 2rem;
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-icons a:hover {
  background-color: var(--color-brand);
  color: var(--color-background);
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


/* ----- Footer ----- */
#footer {
  margin-top: auto;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
}


/* ----- Blog Index Listing ----- */
.blog-index {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-xl);
}

.blog-index h1 {
  margin-top: 0;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--color-brand);
}

.blog-index ul {
  list-style: none;
  padding: 0;
}

.blog-index ul li {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.blog-index ul li:last-child {
  border-bottom: none;
}

.blog-index ul li a {
  font-size: var(--font-size-h4);
  font-weight: 600;
  color: var(--color-link);
  transition: color var(--transition-base);
}

.blog-index ul li a:hover {
  color: var(--color-brand);
}


/* ----- Blog Post Container ----- */
.blog-post {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

/* Override base h1 margin-top since this is the first element in blog posts */
.blog-post .blog_post_title {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.blog-post .post-article {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

/* Align document content with blog post container */
.blog-post .document {
  max-width: none;
  margin: 0;
}


/* ----- Blog Post Content (reStructuredText) ----- */
.document {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.section {
  margin-bottom: var(--space-2xl);
}

.section h1,
.section h2,
.section h3 {
  color: var(--color-text);
}

/* Docutils specific */
.docutils {
  font-family: 'Courier New', Courier, monospace;
  background-color: var(--color-background-alt);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

.literal {
  font-family: 'Courier New', Courier, monospace;
  background-color: var(--color-background-alt);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

tt.docutils {
  font-family: 'Courier New', Courier, monospace;
}

/* Reference links */
.reference.external {
  color: var(--color-brand);
  text-decoration: underline;
}

.reference.external:hover {
  color: var(--color-link-hover);
}


/* ----- Epigraphs (Elegant Quotes) ----- */
.epigraph {
  position: relative;
  text-align: center;
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.8;
  margin: 2rem auto;
  padding: 0 2rem;
  max-width: 700px;

  /* Teal gradient text - the signature element */
  background: linear-gradient(135deg, #74cfae 0%, #2d7a6e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Attribution link styling */
.epigraph a {
  font-size: 0.9rem;
  font-style: normal;
  color: #6b7280;
  text-decoration: none;

  /* Restore normal text color for attribution */
  background: none;
  -webkit-text-fill-color: #6b7280;
}

.epigraph a:hover {
  color: var(--color-brand);
  -webkit-text-fill-color: var(--color-brand);
}

/* Mobile adjustments for epigraphs */
@media (max-width: 640px) {
  .epigraph {
    font-size: 1.125rem;
    padding: 0 1rem;
  }
}


/* ----- Admonitions (Warning, Note, Tip, etc.) ----- */

/* Base admonition styles */
.warning,
.note,
.tip,
.hint,
.caution,
.danger,
.attention,
.important,
.error {
  position: relative;
  margin: 2rem 0;
  padding: 1.5rem 1.5rem 1.5rem 3.5rem;
  border-top: 4px solid;
  border-image-slice: 1;
}

/* Hide admonition title - color-coded border and icon provide semantic meaning */
.admonition-title {
  display: none;
}

/* Admonition body text */
.warning p:not(.admonition-title),
.note p:not(.admonition-title),
.tip p:not(.admonition-title),
.hint p:not(.admonition-title),
.caution p:not(.admonition-title),
.danger p:not(.admonition-title),
.attention p:not(.admonition-title),
.important p:not(.admonition-title),
.error p:not(.admonition-title) {
  line-height: 1.7;
  color: #1f2937;
  margin-bottom: 0;
}

/* Tip/Hint: Teal gradient (brand signature) */
.tip,
.hint {
  border-image: linear-gradient(90deg, #74cfae 0%, #2d7a6e 100%);
}

.tip::before,
.hint::before {
  content: "\f0eb"; /* FA lightbulb icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 1.5rem;
  left: 1rem;
  font-size: 1.25rem;
  color: #2d7a6e;
}

/* Note: Purple to teal gradient */
.note {
  border-image: linear-gradient(90deg, #9f7aea 0%, #74cfae 100%);
}

.note::before {
  content: "\f05a"; /* FA info-circle icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 1.5rem;
  left: 1rem;
  font-size: 1.25rem;
  color: #7c3aed;
}

/* Warning/Caution/Attention: Coral to teal gradient */
.warning,
.caution,
.attention {
  border-image: linear-gradient(90deg, #ff8b7a 0%, #74cfae 100%);
}

.warning::before,
.caution::before,
.attention::before {
  content: "\f071"; /* FA exclamation-triangle icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 1.5rem;
  left: 1rem;
  font-size: 1.25rem;
  color: #ea580c;
}

/* Danger/Error/Important: Red to teal gradient */
.danger,
.error,
.important {
  border-image: linear-gradient(90deg, #dc2626 0%, #74cfae 100%);
}

.danger::before,
.error::before,
.important::before {
  content: "\f06a"; /* FA exclamation-circle icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 1.5rem;
  left: 1rem;
  font-size: 1.25rem;
  color: #dc2626;
}

/* Mobile adjustments for admonitions */
@media (max-width: 640px) {
  .warning,
  .note,
  .tip,
  .hint,
  .caution,
  .danger,
  .attention,
  .important,
  .error {
    padding: 1rem 1rem 1rem 2.5rem;
  }

  .warning::before,
  .note::before,
  .tip::before,
  .hint::before,
  .caution::before,
  .danger::before,
  .attention::before,
  .important::before,
  .error::before {
    left: 0.75rem;
    font-size: 1.125rem;
  }
}


/* ----- Figures & Captions ----- */
.figure {
  margin: var(--space-xl) 0;
  text-align: center;
}

.figure img {
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.caption {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-top: var(--space-md);
  font-style: italic;
}

.img-responsive {
  max-width: 100%;
  height: auto;
}


/* ----- Code Blocks & Syntax Highlighting ----- */
pre {
  background-color: #2d2d2d;
  color: #f8f8f2;
  padding: var(--space-lg);
  border-radius: 4px;
  overflow-x: auto;
  margin: var(--space-lg) 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

/* Inline code */
:not(pre) > code {
  background-color: var(--color-background-alt);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--color-text);
}

/* Pygments Murphy Theme Integration */
.pygments_murphy {
  background-color: #2d2d2d;
  border-radius: 4px;
  margin: var(--space-lg) 0;
}

.pygments_murphy pre {
  margin: 0;
  background: transparent;
}

/* Murphy theme colors */
.pygments_murphy .hll { background-color: #404040 }
.pygments_murphy .c { color: #999; font-style: italic }
.pygments_murphy .err { color: #a61717; background-color: #e3d2d2 }
.pygments_murphy .g { color: #d0d0d0 }
.pygments_murphy .k { color: #6ab825; font-weight: bold }
.pygments_murphy .l { color: #d0d0d0 }
.pygments_murphy .n { color: #d0d0d0 }
.pygments_murphy .o { color: #d0d0d0 }
.pygments_murphy .x { color: #d0d0d0 }
.pygments_murphy .p { color: #d0d0d0 }
.pygments_murphy .cm { color: #999; font-style: italic }
.pygments_murphy .cp { color: #cd2828; font-weight: bold }
.pygments_murphy .c1 { color: #999; font-style: italic }
.pygments_murphy .cs { color: #e50808; font-weight: bold; background-color: #520000 }
.pygments_murphy .gd { color: #d22323 }
.pygments_murphy .ge { color: #d0d0d0; font-style: italic }
.pygments_murphy .gr { color: #d22323 }
.pygments_murphy .gh { color: #fff; font-weight: bold }
.pygments_murphy .gi { color: #589819 }
.pygments_murphy .go { color: #ccc }
.pygments_murphy .gp { color: #aaa }
.pygments_murphy .gs { color: #d0d0d0; font-weight: bold }
.pygments_murphy .gu { color: #fff; text-decoration: underline }
.pygments_murphy .gt { color: #d22323 }
.pygments_murphy .kc { color: #6ab825; font-weight: bold }
.pygments_murphy .kd { color: #6ab825; font-weight: bold }
.pygments_murphy .kn { color: #6ab825; font-weight: bold }
.pygments_murphy .kp { color: #6ab825 }
.pygments_murphy .kr { color: #6ab825; font-weight: bold }
.pygments_murphy .kt { color: #6ab825; font-weight: bold }
.pygments_murphy .ld { color: #d0d0d0 }
.pygments_murphy .m { color: #3677a9 }
.pygments_murphy .s { color: #ed9d13 }
.pygments_murphy .na { color: #bbb }
.pygments_murphy .nb { color: #24909d }
.pygments_murphy .nc { color: #447fcf }
.pygments_murphy .no { color: #40ffff }
.pygments_murphy .nd { color: #ffa500 }
.pygments_murphy .ni { color: #d0d0d0 }
.pygments_murphy .ne { color: #bbb }
.pygments_murphy .nf { color: #447fcf }
.pygments_murphy .nl { color: #d0d0d0 }
.pygments_murphy .nn { color: #447fcf }
.pygments_murphy .nx { color: #d0d0d0 }
.pygments_murphy .py { color: #d0d0d0 }
.pygments_murphy .nt { color: #6ab825; font-weight: bold }
.pygments_murphy .nv { color: #40ffff }
.pygments_murphy .ow { color: #6ab825; font-weight: bold }
.pygments_murphy .w { color: #666 }
.pygments_murphy .mf { color: #3677a9 }
.pygments_murphy .mh { color: #3677a9 }
.pygments_murphy .mi { color: #3677a9 }
.pygments_murphy .mo { color: #3677a9 }
.pygments_murphy .sb { color: #ed9d13 }
.pygments_murphy .sc { color: #ed9d13 }
.pygments_murphy .sd { color: #ed9d13 }
.pygments_murphy .s2 { color: #ed9d13 }
.pygments_murphy .se { color: #ed9d13 }
.pygments_murphy .sh { color: #ed9d13 }
.pygments_murphy .si { color: #ed9d13 }
.pygments_murphy .sx { color: #ffa500 }
.pygments_murphy .sr { color: #ed9d13 }
.pygments_murphy .s1 { color: #ed9d13 }
.pygments_murphy .ss { color: #ed9d13 }
.pygments_murphy .bp { color: #24909d }
.pygments_murphy .vc { color: #40ffff }
.pygments_murphy .vg { color: #40ffff }
.pygments_murphy .vi { color: #40ffff }
.pygments_murphy .il { color: #3677a9 }


/* ============================================
   6. UTILITY CLASSES
   ============================================ */

.centered {
  text-align: center;
}

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

/* Spacing utilities */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-sm) !important; }
.mt-2 { margin-top: var(--space-md) !important; }
.mt-3 { margin-top: var(--space-lg) !important; }
.mt-4 { margin-top: var(--space-xl) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-sm) !important; }
.mb-2 { margin-bottom: var(--space-md) !important; }
.mb-3 { margin-bottom: var(--space-lg) !important; }
.mb-4 { margin-bottom: var(--space-xl) !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: var(--space-sm) !important; }
.pt-2 { padding-top: var(--space-md) !important; }
.pt-3 { padding-top: var(--space-lg) !important; }
.pt-4 { padding-top: var(--space-xl) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: var(--space-sm) !important; }
.pb-2 { padding-bottom: var(--space-md) !important; }
.pb-3 { padding-bottom: var(--space-lg) !important; }
.pb-4 { padding-bottom: var(--space-xl) !important; }


/* ============================================
   7. RESPONSIVE MEDIA QUERIES
   ============================================ */

/* Small tablets (640px and up) */
@media (min-width: 640px) {
  .container {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  #social a {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
}

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .navbar-collapse {
    display: flex !important;
  }

  .navbar-toggle {
    display: none;
  }
}

/* Mobile navbar toggle */
@media (max-width: 767px) {
  .navbar-inner {
    flex-wrap: wrap;
  }

  .navbar-toggle {
    display: block;
  }

  .navbar-collapse {
    display: none;
    width: 100%;
    margin-top: var(--space-md);
  }

  .navbar-collapse.show {
    display: flex;
  }

  .navbar-nav {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .navbar-nav li {
    width: 100%;
  }

  .navbar-nav a {
    display: block;
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
  }

  /* Terminal prompt mobile adjustments */
  .terminal-prompt {
    font-size: 0.875rem;
    gap: var(--space-xs);
  }

  .prompt-icon {
    font-size: 1rem;
  }

  .prompt-cursor {
    display: none;
  }
}


/* ============================================
   8. PRINT STYLES
   ============================================ */

@media print {
  .navbar,
  #social,
  #footer,
  .navbar-toggle {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
    color: #000;
  }

  .document {
    max-width: 100%;
  }

  pre, code {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
}


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

.prompt-cursor.blinking {
  opacity: 1;
  animation: blink 1.5s step-end infinite;
}


/* ============================================
   9. ACCESSIBILITY & MOTION PREFERENCES
   ============================================ */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-border: #000;
    --color-text: #000;
    --color-background: #fff;
  }
}

/* Skip to content link for keyboard navigation */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-brand);
  color: var(--color-background);
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}
