/* quirks.css, styling the JS "quirks" depend on, salvaged from the old
   per-page CSS so they survive the Tailwind redesign. These are fixed-position
   overlays / terminals / modals that read fine over either light or dark page
   themes (the terminals are intentionally always dark, macOS-style). */

/* ---------------------------------------------------------------- */
/* Strict-equality + Konami + language "hello-world" terminals      */
/* Shared by the-truest-equality.js, easter-eggs.js,                */
/* and languages-hello-world.js.                                    */
/* ---------------------------------------------------------------- */

.equality-terminal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: equality-terminal-fade-in 0.25s ease;
}

/* Draggable language terminals are appended (absolutely) into #main-content. */
.terminal-overlay {
  position: absolute;
  inset: 0;
  z-index: 10000;
}

@keyframes equality-terminal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.equality-terminal-panel {
  width: min(32rem, 100%);
  max-height: min(70vh, 28rem);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(52, 199, 89, 0.12);
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Consolas", monospace;
}

.equality-terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem 0.55rem 0.85rem;
  background: linear-gradient(180deg, #3a3a3c 0%, #2c2c2e 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
}

.equality-terminal-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.equality-terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.35);
}

.equality-terminal-dot-red {
  background: #ff5f57;
}

.equality-terminal-dot-yellow {
  background: #febc2e;
}

.equality-terminal-dot-green {
  background: #28c840;
}

.equality-terminal-title {
  flex: 1;
  font-size: 0.72rem;
  color: #98989d;
  letter-spacing: 0.02em;
  user-select: none;
}

.equality-terminal-close {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #a1a1a6;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.equality-terminal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.equality-terminal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0d1117;
  background-image: linear-gradient(
    180deg,
    rgba(52, 199, 89, 0.04) 0%,
    transparent 40%
  );
}

.equality-terminal-hint {
  padding: 0.65rem 1rem 0.35rem;
  font-size: 0.8rem;
  color: #58a6ff;
  opacity: 0.95;
  border-bottom: 1px solid rgba(48, 54, 61, 0.8);
}

.equality-terminal-log {
  flex: 1;
  overflow: auto;
  padding: 0.75rem 1rem 1rem;
  font-size: 0.85rem;
  line-height: 1.65;
}

.equality-terminal-line {
  margin: 0;
  padding: 0.15rem 0;
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
}

.equality-terminal-line.equality-terminal-prompt {
  color: #79c0ff;
}

.equality-terminal-line.equality-terminal-bool {
  color: #7ee787;
  font-weight: 600;
}

.equality-terminal-line.equality-terminal-success {
  color: #34c759;
  font-weight: 600;
  text-shadow: 0 0 24px rgba(52, 199, 89, 0.35);
}

.equality-terminal-log::-webkit-scrollbar {
  width: 8px;
}

.equality-terminal-log::-webkit-scrollbar-thumb {
  background: rgba(139, 148, 158, 0.35);
  border-radius: 4px;
}

/* ---------------------------------------------------------------- */
/* Contact dialog modal (contact-dialog.js)                         */
/* ---------------------------------------------------------------- */

.contact-dialog {
  position: relative;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0;
  border: none;
  border-radius: 16px;
  background: #f5f5f7;
  color: #1c1c1e;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.contact-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.contact-dialog-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #1c1c1e;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.contact-dialog-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.contact-form {
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-form h2 {
  margin: 0 1.75rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1c1c1e;
}

.contact-dialog-lead {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
}

.contact-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-top: 0.35rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #c7c7cc;
  border-radius: 10px;
  background: #fff;
  color: #1c1c1e;
  font-family: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 7rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.contact-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
  padding-top: 0.35rem;
}

.contact-btn {
  padding: 0.6rem 1.35rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  color: #000000;
  border: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.contact-btn-primary {
  background: #007aff;
  color: #fff;
}

.contact-btn-primary:hover {
  background: #0066d6;
}

.contact-btn-secondary {
  background: #e5e5ea;
  color: #1c1c1e;
}

.contact-btn-secondary:hover {
  background: #d8d8dc;
}

@media (max-width: 480px) {
  .contact-form-actions {
    flex-direction: column-reverse;
  }

  .contact-btn {
    width: 100%;
  }
}

/* ---------------------------------------------------------------- */
/* Portfolio expandable project descriptions (portfolio.js)         */
/* Functional classes layered on top of the Tailwind card styling.  */
/* ---------------------------------------------------------------- */

.project-description {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
  padding: 0;
}

.project-description.expanded {
  max-height: 30rem;
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.project-header {
  cursor: pointer;
  user-select: none;
}

/* portfolio.js swaps the arrow glyph (▸/▾) directly via textContent. */
.project-header .arrow {
  display: inline-block;
}
