/* ============================================================================
   portfolio.css — styles for the public portfolio site
   (sujonmir.com and sujonmir.space/portfolio).
   Dark "terminal" aesthetic, converted from the Claude design.
   ============================================================================ */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  /* Column layout so the footer is pushed to the bottom of the viewport even
     when a page (e.g. Contact) doesn't have enough content to fill the screen. */
  display: flex;
  flex-direction: column;
  background-color: #0a0a0b;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  color: #ededed;
  font-family:
    "Space Grotesk",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Main grows to fill leftover height → footer sits at the bottom on short pages.
   width:100% is REQUIRED: as a flex item, main's `margin:0 auto` would otherwise
   size it to max-content (1160px) and overflow the viewport on mobile. */
main {
  flex: 1 0 auto;
  width: 100%;
}
footer.ft {
  flex-shrink: 0;
}
:root {
  --accent: #f5f5f5;
}
::selection {
  background: #f5f5f5;
  color: #0a0a0b;
}
.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
a {
  color: inherit;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.fu {
  animation: fadeUp 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.caret {
  width: 8px;
  height: 16px;
  background: var(--accent);
  display: inline-block;
  margin-left: 4px;
  animation: blink 1.1s steps(1) infinite;
}
.caret.sm {
  height: 15px;
  vertical-align: -2px;
  margin-left: 3px;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(10, 10, 11, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  background: none;
  border: none;
  cursor: pointer;
  color: #ededed;
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
}
.brand .dollar {
  color: #6a6a72;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}
.nav-links a,
.nav-links button {
  background: none;
  border: none;
  cursor: pointer;
  color: #9a9aa2;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  transition:
    color 0.15s,
    background 0.15s;
}
.nav-links a:hover,
.nav-links button.navlink:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-links button.navlink.active {
  color: #fff;
}
.btn-cta {
  margin-left: 8px;
  background: #f5f5f5 !important;
  color: #0a0a0b !important;
  padding: 8px 16px !important;
  font-weight: 700;
  transition: opacity 0.15s !important;
}
.btn-cta:hover {
  opacity: 0.85;
  background: #f5f5f5 !important;
}
.nav-path {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #5a5a62;
}
.nav-path .host {
  color: #6a6a72;
}
.nav-path .pth {
  color: #8a8a92;
}
.nav-path .hint {
  opacity: 0.7;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ededed;
  border-radius: 7px;
  padding: 7px 10px;
  cursor: pointer;
}

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.page {
  display: none;
}
.page.active {
  display: block;
}

/* ── Buttons (shared) ─────────────────────────────────────────────────────── */
.btn {
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  border-radius: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  transition:
    opacity 0.15s,
    background 0.15s,
    border-color 0.15s;
}
.btn-solid {
  background: #f5f5f5;
  color: #0a0a0b;
  font-weight: 700;
  border: none;
}
.btn-solid:hover {
  opacity: 0.85;
}
.btn-outline {
  background: none;
  color: #ededed;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 500;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ── Home ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 72px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #b9b9c0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ededed;
  box-shadow: 0 0 0 3px rgba(237, 237, 237, 0.18);
}
.hero h1 {
  margin: 0 0 22px;
}
/* Small mono "eyebrow" carrying the name — first words of the H1 (helps ranking
   for the "Sujon Mir" query) while the tagline stays the visual headline. */
.hero h1 .hero-kicker {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: #9a9aa2;
  margin-bottom: 14px;
}
.hero h1 .hero-tagline {
  display: block;
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}
.hero .lead {
  font-size: 18px;
  line-height: 1.6;
  color: #a6a6ae;
  max-width: 30em;
  margin: 0 0 16px;
}
.hero .who {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #6a6a72;
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.terminal {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(180deg, #131316, #0d0d10);
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.terminal-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2c2c30;
}
.terminal-bar .fname {
  margin-left: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #5a5a62;
}
.terminal-body {
  padding: 22px 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.85;
  color: #c8c8d0;
}
.terminal-body .kw {
  color: #6a6a72;
}
.terminal-body .nm {
  color: #fff;
}
.terminal-body .pr {
  color: #8a8a92;
}
.terminal-body .st {
  color: #ededed;
}
.terminal-body .ind {
  padding-left: 20px;
}
.terminal-body .run {
  margin-top: 12px;
  color: #6a6a72;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 64px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}
.stat {
  background: #0c0c0f;
  padding: 24px 22px;
}
.stat .n {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.stat .l {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #7a7a82;
  margin-top: 4px;
}

.marquee {
  margin: 24px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding: 18px 0;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: #7a7a82;
}
.marquee-track .grp {
  display: flex;
  gap: 34px;
  padding-right: 34px;
}
.marquee-track .sep {
  color: #3a3a40;
}

.sec {
  padding: 56px 0;
}
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.sec-title {
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  color: #7a7a82;
  margin: 0;
  letter-spacing: 0.04em;
}
.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #9a9aa2;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  transition: color 0.15s;
}
.link-btn:hover {
  color: #fff;
}

.cards3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feat-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: #0d0d10;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.feat-card:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-3px);
}
.feat-shot {
  aspect-ratio: 16/10;
  background-image: repeating-linear-gradient(
    135deg,
    #161619 0 10px,
    #101013 10px 20px
  );
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.feat-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}
.feat-shot .tag {
  position: relative;
  z-index: 1;
}
.feat-shot .tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #5a5a62;
}
.feat-card .meta {
  padding: 16px;
}
.feat-card .meta .nm {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.feat-card .meta .ty {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #7a7a82;
  margin-top: 6px;
}

.tcards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tcard {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #0d0d10;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tcard .q {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  color: #3a3a40;
  line-height: 1;
}
.tcard blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #c8c8d0;
}
.tcard figcaption {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #7a7a82;
  margin-top: auto;
}

/* ── Work ─────────────────────────────────────────────────────────────────── */
.page-h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 12px;
}
.page-intro {
  font-size: 16px;
  color: #a6a6ae;
  max-width: 36em;
  margin: 0 0 32px;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}
.filter {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  color: #cfcfd6;
  padding: 8px 14px;
  border-radius: 7px;
  font-family: inherit;
  font-size: inherit;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.filter:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.4);
}
.filter.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.work-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  background: #0d0d10;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}
.work-card:hover {
  border-color: rgba(255, 255, 255, 0.26);
}
.work-shot {
  aspect-ratio: 16/9;
  background-image: repeating-linear-gradient(
    135deg,
    #161619 0 11px,
    #101013 11px 22px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.work-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}
.work-shot .ph,
.work-shot .n {
  position: relative;
  z-index: 1;
}
.work-shot .ph {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #55555c;
  border: 1px dashed #2e2e34;
  padding: 6px 12px;
  border-radius: 6px;
}
.work-shot .n {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #6a6a72;
}
.work-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.work-body .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.work-body h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.work-body .type {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #0a0a0b;
  background: #cfcfd6;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.work-body p {
  font-size: 14px;
  line-height: 1.6;
  color: #a0a0a8;
  margin: 0;
}
.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.tech span {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #8a8a92;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 100px;
}
.visit {
  margin-top: auto;
  align-self: flex-start;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: #ededed;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 2px;
  transition: border-color 0.15s;
}
.visit:hover {
  border-color: #fff;
}

/* ── About ────────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
}
.about-grid p {
  font-size: 16px;
  line-height: 1.7;
  color: #9c9ca4;
  margin: 0 0 18px;
}
.about-grid p.big {
  font-size: 18px;
  color: #c2c2ca;
}
.how {
  display: grid;
  gap: 12px;
}
.how-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.how-row .num {
  font-family: "JetBrains Mono", monospace;
  color: #5a5a62;
  font-size: 13px;
  margin-top: 2px;
}
.how-row p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #b4b4bc;
}
.facts {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #0d0d10;
  padding: 22px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 2;
  margin-bottom: 24px;
}
.facts .hd {
  color: #6a6a72;
  margin-bottom: 6px;
}
.facts .row {
  display: flex;
  justify-content: space-between;
}
.facts .row .k {
  color: #7a7a82;
}
.stack-group {
  margin-bottom: 18px;
}
.stack-group .gl {
  font-size: 13px;
  color: #cfcfd6;
  margin-bottom: 8px;
  font-weight: 600;
}
.stack-group .items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stack-group .items span {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #9a9aa2;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 9px;
  border-radius: 6px;
}

/* ── Services ─────────────────────────────────────────────────────────────── */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.svc {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #0d0d10;
  padding: 26px 22px;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.svc:hover {
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-3px);
}
.svc .n {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #5a5a62;
  margin-bottom: 18px;
}
.svc h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.svc p {
  font-size: 14px;
  line-height: 1.65;
  color: #9c9ca4;
  margin: 0;
}
.svc-cta {
  margin-top: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, #131316, #0d0d10);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.svc-cta h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.svc-cta p {
  font-size: 15px;
  color: #a0a0a8;
  margin: 0;
}

/* ── Contact ──────────────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: "JetBrains Mono", monospace;
}
.contact-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ededed;
  text-decoration: none;
  transition:
    padding 0.15s,
    color 0.15s;
}
.contact-list a:hover {
  padding-left: 12px;
  color: #fff;
}
.contact-list a .lbl {
  font-size: 14px;
}
.contact-list a .val {
  font-size: 13px;
  color: #9a9aa2;
}
.contact-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #0d0d10;
  padding: 28px;
}
.contact-card .hd {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #6a6a72;
  margin-bottom: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.field label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #9a9aa2;
}
.field input,
.field textarea {
  background: #08080a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 11px 13px;
  color: #ededed;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.field textarea {
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  border-color: rgba(255, 255, 255, 0.45);
}
.send-btn {
  background: #f5f5f5;
  color: #0a0a0b;
  border: none;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  padding: 13px;
  border-radius: 8px;
  transition: opacity 0.15s;
}
.send-btn:hover {
  opacity: 0.85;
}
.send-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.form-msg {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  margin-top: 4px;
  min-height: 1em;
}
.form-msg.ok {
  color: #7cfc9b;
}
.form-msg.err {
  color: #ff7b7b;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer.ft {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  margin-top: 24px;
}
/* Internal links to the dedicated SEO landing pages (crawl + relevance). */
.ft-specialties {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}
.ft-specialties .ft-sp-label {
  color: #6a6a72;
}
.ft-specialties a {
  color: #8a8a92;
  text-decoration: none;
  transition: color 0.15s;
}
.ft-specialties a:hover {
  color: #fff;
}
.ft-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 36px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #6a6a72;
}
.ft-links {
  display: flex;
  gap: 18px;
}
.ft-links a {
  color: #8a8a92;
  text-decoration: none;
  transition: color 0.15s;
}
.ft-links a:hover {
  color: #fff;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
/* Never let media break the layout horizontally. */
img,
svg,
video {
  max-width: 100%;
  height: auto;
}
* {
  min-width: 0;
}

/* Main-site nav toggle (logged-in users only) floats top-right on desktop; on
   mobile it moves to the bottom-right, stacked ABOVE the chat launcher so the two
   don't overlap. (#nav-open-btn comes from sidebar.css.) */
@media (max-width: 760px) {
  #nav-open-btn {
    top: auto !important;
    bottom: 90px !important;
    right: 18px !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.55) !important;
  }
}

/* Tablet & below */
@media (max-width: 860px) {
  main {
    padding: 0 20px;
  }
  .hero {
    padding: 48px 0 32px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 40px;
  }
  .cards3,
  .tcards,
  .svc-grid {
    grid-template-columns: 1fr;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .sec {
    padding: 44px 0;
  }
}

/* Collapse the inline nav into a toggle menu (covers small tablets too). */
@media (max-width: 760px) {
  .nav-inner {
    gap: 12px;
  }
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 10, 11, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 16px 16px;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a,
  .nav-links button {
    padding: 13px 8px;
    border-radius: 6px;
    text-align: left;
    width: 100%;
  }
  .btn-cta {
    margin-left: 0 !important;
    text-align: center;
  }
  .nav-toggle {
    display: inline-block;
  }
  .nav-path {
    display: none;
  }
}

/* Phones */
@media (max-width: 600px) {
  main {
    padding: 0 16px;
  }
  .hero {
    padding: 32px 0 24px;
  }
  .hero h1 {
    margin-bottom: 18px;
  }
  .hero h1 .hero-tagline {
    font-size: clamp(30px, 8vw, 44px);
  }
  .hero h1 .hero-kicker {
    font-size: 13px;
    margin-bottom: 10px;
  }
  .hero .lead {
    font-size: 16px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .terminal-body {
    font-size: 12px;
    padding: 18px 16px;
    line-height: 1.7;
  }
  .terminal-body .ind {
    padding-left: 14px;
  }
  .sec {
    padding: 36px 0;
  }
  .sec-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .work-body .top {
    flex-wrap: wrap;
  }
  .work-body .type {
    white-space: normal;
  }
  .svc-cta {
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .svc-cta .btn {
    width: 100%;
    text-align: center;
  }
  .contact-list a .val {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
    text-align: right;
  }
  .ft-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 28px 16px;
  }
}

/* Small phones */
@media (max-width: 400px) {
  .stats {
    gap: 1px;
  }
  .stat {
    padding: 18px 14px;
  }
  .stat .n {
    font-size: 28px;
  }
  .work-body,
  .svc {
    padding: 18px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

/* Web Care account button in the nav (far right, same look as "contact";
   see care-nav.js). Signed in → the name replaces "log in", with a green dot. */
.nav-links #careAuthLink.care-auth {
  margin-left: 8px;
}
.nav-links #careAuthLink.is-auth::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  margin-right: 7px;
  vertical-align: 1px;
}

/* ── Work lightbox (click a project shot) ─────────────────────────────────── */
.work-shot[data-lb] { cursor: zoom-in; }
#wlb { position: fixed; inset: 0; z-index: 1200; display: none; flex-direction: column; }
#wlb.open { display: flex; }
#wlb .wlb-bg { position: absolute; inset: 0; background: rgba(6, 6, 8, 0.94); backdrop-filter: blur(6px); }
#wlb .wlb-x, #wlb .wlb-nav {
  position: absolute; z-index: 3; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff; width: 44px; height: 44px; border-radius: 999px; cursor: pointer; padding: 0; line-height: 0;
  display: grid; place-items: center; transition: background 0.15s;
}
#wlb .wlb-x svg, #wlb .wlb-nav svg { display: block; }
#wlb .wlb-x:hover, #wlb .wlb-nav:hover { background: rgba(255, 255, 255, 0.16); }
#wlb .wlb-x { top: 16px; right: 16px; }
#wlb .wlb-nav { top: 50%; transform: translateY(-50%); }
#wlb .wlb-nav.prev { left: 16px; }
#wlb .wlb-nav.next { right: 16px; }
#wlb .wlb-count { position: absolute; z-index: 3; top: 26px; left: 20px; font-family: "JetBrains Mono", monospace; font-size: 12px; color: #8a8a92; }
#wlb .wlb-stage { position: relative; z-index: 2; flex: 1; min-height: 0; padding: 64px 76px 12px; }
#wlb .wlb-frame { position: relative; width: 100%; height: 100%; overflow: hidden; }
#wlb .wlb-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; will-change: transform; }
#wlb .wlb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); background: #0d0d10; cursor: zoom-in; }
#wlb .wlb-stage.zoomed .wlb-layer { overflow: auto; align-items: flex-start; justify-content: flex-start; scrollbar-width: thin; }
#wlb .wlb-stage.zoomed .wlb-img { flex: 0 0 auto; margin: auto; max-width: none; max-height: none; width: auto; height: auto; cursor: zoom-out; border-radius: 6px; }
#wlb .wlb-hint { position: absolute; z-index: 3; top: 26px; left: 50%; transform: translateX(-50%); font-family: "JetBrains Mono", monospace; font-size: 11px; color: #6a6a72; white-space: nowrap; }
body.wlb-open #muchat-launcher, body.wlb-open #muchat-panel { display: none !important; }
#wlb .wlb-info {
  position: relative; z-index: 2; flex: 0 0 auto; max-height: 38vh; overflow: auto;
  width: min(880px, calc(100% - 32px)); margin: 0 auto 18px; padding: 18px 20px;
  background: #0d0d10; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
#wlb .wlb-info .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#wlb .wlb-info h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
#wlb .wlb-info .type { font-family: "JetBrains Mono", monospace; font-size: 10px; color: #0a0a0b; background: #cfcfd6; padding: 4px 8px; border-radius: 5px; white-space: nowrap; }
#wlb .wlb-info p { font-size: 14px; line-height: 1.6; color: #a0a0a8; margin: 0; }
#wlb .wlb-info .tech { display: flex; flex-wrap: wrap; gap: 6px; }
#wlb .wlb-info .tech span { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: #8a8a92; border: 1px solid rgba(255, 255, 255, 0.12); padding: 3px 8px; border-radius: 999px; }
#wlb .wlb-info .visit { align-self: flex-start; font-family: "JetBrains Mono", monospace; font-size: 13px; color: #fff; text-decoration: none; border-bottom: 1px solid #fff; padding-bottom: 2px; }
#wlb .wlb-info .visit:hover { color: #cfcfd6; border-color: #cfcfd6; }
@media (max-width: 640px) {
  #wlb .wlb-stage { padding: 60px 12px 10px; }
  #wlb .wlb-nav { width: 38px; height: 38px; top: auto; bottom: 50vh; }
  #wlb .wlb-nav.prev { left: 8px; }
  #wlb .wlb-nav.next { right: 8px; }
  #wlb .wlb-info { max-height: 44vh; padding: 14px 16px; margin-bottom: 12px; }
  #wlb .wlb-hint { display: none; }
  #wlb .wlb-info h3 { font-size: 16px; }
}

/* ── Mobile nav = side drawer (≤760px): slides in from the right, 80% wide ── */
.nav-close { display: none; }
@media (max-width: 760px) {
  /* backdrop-filter would make the fixed drawer relative to the header */
  header.nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10, 10, 11, 0.97); }
  .nav-links, .nav-links.open {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    bottom: 0;
    width: min(80vw, 360px);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 64px 18px 24px;
    background: #0d0d10;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    box-shadow: -24px 0 48px rgba(0, 0, 0, 0.45);
    overflow-y: auto;
    z-index: 60;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.26, 1), visibility 0s linear 0.3s;
  }
  .nav-links.open {
    transform: none;
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.26, 1), visibility 0s;
  }
  .nav-links a,
  .nav-links button {
    font-size: 15px;
    padding: 14px 12px;
  }
  .nav-links .btn-cta,
  .nav-links #careAuthLink.care-auth {
    margin: 12px 0 0 !important;
    padding: 13px 16px !important;
    text-align: center;
    border-radius: 8px;
  }
  .nav-links .btn-cta + .btn-cta { margin-top: 10px !important; }
  .nav-close {
    display: block;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px !important;
    height: 38px;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 8px !important;
    color: #ededed !important;
    font-size: 20px !important;
    line-height: 1;
    text-align: center !important;
  }
  body.nav-drawer-open { overflow: hidden; }
  body.nav-drawer-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 49;
    animation: navFade 0.25s ease;
  }
}
@keyframes navFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nav-links, .nav-links.open { transition: none !important; } }

/* ── Products (own products: Sifra Chat, MaCare) ─────────────────────────────
   Left sidebar with one tab per product; on small screens the tabs become a
   row above the panel. The open tab is kept in ?product= (portfolio.js). */
.prod-wrap {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.prod-side {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prod-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #0d0d10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  color: #cfcfd6;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.prod-tab:hover { border-color: rgba(255, 255, 255, 0.28); }
.prod-tab.active {
  background: #151519;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.prod-tab img { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.prod-tab b { display: block; font-size: 15px; font-weight: 600; }
.prod-tab small {
  display: block;
  font-size: 12px;
  color: #8a8a92;
  margin-top: 2px;
}
.prod-main { min-width: 0; scroll-margin-top: 80px; }
.prod-panel[hidden] { display: none; }
.prod-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: #0d0d10;
  padding: 28px;
}
.prod-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.prod-head img { width: 52px; height: 52px; border-radius: 13px; }
.prod-head > div { flex: 1; min-width: 200px; }
.prod-head h3 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.prod-tag { margin: 4px 0 0; color: #a6a6ae; font-size: 15px; }
.prod-live {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #7ee2a8;
  border: 1px solid rgba(126, 226, 168, 0.3);
  border-radius: 100px;
  padding: 4px 10px;
  white-space: nowrap;
}
.prod-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 22px 0;
  background: #131316;
}
.prod-lead {
  font-size: 16px;
  line-height: 1.7;
  color: #c4c4cc;
  margin: 0 0 22px;
}
.prod-feats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.prod-feats > div {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  background: #0a0a0b;
}
.prod-feats b { font-size: 14px; font-weight: 600; }
.prod-feats p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #9c9ca4;
}
.prod-note {
  margin-top: 18px;
  font-size: 14px;
  color: #b4b4bc;
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  padding: 4px 0 4px 14px;
}
.prod-note a { margin-left: 6px; color: #fff; }
.prod-fine { margin: 16px 0 0; font-size: 12px; color: #7a7a82; }
.prod-cta {
  margin-top: 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #17171b, #111114);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.prod-cta h4 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.prod-cta p { margin: 0; font-size: 14px; color: #a0a0a8; }
.prod-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.prod-btns .btn { text-decoration: none; display: inline-block; }
.prod-care {
  margin-top: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 22px 24px;
}
.prod-care-k {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #7a7a82;
}
.prod-care h4 { margin: 8px 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.prod-care p { margin: 0 0 16px; font-size: 14px; line-height: 1.65; color: #a0a0a8; }
.prod-care.slim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
}
.prod-care.slim p { margin: 0; flex: 1; min-width: 220px; }
.prod-care.slim b { color: #ededed; }

/* Home: "my own products" teaser */
.prod-teasers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.prod-teaser {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #0d0d10;
  padding: 18px;
  transition: border-color 0.2s, transform 0.2s;
}
.prod-teaser:hover { border-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
.prod-teaser img { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.prod-teaser span { flex: 1; min-width: 0; }
.prod-teaser b { display: block; font-size: 16px; }
.prod-teaser small { display: block; font-size: 13px; color: #9c9ca4; margin-top: 3px; line-height: 1.5; }
.prod-teaser i { font-style: normal; color: #7a7a82; }

/* Work cards of own products: two links side by side */
.visit-row { margin-top: auto; display: flex; gap: 16px; flex-wrap: wrap; }
.visit-row .visit { margin-top: 0; }

@media (max-width: 860px) {
  .prod-wrap { grid-template-columns: 1fr; gap: 16px; }
  .prod-side {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .prod-side::-webkit-scrollbar { display: none; }
  .prod-tab { width: auto; flex: 1 0 auto; padding: 10px 12px; }
  .prod-tab small { display: none; }
  .prod-tab img { width: 28px; height: 28px; }
  .prod-panel { padding: 20px 16px; }
  .prod-feats { grid-template-columns: 1fr 1fr; }
  .prod-teasers { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .prod-feats { grid-template-columns: 1fr; }
  .prod-head h3 { font-size: 22px; }
  .prod-cta, .prod-care { padding: 18px 16px; }
  /* Phones: one full-width button per line (Sujon, 2026-10-09). */
  .prod-btns { width: 100%; flex-direction: column; }
  .prod-btns .btn { width: 100%; text-align: center; white-space: nowrap; }
}
