/* ==========================================================================
   AWS Student Builder Group — Terminal Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --bg: #0a0b09;
  --bg-panel: rgba(22, 22, 16, 0.55);
  --bg-panel-hover: rgba(30, 29, 20, 0.8);
  --bg-terminal: #0d0e0a;
  --bg-titlebar: #16150f;

  --accent: #ffb000;
  --accent-dim: rgba(255, 176, 0, 0.14);
  --accent-glow: rgba(255, 176, 0, 0.25);
  --ok: #7ee787;

  --text-primary: #ece6d6;
  --text-secondary: #a39a86;
  --text-muted: #6b6355;

  --border-subtle: rgba(255, 176, 0, 0.14);
  --border-hover: rgba(255, 176, 0, 0.4);

  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --ease-out-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.25s var(--ease-out-smooth);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-mono);
  background-color: var(--bg);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}

/* Scanline / CRT texture — subtle, restrained */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.35;
  mix-blend-mode: overlay;
}

.bg-ambient-light {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(255, 176, 0, 0.07) 0%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255, 176, 0, 0.2); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container {
  max-width: 860px;
  width: 90%;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

/* Blinking cursor, used throughout */
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Header — terminal titlebar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
}

.term-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.term-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.term-dots .dot-red { background: #ff5f56; }
.term-dots .dot-yellow { background: #ffbd2e; }
.term-dots .dot-green { background: #27c93f; }

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.brand-logo .prompt-user { color: var(--ok); }
.brand-logo .prompt-path { color: var(--accent); }
.brand-logo .prompt-sep { color: var(--text-muted); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out-smooth), transform 0.6s var(--ease-out-smooth);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Hero */
.hero-section {
  padding: 4rem 0 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-cmd-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.1rem;
}
.hero-cmd-line .cmd-prompt { color: var(--ok); }
.hero-cmd-line .cmd-text { color: var(--text-secondary); }

.hero-title {
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  max-width: 680px;
}

.hero-title .highlight {
  color: var(--accent);
}

.hero-title .type-cursor {
  color: var(--accent);
}

.hero-description {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 560px;
  line-height: 1.7;
  border-left: 2px solid var(--border-subtle);
  padding-left: 0.9rem;
}

.hero-description::before {
  content: '# ';
  color: var(--text-muted);
}

/* Events Section */
.events-section {
  margin: 1.5rem 0 5rem;
}

.section-title-wrapper {
  margin-bottom: 1.1rem;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0;
}
.section-title .prompt-sym { color: var(--ok); margin-right: 6px; }
.section-title .cmd { color: var(--accent); }

/* Event Card — styled like a directory listing / file block */
.event-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  transition: var(--transition);
  cursor: pointer;
}

.event-card:hover {
  background: var(--bg-panel-hover);
  border-color: var(--border-hover);
  border-left-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim), 0 20px 40px rgba(0, 0, 0, 0.5);
}

.event-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.date-pill {
  background: var(--accent-dim);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: var(--radius-sm);
}

.duration-badge {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.duration-badge::before { content: '⏱ '; }

.event-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.event-title::before {
  content: '> ';
  color: var(--ok);
}

.event-summary {
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.65;
  max-width: 520px;
}

.event-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.tag {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.tag::before { content: '#'; color: var(--text-muted); margin-right: 2px; }

/* Buttons */
.btn-primary {
  background: transparent;
  color: var(--accent);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hover);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: var(--transition);
}
.btn-primary::before { content: '$'; color: var(--text-muted); }

.btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.btn-arrow { display: none; }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary::before { content: '$ '; color: var(--text-muted); }
.btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* Modal — full terminal window replica */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 4, 2, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: var(--bg-terminal);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 92%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255,176,0,0.05);
  overflow: hidden;
  transform: scale(0.97) translateY(8px);
  transition: transform 0.25s var(--ease-out-smooth);
}

.modal-overlay.active .modal-window {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-titlebar);
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-filename {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
  font-family: var(--font-mono);
}
.modal-close-btn:hover { color: var(--accent); }

.modal-body {
  padding: 1.5rem 1.6rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.modal-badge {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ok);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.modal-badge::before { content: '// '; color: var(--text-muted); }

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: rgba(255, 176, 0, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.meta-label::before { content: '$ '; }

.meta-value {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
}

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

.block-heading {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0;
}
.block-heading::before { content: '$ '; color: var(--text-muted); }

.block-text {
  color: var(--text-secondary);
  font-size: 0.87rem;
  line-height: 1.7;
  padding-left: 1rem;
  border-left: 2px solid var(--border-subtle);
}

.modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-left: 1rem;
  border-left: 2px solid var(--border-subtle);
}

.modal-list li {
  position: relative;
  padding-left: 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
}
.modal-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--ok);
}
.modal-list li strong { color: var(--text-primary); }

.modal-footer {
  padding: 0.9rem 1.6rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-titlebar);
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 1.6rem 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-wrapper {
  display: flex;
  justify-content: center;
}
.footer-wrapper::before { content: '$ echo '; color: var(--text-muted); }

/* Mobile */
@media (max-width: 640px) {
  .hero-title { font-size: 1.7rem; }
  .event-card { flex-direction: column; align-items: flex-start; }
  .btn-primary { width: 100%; justify-content: center; }
  .modal-meta-grid { grid-template-columns: 1fr; gap: 8px; }
}

/* Accessibility: visible focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .cursor { animation: none; }
}
