:root {
  --color-bg: #181818;
  --color-surface: #212121;
  --color-header: #0f0f0f;
  --color-card: #232324;
  --color-primary: #fff;
  --color-secondary: #aaa;
  --color-accent: #3ea6ff;
  --color-action: #ff0000;
  --color-error: #d33333;
  --color-success: #18a46f;
}

/* GENERAL RESET */
* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: repeating-linear-gradient(
    45deg,
    #19191a 0px, #19191a 12px,
    #1d1d1f 12px, #1d1d1f 24px
  );
  color: var(--color-primary);
  margin: 0;
  padding: 0;
}

/* HEADER */
header.site-header {
  background: var(--color-header);
  color: var(--color-primary);
  padding: 2rem 1rem 1rem 1rem;
  text-align: center;
}
.header-branding {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 0.4em;
}
.header-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2.5px solid var(--color-action);
  object-fit: cover;
  background: #222;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.site-title {
  font-size: 2.1rem;
  margin: 0;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}
.site-subtitle {
  font-size: 1.08rem;
  margin-top: 0.6em;
  margin-bottom: 0.6em;
  color: var(--color-secondary);
}

/* HAMBURGER & OVERLAY NAV */
.hamburger {
  display: block;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--color-primary);
  position: absolute;
  top: 1.1rem;
  right: 1.3rem;
  z-index: 1051;
  cursor: pointer;
}

.mobile-nav-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: repeating-linear-gradient(
    135deg,
    #19191a 0px, #19191a 12px,
    #1d1d1f 12px, #1d1d1f 24px
  );
  color: #fff;
  z-index: 1100;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateX(-100vw);
  transition: transform 0.7s cubic-bezier(.77,0,.18,1), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}
.mobile-nav-overlay.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-content {
  width: 96vw;
  max-width: 340px;
  min-width: 210px;
  height: auto;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  background: none;
  border-radius: 18px;
  box-shadow: 0 2px 40px #000c;
  padding: 0 0 1.1rem 0;
}
.profile-center {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.4rem;
  margin-bottom: 0.6rem;
}
.overlay-profile {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid #444;
  box-shadow: 0 0 8px 0 #000c;
  background: #19191a;
  object-fit: cover;
}
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0.4rem;
  margin-top: 0.4rem;
  margin-bottom: 0.7rem;
}
.mobile-nav-links a {
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  padding: 0.08em 0.1em;
  border-radius: 2px;
  transition: color 0.13s, background 0.13s;
  line-height: 1.18;
}
.mobile-nav-links a:hover {
  color: var(--color-accent);
  background: rgba(30,120,255,0.06);
}
.close-overlay {
  position: absolute;
  top: 0.7rem;
  right: 1.0rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #fff;
  cursor: pointer;
  z-index: 1200;
  opacity: 0.84;
  transition: opacity 0.2s;
}
.close-overlay:hover {
  opacity: 1;
}

/* Menu footer info */
.menu-footer-info {
  color: #888;
  font-size: 0.92rem;
  text-align: center;
  margin-top: 1.1rem;
  line-height: 1.4;
  font-weight: 400;
}
.menu-footer-info a {
  color: var(--color-accent);
  text-decoration: underline;
  font-size: 0.93rem;
}
.menu-footer-info svg {
  margin-bottom: -3px;
}

/* MOBILE HEADER RESPONSIVENESS */
@media (max-width: 600px) {
  .mobile-nav-content {
    width: 98vw;
    max-width: 100vw;
    min-width: unset;
    height: auto;
    border-radius: 0;
    box-shadow: none;
  }
  .profile-center {
    margin-top: 1rem;
    margin-bottom: 0.4rem;
  }
  .overlay-profile {
    width: 38px;
    height: 38px;
  }
  .mobile-nav-links {
    gap: 0.25rem;
    margin-top: 0.3rem;
    margin-bottom: 0.4rem;
  }
  .mobile-nav-links a {
    font-size: 0.96rem;
    padding: 0.07em 0.07em;
  }
  .menu-footer-info {
    font-size: 0.85rem;
    margin-top: 0.6rem;
  }
  .close-overlay {
    font-size: 1.2rem;
    top: 0.6rem;
    right: 0.8rem;
  }
}

/* FORMS & BUTTONS */
.form-label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: 500;
  color: var(--color-secondary);
}
.form-control,
input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.55em 0.9em;
  border: 1.5px solid #353538;
  border-radius: 0.5em;
  font-size: 1.05em;
  margin-bottom: 1em;
  background: #18181a;
  color: var(--color-primary);
  transition: border-color 0.2s, background 0.2s;
  outline: none;
  box-shadow: none;
  font-family: inherit;
}
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-accent);
  background: #202023;
}
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: #767687;
  opacity: 1;
}
input[type="checkbox"], input[type="radio"] {
  margin-right: 0.5em;
  accent-color: var(--color-accent);
}
input:disabled, .form-control:disabled {
  background: #222228;
  color: #666;
}

/* BUTTONS */
.btn, .btn-primary {
  display: inline-block;
  padding: 0.5em 1.4em;
  background: var(--color-action);
  color: #fff;
  border: none;
  border-radius: 2em;
  font-weight: bold;
  font-size: 1.08em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s, color 0.16s;
  margin-top: 0.3em;
}
.btn:hover, .btn-primary:hover {
  background: #c00;
  color: #fff;
}

/* ALERTS */
.alert {
  border-radius: 0.7em;
  padding: 1em 1.2em;
  margin-bottom: 1em;
  font-size: 1em;
  font-weight: 500;
}
.alert-danger {
  background: #2b1111;
  color: #ff9696;
  border: 1.5px solid #efb1b1;
}
.alert-success {
  background: #0d2b19;
  color: #85e7b7;
  border: 1.5px solid #b0e3ce;
}

/* CARDS */
.card {
  background: var(--color-card);
  border-radius: 1em;
  box-shadow: 0 2px 16px rgba(0,0,0,0.16);
  overflow: hidden;
  margin-bottom: 2em;
  border: 1.5px solid #24242a;
}
.card-body {
  padding: 1.5em 1.2em;
  background: transparent;
}
.card h2, .card h3 {
  margin-top: 0.1em;
  margin-bottom: 0.8em;
  color: var(--color-primary);
}

/* FEATURED VIDEO & PROJECTS */
.featured-video {
  max-width: 480px;
  margin: 2rem auto 1rem auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.24);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-card);
}
.projects {
  padding: 2rem 1rem;
  max-width: 1100px;
  margin: auto;
}
.projects h2 {
  text-align: center;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  font-size: 2rem;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--color-card);
  border-radius: 10px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.project-card .card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-card h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
  color: var(--color-accent);
}
.project-card p {
  flex: 1;
  font-size: 0.97rem;
  margin: 0 0 0.8rem 0;
  color: var(--color-secondary);
}
.project-card .btn {
  align-self: flex-start;
  padding: 0.4rem 1rem;
  background: var(--color-action);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s;
  font-size: 1rem;
}
.project-card .btn:hover {
  background: #c00;
  color: #fff;
}

/* RESOURCES & ABOUT */
.resources {
  max-width: 800px;
  margin: 3rem auto 2rem auto;
  padding: 2rem 1rem;
  background: var(--color-card);
  border-radius: 10px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.12);
}
.resources h2 {
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.resources ul {
  padding-left: 1.2rem;
  margin: 0;
}
.resources li {
  margin-bottom: 0.8rem;
}
.about {
  background: var(--color-header);
  color: var(--color-primary);
  padding: 2rem 1rem 1.5rem 1rem;
  text-align: center;
}
.about img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid var(--color-action);
}
.about h2 {
  margin: 0.5rem 0;
}
.about p {
  margin: 0.4rem 0 0.8rem 0;
}

/* FOOTER */
.footer {
  background: var(--color-header);
  color: var(--color-secondary);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.97rem;
}
.social-links a {
  color: var(--color-accent);
  margin: 0 0.8rem;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  transition: color 0.15s;
}
.social-links a:hover {
  color: var(--color-action);
}

/* --- MOBILE HEADER RESPONSIVENESS --- */
@media (max-width: 600px) {
  .header-branding {
    flex-direction: column;
    gap: 0.4rem;
  }
  .site-title { font-size: 1.22rem; }
  .site-subtitle { font-size: 0.95rem; }
  .projects h2, .resources h2 { font-size: 1.2rem; }
  .project-card img { height: 130px; }
  .card-body { padding: 1em 0.7em; }
}
/* Center all auth-related cards and their content */
.container.py-5 {
  margin-left: auto !important;
  margin-right: auto !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 84vh;
}

.card {
  margin-left: auto;
  margin-right: auto;
}

.card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-body form {
  width: 100%;
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-body .form-label,
.card-body input,
.card-body button,
.card-body .alert,
.card-body a {
  width: 100%;
  text-align: center;
}

.card-body .form-label {
  text-align: left; /* Keeps labels aligned left, adjust if you prefer center */
}

.card-body h2,
.card-body h3 {
  width: 100%;
  text-align: center;
}

.card-body .alert {
  margin-left: 0;
  margin-right: 0;
}

.card-body .btn,
.card-body button {
  margin-left: auto;
  margin-right: auto;
}

/* On mobile, make sure forms don't shrink too much */
@media (max-width: 600px) {
  .card-body form {
    max-width: 98vw;
  }
}
