.disclaimer-note-text {
  font-size: medium;
  padding: 0.5rem;
}

.disclaimer-note-box {
  background-color: rgba(240, 248, 255, 0.3);
  width: 80vw;
  margin: auto;
  border-radius: 1rem;
}

@media (min-width: 1270px) {
  .disclaimer-note-box {
    background-color: rgba(240, 248, 255, 0.3);
    width: 30vw;
    margin: auto;
    border-radius: 1rem;
  }
}

.video-container {
  margin-top: 1rem;
  margin-bottom: 1rem;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

/* YouTube requires at least 200px of height for the interactive player. */
.video-container.is-playing {
  min-height: 200px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

#main .video-launch {
  position: absolute;
  inset: 0;
  display: block;
  border: 0;
}

.video-launch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 68px;
  height: 48px;
  border-radius: 12px;
  color: #fff;
  background: #e00025;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.video-launch:hover .video-play-icon,
.video-launch:focus-visible .video-play-icon {
  background: #b8001e;
}

#main .video-launch:focus-visible {
  outline: 3px solid #c5d5ff;
  outline-offset: -4px;
}

/* Personal introduction and the paired portraits. */
#header .content .inner {
  max-height: none;
  transition: none;
}

.profile-intro {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 49rem;
}

.profile-portrait {
  display: block;
  flex: 0 0 auto;
  width: 176px;
  height: auto;
  border-radius: 12px;
}

.profile-copy {
  min-width: 0;
  text-align: left;
}

#header .profile-copy h1 {
  margin-bottom: 0.75rem;
  letter-spacing: normal;
}

#header .content .profile-headline {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 600;
}

#header .content .profile-bio {
  max-width: 36rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: normal;
  text-transform: none;
  color: #e0e5ef;
}

.wave-pair {
  width: min(100%, 29rem);
  margin: 2rem auto 1.5rem;
}

.wave-pair img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 736px) {
  .profile-intro {
    flex-direction: column;
    gap: 1.25rem;
  }

  .profile-portrait {
    width: 144px;
  }

  .profile-copy {
    text-align: center;
  }

  #header .content .inner {
    padding: 1.5rem 1rem;
  }

}

/* ==========================================================================
   Open-source projects showcase — "terminal window" cards
   Lives at the top of #current. Styled as mini terminals since both projects
   are genuine CLI/dev tools. Accent gradient (#5b8def slate-blue -> #9b6cf0
   purple) echoes the site's animated particle background (#2c3e50 -> #443f67).
   Plain hyphenated class names to match this file's convention; all scoped
   under .projects-showcase so nothing here leaks into the template.
   ========================================================================== */

.projects-showcase {
  --term-accent-a: #5b8def;
  --term-accent-b: #9b6cf0;
  --term-screen: rgba(8, 10, 20, 0.55);
  --term-border: rgba(255, 255, 255, 0.12);
  --term-muted: rgba(255, 255, 255, 0.5);
  margin-bottom: 2.5rem;
}

.projects-showcase .showcase-lead {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.35rem;
  text-transform: uppercase;
  color: var(--term-muted);
  margin: 0 0 0.35rem 0;
}

.projects-showcase .showcase-sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 1.5rem 0;
}

/* --- the terminal card ------------------------------------------------- */
.term-card {
  position: relative;
  border: 1px solid var(--term-border);
  border-radius: 8px;
  background: rgba(15, 18, 28, 0.6);
  margin-bottom: 1.5rem;
  overflow: hidden;
  /* let the animated dots glow through, plus a soft lift shadow */
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out,
    border-color 0.2s ease-in-out;
}

.term-card:hover {
  transform: translateY(-4px);
  border-color: rgba(155, 108, 240, 0.55);
  box-shadow: 0 18px 40px -14px rgba(91, 141, 239, 0.45),
    0 0 0 1px rgba(155, 108, 240, 0.25);
}

/* title bar with traffic lights */
.term-titlebar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--term-border);
}

.term-lights {
  display: inline-flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.term-lights span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}

.term-lights .tl-r { background: #ff5f56; }
.term-lights .tl-y { background: #ffbd2e; }
.term-lights .tl-g { background: #27c93f; }

.term-path {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the github glyph pinned to the right of the title bar */
.term-titlebar .term-gh {
  margin-left: auto;
  flex-shrink: 0;
  /* SVG octocat inherits this via fill:currentColor */
  color: rgba(255, 255, 255, 0.6);
  border-bottom: none;
  line-height: 0;
  display: inline-flex;
  transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.term-titlebar .term-gh svg {
  display: block;
}

.term-titlebar .term-gh:hover {
  color: #fff;
  transform: scale(1.12);
}

/* thin accent underline pinned to the bottom edge of the title bar */
.term-titlebar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px; /* overlaps the 1px border-bottom */
  height: 2px;
  background: linear-gradient(90deg, var(--term-accent-a), var(--term-accent-b));
  opacity: 0.9;
}

/* --- terminal screen (body) -------------------------------------------- */
.term-screen {
  padding: 1.15rem 1.15rem 1.25rem;
  background: var(--term-screen);
}

.term-tagline {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  font-style: italic;
  color: #b9c6e2;
  margin: 0 0 0.85rem 0;
  line-height: 1.5;
}

.term-tagline .caret {
  color: var(--term-accent-a);
  font-style: normal;
  font-weight: 600;
  margin-right: 0.4rem;
}

.term-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 1rem 0;
}

/* lang: / tags: metadata rows */
.term-meta {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--term-muted);
  margin-bottom: 0.35rem;
}

.term-meta .meta-key {
  color: #b8c4da;
  margin-right: 0.5rem;
}

.term-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.term-lang .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.term-tag {
  color: #c5adfa;
  margin-right: 0.6rem;
  white-space: nowrap;
}

/* --- command prompt row ------------------------------------------------ */
.term-cmd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0.25rem;
  padding: 0.6rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--term-border);
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

.term-cmd .prompt-sign {
  color: #27c93f;
  font-weight: 700;
  flex-shrink: 0;
}

.term-cmd .cmd-text {
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* blinking cursor block */
.term-cmd .cursor {
  width: 8px;
  height: 1.05em;
  background: var(--term-accent-a);
  display: inline-block;
  margin-left: 0.1rem;
  flex-shrink: 0;
  animation: term-blink 1.1s steps(1) infinite;
}

@keyframes term-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* copy button */
.term-copy {
  margin-left: auto;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid var(--term-border);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 4px;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out,
    border-color 0.2s ease-in-out;
}

.term-copy:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.term-copy.copied {
  color: #27c93f;
  border-color: rgba(39, 201, 63, 0.5);
}

/* --- CTA --------------------------------------------------------------- */
.term-cta-row {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--term-border);
}

.projects-showcase .term-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#main .projects-showcase .term-cta.button.special {
  color: #1b1f22 !important;
}

/* GitHub marks are INLINE SVG (not FontAwesome glyphs). The template's webfont
   mechanism proved fragile here (a stale/absent FontAwesome face renders a tofu
   box), so the octocat is drawn as SVG with fill:currentColor and can never
   tofu. This rule just vertically centers it against the button label. */
.projects-showcase .term-cta .term-cta-gh {
  vertical-align: -2px;
  margin-right: 0.15rem;
}

/* divider between the showcase and the films below */
.showcase-divider {
  border: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  margin: 0 0 2rem 0;
}

/* --- responsive: relax inside the fixed 40rem column on small screens -- */
@media (max-width: 736px) {
  .term-screen {
    padding: 1rem 0.85rem 1.1rem;
  }
  .term-cmd {
    flex-wrap: wrap;
  }
  .term-copy {
    margin-left: 0;
    margin-top: 0.4rem;
  }
  .term-meta {
    line-height: 2.1;
  }
}

#main .writing-list {
  padding: 0;
  list-style: none;
}

#main .writing-list li {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  list-style: none;
}

#main .writing-list h4 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
  letter-spacing: normal;
  text-transform: none;
}

#main .writing-list p {
  margin: 0 0 0.75rem;
}

#main .writing-list .writing-meta {
  color: #bac8e2;
  font-size: 0.85rem;
}

.selected-writing {
  margin-bottom: 2rem;
}
