@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Instrument+Serif:ital@0;1&display=swap');

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



:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;

  --success: #16a34a;
  --danger: #dc2626;

  --bg: #f4f7fb;
  --card-bg: #ffffff;

  --text: #1f2937;
  --text-light: #6b7280;

  --radius: 16px;

  --shadow:
    0 10px 25px rgba(0,0,0,0.08);

  --transition: 0.3s ease;
}}
=======
:root {
  --paper: #f5f2ec;
  --surface: #faf8f4;
  --card: #ffffff;

  --ink: #1c1a17;
  --ink2: #6b6560;
  --ink3: #b0aa9f;

  --rule: #d9d4cc;

  --blue: #2f6fd8;
  --green: #4f8d32;
  --amber: #c97317;
  --red: #c92d2d;

  --mono: 'DM Mono', monospace;
  --serif: 'Instrument Serif', serif;
}
body.dark {
  --paper: #111008;
  --surface: #181610;
  --card: #1d1b15;

/* NAVBAR */
.custom-navbar {
  background: rgba(5, 13, 26, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  color: var(--teal) !important;
  letter-spacing: 0.04em;
}

.nav-link {
  color: var(--muted) !important;
  font-size: 0.9rem;
  font-weight: 500;
  margin-left: 1rem;
  transition: color 0.25s ease;
}

.nav-link:hover {
  color: var(--teal) !important;
}

.navbar-toggler {
  border: 1px solid rgba(255,255,255,.1);
  padding: 0.35rem 0.55rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

body {

  body {
  margin: 0;

  background: var(--paper);
  color: var(--ink);

  font-family: var(--mono);

  min-height: 100vh;

  display: flex;
  justify-content: center;

  align-items: center;

  background: var(--bg);

  font-family:
    Inter,
    Segoe UI,
    sans-serif;

  color: var(--text);

  padding: 20px;
}


  padding: 40px 20px;

  transition: 0.3s;

}

.page {
  width: 100%;
  max-width: 1200px;
}

.bmi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;

  border: 1px solid var(--rule);

  overflow: hidden;

  border-radius: 12px;
}

.card {
  background: var(--card);

  padding: 34px;

  border-right: 1px solid var(--rule);
}

.right-card {
  background: var(--surface);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding-bottom: 20px;

  border-bottom: 1px solid var(--rule);

  margin-bottom: 30px;
}

.card-title {
  font-family: var(--serif);

  font-size: 52px;
  font-style: italic;
  font-weight: 400;
}

button#reset-btn {
  width: 100%;
  padding: 12px;
  margin-top: 14px;
  background: var(--ink);
  color: var(--card);
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  font-size: 10px;
  font-family: var(--f-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    opacity 0.15s,
    transform 0.1s;
}

button#reset-btn:hover {
  opacity: 0.8;
}
button#reset-btn:active {
  transform: scale(0.997);
}

.error-msg {
  font-size: 11px;
  color: var(--red1);
  margin-top: 10px;
  letter-spacing: 0.02em;
}
.theme-toggle {
  width: 42px;
  height: 42px;

  border: 1px solid var(--rule);

  background: transparent;

  color: var(--ink);

  cursor: pointer;

  border-radius: 6px;

  font-size: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 14px;

  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 10px;

  text-transform: uppercase;

  letter-spacing: 0.14em;

  color: var(--ink3);
}

input,
select {
  width: 100%;

  height: 50px;

  background: var(--surface);

  border: 1px solid var(--rule);

  color: var(--ink);

  padding: 0 14px;

  font-family: var(--mono);

  border-radius: 5px;

  outline: none;
}

.btn-row {
  display: grid;
  grid-template-columns: 2fr 1fr;

  gap: 12px;

  margin-top: 30px;
}

.primary-btn,
.secondary-btn {
  height: 50px;

  

  text-transform: uppercase;

  letter-spacing: 0.14em;

  font-size: 11px;

  font-family: var(--mono);

  cursor: pointer;
}

.primary-btn {
  margin-top: 14px;
  background: var(--ink);

  color: var(--card);

  border: none;
}

.secondary-btn {
  background: transparent;

  color: var(--ink3);

  border: none;
}

.results {
  margin-top: 34px;

  border-top: 1px solid var(--rule);

  padding-top: 28px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.metric-card {
  padding-right: 20px;
}

.metric-card:last-child {
  border-left: 1px solid var(--rule);
  padding-left: 20px;
}

.metric-label {
  font-size: 10px;

  text-transform: uppercase;

  letter-spacing: 0.14em;
  

  color: var(--ink3);

  margin-bottom: 12px;
}

.metric-value {
  font-size: 76px;
  color: #4f8d32;
  font-family: var(--serif);

  font-style: italic;
}

.badge {
  margin-top: 14px;

  display: inline-block;

  padding: 6px 10px;

  font-size: 10px;

  letter-spacing: 0.12em;

  border-radius: 4px;

  background: #e5efd8;

  color: #5d8d25;
}

.healthy-range {
  font-size: 40px;

  font-family: var(--serif);
}

.tip-text {
  margin-top: 12px;

  color: var(--ink2);

  line-height: 1.7;

  font-size: 12px;
}

.range-section {
  margin-top: 30px;

  border-top: 1px solid var(--rule);

  padding-top: 28px;
}

.range-bar {
  position: relative;

  display: flex;

  height: 4px;
}

.seg {
  flex: 1;
}

.blue {
  background: #2f6fd8;
}

.green {
  background: #5d8d25;
}

.amber {
  background: #c97317;
}

.red {
  background: #c92d2d;
}

.pointer {
  width: 16px;
  height: 16px;

  border-radius: 50%;

  background: var(--card);

  border: 2px solid var(--ink);

  position: absolute;

  top: -6px;

  left: 40%;

  transform: translateX(-50%);
}

.range-labels {
  margin-top: 10px;

  display: flex;
  justify-content: space-between;

  color: var(--ink3);

  font-size: 10px;
}

/* FOOTER */
footer {
  margin-top: 4rem;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  background: rgba(255,255,255,.02);
  backdrop-filter: blur(10px);
  border-radius: 20px 20px 0 0;
}

footer div:first-child {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

footer .social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

footer a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.25s ease;
  text-decoration: none;
}

footer a:hover {
  background: var(--teal);
  color: white;
  transform: translateY(-3px);
}

footer svg {
  width: 18px;
  height: 18px;
}

/* RESPONSIVE */
/* RESPONSIVE */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text p {
    margin: 0 auto;
  }

  .hero-img {
    justify-content: center;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .page {
    padding: 1.5rem 1rem 3rem;
  }

  .hero-text h1 {
    font-size: 1.7rem;
  }

  .card,
  .full-card {
    padding: 1.2rem;
  }

  .gauge-svg-wrap {
    width: 100%;
    max-width: 240px;
  }

  .human-figures {
    flex-wrap: wrap;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }
}

/* ANIMATE IN */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card, .full-card, .hero-text { animation: fadeUp .5s ease both; }
.main-grid .card:nth-child(2) { animation-delay: .1s; }
.main-grid .card:nth-child(3) { animation-delay: .15s; }
.main-grid .card:nth-child(4) { animation-delay: .2s; }
