:root {
  /* --- THE PALETTE --- */
  --charcoal: #1e1e24;
  --crimson: #92140c;
  --off-white: #fff8f0;
  --peach: #ffcf99;
  --navy: #111d4a;

  /* --- SEMANTIC MAPPING --- */
  /* Changing these changes the whole theme logic */
  --bg-body: var(--off-white);
  --bg-card: #ffffff;
  /* Pure white for card contrast, or use --off-white with a border */
  --bg-footer: var(--navy);

  --text-main: var(--charcoal);
  --text-muted: #555560;
  /* Slightly lighter version of charcoal */
  --text-inv: var(--off-white);
  /* Text on dark backgrounds */

  --primary: var(--crimson);
  --secondary: var(--navy);
  --accent: var(--peach);

  /* --- SPACING & UI --- */
  --radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --font-main:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

/* --- RESET --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main) !important;
  font-family: var(--font-main);
  line-height: 1.6;
  font-family: "Aldrich", sans-serif;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5 {
  color: var(--secondary) !important;
  /* Navy headers look professional */
  margin-bottom: 1rem;
  line-height: 1.2;
}

p {
  margin-bottom: 1.5rem;
  max-width: 70ch;
  /* Readability limit */
  color: var(--text-main) !important;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: 0.2s;
}

a:hover {
  border-bottom-color: var(--primary);
}



.aboutme i,
.aboutme img
{
    font-size: 200% !important;

}

/* --- LAYOUT UTILITIES --- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

@media (min-width: 1400px) {
  .container {
    max-width: 1600px;
    width: 99%;
    padding: 1.5rem;
  }
}

/* --- COMPONENTS --- */

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: transform 0.1s ease, opacity 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary);
  /* Crimson */
  color: var(--off-white);
}

.btn-primary:hover {
  background-color: var(--navy);
  /* Shift to Navy on hover */
  color: white;
}

.btn-secondary {
  background-color: var(--accent);
  /* Peach */
  color: var(--charcoal);
}

.btn-secondary:hover {
  filter: brightness(0.9);
}

/* Cards / content blocks */
.card {
  background: white;
  border: 1px solid var(--peach);
  /* Subtle peach border */
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.card p,
small {
  color: var(--text-main) !important;
  /* Muted text for descriptions */
}

.card:hover {
  box-shadow: 0 6px 12px var(--shadow);
  /* Slightly stronger shadow on hover */
}

/* Navbar */
.navbar {
  background-color: var(--primary);
  color: var(--text-main);
  padding: 1rem 0;
}

.navbar .container {
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar a {
  color: var(--peach) !important;
  /* Peach links pop on Navy bg */
}
.nav-links a:hover {
  border-bottom-color: rgba(0,0,0,0) !important;
}
.navbar a:hover {
  color: var(--text-inv) !important;
  /* Off-white on hover for better contrast */
}

/* Footer */
.footer {
  background-color: var(--charcoal);
  color: var(--off-white);
  text-align: center;
  padding: 3rem 1rem;
  margin-top: 4rem;
}

/* --- FORM ELEMENTS (Backend devs usually need these) --- */
input,
textarea,
select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 2px solid #ddd;
  border-radius: var(--radius);
  background: white;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* --- SIMPLE DARK MODE OVERRIDE --- */
/* If the user's OS is set to dark mode, this flips the colors automatically */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: var(--charcoal);
    --bg-card: #2a2a32;
    --text-main: var(--off-white);
    --secondary: var(--peach);
    /* Make headers peach in dark mode for contrast */
    --shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
    /* Lighter shadow for dark mode */
  }

  .card {
    border: 1px solid var(--navy);
    background: var(--bg-card);
  }

  .navbar {
    background-color: var(--navy);
  }
}

@font-face {
  font-family: "Aldrich";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/aldrich/v22/MCoTzAn-1s3IGyJMVacY3w.woff2)
    format("woff2");
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

.underline-on-hover:hover {
  text-decoration: underline;
  /* Underline on hover for elements with this class */
  cursor: pointer;
  /* Change cursor to pointer on hover */
  color: var(--crimson) !important;
}

/* Inline code (e.g., "Run npm install") */
code {
  color: var(--crimson);
  /* Your #92140c - highlights the term */
  font-family: "Fira Code", "Courier New", monospace;
  /* classic backend font */
  font-size: 0.9em;
  padding: 0.1rem 0.3rem;
  background-color: #f4f4f4;
  /* Light gray background for inline contrast */
  border-radius: 4px;
}

/* Block code (The big box) */
pre {
  background-color: var(--charcoal);
  /* #1e1e24 */
  color: var(--off-white);
  /* #fff8f0 */
  padding: 1.5rem;
  /* ample breathing room */
  border-radius: 8px;
  /* soft corners */
  border-left: 5px solid var(--peach);
  /* #ffcf99 - Adds a nice accent bar */

  /* CRITICAL FOR LAYOUT: */
  overflow-x: auto;
  /* Adds a scrollbar if code is too wide */
  margin-bottom: 2rem;
}

/* Override Bootstrap's specific rule that might mess this up */
pre code {
  color: inherit;
  /* Inherit the off-white from <pre> */
  background: none;
  /* Remove the gray background from <code> */
  padding: 0;
  /* Remove padding */
  font-size: 0.95rem;
}

/* Card image top styling to span full card width despite .card padding */
.card-img-top {
  margin: -1.25rem -1.25rem 1rem -1.25rem;
  width: calc(100% + 2.5rem);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
