html {
  font-size: 14px;
  height: 100%;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* Base theme variables */
:root {
  --bg1: #1f1f1f;
  --bg2: #2b2b2b;
  --pattern: rgba(255, 255, 255, 0.045);
  --text: #cbcbcb;

  /* Parallax offsets */
  --px: 0;
  --py: 0;

  /* Fonts */
  --font-heading: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Lock to blue theme by default (no button) */
body.theme-blue {
  --tint-a: rgba( 64, 132, 255, 0.20);
  --tint-b: rgba( 64, 132, 255, 0.05);
}

/* Background: grey gradient + dot grid + blue tint */
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 500;

  background:
    linear-gradient(135deg, var(--tint-a), var(--tint-b)),
    radial-gradient(circle at 1px 1px, var(--pattern) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(180deg, var(--bg1), var(--bg2));
  background-position:
    center center,
    calc(50% + (var(--px) * 2%)) calc(50% + (var(--py) * 2%)),
    center top;
  transition: background-color 0.3s ease, background-image 0.3s ease, background-position 0.15s ease;
}

/* Optional depth layers (soft light blobs) */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -10vmax;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background:
    radial-gradient(40vmax 40vmax at calc(20% + (var(--px) * 8%)) calc(30% + (var(--py) * 8%)),
      rgba(255, 255, 255, 0.03), transparent 60%),
    radial-gradient(50vmax 50vmax at calc(80% + (var(--px) * -8%)) calc(70% + (var(--py) * -8%)),
      rgba(0, 0, 0, 0.25), transparent 60%);
  filter: blur(2px);
  transform: translateZ(0);
}
body::after {
  background:
    radial-gradient(30vmax 30vmax at calc(70% + (var(--px) * 10%)) calc(20% + (var(--py) * 10%)),
      rgba(255, 255, 255, 0.04), transparent 60%),
    radial-gradient(35vmax 35vmax at calc(25% + (var(--px) * -6%)) calc(80% + (var(--py) * -6%)),
      rgba(0, 0, 0, 0.20), transparent 60%);
  mix-blend-mode: soft-light;
  transform: translateZ(0);
}

/* Horizontal navbar container */
.horizontal-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0;
}

/* Glass (semi-transparent) navbar */
.glass-effect {
  background: rgba(18, 18, 18, 0.35);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  position: relative;
}

/* subtle reflection */
.glass-effect::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 28%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
  border-radius: 0 0 12px 12px;
  pointer-events: none;
}

@supports not ((backdrop-filter: blur(1px))) {
  .glass-effect { background: rgba(18, 18, 18, 0.7); }
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.75rem 0; /* slightly tighter */
}

/* Brand (smaller, professional) */
.navbar-brand {
  font-size: 1.125rem; /* ~18px */
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin-right: 1rem;
}

/* Nav items (tighten and smaller) */
.navbar-nav { display: flex; padding-left: 0; margin: 0; list-style: none; }
.nav-item { margin: 0 0.25rem; }
.nav-link {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* Main content spaced below fixed navbar */
.main-content { padding-top: 4.25rem; width: 100%; }

/* Links */
a { color: rgba(255, 255, 255, 0.85); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #ffffff; }

/* Headings */
h1, h2, h3, h4, h5, h6 { color: #dfdbdb; font-family: var(--font-heading); }

/* Navbar toggler */
.navbar-toggler {
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.navbar-toggler:hover { background: rgba(255, 255, 255, 0.1); }
.navbar-toggler-icon {
  display: inline-block; width: 1.25em; height: 1.25em;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: center; background-size: 100%;
}

/* Forms */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder { color: var(--bs-secondary-color); text-align: end; }
.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder { text-align: start; }

/* Hero styles (smaller, sleeker) */
.hero {
  display: grid;
  place-items: center;
  text-align: center;
  margin-top: 14vh;
  padding: 0 1rem;
}
.hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.15px;
  line-height: 1.1;
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  color: #f3f3f3;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.02),
    0 5px 14px rgba(0,0,0,0.28);
}
.hero-subtitle {
  margin-top: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  color: #d7d7d7;
  opacity: 0.9;
}

.hero-about {
    margin-left: 10rem;
    margin-right: 10rem;
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 2;
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    color: #d7d7d7;
    opacity: 0.9;
}

.hero-headshot {
    display: flex;
    justify-content: center;
    margin: 0.75rem 0 1rem 0;
}

.headshot {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 22px rgba(0,0,0,0.35);
    background: rgba(0,0,0,0.15);
}

@media (min-width: 992px) {
    .headshot {
        width: 160px;
        height: 160px;
    }
}

/* Mobile */
@media (max-width: 767px) {
  .navbar-nav { margin-top: 0.5rem; }
  .navbar-collapse { width: 100%; }
  .nav-item { margin: 0.2rem 0; }
}