:root {
  --dark-background: #161616;
  --card-background: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #b1b1b1;
  --accent-glow: #ffffff;
  --gradient-border: linear-gradient(145deg, #fff 0%, #909090 100%);
  --sidebar-width: 280px;
  --border-radius: 20px;
  --spacing-unit: 1rem;
  --font-main: "Montserrat", sans-serif;
  --font-alt: "Vazirmatn", sans-serif;
  --font-code: "Consolas", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  width: 100%;
  font-family: var(--font-main);
  background-color: var(--dark-background);
  color: var(--text-primary);
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--card-background);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

body {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 100dvh;
  width: 100dvw;
}

.nav-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: var(--sidebar-width);
  height: 98dvh;
  margin: 1dvh;
  background: var(--gradient-border);
  background-size: 400% 400%;
  animation: gradientAnim 15s ease infinite;
  border-radius: var(--border-radius);
  flex-shrink: 0;
  z-index: 10;
}

.nav-side-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 97.3%;
  height: 99.5%;
  background: var(--dark-background);
  border-radius: calc(var(--border-radius) - 2px);
  padding: 2dvh 0;
}

.cv-avatar {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  flex-direction: column;
  align-content: center;
  align-items: center;

  margin-bottom: 1dvh;
}
.cv-image {
  width: 12dvh;
  height: 12dvh;
  border-radius: 50%;
  border: 3px solid var(--accent-glow);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  object-fit: cover;
}

.cv-info {
  text-align: center;
  margin-bottom: 0.5dvh;
}
.cv-name-text {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
}
.cv-job-text {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.cv-connect {
  display: flex;
  gap: 1.5dvh;
}
.cv-connect-item i {
  width: 2.5dvh;
  height: 2.5dvh;
  color: var(--text-primary);
  transition: transform 0.2s, color 0.2s;
  cursor: pointer;
}
.cv-connect-item:hover i {
  transform: scale(1.2);
  color: var(--accent-glow);
}

.cv-document {
  margin-top: 0.5rem;
}

.download-cv-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.download-cv-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.cv-buttons {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-top: 6dvh;
}

.cv-buttons-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  gap: 1.5dvh;
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 10px;
}
.cv-buttons-zone::-webkit-scrollbar {
  display: none;
}

.cv-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80%;
  padding: 1.2dvh;
  background: var(--card-background);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}
.cv-btn > :is(i,.svg-inline--fa) {
  width: 1.5dvh;
  height: 1.5dvh;
  margin-right: 10px;
}
.cv-btn:hover,
.cv-btn.active-btn {
  background: white;
  color: black;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.cv-login,
.copyright {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

.cv-login-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 14px;

  background: transparent;
  border: 1px solid var(--text-secondary);
  border-radius: 20px;

  color: white;
  text-decoration: none;
  font-size: 0.85rem;

  transition: all 0.25s ease;
}

.cv-login-button:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.06);
}

.cv-user-button {
  background: var(--card-background);
}

.cv-user-button img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cv-user-button span {
  font-weight: 500;
}

.copyright-text {
  font-size: 0.7rem;
  color: #666;
  padding: 10px;
}

.main-doc {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: row;
  align-content: center;
  width: 100%;
  height: 98dvh;
  margin: 1dvh 1dvh 1dvh 0;
  background: var(--gradient-border);
  background-size: 400% 400%;
  animation: gradientAnim 15s ease infinite;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

.cv-main-doc {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-content: center;
  justify-content: center;
  align-items: center;

  height: 99.5%;
  width: 99.5%;
  background: var(--dark-background);
  border-radius: calc(var(--border-radius) - 2px);

  overflow-y: auto;
  overflow-x: hidden;
}

.big-home {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 96%;
  width: 96%;
  color: white;
}

.cv-big-home-title {
  font-family: var(--font-code);
  font-size: 4dvh;
  margin-bottom: 2dvh;
  white-space: nowrap;
}

.cv-big-home-main {
  font-family: var(--font-code);
  font-size: 2dvh;
  line-height: 1.6;
  background: #1a1a1a;
  padding: 2dvh;
  border-radius: 10px;
  border-left: 3px solid var(--accent-glow);
  margin-bottom: 2dvh;
  flex-grow: 1;
  overflow-y: auto;
  max-height: max-content;
}

.cv-modern-picture {
  height: 20dvh;
  display: flex;
  justify-content: center;
  position: relative;
}
.cv-modern-img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.big-resume {
  display: flex;
  flex-direction: row;
  align-content: center;
  align-items: center;
  justify-content: center;

  gap: 3dvh;

  padding-bottom: 5dvh;
  padding-top: 5dvh;

  width: 95%;
}
.cv-educperience,
.cv-right-body {
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 3dvh;
}

.cv-education,
.cv-experience,
.cv-skills,
.cv-certificates {
  background: var(--card-background);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 2dvh;
  max-width: 32rem;
}

.cv-edu-header,
.cv-exp-header,
.cv-skill-header,
.cv-cert-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1dvh;
  margin-bottom: 1.5dvh;
}
.cv-edu-titleImage,
.cv-skill-titleImage,
.cv-exp-titleImage {
  height: 3dvh;
  margin-right: 10px;
}
.cv-edu-titleText,
.cv-skill-titleText,
.cv-exp-titleText {
  font-size: 1.2rem;
  font-weight: 700;
}

.cv-edu-title,
.cv-exp-title,
.cv-skill-title {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: center;
}

.cv-edu-timeline,
.cv-exp-timeline {
  position: relative;
  padding-left: 20px;
}
.cv-edu-row,
.cv-exp-row {
  position: relative;
  margin-bottom: 2.5dvh;
}

.cv-exp-row {
  margin-left: 1dvw;
}
.cv-edu-circle,
.cv-exp-circle {
  position: absolute;
  left: -26px;
  top: 5px;
  width: 12px;
  height: 12px;
  background: var(--dark-background);
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 8px white;
}
.cv-exp-circle {
  left: -40px;
  top: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222;
}
.cv-exp-img {
  width: 15px;
  height: 15px;
}
.cv-edu-date,
.cv-exp-date {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 5px;
  display: block;
}
.cv-edu-name,
.cv-exp-name {
  font-size: 1rem;
  font-weight: 600;
}
.cv-edu-field {
  font-weight: 400;
  font-size: 0.9rem;
  color: #ccc;
}

.cv-skill {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5dvh;
  justify-content: center;
}
.cv-skill-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
}

.cv-skill-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #fff, #666, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);

  animation: spin 2s infinite linear reverse;
}

.cv-skill-count {
  width: 50px;
  height: 50px;
  background: var(--dark-background);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;

  animation: spin-upright 2s infinite linear reverse;
}

.cv-skill-mainImage {
  width: 30px;
}

.cv-skill-name {
  margin-top: 10px;
  font-size: 0.9rem;
  text-align: center;
}

.big-projects {
  width: 100%;
}
.project-type {
  margin-bottom: 4dvh;
}
.project-type .title {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  margin-bottom: 2dvh;
  color: white;
}
.project-type .title img {
  height: 4dvh;
  margin-right: 10px;
}

.project-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2dvh;
}
.row {
  display: flex;
  flex-direction: column;
  background: var(--card-background);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1.5dvh;
  text-decoration: none;
  transition: transform 0.2s;
  color: white;
}
.row:hover {
  transform: translateY(-5px);
  border-color: white;
}
.project-img {
  width: 100%;
  height: 15dvh;
  background: #000;
  border-radius: 10px;
  margin-bottom: 1dvh;
  overflow: hidden;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5dvh;
}
.project-status {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
}
.status-icon {
  width: 1.5dvh;
  height: 1.5dvh;
  margin-right: 8px;
}

.big-contact {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.cv-contact-section p {
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 4dvh;
  color: #ccc;
}

@media (max-width: 1050px) {
  body {
    flex-direction: column;
    justify-content: space-between;
    height: 100dvh;
    overflow: hidden;
    position: relative;
  }

  .nav-side {
    display: none;
  }

  .main-doc {
    width: 100dvw;
    height: 100%;
    margin-top: 10dvh;
    margin-bottom: 10dvh;
    border-radius: 0;
    order: 2;
    background: var(--dark-background);
    border: none;
  }
  .cv-main-doc {
    border-radius: 0;
  }

  .m-top-navbar {
    display: flex;
    height: 11dvh;
    width: 100dvw;
    background: var(--gradient-border);
    background-size: 400% 400%;
    animation: gradientAnim 15s ease infinite;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  }

  .m-top-navbar-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 97.3%;
    width: 99.5%;
    padding: 0 3dvw;
    background: rgba(22, 22, 22, 0.9);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
  }

  .m-top-navbar-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    width: 100%;
  }
  .cv-info {
    padding: 0;
    line-height: 1.2;
  }
  .cv-name-text {
    font-size: 2dvh;
  }
  .cv-job-text {
    font-size: 1.5dvh;

    margin-bottom: 0;
    margin-top: 0.3rem;
  }

  .cv-connect {
    margin-top: 0.5dvh;
    justify-content: flex-start;
  }
  .cv-connect-item i {
    width: 2.2dvh;
    height: 2.2dvh;
  }

  .m-top-navbar-avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .m-top-navbar-avatar .cv-image {
    width: 7dvh;
    height: 7dvh;
    margin-right: 1dvh;
  }

  .download-cv-btn {
    position: absolute;

    bottom: 0;
    left: 44%;
    transform: translate(-50%, 50%);

    padding: 5px 10px;
    font-size: 1.5dvh;

    background: var(--card-background);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .download-cv-btn .cv-btn-text {
    display: none;
  }

  .m-navbar {
    display: flex;
    height: 9dvh;
    width: 100dvw;
    background: var(--gradient-border);
    background-size: 400% 400%;
    animation: gradientAnim 15s ease infinite;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    order: 3;
  }

  .cv-mb-buttons {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-content: center;

    width: 99.5%;
    height: 97.3%;
    background: rgba(22, 22, 22, 0.95);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }

  .cv-mb-btn {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    transition: 0.3s;
    font-size: 1.5dvh;
  }
  .cv-mb-btn > :is(i,.svg-inline--fa) {
    width: 2.5dvh;
    height: 2.5dvh;
    margin-bottom: 2px;
  }

  .cv-mb-active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
  }
  .cv-mb-right {
    border-top-left-radius: 20px;
  }
  .cv-mb-left {
    border-top-right-radius: 20px;
  }

  .cv-big-home-titleText {
    font-size: 3dvh;
  }
  .cv-big-home-main {
    font-size: 1.8dvh;
  }
  .cv-modern-img {
    height: 15dvh;
  }

  .cv-educperience {
    flex-direction: column;
  }
  .cv-edu-body,
  .cv-exp-body {
    margin-left: 2dvh;
  }
  .cv-edu-name {
    width: 100%;
  }

  .cv-contact-section {
    padding-bottom: 5dvh;
  }

  .cv-login-button {
    padding: 5px 10px;
    font-size: 1.5dvh;
    margin: 0;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .cv-user-button {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;

    text-align: center;

    padding: 0;
    margin: 0;

    padding-top: 0.4rem;
    padding-bottom: 0.4rem;

    width: 5.5rem;
  }

  .cv-user-button span {
    font-size: 0.5rem;
  }

  .cv-user-button img {
    width: 33px;
    height: 33px;
  }

  .cv-main-doc {
    justify-content: unset;
  }

  .big-resume {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;

    width: 90%;
  }
  .big-home {
    margin-top: 1rem;
    width: 95%;
    height: unset;
  }
}

.m-top-navbar,
.m-navbar {
  display: none;
}
@media (max-width: 1050px) {
  .m-top-navbar,
  .m-navbar {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

@keyframes gradientAnim {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-upright {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

/* ==========================================================
   2026 Home refresh + bilingual language control
   Keeps the existing desktop/mobile shell intact.
   ========================================================== */
.site-language-switch {
  position: fixed;
  z-index: 1200;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(12,12,16,.78);
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-language-switch span {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,.15);
}
.site-language-switch a {
  min-width: 34px;
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(255,255,255,.62);
  text-decoration: none;
  text-align: center;
  font: 700 12px/1 var(--font-code);
  transition: .18s ease;
}
.site-language-switch a:hover,
.site-language-switch a.is-active {
  color: #fff;
  background: rgba(255,255,255,.10);
}
.lang-fa {
  --font-main: "Vazirmatn", Tahoma, Arial, sans-serif;
  --font-code: "Vazirmatn", Tahoma, Arial, sans-serif;
}
.lang-fa .main-doc,
.lang-fa .cv-buttons-zone,
.lang-fa .m-navbar,
.lang-fa .m-top-navbar { direction: rtl; }
.lang-fa .nav-side { direction: ltr; }
.lang-fa .nav-side .cv-info,
.lang-fa .nav-side .cv-buttons { direction: rtl; }

.home-v2 {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  align-items: center;
  gap: clamp(24px, 4vw, 68px);
  width: min(1180px, 94%);
  height: auto;
  min-height: min(680px, 88vh);
  padding: clamp(32px, 5vw, 72px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(247,0,255,.11), transparent 31%),
    radial-gradient(circle at 82% 66%, rgba(79,176,255,.09), transparent 30%),
    rgba(15,15,20,.72);
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
}
.home-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 90%);
}
.home-intro { position: relative; z-index: 2; min-width: 0; }
.home-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin-bottom: 22px;
  padding: 9px 13px;
  border: 1px solid rgba(124,255,193,.16);
  border-radius: 999px;
  background: rgba(124,255,193,.055);
  color: rgba(226,255,242,.78);
  font: 600 clamp(11px, 1vw, 13px)/1.25 var(--font-main);
}
.home-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7cffc1;
  box-shadow: 0 0 0 5px rgba(124,255,193,.08), 0 0 14px rgba(124,255,193,.45);
}
.home-kicker {
  margin-bottom: 13px;
  color: rgba(255,255,255,.46);
  font: 700 clamp(11px, 1vw, 13px)/1.4 var(--font-code);
  letter-spacing: .16em;
}
.home-title {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-family: var(--font-main);
  font-size: clamp(40px, 5.4vw, 78px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.lang-fa .home-title {
  font-size: clamp(38px, 4.7vw, 68px);
  line-height: 1.35;
  letter-spacing: 0;
}
.home-caret {
  display: inline-block;
  width: .085em;
  height: .85em;
  margin-inline-start: .08em;
  vertical-align: -.03em;
  border-radius: 4px;
  background: var(--accent-glow, #f700ff);
  box-shadow: 0 0 16px rgba(247,0,255,.42);
  animation: homeCaretBlink 1.05s steps(1,end) infinite;
}
@keyframes homeCaretBlink { 0%,48% { opacity: 1 } 49%,100% { opacity: .12 } }
@media (prefers-reduced-motion: reduce) { .home-caret { animation: none; } }
.home-summary {
  max-width: 780px;
  margin: 25px 0 0;
  color: rgba(255,255,255,.68);
  font-family: var(--font-main);
  font-size: clamp(18px, 1.5vw, 23px);
  line-height: 1.85;
}
.lang-fa .home-summary { line-height: 2; }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.home-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 19px;
  border-radius: 13px;
  font-family: var(--font-main);
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.home-actions a:hover { transform: translateY(-2px); }
.home-primary-action {
  color: #0d0d10;
  background: #fff;
  border: 1px solid #fff;
}
.home-secondary-action {
  color: #fff;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.12);
}
.home-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.home-stack span {
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.48);
  background: rgba(255,255,255,.025);
  font: 600 11px/1 var(--font-code);
}
.home-visual {
  position: relative;
  z-index: 1;
  height: auto;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-visual .cv-modern-img {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  height: auto;
  max-height: 430px;
  object-fit: contain;
  filter: drop-shadow(0 24px 35px rgba(0,0,0,.35));
}
@media (max-width: 1050px) {
  .site-language-switch { top: 10px; }
  .home-v2 {
    grid-template-columns: 1fr;
    min-height: unset;
    margin: 70px auto 100px;
    padding: clamp(24px, 6vw, 46px);
    border-radius: 24px;
  }
  .home-visual { min-height: 220px; }
  .home-visual .cv-modern-img { max-height: 260px; }
}
@media (max-width: 560px) {
  .home-v2 { width: 92%; gap: 14px; padding: 24px 18px; }
  .home-title { font-size: clamp(34px, 10.8vw, 50px); }
  .lang-fa .home-title { font-size: clamp(31px, 9.5vw, 44px); }
  .home-summary { font-size: 17px; }
  .home-actions a { width: 100%; }
  .home-visual { min-height: 180px; }
}

/* ==========================================================
   2026-08-29 refinement: language dropdown, RTL geometry,
   full-surface home ambience and typewriter hero.
   ========================================================== */
.cv-btn > :is(i,.svg-inline--fa) {
  margin-right: 0;
  margin-inline-end: 10px;
  width: 1.5dvh;
  text-align: center;
}

.cv-login { margin-top: auto; }
.copyright { margin-top: 10px; }

.cv-language-select {
  width: 80%;
  margin: 10px auto 0;
  direction: ltr;
}
.cv-language-dropdown {
  position: relative;
  width: 100%;
  font-family: var(--font-main);
}
.cv-language-dropdown > summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  color: rgba(255,255,255,.88);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.cv-language-dropdown > summary::-webkit-details-marker { display: none; }
.cv-language-dropdown > summary:hover {
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.065);
  transform: translateY(-1px);
}
.cv-language-current {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.cv-language-current b {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .78rem;
  font-weight: 650;
}
.cv-language-flag { font-size: 1.15rem; line-height: 1; }
.cv-language-label { color: #777; font-size: .68rem; }
.cv-language-chevron {
  color: #8a8a8a;
  font-size: 1rem;
  transition: transform .18s ease;
}
.cv-language-dropdown[open] .cv-language-chevron { transform: rotate(180deg); }
.cv-language-menu {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(20,20,23,.98);
  box-shadow: 0 18px 45px rgba(0,0,0,.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.cv-language-menu a {
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) 18px;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 10px;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  font-size: .78rem;
  text-align: left;
}
.cv-language-menu a:hover,
.cv-language-menu a.is-active { background: rgba(255,255,255,.07); color: #fff; }
.cv-language-check { justify-self: end; color: #8dffbf; font-weight: 800; }
.lang-fa .cv-language-select { direction: rtl; }
.lang-fa .cv-language-menu a { text-align: right; }

.home-v2 {
  background: transparent;
  border-color: rgba(255,255,255,.07);
  box-shadow: none;
}
.home-v2::before { opacity: .35; }
.home-title { min-height: 2.2em; }
.home-typewriter { unicode-bidi: plaintext; }
.lang-fa .home-typewriter { direction: rtl; }
.home-visual .cv-modern-img {
  width: min(100%, 390px);
  aspect-ratio: 1 / 1;
  max-height: 390px;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 26px 70px rgba(0,0,0,.36);
  filter: none;
}

.lang-fa .cv-edu-timeline,
.lang-fa .cv-exp-timeline {
  padding-left: 0;
  padding-right: 20px;
  text-align: right;
}
.lang-fa .cv-edu-circle {
  left: auto;
  right: -26px;
}
.lang-fa .cv-exp-circle {
  left: auto;
  right: -40px;
}
.lang-fa .cv-exp-row {
  margin-left: 0;
  margin-right: 1dvw;
}
.lang-fa .cv-edu-titleImage,
.lang-fa .cv-skill-titleImage,
.lang-fa .cv-exp-titleImage {
  margin-right: 0;
  margin-left: 10px;
}

.m-language-dropdown { display: none; }
@media (max-width: 1050px) {
  .site-language-switch { display: none !important; }
  .m-top-navbar-login { gap: 6px; }
  .m-language-dropdown {
    position: relative;
    display: block;
    direction: ltr;
  }
  .m-language-dropdown summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    background: rgba(255,255,255,.045);
    color: #fff;
    font: 650 11px/1 var(--font-main);
    cursor: pointer;
  }
  .m-language-dropdown summary::-webkit-details-marker { display:none; }
  .m-language-dropdown > div {
    position: absolute;
    z-index: 120;
    top: calc(100% + 7px);
    left: 0;
    display: grid;
    min-width: 132px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    background: rgba(18,18,21,.98);
    box-shadow: 0 14px 35px rgba(0,0,0,.4);
  }
  .m-language-dropdown a {
    padding: 9px 8px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font: 600 11px/1.4 var(--font-main);
    white-space: nowrap;
  }
  .m-language-dropdown a:hover { background: rgba(255,255,255,.07); }
.home-v2 { margin-top: 36px; }
}
.lang-fa .cv-btn > :is(i,.svg-inline--fa) {
  margin-right: 0;
  margin-left: 10px;
}
.lang-en .cv-btn > :is(i,.svg-inline--fa) {
  margin-left: 0;
  margin-right: 10px;
}

/* 2026-08-29 final RTL / language / Home refinements */
.cv-language-flag,
.m-language-flag {
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center;
}
.cv-language-flag {
  width: 24px;
  height: 17px;
  border-radius: 4px;
}
.m-language-flag {
  width: 22px;
  height: 15px;
  border-radius: 3px;
}
.m-language-dropdown summary .m-language-flag { width: 21px; height: 15px; }
.m-language-dropdown a {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* The gradient belongs to cv-main-doc; Home itself must not look like a bordered card. */
.home-v2 {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.home-v2::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

.copyright-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  line-height: 1.65;
}
.lang-fa .copyright-text {
  direction: rtl;
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
}
.copyright-years { white-space: nowrap; }

/* Persian resume timeline: markers and dates stay on the right without colliding with text. */
.lang-fa .cv-edu-row,
.lang-fa .cv-exp-row {
  width: 100%;
  direction: rtl;
  text-align: right;
}
.lang-fa .cv-edu-date,
.lang-fa .cv-exp-date {
  display: block;
  width: 100%;
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
  margin: 0 0 5px;
}


/* Font Awesome icon system: all UI icons are local, no icon CDN required. */
.cv-connect-item i {
  width: 2.5dvh;
  min-width: 2.5dvh;
  font-size: 2.25dvh;
  text-align: center;
  color: var(--text-primary);
  transition: transform .2s, color .2s;
}
.cv-connect-item:hover i { transform: scale(1.2); color: var(--accent-glow); }
.download-cv-btn > :is(i,.svg-inline--fa) { width: 18px; text-align:center; }
.cv-btn > :is(i,.svg-inline--fa), .cv-mb-btn > :is(i,.svg-inline--fa) { flex:0 0 auto; text-align:center; }
.cv-language-chevron, .cv-language-check { font-size: 11px; }
.project-category-icon { width:4dvh; min-width:4dvh; margin-inline-end:10px; text-align:center; color:var(--accent-glow); font-size:2.5dvh; }
.status-icon { width:auto; height:auto; margin-inline-end:8px; font-size:9px; }
.status-icon.is-online { color:#78e08f; }
.status-icon.is-offline { color:#777; }
.cv-skill-mainImage { display:inline-grid; place-items:center; font-size:2.2dvh; color:#fff; }

/* Home returns to the same neutral surface as the other pages. */
.home-v2 {
  grid-template-columns:minmax(0, 1.25fr) minmax(220px, .75fr);
  min-height:min(600px, 84vh);
  width:min(1120px, 92%);
  padding:clamp(26px, 4.5vw, 58px);
  gap:clamp(28px, 4vw, 62px);
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible;
}
.home-v2::before { content:none !important; display:none !important; }
.home-intro { display:flex; flex-direction:column; justify-content:center; }
.home-title {
  max-width:780px;
  margin:0 0 20px;
  font-size:clamp(34px, 4.6vw, 64px);
  line-height:1.12;
  min-height:0;
}
.lang-fa .home-title { font-size:clamp(32px, 4vw, 54px); line-height:1.45; }
.home-about {
  flex-grow:0;
  max-height:none;
  margin:0;
  padding:0;
  overflow:visible;
  background:transparent;
  border:0;
  border-radius:0;
  color:rgba(255,255,255,.72);
  font-family:var(--font-main);
  font-size:clamp(16px, 1.45vw, 21px);
  line-height:1.9;
}
.home-about code { font:inherit; color:inherit; white-space:normal; }
.lang-fa .home-about { direction:rtl; text-align:right; line-height:2; }
.home-caret { height:1em; vertical-align:-.12em; }
.home-visual { min-height:300px; }
.home-visual .cv-modern-img { max-width:360px; max-height:390px; }
@media (max-width:1050px) {
  .home-v2 { grid-template-columns:1fr; margin:36px auto 90px; padding:26px 20px; }
  .home-visual { min-height:200px; }
  .home-visual .cv-modern-img { max-height:250px; max-width:250px; }
}

.lang-fa .cv-btn > :is(i,.svg-inline--fa) { margin-right:0; margin-left:10px; }
.lang-en .cv-btn > :is(i,.svg-inline--fa) { margin-left:0; margin-right:10px; }

/* Home uses the same page surface as the rest of the site. */
.cv-main-doc > .home-v2,
.home-v2 {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}
.home-v2::before, .home-v2::after { content: none !important; display:none !important; }

/* Font Awesome local SVG+JS compatibility */
.cv-connect-item :is(i,.svg-inline--fa), .cv-navbar a :is(i,.svg-inline--fa), .cv-m-navbar a :is(i,.svg-inline--fa) { width:1em; height:1em; }
.cv-btn > :is(i,.svg-inline--fa) { width:1.5dvh; height:1.5dvh; flex:0 0 auto; }
.lang-fa .cv-btn > :is(i,.svg-inline--fa) { margin-right:0; margin-left:10px; }
.lang-en .cv-btn > :is(i,.svg-inline--fa) { margin-left:0; margin-right:10px; }

/* 2026-08-30 resume/home polish */
body.lang-fa,
body.lang-fa button,
body.lang-fa input,
body.lang-fa textarea,
body.lang-fa select {
  font-family: "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif !important;
}

/* Social icons use one monochrome treatment; LinkedIn must not become brand-blue. */
.cv-connect-item,
.cv-connect-item:visited,
.cv-connect-item.linkedin,
.cv-connect-item.linkedin:visited,
.cv-connect-item.linkedin :is(i, .svg-inline--fa) {
  color: var(--text-primary) !important;
}
.cv-connect-item.linkedin:hover,
.cv-connect-item.linkedin:hover :is(i, .svg-inline--fa) {
  color: var(--accent-glow) !important;
}

/* Resume card headings: icon and title share the exact same center line. */
.cv-edu-title,
.cv-exp-title,
.cv-skill-title {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 32px;
  line-height: 1.2;
}
.cv-edu-titleImage,
.cv-exp-titleImage,
.cv-skill-titleImage {
  width: 1.15em !important;
  height: 1.15em !important;
  margin: 0 !important;
  flex: 0 0 auto;
  vertical-align: middle;
}
.cv-edu-titleText,
.cv-exp-titleText,
.cv-skill-titleText {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

/* Experience markers get their own reserved column instead of sitting over text. */
.cv-exp-timeline {
  padding-left: 0;
}
.cv-exp-row {
  min-height: 36px;
  margin-left: 0;
  padding-left: 48px;
}
.cv-exp-circle {
  left: 0;
  top: 2px;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  z-index: 1;
}
.cv-exp-circle :is(i, .svg-inline--fa) {
  display: block;
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  line-height: 1;
}
.lang-fa .cv-exp-timeline {
  padding-right: 0;
  padding-left: 0;
}
.lang-fa .cv-exp-row {
  margin-right: 0;
  margin-left: 0;
  padding-right: 48px;
  padding-left: 0;
}
.lang-fa .cv-exp-circle {
  right: 0;
  left: auto;
}

/* Brand/technology artwork is intentionally preserved in Skills. */
.cv-skill-mainImage {
  display: block !important;
  width: 30px !important;
  height: 30px !important;
  object-fit: contain;
  object-position: center;
  color: initial;
}

/* Word-like character typing: thin caret on the active line only. */
.home-title { min-height: 1.55em; }
.home-about { min-height: 8.2em; }
.home-caret {
  width: 2px !important;
  height: 1em !important;
  margin-inline-start: .11em;
  border-radius: 0 !important;
  background: currentColor !important;
  box-shadow: none !important;
  vertical-align: -.12em !important;
  animation: homeCaretBlinkWord .86s steps(1, end) infinite !important;
}
.home-caret[hidden] { display: none !important; }
@keyframes homeCaretBlinkWord {
  0%, 46% { opacity: 1; }
  47%, 100% { opacity: 0; }
}
@media (max-width: 1050px) {
  .home-about { min-height: 0; }
}
\n\n/* 2026-08-30: image-free Home hero and editor-like typewriter */\n.home-v2 {\n  display: flex !important;\n  grid-template-columns: none !important;\n  align-items: center;\n  justify-content: center;\n  gap: 0 !important;\n  width: min(980px, 92%) !important;\n  min-height: min(620px, 82vh);\n  border: 0 !important;\n  outline: 0 !important;\n  border-radius: 0 !important;\n  box-shadow: none !important;\n  background: transparent !important;\n}\n.home-v2::before,\n.home-v2::after { content: none !important; display: none !important; }\n.home-intro { width: min(900px, 100%); }\n.home-visual,\n.home-visual-glow { display: none !important; }\n.home-title { min-height: 2.35em; }\n.home-about { min-height: 8.4em; }\n.home-caret[hidden] { display: none !important; }\n@media (max-width: 1050px) {\n  .home-v2 { width: 92% !important; min-height: 62vh; margin: 42px auto 90px; }\n}\n
.home-type-seed { visibility: hidden; }


/* Mobile CV shortcut: icon-only, no chip background/border. */
@media (max-width: 900px) {
  .m-top-navbar-avatar .download-cv-btn,
  .m-top-navbar .download-cv-btn {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .m-top-navbar-avatar .download-cv-btn:hover,
  .m-top-navbar .download-cv-btn:hover { background: transparent !important; box-shadow:none !important; }
}
