/* ------------------------------------------------
   Reset & Base
   ------------------------------------------------ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  background-color: #111114;
  color: #a0a0a8;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

*, a, button, [role="button"], input, textarea, select {
  cursor: none !important;
}

/* Spring cursor */

.spring-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: #8abba0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.spring-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(138, 187, 160, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease, width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}

.spring-cursor.visible { opacity: 1; }
.spring-cursor-ring.visible { opacity: 1; }

/* Hovering links/buttons — ring expands, border brightens */
.spring-cursor-ring.hovering {
  width: 48px;
  height: 48px;
  border-color: rgba(138, 187, 160, 0.6);
}

/* Text — vertical bar, ring hidden */
.spring-cursor.text-mode {
  width: 2px;
  height: 22px;
  border-radius: 1px;
}

/* Text + pressing — square (selecting text) */
.spring-cursor.text-mode.pressing {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  transition: width 0.4s ease, height 0.4s ease, border-radius 0.4s ease;
}

.spring-cursor-ring.text-mode {
  opacity: 0;
}

/* Pressed — ring shrinks */
.spring-cursor-ring.pressing {
  width: 20px;
  height: 20px;
  border-color: rgba(138, 187, 160, 0.8);
}

@media (max-width: 767px) {
  * { cursor: auto !important; }
  .spring-cursor, .spring-cursor-ring { display: none !important; }
}

a {
  color: inherit;
  text-decoration: none;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background-color: #8abba0;
  color: #111114;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 500;
  z-index: 1000;
  border-radius: 0 0 4px 0;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #8abba0;
  outline-offset: 2px;
}

/* ------------------------------------------------
   Layout
   ------------------------------------------------ */

.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 48px;
  }
}

/* ------------------------------------------------
   Navigation
   ------------------------------------------------ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px;
  transition: background-color 0.4s ease;
}

@media (min-width: 768px) {
  .nav {
    padding: 28px 48px;
  }
}

.nav.scrolled {
  background-color: transparent;
}

.nav-name {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 26px;
  color: #e0e0e4;
  transition: color 0.25s ease;
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.nav-prompt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #8abba0;
  opacity: 0.5;
  margin-right: 2px;
}

.nav-name:hover,
.nav-name:focus-visible {
  color: #fff;
  outline: 2px solid #8abba0;
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-name:hover .nav-prompt,
.nav-name:focus-visible .nav-prompt {
  opacity: 0.8;
}

/* Blinking cursor after name */

.cursor {
  display: inline-block;
  width: 2px;
  height: 22px;
  background-color: #8abba0;
  margin-left: 3px;
  animation: blink 1.2s step-end infinite;
  vertical-align: middle;
  position: relative;
  top: 1px;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  font-size: 16px;
  color: #a0a0a8;
  transition: color 0.25s ease;
  padding: 4px 8px;
  border-radius: 4px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #e0e0e4;
  outline: 2px solid #8abba0;
  outline-offset: 2px;
}

.nav-dot {
  color: #4a4a50;
  font-size: 14px;
  user-select: none;
}

/* ------------------------------------------------
   Hero
   ------------------------------------------------ */

.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

/* Ambient glow — subtle screen-like light behind the content */

.hero-glow {
  position: absolute;
  top: 20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    ellipse at center,
    rgba(138, 187, 160, 0.06) 0%,
    rgba(138, 187, 160, 0.02) 40%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

@media (min-width: 768px) {
  .hero-glow {
    width: 700px;
    height: 700px;
    top: 10%;
    left: -5%;
  }
}

.hero-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: calc(92vh - 80px);
  width: 100%;
  gap: 48px;
}

@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .hero-container {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: auto;
    gap: 0;
  }
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

@media (max-width: 767px) {
  .hero-content {
    width: 100%;
  }
}

/* Terminal-style prefix */

.hero-prefix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  color: #8abba0;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  opacity: 0.7;
}

.hero-headline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.12;
  color: #e0e0e4;
  max-width: 780px;
}

.hero-role {
  margin-top: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #6a6a72;
  letter-spacing: 0.02em;
}

.hero-sub {
  margin-top: 24px;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
  color: #888890;
  max-width: 580px;
}

/* Status bar — terminal-inspired metadata strip at bottom of hero */

.hero-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 48px;
  padding-bottom: 24px;
  border-top: 1px solid #1e1e22;
  margin-top: auto;
}

.hero-status span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #4a4a52;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Dot separator between status items on desktop */

@media (min-width: 768px) {
  .hero-status span:not(:last-child)::after {
    content: '·';
    margin-left: 20px;
    color: #333338;
  }
}

/* ------------------------------------------------
   Terminal card — CSS-only visual element in hero
   ------------------------------------------------ */

.terminal-card {
  width: 250px;
  height: 220px;
  border: 1px solid #1e1e24;
  border-radius: 8px;
  background-color: rgba(18, 18, 22, 0.6);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  flex-shrink: 0;
}

/* Position terminal card so half is above hero title on desktop */
@media (min-width: 768px) {
  .hero-container {
    align-items: center;
    position: relative;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
  }

  .terminal-card {
    position: absolute;
    right: 0;
    top: 0;
    margin-top: 0;
    /* Position will be set by JavaScript to align with headline */
  }
}

@media (max-width: 767px) {
  .terminal-card {
    margin-bottom: 24px;
    align-self: flex-start;
    position: relative;
  }
}

.terminal-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 8px;
  background: transparent;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}

.terminal-card:hover::before,
.terminal-card.active::before {
  opacity: 1;
  box-shadow: 0 0 20px rgba(138, 187, 160, 0.15), 0 0 40px rgba(138, 187, 160, 0.08);
  animation: terminal-glow 2s ease-in-out infinite;
}

@keyframes terminal-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(138, 187, 160, 0.15), 0 0 40px rgba(138, 187, 160, 0.08);
  }
  50% {
    box-shadow: 0 0 25px rgba(138, 187, 160, 0.2), 0 0 50px rgba(138, 187, 160, 0.12);
  }
}

.terminal-card.closing {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid #1a1a1e;
  cursor: grab;
  user-select: none;
}

.terminal-header:active {
  cursor: grabbing;
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: default;
}

/* Close button hover — lights up red */

.terminal-dot--red {
  background-color: #3a2020;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.terminal-dot--red:hover,
.terminal-dot--red:focus-visible {
  background-color: #e05050;
  box-shadow: 0 0 6px rgba(224, 80, 80, 0.4);
  outline: 2px solid #e05050;
  outline-offset: 2px;
}

.terminal-dot--yellow { background-color: #3a3520; }
.terminal-dot--green { background-color: #203a28; }

.terminal-title {
  font-size: 11px;
  color: #3a3a42;
  margin-left: 6px;
  letter-spacing: 0.02em;
}

.terminal-body {
  padding: 14px 16px;
}

.terminal-line {
  white-space: nowrap;
  min-height: 1.7em;
}

.terminal-key {
  color: #6e6e78;
}

.terminal-colon {
  color: #4a4a52;
}

.terminal-string {
  color: #8abba0;
}

.terminal-value {
  color: #b0a080;
}

.terminal-bool {
  color: #7a9ec2;
}

.terminal-comment {
  color: #333338;
  font-style: italic;
}

.terminal-download {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #1a1a1e;
  color: #6a6a72;
  text-decoration: none;
  transition: color 0.25s ease;
}

.terminal-download:hover {
  color: #a0a0a8;
}

.terminal-download .terminal-prompt {
  color: #8abba0;
  opacity: 0.6;
}

.terminal-download .terminal-url {
  color: #8abba0;
  text-decoration: underline;
  text-decoration-color: rgba(138, 187, 160, 0.6);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.25s ease;
}

.terminal-download:hover .terminal-url {
  text-decoration-color: rgba(138, 187, 160, 1);
}

/* ------------------------------------------------
   Work section
   ------------------------------------------------ */

.work {
  padding-bottom: 40px;
  scroll-margin-top: 80px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 767px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a6a72;
  margin-bottom: 0;
}

.section-nav {
  display: flex;
  gap: 8px;
}

.section-nav-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #3a3a42;
  padding: 2px 6px;
  border-radius: 3px;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.section-nav-link:hover {
  color: #8abba0;
  background-color: rgba(138, 187, 160, 0.08);
}

.section-nav-link.active {
  color: #8abba0;
  background-color: rgba(138, 187, 160, 0.12);
}

.section-nav-link.active::after {
  content: ' ×';
  opacity: 0.5;
}

.section-nav-link.active:hover::after {
  opacity: 1;
}

/* Card hide/show for filtering */
.project-card.card-hidden {
  display: none;
}

/* Project list */

.project-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Project card */

.project-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 32px 28px;
  border-radius: 12px;
  border: 1px solid transparent;
  background-color: transparent;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}


.project-card:hover,
.project-card:focus-visible {
  background-color: #17171d;
  border-color: #252529;
  transform: translateY(-2px);
  outline: 2px solid #8abba0;
  outline-offset: 4px;
}

.project-card:hover .project-title {
  color: #fff;
}

.project-card:hover .project-desc {
  color: #9a9aa2;
}

.project-card:hover .project-number {
  color: #8abba0;
}


/* Number */

.project-number {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #3a3a40;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

/* Arrow — appears inline after project number on hover */

.project-number::after {
  content: ' ➤';
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-number::after {
  opacity: 1;
  animation: pulse-arrow 1.2s ease-in-out infinite;
}

@keyframes pulse-arrow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Text */

.project-text {
  flex: 1;
  min-width: 0;
}

.project-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(22px, 3.2vw, 28px);
  line-height: 1.2;
  color: #e0e0e4;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.project-desc {
  font-size: 15.5px;
  line-height: 1.55;
  color: #7e7e86;
  max-width: 500px;
  transition: color 0.3s ease;
}

/* Metric */

.project-metric {
  text-align: right;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

.metric-number {
  display: block;
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  color: #8abba0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.metric-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: #6a6a72;
  margin-top: 4px;
}

.project-card:hover .metric-number {
  color: #9ccdb5;
  text-shadow: 0 0 24px rgba(138, 187, 160, 0.3);
}

/* Inline preview — crossfade with metric on hover */

.project-metric,
.project-preview-inline {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
}

.project-metric {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.project-preview-inline {
  flex-shrink: 0;
  width: 240px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-metric {
  opacity: 0;
}

.project-card:hover .project-preview-inline {
  opacity: 1;
}

/* Mobile work layout */

@media (max-width: 767px) {
  .project-list {
    gap: 8px;
  }

  .project-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 20px;
    border-radius: 10px;
  }

  .project-card:hover {
    transform: none;
  }

  .project-metric {
    position: static;
    transform: none;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .metric-number {
    font-size: 28px;
  }

  .metric-label {
    margin-top: 0;
  }

  .project-card:hover .project-metric {
    opacity: 1;
  }

  .project-preview-inline {
    position: static;
    transform: none;
    width: 100%;
    opacity: 1;
    display: block;
    order: 2;
  }

  .project-metric {
    order: 3;
  }

  .project-card:hover .project-metric {
    opacity: 1;
  }

  .project-card:hover .project-preview-inline {
    opacity: 1;
  }
}

/* ------------------------------------------------
   Section break
   ------------------------------------------------ */

.section-break {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding-bottom: 64px;
}

.section-break span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #333338;
}

/* ------------------------------------------------
   Closing
   ------------------------------------------------ */

.closing {
  padding-top: 120px;
  padding-bottom: 120px;
}

.closing-headline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 40px);
  line-height: 1.15;
  color: #e0e0e4;
  margin-bottom: 24px;
}

.closing-body {
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.65;
  color: #888890;
  max-width: 560px;
}

/* ------------------------------------------------
   Case Study Pages
   ------------------------------------------------ */

.case-study {
  padding-top: 120px;
  padding-bottom: 80px;
}

.case-study-header {
  margin-bottom: 64px;
}

.case-study-hero {
  margin-bottom: 48px;
}

.case-study-hero img {
  width: 100%;
  display: block;
  border-radius: 8px;
  opacity: 0.85;
}

.case-study-back {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #6a6a72;
  padding: 8px 12px;
  margin-left: -12px;
  margin-bottom: 32px;
  border-radius: 4px;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.case-study-back:hover {
  color: #8abba0;
  background-color: #17171d;
  outline: 2px solid #8abba0;
  outline-offset: 4px;
}

.case-study-meta {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #5a5a62;
  margin-bottom: 16px;
}

.case-study-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.12;
  color: #e0e0e4;
}

.case-study-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #1e1e22;
}

.case-study-metric .metric-number {
  font-size: clamp(28px, 4vw, 36px);
}

.case-study-metric .metric-label {
  font-size: 12px;
  color: #6a6a72;
  margin-top: 4px;
}

.case-study-section {
  margin-bottom: 48px;
}

.case-study-heading {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  color: #e0e0e4;
  margin-bottom: 20px;
}

.case-study-section p {
  font-size: 17px;
  line-height: 1.7;
  color: #a0a0a8;
  margin-bottom: 16px;
  max-width: 640px;
}

.case-study-section p:last-child {
  margin-bottom: 0;
}

.case-study-section strong {
  color: #c8c8ce;
  font-weight: 500;
}

.case-study-results {
  list-style: none;
  padding: 0;
  margin-top: 16px;
}

.case-study-results li {
  font-size: 17px;
  line-height: 1.7;
  color: #a0a0a8;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.case-study-results li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #8abba0;
  opacity: 0.6;
}

.case-study-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 48px;
  margin-top: 64px;
  border-top: 1px solid #1e1e22;
  gap: 24px;
}

.case-study-prev,
.case-study-next {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 8px;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.case-study-prev:hover,
.case-study-next:hover {
  color: #8abba0;
  background-color: #17171d;
  outline: 2px solid #8abba0;
  outline-offset: 4px;
}

.case-study-prev .nav-label,
.case-study-next .nav-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #4a4a52;
  transition: color 0.25s ease;
}

.case-study-prev .nav-title,
.case-study-next .nav-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 18px;
  color: #a0a0a8;
  transition: color 0.25s ease;
}

.case-study-prev:hover .nav-label,
.case-study-next:hover .nav-label {
  color: #6a6a72;
}

.case-study-prev:hover .nav-title,
.case-study-next:hover .nav-title {
  color: #e0e0e4;
}

.case-study-next {
  margin-left: auto;
  text-align: right;
  align-items: flex-end;
}

@media (max-width: 767px) {
  .case-study {
    padding-top: 100px;
  }

  .case-study-nav {
    flex-direction: row;
  }

  .case-study-prev .nav-title,
  .case-study-next .nav-title {
    display: none;
  }
}

/* ------------------------------------------------
   Footer
   ------------------------------------------------ */

.footer {
  padding-bottom: 48px;
}

.footer-divider {
  height: 1px;
  background-color: #1e1e22;
  margin-bottom: 32px;
}

.footer-name {
  font-size: 15px;
  color: #777780;
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #6a6a72;
  transition: color 0.25s ease;
  padding: 4px 8px;
  border-radius: 4px;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #a0a0a8;
  outline: 2px solid #8abba0;
  outline-offset: 4px;
  border-radius: 2px;
}

.footer-dot {
  color: #3a3a40;
  font-size: 13px;
  user-select: none;
}

/* ------------------------------------------------
   Selection
   ------------------------------------------------ */

::selection {
  background-color: rgba(138, 187, 160, 0.2);
  color: #e0e0e4;
}

/* ------------------------------------------------
   Focus styles for better accessibility
   ------------------------------------------------ */

/* Remove default outline and use custom focus-visible */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid #8abba0;
  outline-offset: 2px;
}

/* Ensure buttons are keyboard accessible */
button:focus-visible {
  outline: 2px solid #8abba0;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ------------------------------------------------
   Terminal Scrollbar
   ------------------------------------------------ */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0f0f12;
}

::-webkit-scrollbar-thumb {
  background: #2a2a32;
  border-radius: 5px;
  border: 1px solid #1a1a1e;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a3a42;
}

::-webkit-scrollbar-thumb:active {
  background: #8abba0;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #2a2a32 #0f0f12;
}

/* ------------------------------------------------
   Terminal Tab Indicators - CSS-only active states
   ------------------------------------------------ */

/* ------------------------------------------------
   Scroll Terminal Output - CSS-only with scroll-triggered visibility
   ------------------------------------------------ */

.scroll-terminal {
  position: fixed;
  top: 80px;
  right: 8px;
  width: 164px;
  background-color: rgba(18, 18, 22, 0.95);
  border: 1px solid #1e1e24;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #6a6a72;
  z-index: 101;
  opacity: 0;
  transform: translateY(-10px) translateX(0) scale(0.95);
  transition: opacity 0.3s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: top, transform;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 767px) {
  .scroll-terminal {
    display: none;
  }
}

/* Show terminal when scrolled past hero */
body.scrolled .scroll-terminal {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

@keyframes scrollTerminalBounce {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-6px) scale(1.03); }
  50%  { transform: translateY(3px) scale(0.98); }
  70%  { transform: translateY(-2px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

.scroll-terminal.bounce {
  animation: scrollTerminalBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-terminal-header {
  padding: 4px 8px;
  border-bottom: 1px solid #1a1a1e;
  background-color: rgba(26, 26, 30, 0.5);
}

.scroll-terminal-title {
  font-size: 9px;
  color: #5a5a62;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scroll-terminal-body {
  padding: 6px 8px;
  flex: 1;
}

.scroll-terminal-line {
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.scroll-terminal-line:last-child {
  margin-bottom: 0;
}

.scroll-terminal-line .prompt {
  color: #8abba0;
  opacity: 0.6;
}

.scroll-terminal-line .command {
  color: #6a6a72;
}

.scroll-terminal-line .output {
  color: #6a6a72;
}

.scroll-top-link {
  display: block;
  padding: 5px 8px;
  border-top: 1px solid #1a1a1e;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #9a9aa2;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.scroll-top-link:hover {
  color: #8abba0;
  background-color: rgba(138, 187, 160, 0.08);
}

.scroll-top-link .arrow {
  display: inline-block;
  animation: arrow-bounce 2s ease-in-out infinite;
}

@keyframes arrow-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  90% { transform: translateY(-2px); }
}

/* ------------------------------------------------
   Interactive Terminal Commands - CSS-only tooltips
   ------------------------------------------------ */

.interactive-element {
  cursor: help;
  position: relative;
  border-bottom: 1px dotted rgba(138, 187, 160, 0.3);
  transition: border-color 0.2s ease;
}

.interactive-element:hover {
  border-bottom-color: rgba(138, 187, 160, 0.6);
}

/* CSS-only tooltip using ::before and ::after */
.interactive-element::before {
  content: '$ ' attr(data-command);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background-color: rgba(18, 18, 22, 0.98);
  border: 1px solid #1e1e24;
  border-radius: 4px;
  padding: 6px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #8abba0;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 4px;
}

.interactive-element::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1e1e24;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1001;
}

.interactive-element:hover::before,
.interactive-element:hover::after {
  opacity: 1;
}

.interactive-element:hover::before {
  transform: translateX(-50%) translateY(-12px);
}

/* ------------------------------------------------
   Terminal Loading States
   ------------------------------------------------ */

.terminal-loading {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #8abba0;
}

.terminal-loading-bar {
  display: inline-block;
  width: 0;
  height: 2px;
  background-color: #8abba0;
  animation: loading-progress 1.5s ease-in-out infinite;
}

@keyframes loading-progress {
  0% {
    width: 0;
    opacity: 0.5;
  }
  50% {
    width: 100%;
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 0.5;
  }
}

.terminal-loading-text {
  display: inline-block;
  margin-left: 8px;
  color: #6a6a72;
}

.terminal-loading-text::after {
  content: '...';
  animation: loading-dots 1.5s steps(4, end) infinite;
}

@keyframes loading-dots {
  0%, 20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%, 100% {
    content: '...';
  }
}

/* Loading overlay - CSS-only, hidden by default */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(17, 17, 20, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Show loading overlay when body has loading class (can be toggled via minimal JS or CSS) */
body.loading .loading-overlay {
  opacity: 1;
  pointer-events: all;
}

.loading-content {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  color: #8abba0;
}

.loading-content .loading-command {
  font-size: 14px;
  margin-bottom: 16px;
  color: #6a6a72;
}

.loading-content .loading-bar-container {
  width: 200px;
  height: 2px;
  background-color: #1e1e24;
  border-radius: 1px;
  overflow: hidden;
  margin: 0 auto;
}

.loading-content .loading-bar {
  height: 100%;
  background-color: #8abba0;
  width: 0;
  animation: loading-bar-fill 1s ease-in-out;
}

@keyframes loading-bar-fill {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}

.loading-content .loading-status {
  font-size: 11px;
  margin-top: 12px;
  color: #5a5a62;
}

/* ------------------------------------------------
   Image Terminal — terminal-framed image
   ------------------------------------------------ */

.image-terminal {
  border: 1px solid #1e1e24;
  border-radius: 8px;
  overflow: hidden;
  background-color: rgba(18, 18, 22, 0.6);
}

.image-terminal-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-bottom: 1px solid #1a1a1e;
}

.image-terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #2a2a32;
  margin-left: 4px;
}

.image-terminal-body {
  background-color: #0f0f12;
}

.image-terminal-body img {
  width: 100%;
  display: block;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.image-terminal:hover .image-terminal-body img {
  opacity: 1;
}


/* Terminal typing cursor */
.terminal-cursor {
  display: inline-block;
  width: 6px;
  height: 13px;
  background-color: #8abba0;
  vertical-align: middle;
  animation: blink 1.2s step-end infinite;
  margin-left: 1px;
}
