:root {
  --bg-start: #030f1f;
  --bg-end: #06213f;
  --grid-line: rgba(90, 161, 255, 0.25);
  --text-primary: #f3f4f6;
  --text-muted: #a7b3d1;
  --accent: #4f9fff;
  --success-fore: #56b156;
  --warn-fore: #b1a856;
  --error-fore: #b15656;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(79, 120, 229, 0.25), transparent 60%),
    linear-gradient(160deg, var(--bg-start), var(--bg-end));
  color: var(--text-primary);
  font-family: "Space Grotesk", "Space Mono", sans-serif;
  padding: 2rem;
}

/* Copyright Footer */
.copyright-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  text-align: center;
  padding: 1.5rem 2rem;
  background: transparent;
  pointer-events: none;
}

.copyright-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.login-button {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--text-primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, letter-spacing 200ms ease;
  background: rgba(5, 6, 10, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.login-button-group {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 10;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
}

.login-button-group .login-button {
  position: static;
  right: auto;
  top: auto;
}

.login-button:hover,
.login-button:focus-visible {
  border-color: rgba(79, 159, 255, 0.9);
  color: var(--accent);
  background: rgba(5, 6, 10, 0.75);
}

.login-button:focus-visible {
  outline: 2px dotted rgba(79, 159, 255, 0.9);
  outline-offset: 4px;
}

#blueprint-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 30% 20%, rgba(28, 108, 255, 0.35), transparent 40%),
    linear-gradient(160deg, var(--bg-start), var(--bg-end));
}

#blueprint-background,
#blueprint-background * {
  pointer-events: none;
}

#blueprint-background svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 10px rgba(79, 159, 255, 0.45));
}

.dashboard {
  max-width: 720px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 800ms ease forwards;
  opacity: 0;
  position: relative;
  z-index: 1;
}

.dashboard__title {
  font-size: clamp(2.8rem, 8vw, 8rem);
  letter-spacing: 0.2rem;
  font-weight: 600;
  margin: 0;
}

.dashboard__title b {
  color: var(--accent);
}

.dashboard__subtitle {
  font-size: clamp(1.25rem, 3.5vw, 2rem);
  font-weight: 400;
  color: var(--text-muted);
}

.dashboard__subtitle b {
  color: var(--accent);
}

.dashboard__description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 6, 10, 0.75);
  border-radius: 16px;
  padding: 1.25rem 1.75rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.dashboard__contact {
  margin: 0.25rem auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--text-primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, letter-spacing 200ms ease;
}

.dashboard__contact:hover,
.dashboard__contact:focus-visible,
.dashboard__contact[data-revealed="true"] {
  border-color: rgba(79, 159, 255, 0.9);
  color: var(--accent);
  letter-spacing: 0.18em;
  background: rgba(5, 6, 10, 0.75);
}

.dashboard__contact:focus-visible {
  outline: 2px dotted rgba(79, 159, 255, 0.9);
  outline-offset: 4px;
}

.dashboard__contact .contact-shell,
.dashboard__contact .contact-shell * {
  display: inline;
  font-family: inherit;
  font-weight: inherit;
  font-style: inherit;
  font-size: 1em;
  text-transform: none;
  text-decoration: none;
  color: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  vertical-align: baseline;
  position: relative;
  top: 0;
  transform: none;
  pointer-events: none;
}

#blueprint-background .brain-schematic path,
#blueprint-background .brain-schematic line,
#blueprint-background .brain-schematic ellipse {
  stroke: rgba(173, 213, 255, 0.92);
  stroke-linecap: round;
  stroke-linejoin: round;
}

#blueprint-background .brain-schematic .brain-outline {
  stroke-width: 1.3;
}

#blueprint-background .brain-schematic .brain-highlight {
  stroke: rgba(220, 238, 255, 0.95);
}

#blueprint-background .brain-schematic .brain-fill {
  fill: rgba(10, 32, 65, 0.42);
}

#blueprint-background .brain-schematic .brain-datum-ring,
#blueprint-background .brain-schematic .brain-datum-axis {
  stroke: rgba(173, 213, 255, 0.45);
}

#blueprint-background .brain-schematic .brain-hatching path,
#blueprint-background .brain-schematic .brain-hatching line {
  stroke: rgba(173, 213, 255, 0.55);
  opacity: 0.55;
}

#blueprint-background .brain-schematic .brain-pathways path,
#blueprint-background .brain-schematic .brain-pathways line {
  stroke: rgba(210, 241, 255, 0.95);
  fill: none;
}

#blueprint-background .brain-schematic .brain-pathways circle {
  stroke: rgba(210, 241, 255, 0.9);
  fill: rgba(24, 64, 122, 0.45);
}

#blueprint-background .brain-schematic .brain-pathways .brain-pathway {
  stroke-width: 1.25;
}

#blueprint-background .brain-schematic .brain-pathways .brain-pathway.connector {
  stroke-width: 1.05;
}

#blueprint-background .brain-schematic .brain-pathways .brain-pathway.loop {
  stroke-width: 0.95;
}

#blueprint-background .chip-schematic .chip-body,
#blueprint-background .chip-schematic .chip-core,
#blueprint-background .chip-schematic .chip-crosshair,
#blueprint-background .chip-schematic .chip-traces path,
#blueprint-background .chip-schematic .chip-loop {
  stroke: rgba(173, 213, 255, 0.9);
  fill: none;
}

#blueprint-background .chip-schematic .chip-body {
  fill: rgba(8, 24, 52, 0.65);
  stroke-width: 1.2;
}

#blueprint-background .chip-schematic .chip-core {
  fill: rgba(10, 32, 70, 0.35);
  stroke-width: 1;
}

#blueprint-background .chip-schematic .chip-crosshair {
  opacity: 0.4;
  stroke-dasharray: 4 4;
}

#blueprint-background .chip-schematic .chip-traces path,
#blueprint-background .chip-schematic .chip-loop {
  opacity: 0.5;
}

#blueprint-background .chip-schematic .chip-pin,
#blueprint-background .chip-schematic .chip-pin-node {
  stroke: rgba(207, 237, 255, 0.95);
}

#blueprint-background .chip-schematic .chip-pin {
  stroke-width: 1.1;
}

#blueprint-background .chip-schematic .chip-pin-node {
  fill: rgba(25, 86, 156, 0.55);
  stroke-width: 0.8;
}

#blueprint-background .chip-schematic .chip-connections .chip-connection {
  stroke: rgba(202, 238, 255, 0.9);
  stroke-width: 1;
  fill: none;
}

#blueprint-background .chip-schematic .chip-connection-node {
  fill: rgba(27, 92, 165, 0.8);
  stroke: rgba(210, 241, 255, 0.9);
  stroke-width: 0.8;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Crosshatch Pattern Mixin */
.crosshatch-container {
  background:
    repeating-linear-gradient(45deg,
      transparent,
      transparent 8px,
      rgba(173, 213, 255, 0.08) 8px,
      rgba(173, 213, 255, 0.08) 10px),
    repeating-linear-gradient(-45deg,
      transparent,
      transparent 8px,
      rgba(173, 213, 255, 0.06) 8px,
      rgba(173, 213, 255, 0.06) 10px),
    rgba(5, 6, 10, 0.5);
}

.crosshatch-container input {
  background: rgba(5, 6, 10, 0.95);
}

.crosshatch-container input:focus {
  background: rgba(5, 6, 10, 0.98);
}

.crosshatch-container input.is-invalid {
  background: rgba(30, 10, 10, 0.95);
}

.crosshatch-container input.is-invalid:focus {
  background: rgba(30, 10, 10, 0.98);
}

.crosshatch-container button,
.crosshatch-container input[type="submit"] {
  background: linear-gradient(135deg, rgba(79, 159, 255, 0.35), rgba(79, 120, 229, 0.3)), rgba(5, 6, 10, 0.9);
}

.crosshatch-container button:hover,
.crosshatch-container input[type="submit"]:hover {
  background: linear-gradient(135deg, rgba(79, 159, 255, 0.45), rgba(79, 120, 229, 0.4)), rgba(5, 6, 10, 0.9);
}

/* Error Page Styles */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.error-card {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 2rem 2.5rem;
  border: 1px solid rgb(84, 167, 255);
  border-radius: 16px;
  background: rgba(5, 6, 10, 0.5);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: fadeIn 600ms ease forwards;
  max-width: 820px;
  width: 100%;
}

.error-code {
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-shadow: 0 0 35px rgba(79, 159, 255, 0.35);
}

.error-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.error-title {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  font-weight: 600;
  color: var(--text-primary);
}

.error-message {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.error-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.error-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: 1px solid rgba(79, 159, 255, 0.6);
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(135deg, rgba(79, 159, 255, 0.25), rgba(79, 120, 229, 0.25)), rgba(5, 6, 10, 0.9);
  transition: all 200ms ease;
}

.error-link:hover,
.error-link:focus-visible {
  border-color: rgba(79, 159, 255, 0.9);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(79, 159, 255, 0.25);
}

.error-link:focus-visible {
  outline: 2px dotted rgba(79, 159, 255, 0.9);
  outline-offset: 4px;
}

.error-link.ghost {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(5, 6, 10, 0.65);
  color: var(--text-muted);
}

.error-link.ghost:hover,
.error-link.ghost:focus-visible {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--text-primary);
}

/* Login Page Styles */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.login-form-wrapper {
  max-width: 400px;
  width: 100%;
  border: 1px solid rgb(84, 167, 255);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: fadeIn 600ms ease forwards;
}

.login-form-wrapper {
  max-width: 400px;
  width: 100%;
  border: 1px solid rgb(84, 167, 255);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: fadeIn 600ms ease forwards;
}

.login-title {
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 0.1rem;
  color: var(--text-primary);
}

.login-title b {
  color: var(--accent);
}

.login-error {
  background: rgba(30, 10, 10, 0.85);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 8px;
  padding: .25rem .5rem;
  margin-bottom: 1rem;
  color: #fecaca;
  font-size: 0.95rem;
  animation: fadeIn 300ms ease forwards;
}

.login-error::before {
  content: "⚠";
  margin-left: 0.5rem;
}

.login-message {
  background: rgba(10, 25, 47, 0.85);
  border: 1px solid rgba(79, 159, 255, 0.5);
  border-radius: 8px;
  padding: .25rem .5rem;
  margin-bottom: 1.5rem;
  color: #bfdbfe;
  font-size: 0.95rem;
  animation: fadeIn 300ms ease forwards;
}

.login-message::before {
  content: "ℹ";
  margin-left: 0.5rem;
}

.btn-resend {
  width: 100%;
  padding: 0.75rem;
  background: rgba(79, 159, 255, 0.2);
  color: #4f9fff;
  border: 2px solid #4f9fff;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-resend:hover {
  background: rgba(79, 159, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 159, 255, 0.3);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.login-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-label.is-invalid:after {
  content: "*";
}

.login-input {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.login-input::placeholder {
  color: rgba(167, 179, 209, 0.6);
}

.login-input:focus {
  outline: none;
  border-color: rgba(79, 159, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(79, 159, 255, 0.1);
}

.login-input:valid:not(:placeholder-shown) {
  border-color: rgba(34, 197, 94, 0.5);
}

.login-input.is-invalid {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  background: rgba(30, 10, 10, 0.6);
}

.login-input.is-invalid:focus {
  border-color: rgba(239, 68, 68, 0.85);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.login-label.is-invalid {
  color: #fca5a5;
}

.login-submit {
  padding: 0.85rem 1.5rem;
  border: 1px solid rgba(79, 159, 255, 0.6);
  border-radius: 8px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 200ms ease;
  margin-top: 0.5rem;
}

.login-submit:hover {
  border-color: rgba(79, 159, 255, 0.9);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(79, 159, 255, 0.3);
}

.login-submit:active {
  transform: scale(0.98);
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-divider {
  color: var(--text-muted);
  margin: 0 0.5rem;
}

.login-link {
  color: var(--accent);
  text-decoration: none;
  transition: color 200ms ease;
  font-weight: 500;
}

.login-link:hover {
  color: #6ea8ff;
  text-decoration: underline;
}

/* Reset Password Page Styling */
.reset-password-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.reset-password-card {
  max-width: 500px;
  width: 100%;
  text-align: center;
  padding: 3rem;
  background: rgba(15, 23, 42, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.reset-title {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.reset-info {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  text-align: left;
}

.reset-message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.reset-message.success {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.reset-message.error {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 1rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #4f9fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(79, 159, 255, 0.1);
}

.form-group input.is-invalid {
  border-color: #f44336;
  background: rgba(244, 67, 54, 0.08);
}

.form-group input.is-invalid:focus {
  border-color: #f44336;
  background: rgba(244, 67, 54, 0.12);
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.form-group label.is-invalid {
  color: #f44336;
}

.form-group label.is-invalid:after {
  content: ' *';
  color: #f44336;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  width: 100%;
  background: #4f9fff;
  color: white;
  margin-bottom: 0.75rem;
}

.btn-primary:hover {
  background: #3a8fee;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 159, 255, 0.3);
}

.reset-link {
  margin-top: 1.5rem;
}

.reset-link a {
  color: #4f9fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.reset-link a:hover {
  color: #3a8fee;
  text-decoration: underline;
}

.success-icon {
  margin-bottom: 1.5rem;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.reset-actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
}

.reset-actions .btn {
  flex: 1;
  margin-bottom: 0;
}

/* site toast */
.msg-manager {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 400px;
  width: auto;
  margin: 0;
  padding: 10px;  
  z-index: 5000;
  overflow: hidden;

  color: var(--accent);
  background: rgba(5, 6, 10, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  border: 1px solid #222;

  font-size: 12px;
  pointer-events: auto;
  transition: width 0.3s, height 0.3s;

}

.msg-manager:hover {
  border: 1px solid #606060;
}

.msg-manager div {
  font-style: normal;
}

.msg-manager i {
  font-style: normal;
}

.msg-manager .msg-counter,
.msg-manager .msg-content {
  display: inline-block;
}

.msg-manager .msg-counter {
  background: rgba(63, 63, 63, 0.7);
  border-radius: 8px;
  text-align: center;
  font-size: 10px;
  margin-left: 2px;
  padding: 0 2px;
}

.msg-manager .message i::before {
  /* envelope */
  content: "✉ ";
}

.msg-manager .success i::before {
  /* check mark */
  content: "✔ ";
}

.msg-manager .warn i::before {
  content: "⚠ ";
}

.msg-manager .error i::before {
  /* heavy multiplication sign */
  content: "✖ ";
}

.msg-manager .message {
  color: var(--accent);
}

.msg-manager .success {
  color: var(--success-fore);
}

.msg-manager .warn {
  color: var(--warn-fore);
}

.msg-manager .error {
  color: var(--error-fore);
}

.msg-manager .fade-out {
  opacity: 0;
  transition: opacity 0.5s;
}

.msg-manager .message[data-pinned="1"] i::before {
  content: "✯ ";
}

.msg-manager div[data-pinned="1"]:not(:has(~ div[data-pinned="1"])):not(:last-child) {
  padding-bottom: 3px;
  margin-bottom: 3px;
  border-bottom: 1px solid #424242;
}