/* Google Font (portfolio/hometown): Roboto */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
  --bg: #0d1117;       
  --panel: #161b22;    
  --text: #e6edf3;     
  --muted: #8b949e;   
  --link: #58a6ff;     
  --border: #30363d;   
  --accent: #a78bfa;   
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6; 
  font-size: 1rem;
}

/* Headings */
h1, h2, h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.lead { font-size: 1.05rem; }
.muted { color: var(--muted); }

/* Links */
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

main, header, footer, section {
  max-width: 900px;       
  margin: 0 auto;
  padding: 1rem;
}
.prose { max-width: 65ch; } 

/* Card */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

nav ul { 
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 0.6rem; flex-wrap: wrap;
}
nav li { margin: 0; }
nav a { 
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
}
nav a:hover { background-color: #2a2f37; }
nav a[aria-current="page"] {
  background: var(--accent);
  color: #111;
}
nav a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Images */
img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 2px 2px 5px #00000055;
  margin: 0.75rem auto;
}

figure { margin: 1rem 0; }
figcaption { color: var(--muted); font-size: .95rem; margin-top: .25rem; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  
}

@media (max-width: 40rem){
  body { font-size: 1.05rem; }
}


/* ===== Flexbox Demo ===== */
.flex-demo { max-width: 1000px; margin: 32px auto; padding: 0 16px; }
.flex-demo h1 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); text-align: center; margin: 0 0 24px; }
.flex-demo h2 { font-size: 1rem; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.flex-demo code { color: var(--link); }

.flex-demo .demo {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin: 14px 0 18px;
}

.flex-demo .flex-parent {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px dashed var(--border);
  background: #0f1420;
  border-radius: 12px;
  min-height: 90px;
}

.flex-demo .flex-item {
  border: 1px solid var(--border);
  background: #1f2633;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  font-weight: 600;
  flex-grow: 1; 
}

.flex-demo .flex-item:nth-child(5n+1){ background:#1e2a3a; }
.flex-demo .flex-item:nth-child(5n+2){ background:#1a2e3f; }
.flex-demo .flex-item:nth-child(5n+3){ background:#1b3044; }
.flex-demo .flex-item:nth-child(5n+4){ background:#183447; }
.flex-demo .flex-item:nth-child(5n+5){ background:#16374c; }

.flex-demo .small { min-width: 18px; flex-grow: 0; }
.flex-demo .tall { min-height: 180px; }
.flex-demo .tallbox { height: 60px; }
.flex-demo .wide { min-width: 200px; flex-grow: 1; }
.flex-demo .chip { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; }
.flex-demo .grid { flex: 0 1 30%; }
.flex-demo .special { align-self: center; order: -1; background:#27405d; }

.flex-demo .demo2 .flex-parent { justify-content: space-around; }
.flex-demo .demo2 .flex-item { flex-grow: 0; }
.flex-demo .demo3 .flex-parent { justify-content: space-evenly; }
.flex-demo .demo3 .flex-item { flex-grow: 0; }
.flex-demo .demo4 .flex-parent { align-items: center; }
.flex-demo .demo5 .flex-parent { flex-direction: row-reverse; }
.flex-demo .demo6 .flex-parent { flex-wrap: wrap; }
.flex-demo .demo7 .flex-parent { flex-flow: row wrap; justify-content: center; }
.flex-demo .demo8 .flex-parent { flex-flow: row wrap; align-content: space-between; justify-content: center; }
