:root {
  --bg: #0c0f14;
  --bg-2: #10141b;
  --card-side: #161b23;
  --card-main: #0f1319;
  --line: rgba(255, 255, 255, 0.07);
  --text: #eef2f6;
  --muted: #8b97a6;
  --muted-2: #64707e;
  --accent: #0a9640;
  --accent-2: #80ae91;
  --accent-soft: #36d42124;
  --radius: 22px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
}

/* :root {
  --bg: #0c0f14;
  --bg-2: #10141b;
  --card-side: #161b23;
  --card-main: #0f1319;
  --line: rgba(255, 255, 255, 0.07);
  --text: #eef2f6;
  --muted: #8b97a6;
  --muted-2: #64707e;
  --accent: #21d4c4;
  --accent-2: #0fb4d4;
  --accent-soft: rgba(33, 212, 196, 0.14);
  --radius: 22px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
} */


* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Plus Jakarta Sans", "Vazirmatn", system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 85% -10%, #14202b 0%, transparent 55%),
    radial-gradient(900px 500px at 0% 110%, #121a22 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

html[dir="rtl"] body {
  font-family: "Vazirmatn", "Plus Jakarta Sans", system-ui, sans-serif;
}

/* ---------- Decorative background ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.25;
}
.blob-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: radial-gradient(
    circle at 30% 30%,
    var(--accent),
    transparent 65%
  );
}
.blob-2 {
  width: 360px;
  height: 360px;
  bottom: -120px;
  left: -100px;
  background: radial-gradient(
    circle at 60% 40%,
    var(--accent-2),
    transparent 65%
  );
  opacity: 0.18;
}
.dots {
  position: absolute;
  width: 150px;
  height: 150px;
  top: 40px;
  left: 40px;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.18) 1.5px,
    transparent 1.5px
  );
  background-size: 16px 16px;
  opacity: 0.4;
}

/* ---------- Language toggle ---------- */
.lang-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    background 0.25s,
    transform 0.25s;
}
html[dir="rtl"] .lang-toggle {
  right: auto;
  left: 20px;
}
.lang-toggle:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ---------- Layout ---------- */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.resume-shell {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 1080px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 620px;
}

/* ---------- Side card ---------- */
.card-side {
  flex: 0 0 320px;
  background: var(--card-side);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 42px 28px 22px;
  border-right: 1px solid var(--line);
}
html[dir="rtl"] .card-side {
  border-right: none;
  border-left: 1px solid var(--line);
}
.side-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.avatar-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 22px;
}
.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
}
.avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    var(--accent),
    var(--accent-2),
    transparent 70%
  );
  opacity: 0.55;
  animation: spin 8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.side-name {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.5px;
}
.side-role {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.side-socials {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0 0 26px;
}
.side-socials a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 15px;
  text-decoration: none;
  transition: all 0.25s;
}
.side-socials a:hover {
  color: #06121a;
  background: var(--accent);
  transform: translateY(-3px);
  border-color: transparent;
}

.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 30px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  transition: all 0.25s;
}
.btn-cv:hover {
  background: var(--accent);
  color: #06121a;
  box-shadow: 0 10px 30px -10px var(--accent);
}

.side-copy {
  color: var(--muted-2);
  font-size: 12px;
  margin: 24px 0 0;
  text-align: center;
}

/* ---------- Main card / panels ---------- */
.card-main {
  flex: 1;
  background: var(--card-main);
  position: relative;
  min-width: 0;
}
.panel-viewport {
  position: relative;
  height: 100%;
  min-height: 620px;
}

.panel {
  position: absolute;
  inset: 0;
  padding: 54px 52px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.985);
  transition:
    opacity 0.5s ease,
    transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.panel::-webkit-scrollbar {
  width: 8px;
}
.panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

/* stagger children on activate */
.panel.is-active > * {
  animation: rise 0.6s both;
}
.panel.is-active > *:nth-child(2) {
  animation-delay: 0.06s;
}
.panel.is-active > *:nth-child(3) {
  animation-delay: 0.12s;
}
.panel.is-active > *:nth-child(4) {
  animation-delay: 0.18s;
}
.panel.is-active > *:nth-child(5) {
  animation-delay: 0.24s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.panel-head {
  margin-bottom: 26px;
}
.panel-head h2 {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}
.head-line {
  display: block;
  width: 54px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

.lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 60ch;
  text-align: justify;
}
.sub-title {
  font-size: 16px;
  font-weight: 600;
  margin: 30px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-title i {
  color: var(--accent);
}

.info-v-email-call{
  text-decoration: none;
  color: var(--muted);
}

/* ---------- Home ---------- */
.home-inner {
  max-width: 32ch;
  margin-top: 40px;
}
.home-hello {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 13px;
  margin: 0 0 10px;
}
.home-name {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -1.5px;
  line-height: 1;
}
.home-typed {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--text);
}
.typed-word {
  color: var(--accent);
  border-right: 2px solid var(--accent);
  padding-right: 2px;
}
html[dir="rtl"] .typed-word {
  border-right: none;
  border-left: 2px solid var(--accent);
  padding-right: 0;
  padding-left: 2px;
}
.home-lead {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
  margin: 0 0 28px;
}
.home-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-ghost {
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: 999px;
  transition: all 0.25s;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #06121a;
}
.btn-primary:hover {
  box-shadow: 0 12px 30px -10px var(--accent);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- About ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.info-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14px;
}
.info-k {
  color: var(--muted-2);
}
.info-v {
  font-weight: 600;
}
.info-v-email{
  text-decoration: none;
  color: #fff;
}
.skills {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.skill-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 7px;
  color: var(--muted);
}
.bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 1s ease;
}
.panel.is-active .bar i {
  width: var(--w);
}

/* ---------- Resume timeline ---------- */
.timeline {
  position: relative;
  padding-left: 26px;
}
html[dir="rtl"] .timeline {
  padding-left: 0;
  padding-right: 26px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
html[dir="rtl"] .timeline::before {
  left: auto;
  right: 6px;
}
.tl-item {
  position: relative;
  padding-bottom: 22px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card-main);
  border: 2px solid var(--accent);
}
html[dir="rtl"] .tl-item::before {
  left: auto;
  right: -26px;
}
.tl-date {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.tl-item h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}
.tl-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Portfolio ---------- */
/* .work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.work {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 130px;
  padding: 18px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(160deg, #1b2531, #131922);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: all 0.3s;
}
.work::after {
  content: "→";
  position: absolute;
  top: 16px;
  right: 18px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.3s;
}
html[dir="rtl"] .work::after {
  content: "←";
  right: auto;
  left: 18px;
}
.work:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
.work:hover::after {
  opacity: 1;
  transform: none;
}
.work-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.work h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
} */


/* ---------- Portfolio ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: start;
}
.work {
  grid-column: span 1;
  border-radius: 16px;
  background: linear-gradient(160deg, #1b2531, #131922);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, grid-column 0.2s;
}
.work.active {
  grid-column: 1 / -1;
  border-color: var(--accent);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

.work-head {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 130px;
  padding: 18px;
  box-sizing: border-box;
}
.work-head-text { display: flex; flex-direction: column; }
.work-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.work-head h4 { margin: 0; font-size: 17px; font-weight: 600; }

.work-icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 16px;
  transition: transform 0.3s, background 0.3s, border-color 0.3s;
}
.work.active .work-icon {
  transform: rotate(45deg);
  background: var(--accent);
  color: #0d1218;
  border-color: var(--accent);
}
.work:not(.active) .work-head:hover .work-icon { border-color: var(--accent); }

.work-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.work-body-inner {
  padding: 0 18px 20px;
  border-top: 1px solid var(--line);
  margin-top: -1px;
}
.work-desc {
  color: var(--muted, #8a97a6);
  font-size: 14px;
  line-height: 1.7;
  margin: 14px 0 16px;
}

/* scrollable image gallery */
.work-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
.work-gallery::-webkit-scrollbar { height: 6px; }
.work-gallery::-webkit-scrollbar-track { background: transparent; }
.work-gallery::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.work-gallery:hover::-webkit-scrollbar-thumb { background: var(--accent); }

.thumb {
  flex: 0 0 auto;
  width: 300px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(61, 220, 132, 0.14), rgba(61, 220, 132, 0) 60%), #10151d;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #8a97a6);
  font-size: 11px;
  overflow: hidden;
  scroll-snap-align: start;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.work-link:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; }
  .thumb { width: 130px; }
}

/* ---------- Video portfolio item (click-to-play, scrolls horizontally like .work-gallery) ---------- */
.video-showcase {
  position: relative;
  flex: 0 0 auto;
  width: 380px;
  max-width: 90vw;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #10151d;
  cursor: pointer;
  scroll-snap-align: start;
}
.video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
}
.video-showcase:hover .video-poster {
  transform: scale(1.03);
  filter: brightness(0.85);
}
.video-play-btn {
  all: unset;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #0d1218;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.65);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.video-play-btn i { margin-inline-start: 3px; }
.video-showcase:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.08);
}
.video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  background: #000;
}
.video-showcase.is-playing { cursor: default; }
.video-showcase.is-playing .video-poster,
.video-showcase.is-playing .video-play-btn {
  display: none;
}
.video-showcase.is-playing .video-player { display: block; }

@media (max-width: 560px) {
  .video-showcase { width: 240px; }
  .video-play-btn { width: 52px; height: 52px; font-size: 20px; }
}

/* ---------- Video download button ---------- */
.video-download-btn {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: rgba(13, 18, 24, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text, #fff);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0.92;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease,
    transform 0.25s ease, opacity 0.25s ease;
}
.video-download-btn i {
  font-size: 14px;
  color: var(--accent);
  transition: color 0.25s ease;
}
.video-download-btn:hover,
.video-download-btn:focus-visible {
  background: var(--accent);
  color: #06121a;
  box-shadow: 0 10px 24px -8px var(--accent);
  opacity: 1;
  transform: translateY(-1px);
}
.video-download-btn:hover i,
.video-download-btn:focus-visible i {
  color: #06121a;
}
.video-showcase.is-playing .video-download-btn {
  top: 10px;
}

@media (max-width: 560px) {
  .video-download-btn {
    padding: 8px;
    gap: 0;
  }
  .video-download-btn i { font-size: 15px; }
  .video-download-btn span { display: none; }
}

/* only real photos are zoomable, the numbered placeholders aren't */
.thumb img { cursor: zoom-in; transition: transform 0.3s ease; }
.thumb img:hover { transform: scale(1.04); }

/* ---------- Image Lightbox (click a thumbnail to enlarge) ---------- */
body.lightbox-open { overflow: hidden; }

.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.img-lightbox.is-open { display: flex; }

.img-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 14, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.img-lightbox.is-open .img-lightbox-backdrop { opacity: 1; }

.img-lightbox-img {
  position: relative;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.8);
  object-fit: contain;
  background: #10151d;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.05), opacity 0.3s ease;
}
.img-lightbox.is-open .img-lightbox-img {
  transform: scale(1);
  opacity: 1;
}

.img-lightbox-close {
  position: fixed;
  top: 22px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.35s, background 0.3s, border-color 0.3s, color 0.3s;
}
.img-lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: rotate(90deg);
}
html[dir="rtl"] .img-lightbox-close { right: auto; left: 22px; }

@media (max-width: 640px) {
  .img-lightbox { padding: 16px; }
  .img-lightbox-img { max-width: 96vw; max-height: 80vh; }
  .img-lightbox-close { top: 14px; right: 14px; }
  html[dir="rtl"] .img-lightbox-close { left: 14px; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ci {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.ci i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
  flex: none;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-form input,
.contact-form textarea {
  font-family: inherit;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--text);
  font-size: 14px;
  resize: vertical;
  transition: border 0.25s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form .btn-primary {
  align-self: flex-start;
}
.form-note {
  color: var(--accent);
  font-size: 14px;
  margin: 4px 0 0;
}

/* ---------- Icon rail ---------- */
.rail {
  flex: 0 0 74px;
  background: var(--card-side);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 0;
}
html[dir="rtl"] .rail {
  border-left: none;
  border-right: 1px solid var(--line);
}
.rail-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 19px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.28s;
}
.rail-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.rail-btn.is-active {
  color: #06121a;
  background: var(--accent);
  box-shadow: 0 10px 24px -8px var(--accent);
}
.rail-tip {
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: #05080c;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  border: 1px solid var(--line);
}
html[dir="rtl"] .rail-tip {
  right: auto;
  left: 56px;
  transform: translateY(-50%) translateX(-6px);
}
.rail-btn:hover .rail-tip {
  opacity: 1;
  transform: translateY(-50%);
}

.phon{
  text-decoration: none;
    color: var(--muted);
}
    /* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .resume-shell {
    flex-wrap: wrap;
    min-height: auto;
  }
  .card-side {
    flex: 1 1 100%;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 40px 28px 30px;
  }
  html[dir="rtl"] .card-side {
    border-left: none;
  }
  .card-main {
    flex: 1 1 calc(100% - 74px);
    order: 3;
  }
  .rail {
    flex: 0 0 74px;
    order: 2;
    flex-direction: column;
    border-left: 1px solid var(--line);
  }
  .panel-viewport {
    min-height: 520px;
  }
  .panel {
    position: relative;
    inset: auto;
    min-height: 520px;
  }
  .panel:not(.is-active) {
    display: none;
  }
  .panel.is-active {
    position: relative;
  }
}

@media (max-width: 620px) {
  .stage {
    padding: 0;
  }
  .resume-shell {
    border-radius: 0;
    border: none;
    min-height: 100dvh;
  }
  .card-main {
    flex: 1 1 100%;
    order: 2;
  }
  .rail {
    order: 3;
    flex: 1 1 100%;
    flex-direction: row;
    justify-content: space-around;
    border: none;
    border-top: 1px solid var(--line);
    padding: 10px 6px;
    position: sticky;
    bottom: 0;
    background: var(--card-side);
    z-index: 5;
  }
  html[dir="rtl"] .rail {
    border-right: none;
  }
  .rail-tip {
    display: none;
  }
  .panel {
    padding: 36px 22px;
    min-height: auto;
  }
  .panel-viewport {
    min-height: auto;
  }
  .info-grid,
  .work-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .panel-head h2 {
    font-size: 26px;
  }
  .home-inner {
    margin-top: 8px;
  }
  .lang-toggle {
    top: 14px;
  }
  html[dir="rtl"] .lang-toggle {
    left: 14px;
  }
}