/* =========================================================
   mustapha.io — Personal Portfolio (Mobile-first)
   - Minimal, recruiter-focused
   - Micro-interactions: hover, focus, scroll reveal
   - Terminal Mode overlay included
   ========================================================= */

/* ---------- CSS Reset (lightweight) ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% 0%, rgba(92, 120, 255, 0.18), transparent 50%),
    radial-gradient(900px 600px at 90% 10%, rgba(0, 223, 255, 0.10), transparent 45%),
    var(--bg);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

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

button,
select,
input {
  font: inherit;
}

:root {
  --bg: #0b0f17;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.10);
  --text: rgba(255, 255, 255, 0.88);
  --muted: rgba(255, 255, 255, 0.65);
  --faint: rgba(255, 255, 255, 0.40);
  --accent: #7c9cff;
  --accent-2: #00dfff;
  --danger: #ff3b3b;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;

  --container: 1100px;
}

/* Arabic support */
html[dir="rtl"] body {
  font-family: ui-sans-serif, system-ui, "Noto Sans Arabic", "Segoe UI", Arial;
}

/* ---------- Accessibility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-140%);
  background: #ffffff;
  color: #000;
  padding: 8px 10px;
  border-radius: 10px;
  z-index: 9999;
  transition: transform 220ms ease;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Layout ---------- */
.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 54px 0;
}

.section__header {
  margin-bottom: 18px;
}

.section__title {
  margin: 0 0 6px;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.section__lead {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(11, 15, 23, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header__inner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 180px;
}
.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 156, 255, 0.35), rgba(0, 223, 255, 0.20));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
}
.brand__text {
  display: grid;
  line-height: 1.1;
}
.brand__name {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand__tag {
  color: var(--muted);
  font-size: 0.86rem;
}

.nav {
  display: none; /* mobile-first */
  gap: 8px;
  align-items: center;
}
.nav__link {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.nav__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.nav__link.is-active {
  color: var(--text);
  border-color: rgba(124, 156, 255, 0.25);
  background: rgba(124, 156, 255, 0.12);
}

.header__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.select {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 10px 10px;
  outline: none;
  transition: border-color 180ms ease, transform 120ms ease;
}
.select:focus {
  border-color: rgba(124, 156, 255, 0.55);
}
.select:active {
  transform: translateY(1px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, background 180ms ease, border-color 180ms ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(124, 156, 255, 0.30);
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus-visible {
  outline: 2px solid rgba(124, 156, 255, 0.75);
  outline-offset: 2px;
}
.btn__icon {
  opacity: 0.9;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
}

.btn--sm {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.92rem;
}

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

/* --- Profile photo block --- */
.profile-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

html[dir="rtl"] .profile-row {
  flex-direction: row-reverse;
}

.profile-row__name {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-row__title {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(124,156,255,0.22), rgba(0,223,255,0.12));
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
  flex: 0 0 auto;
  cursor: pointer;
  transition: transform 160ms ease, border-color 180ms ease, background 180ms ease;
}

.avatar:hover {
  transform: translateY(-1px);
  border-color: rgba(0,223,255,0.24);
  background: linear-gradient(135deg, rgba(124,156,255,0.28), rgba(0,223,255,0.16));
}

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

.avatar__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.hero {
  padding-top: 28px;
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.hero__title {
  margin: 0 0 10px;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.hero__name {
  display: block;
  font-size: 2.05rem;
}
.hero__role {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.05rem;
  min-height: 1.2em;
}

.hero__summary {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 68ch;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.pill {
  font-size: 0.9rem;
  padding: 9px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: transform 140ms ease, background 180ms ease, border-color 180ms ease;
}
.pill:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 156, 255, 0.30);
  background: rgba(124, 156, 255, 0.10);
}

.mini-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
.mini-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 12px;
  transition: transform 160ms ease, border-color 180ms ease, background 180ms ease;
}
.mini-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 223, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}
.mini-card__label {
  color: var(--faint);
  font-size: 0.82rem;
  margin-bottom: 6px;
}
.mini-card__value {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero__aside {
  align-self: start;
}

.hero__fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent, rgba(11, 15, 23, 0.85));
  pointer-events: none;
}

/* ---------- Cards ---------- */
.card {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card--glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.card__header {
  padding: 16px 16px 10px;
}
.card__title {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.card__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.card__content {
  padding: 0 16px 16px;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
}
.checklist li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
}
.checklist li::before {
  content: "✓";
  color: var(--accent-2);
  font-weight: 800;
  margin-top: 1px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  transition: transform 140ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(124, 156, 255, 0.30);
  color: var(--text);
}

.note {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(0, 223, 255, 0.16);
  background: rgba(0, 223, 255, 0.06);
  color: var(--muted);
}
.note__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(0, 223, 255, 0.10);
}

/* --- Language Select (langSelect) --- */
.select#langSelect {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 10px 38px 10px 12px; /* space for arrow */
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);

  line-height: 1;
  cursor: pointer;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 120ms ease, background 180ms ease, border-color 180ms ease;
}

/* hover micro-interaction */
.select#langSelect:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(124, 156, 255, 0.28);
}

/* focus ring (keyboard friendly) */
.select#langSelect:focus {
  outline: none;
}
.select#langSelect:focus-visible {
  outline: 2px solid rgba(124, 156, 255, 0.75);
  outline-offset: 2px;
}

/* pressed */
.select#langSelect:active {
  transform: translateY(1px);
}

/* wrapper needed for the custom arrow */
.header__actions {
  position: relative;
}

/* custom arrow using a pseudo element on a wrapper */
.header__actions::after {
  content: "▾";
  position: absolute;
  right: 122px; /* adjust if button widths change */
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

/* dropdown options */
.select#langSelect option {
  background: #0b0f17;
  color: rgba(255, 255, 255, 0.92);
}

/* RTL: keep padding correct */
html[dir="rtl"] .select#langSelect {
  padding: 10px 12px 10px 38px;
}
html[dir="rtl"] .header__actions::after {
  right: auto;
  left: 122px; /* adjust if needed */
}


/* ---------- Journey ---------- */
.journey {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.journey__timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  gap: 6px;
  padding: 14px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 160ms ease, border-color 180ms ease, background 180ms ease;
}
.timeline-item:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 156, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}
.timeline-item__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.timeline-item__title {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.timeline-item__date {
  color: var(--faint);
  font-size: 0.92rem;
}
.timeline-item__desc {
  margin: 0;
  color: var(--muted);
}

.journey__skills {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
}

.skills-header {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.chip-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 120ms ease;
}
.chip:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.chip:active {
  transform: translateY(1px);
}
.chip.is-active {
  background: rgba(124, 156, 255, 0.12);
  border-color: rgba(124, 156, 255, 0.28);
  color: var(--text);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.skill-pill {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.92rem;
  transition: transform 140ms ease, border-color 180ms ease, background 180ms ease;
}
.skill-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 223, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}
.skill-pill[data-dim="true"] {
  opacity: 0.45;
}

.langs__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.lang-card {
  flex: 1 1 auto;
  min-width: 160px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 160ms ease, border-color 180ms ease, background 180ms ease;
}
.lang-card:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 156, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}
.lang-card__name {
  font-weight: 700;
}
.lang-card__level {
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Work stations ---------- */
.station-list {
  display: grid;
  gap: 12px;
}

.station {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.station:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 156, 255, 0.30);
  background: rgba(255, 255, 255, 0.06);
}

.station__head {
  padding: 14px 14px 10px;
  display: grid;
  gap: 6px;
}
.station__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}
.station__role {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.station__where {
  color: var(--faint);
  font-size: 0.95rem;
}
.station__desc {
  margin: 0;
  color: var(--muted);
}

.station__body {
  padding: 0 14px 14px;
  display: grid;
  gap: 10px;
}

.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tech {
  font-size: 0.86rem;
  padding: 7px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
html[dir="rtl"] .bullets {
  padding-left: 0;
  padding-right: 18px;
}

/* ---------- Slider (Side projects) ---------- */
.slider {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items: center;
}

.slider__btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, background 180ms ease, border-color 180ms ease;
}
.slider__btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(124, 156, 255, 0.28);
}
.slider__btn:active {
  transform: translateY(1px);
}

.slider__viewport {
  overflow: hidden;
  border-radius: var(--radius);
}
.slider__track {
  display: flex;
  gap: 12px;
  transition: transform 320ms ease;
  will-change: transform;
}

.side-card {
  min-width: 78%;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.side-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 223, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}
.side-card__title {
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.side-card__desc {
  margin: 0 0 10px;
  color: var(--muted);
}
.side-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Hobbies ---------- */
.hobby-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.hobby {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.hobby:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 156, 255, 0.30);
  background: rgba(255, 255, 255, 0.06);
}
.hobby__title {
  margin: 0 0 6px;
  font-weight: 800;
}
.hobby__desc {
  margin: 0;
  color: var(--muted);
}

.cta {
  margin-top: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(124, 156, 255, 0.18);
  background: rgba(124, 156, 255, 0.08);
  padding: 14px;
  display: grid;
  gap: 12px;
  align-items: center;
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 26px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(11, 15, 23, 0.35);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer__left,
.footer__right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}
.muted {
  color: var(--muted);
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.05);
}
.scroll-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(124, 156, 255, 0.9), rgba(0, 223, 255, 0.9));
  box-shadow: 0 0 20px rgba(124, 156, 255, 0.35);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 520ms ease, transform 520ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 20, 32, 0.92);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 60;
}
.toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* ---------- Terminal Mode ---------- */
.terminal {
  position: fixed;
  inset: 0;
  background: #06080d;
  color: rgba(210, 255, 210, 0.92);
  display: none;
  z-index: 100;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.terminal.is-open {
  display: grid;
  grid-template-rows: auto 1fr;
}

.terminal__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(120, 255, 120, 0.14);
  background: rgba(8, 10, 14, 0.92);
}

.terminal__dots {
  display: flex;
  gap: 6px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  opacity: 0.9;
}
.dot--red { background: #ff5f56; }
.dot--yellow { background: #ffbd2e; }
.dot--green { background: #27c93f; }

.terminal__title {
  color: rgba(210, 255, 210, 0.75);
  font-size: 0.95rem;
}

.terminal__body {
  padding: 14px 12px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
}

.terminal__output {
  overflow: auto;
  padding-right: 8px;
}

.terminal__line {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 6px;
  color: rgba(210, 255, 210, 0.92);
}
.terminal__line--muted {
  color: rgba(210, 255, 210, 0.70);
}
.terminal__line--error {
  color: rgba(255, 120, 120, 0.92);
}

.terminal__prompt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(120, 255, 120, 0.12);
}

.terminal__ps1 {
  color: rgba(120, 255, 120, 0.90);
}
.terminal__input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(210, 255, 210, 0.92);
  caret-color: rgba(120, 255, 120, 0.95);
}

/* Hide main when terminal open */
body.is-terminal main,
body.is-terminal header,
body.is-terminal .scroll-progress,
body.is-terminal .toast {
  display: none;
}

/* ---------- Responsive ---------- */
@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .hero__grid {
    grid-template-columns: 1.25fr 0.85fr;
    gap: 22px;
    align-items: start;
  }

  .hero__name {
    font-size: 2.35rem;
  }

  .mini-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .journey {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 18px;
    align-items: start;
  }

  .station-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .side-card {
    min-width: 48%;
  }

  .hobby-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta {
    grid-template-columns: 1fr auto;
  }

  .footer__inner {
    flex-direction: row;
    align-items: center;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  .reveal {
    transition: none;
    transform: none;
  }

  .slider__track {
    transition: none;
  }

  .btn,
  .pill,
  .mini-card,
  .timeline-item,
  .station,
  .link,
  .skill-pill,
  .lang-card,
  .hobby {
    transition: none;
  }
}

/* --- Print-only CV --- */
.print-only {
  display: none;
}

.print-cv {
  padding: 0;
}

/* Browser -> "Save as PDF" */
@media print {
  @page { margin: 14mm; }

  /* Hide the normal website */
  header,
  footer,
  .scroll-progress,
  .toast,
  .hero__fade,
  .slider,
  .slider__btn {
    display: none !important;
  }

  main > section:not(.print-only) {
    display: none !important;
  }

  /* Show printable CV */
  .print-only {
    display: block !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* CV Typography */
  .print-cv {
    font-family: ui-sans-serif, system-ui, Arial, sans-serif;
    color: #000;
  }

  .print-cv h1 {
    margin: 0 0 4mm 0;
    font-size: 22pt;
    letter-spacing: -0.02em;
  }

  .print-cv .cv-subtitle {
    margin: 0 0 6mm 0;
    font-size: 11pt;
    color: #222;
  }

  .print-cv h2 {
    margin: 7mm 0 3mm;
    font-size: 12pt;
    border-bottom: 1px solid #ddd;
    padding-bottom: 2mm;
  }

  .print-cv .cv-grid {
    display: grid;
    grid-template-columns: 28mm 1fr;
    gap: 6mm;
    align-items: start;
  }

  .print-cv .cv-photo {
    width: 28mm;
    height: 28mm;
    border-radius: 6mm;
    overflow: hidden;
    border: 1px solid #ddd;
  }

  .print-cv .cv-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .print-cv .cv-meta {
    font-size: 10.5pt;
    color: #111;
  }

  .print-cv ul {
    margin: 2mm 0 0 0;
    padding-left: 4mm;
  }

  html[dir="rtl"] .print-cv ul {
    padding-left: 0;
    padding-right: 4mm;
  }

  .print-cv .cv-small {
    font-size: 9.5pt;
    color: #222;
  }

  /* Print URLs for anchors if you add them later */
  .print-cv a::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }
}
