/* ==========================================================
   رزومه سه‌بعدی مهندس عمران — فقط HTML و CSS
   ========================================================== */

:root {
  color-scheme: dark;

  --bg: #05080d;
  --panel-a: rgba(18, 29, 44, 0.92);
  --panel-b: rgba(8, 13, 20, 0.92);
  --line: rgba(140, 180, 220, 0.12);
  --line-strong: rgba(140, 180, 220, 0.24);

  --ink: #eaf0f6;
  --ink-soft: #a9b6c4;
  --muted: #74859a;

  --amber: #f5a524;
  --amber-hi: #ffd166;
  --amber-deep: #9c6200;
  --amber-ink: #1a1203;
  --cyan: #4cc3ff;
  --ok: #3ddc84;

  --radius: 16px;
  --max: 1200px;
  --header-h: 72px;
  --mono: "JetBrains Mono", "Vazirmatn", ui-monospace, monospace;
}

/* ---------- پایه ---------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 85% -5%, rgba(76, 195, 255, 0.10), transparent 70%),
    radial-gradient(900px 500px at 0% 30%, rgba(245, 165, 36, 0.06), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* شبکه نقشه در پس‌زمینه کل صفحه */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 80%);
}

h1, h2, h3, h4, p, figure {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 8px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.hazard {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 14px, #111 14px 28px);
}

/* نوار پیشرفت اسکرول */
.progress {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 4px;
  transform: scaleX(0);
  transform-origin: right;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, #111 10px 20px);
}

@supports (animation-timeline: scroll()) {
  .progress {
    display: block;
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
}

@keyframes progress {
  to { transform: scaleX(1); }
}

/* ==========================================================
   هدر
   ========================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 8, 13, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}

.brand small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* مکعب کوچک چرخان لوگو */
.mini-cube-wrap {
  width: 34px;
  height: 34px;
  perspective: 300px;
}

.mini-cube {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  transform-style: preserve-3d;
  animation: mini-spin 9s linear infinite;
}

.mini-cube i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, var(--amber-hi), var(--amber));
  color: var(--amber-ink);
}

.mini-cube i:nth-child(1) { transform: translateZ(17px); }
.mini-cube i:nth-child(2) { transform: rotateY(180deg) translateZ(17px); }
.mini-cube i:nth-child(3) { transform: rotateY(90deg) translateZ(17px); background: #d58a0a; }
.mini-cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(17px); background: #d58a0a; }
.mini-cube i:nth-child(5) { transform: rotateX(90deg) translateZ(17px); background: #ffe29a; }
.mini-cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(17px); background: #8a5800; }

.mini-cube svg {
  width: 20px;
  height: 20px;
  stroke-width: 3.2;
  stroke-linecap: square;
}

@keyframes mini-spin {
  from { transform: rotateX(-22deg) rotateY(0deg); }
  to { transform: rotateX(-22deg) rotateY(360deg); }
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--amber-hi);
}

/* ==========================================================
   هیرو
   ========================================================== */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  background:
    radial-gradient(650px 420px at 28% 50%, rgba(76, 195, 255, 0.16), transparent 70%),
    radial-gradient(600px 400px at 85% 15%, rgba(245, 165, 36, 0.09), transparent 70%);
}

/* زمین شبکه‌ای متحرک تا افق */
.hero-floor {
  position: absolute;
  z-index: -1;
  left: -50%;
  right: -50%;
  bottom: -2px;
  height: 50%;
  background-image:
    linear-gradient(rgba(76, 195, 255, 0.30) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 195, 255, 0.30) 1px, transparent 1px);
  background-size: 70px 70px;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  animation: floor-move 3.5s linear infinite;
}

@keyframes floor-move {
  to { background-position: 0 70px, 0 70px; }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 24px;
  padding-block: 32px 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border: 1px solid rgba(61, 220, 132, 0.35);
  border-radius: 99px;
  background: rgba(61, 220, 132, 0.08);
  font-size: 13.5px;
  font-weight: 600;
  color: #a5f3c8;
}

.status-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); }
}

/* تیتر با عمق سه‌بعدی */
.hero h1 {
  margin-top: 22px;
  font-size: clamp(3.4rem, 8vw, 6.6rem);
  font-weight: 900;
  line-height: 1.22;
}

.h1-line {
  display: block;
  color: #f4f7fb;
  text-shadow:
    -1px 1px 0 #c9d2dc,
    -2px 2px 0 #aeb9c5,
    -3px 3px 0 #93a0ae,
    -4px 4px 0 #788797,
    -5px 5px 0 #5e6e80,
    -6px 6px 0 #445569,
    -7px 7px 0 #2c3c50,
    -12px 16px 26px rgba(0, 0, 0, 0.6);
}

.h1-line.accent {
  color: var(--amber);
  text-shadow:
    -1px 1px 0 #e0920f,
    -2px 2px 0 #c97f06,
    -3px 3px 0 #b06d00,
    -4px 4px 0 #955c00,
    -5px 5px 0 #7a4b00,
    -6px 6px 0 #603a00,
    -7px 7px 0 #462a00,
    -12px 16px 30px rgba(245, 165, 36, 0.28);
}

.role {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 18px;
  font-size: 1.12rem;
  font-weight: 700;
}

.role span + span::before {
  content: "◆";
  margin-inline-end: 14px;
  font-size: 0.7em;
  color: var(--amber);
}

.lead {
  max-width: 32em;
  margin-top: 12px;
  font-size: 1.04rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

/* دکمه‌های سه‌بعدی */
.btn3d {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 800;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn3d svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.btn-amber {
  background: linear-gradient(180deg, var(--amber-hi), var(--amber));
  color: var(--amber-ink);
  box-shadow: 0 6px 0 var(--amber-deep), 0 14px 30px rgba(245, 165, 36, 0.3);
}

.btn-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--amber-deep), 0 18px 36px rgba(245, 165, 36, 0.4);
}

.btn-amber:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 var(--amber-deep), 0 4px 10px rgba(245, 165, 36, 0.3);
}

.btn-glass {
  border-color: rgba(76, 195, 255, 0.45);
  background: rgba(76, 195, 255, 0.08);
  color: #cdeeff;
  box-shadow: 0 6px 0 rgba(76, 195, 255, 0.22);
}

.btn-glass:hover {
  transform: translateY(-2px);
  background: rgba(76, 195, 255, 0.14);
  box-shadow: 0 8px 0 rgba(76, 195, 255, 0.22);
}

.btn-glass:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 rgba(76, 195, 255, 0.22);
}

/* ---------- صحنه سه‌بعدی ---------- */

.scene-wrap {
  position: relative;
  justify-self: center;
  width: 540px;
  height: 600px;
}

/* گوشه‌های قاب HUD */
.scene-wrap::before,
.scene-wrap::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(76, 195, 255, 0.7);
}

.scene-wrap::before {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}

.scene-wrap::after {
  right: 0;
  bottom: 0;
  border-left: 0;
  border-top: 0;
}

.scene {
  position: absolute;
  top: 0;
  left: 50%;
  width: 540px;
  height: 600px;
  margin-left: -270px;
  perspective: 1500px;
  perspective-origin: 50% 30%;
}

.camera {
  position: absolute;
  left: 50%;
  top: 80%;
  transform-style: preserve-3d;
  transform: rotateX(-20deg);
}

.turntable {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  animation: spin 40s linear infinite;
  will-change: transform;
}

@keyframes spin {
  from { transform: rotateY(-30deg); }
  to { transform: rotateY(-390deg); }
}

@keyframes counter-spin {
  from { transform: rotateY(30deg); }
  to { transform: rotateY(390deg); }
}

/* سیستم جعبه سه‌بعدی: --w عرض، --d عمق، --h ارتفاع */
.bx,
.bx > i {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  transform-style: preserve-3d;
}

.bx > .fr,
.bx > .bk {
  width: var(--w);
  height: var(--h);
  margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2);
}

.bx > .rt,
.bx > .lt {
  width: var(--d);
  height: var(--h);
  margin: calc(var(--h) / -2) 0 0 calc(var(--d) / -2);
}

.bx > .tp,
.bx > .bt {
  width: var(--w);
  height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--w) / -2);
}

.bx > .fr { transform: translateZ(calc(var(--d) / 2)); }
.bx > .bk { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); }
.bx > .rt { transform: rotateY(90deg) translateZ(calc(var(--w) / 2)); }
.bx > .lt { transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); }
.bx > .tp { transform: rotateX(90deg) translateZ(calc(var(--h) / 2)); }
.bx > .bt { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2)); }

/* زمین کارگاه */
.site {
  position: absolute;
  left: 0;
  top: 0;
  width: 400px;
  height: 400px;
  margin: -200px 0 0 -200px;
  transform: rotateX(90deg);
  border: 1px solid rgba(76, 195, 255, 0.5);
  background:
    linear-gradient(rgba(110, 190, 255, 0.22) 1px, transparent 1px) 0 0 / 25px 25px,
    linear-gradient(90deg, rgba(110, 190, 255, 0.22) 1px, transparent 1px) 0 0 / 25px 25px,
    radial-gradient(circle, rgba(40, 110, 200, 0.45), rgba(5, 12, 22, 0.85) 70%);
  box-shadow: 0 0 70px rgba(76, 195, 255, 0.25), inset 0 0 60px rgba(76, 195, 255, 0.18);
}

.site::before {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1.5px dashed rgba(245, 165, 36, 0.75);
}

.ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 260px;
  height: 260px;
  margin: -130px 0 0 -130px;
  border: 2px solid rgba(76, 195, 255, 0.8);
  border-radius: 50%;
  opacity: 0;
  transform: rotateX(90deg) translateZ(1px) scale(0.6);
  animation: ripple 4s ease-out infinite;
}

.ring-2 {
  animation-delay: 2s;
}

@keyframes ripple {
  from { transform: rotateX(90deg) translateZ(1px) scale(0.6); opacity: 0.9; }
  to { transform: rotateX(90deg) translateZ(1px) scale(1.5); opacity: 0; }
}

.bshadow {
  position: absolute;
  left: 0;
  top: 0;
  width: 170px;
  height: 170px;
  margin: -85px 0 0 -85px;
  transform: rotateX(90deg) translateZ(1px);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 40px 18px rgba(0, 0, 0, 0.5);
}

/* طبقات ساختمان */
.floor {
  --w: 150px;
  --d: 150px;
  --h: 30px;
  --glass:
    repeating-linear-gradient(90deg, rgba(160, 220, 255, 0.55) 0 1px, transparent 1px 25px),
    linear-gradient(180deg, rgba(90, 180, 255, 0.34), rgba(30, 100, 190, 0.14));
  --win: rgba(255, 200, 100, 0.6);
  transform: translate3d(0, calc((var(--i) + 0.5) * -30px), 0);
  animation: drop 1.1s cubic-bezier(0.3, 1.35, 0.5, 1) both;
  animation-delay: calc(var(--i) * 0.2s + 0.3s);
}

@keyframes drop {
  from { translate: 0 -1100px; }
}

.floor > i {
  border-top: 2px solid rgba(255, 180, 60, 0.95);
  border-left: 1px solid rgba(160, 220, 255, 0.6);
  border-right: 1px solid rgba(160, 220, 255, 0.6);
  background: var(--glass);
  box-shadow: inset 0 0 14px rgba(76, 195, 255, 0.25);
}

.floor.lit-a > .fr,
.floor.lit-a > .rt {
  background:
    linear-gradient(90deg, transparent 25px, var(--win) 25px 50px, transparent 50px 100px, var(--win) 100px 125px, transparent 125px),
    var(--glass);
}

.floor.lit-b > .bk,
.floor.lit-b > .lt {
  background:
    linear-gradient(90deg, transparent 50px, var(--win) 50px 75px, transparent 75px),
    var(--glass);
}

.floor.lit-c > .fr,
.floor.lit-c > .lt {
  background:
    linear-gradient(90deg, var(--win) 0 25px, transparent 25px 75px, var(--win) 75px 100px, transparent 100px),
    var(--glass);
}

.floor > .slab {
  width: calc(var(--w) + 12px);
  height: calc(var(--d) + 12px);
  margin: calc((var(--d) + 12px) / -2) 0 0 calc((var(--w) + 12px) / -2);
  border: 1.5px solid rgba(255, 180, 60, 0.9);
  background: linear-gradient(135deg, rgba(200, 215, 230, 0.32), rgba(110, 130, 150, 0.22));
  box-shadow: 0 0 18px rgba(245, 165, 36, 0.25);
}

/* طبقه در حال ساخت */
.floor.frame > i {
  border: 1.5px dashed rgba(245, 165, 36, 0.9);
  background: repeating-linear-gradient(90deg, rgba(245, 165, 36, 0.6) 0 2px, transparent 2px 37.5px);
  box-shadow: none;
}

/* جرثقیل برجی */
.lat {
  border-left: 2px solid var(--amber);
  border-right: 2px solid var(--amber);
  background:
    repeating-linear-gradient(to bottom, transparent 0 13px, rgba(245, 165, 36, 0.9) 13px 14.5px),
    repeating-linear-gradient(45deg, transparent 0 9px, rgba(245, 165, 36, 0.6) 9px 10px);
}

.lat-h {
  border-top: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  background:
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(245, 165, 36, 0.9) 13px 14.5px),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(245, 165, 36, 0.55) 8px 9px);
}

.mast {
  --w: 14px;
  --d: 14px;
  --h: 420px;
  transform: translate3d(128px, -210px, -34px);
}

.slew {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  transform: translate3d(128px, -420px, -34px);
}

.slew-rot {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  animation: slew 14s ease-in-out infinite alternate;
}

@keyframes slew {
  from { transform: rotateY(-35deg); }
  to { transform: rotateY(40deg); }
}

.jib {
  --w: 340px;
  --d: 12px;
  --h: 12px;
  transform: translate3d(-100px, -6px, 0);
}

.apex {
  --w: 8px;
  --d: 8px;
  --h: 46px;
  transform: translate3d(0, -23px, 0);
}

.cab {
  --w: 20px;
  --d: 18px;
  --h: 16px;
  transform: translate3d(-18px, 10px, 13px);
}

.cab > i {
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: linear-gradient(180deg, var(--amber-hi), #e09612);
}

.cab > .fr {
  background: linear-gradient(180deg, rgba(150, 220, 255, 0.85) 0 55%, #e09612 55%);
}

.cweight {
  --w: 30px;
  --d: 20px;
  --h: 22px;
  transform: translate3d(52px, 14px, 0);
}

.cweight > i {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(180deg, #6b7684, #3f4955);
}

.trolley {
  --w: 22px;
  --d: 16px;
  --h: 6px;
  transform: translate3d(-190px, 3px, 0);
}

.trolley > i {
  background: var(--amber);
}

.tie {
  position: absolute;
  left: 0;
  top: 0;
  height: 1.5px;
  background: rgba(245, 165, 36, 0.85);
  transform-origin: 0 50%;
}

.tie-a {
  width: 272px;
  transform: translateY(-46px) rotate(172.8deg);
}

.tie-b {
  width: 78px;
  transform: translateY(-46px) rotate(25.9deg);
}

.cable {
  position: absolute;
  left: -190px;
  top: 6px;
  width: 1.5px;
  height: 170px;
  background: rgba(230, 240, 250, 0.75);
  transform-style: preserve-3d;
  animation: hoist 7s ease-in-out infinite;
}

@keyframes hoist {
  0%, 100% { height: 170px; }
  50% { height: 80px; }
}

.cable > .load {
  --w: 90px;
  --d: 14px;
  --h: 10px;
  top: 100%;
  transform: translate3d(0, 5px, 0);
}

.load > i {
  border: 1px solid rgba(245, 165, 36, 0.8);
  background: linear-gradient(180deg, #a3b0bf, #5c6876);
}

/* برچسب‌هایی که همیشه رو به دوربین هستند */
.tag3d {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  transform: translate3d(var(--x), var(--y), var(--z));
}

.tag3d-in {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 150px;
  height: 30px;
  margin: -15px 0 0 -75px;
  border: 1px solid rgba(245, 165, 36, 0.65);
  border-radius: 7px;
  background: rgba(5, 8, 13, 0.8);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--amber-hi);
  white-space: nowrap;
  animation: counter-spin 40s linear infinite, fade-in 0.6s 2.6s both;
}

.tag3d-in.small {
  width: 70px;
  height: 24px;
  margin: -12px 0 0 -35px;
  border-color: rgba(76, 195, 255, 0.6);
  color: var(--cyan);
  font-size: 11px;
}

@keyframes fade-in {
  from { opacity: 0; }
}

/* اطلاعات HUD */
.hud {
  position: absolute;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: rgba(160, 210, 240, 0.75);
  direction: ltr;
}

.hud-tl {
  top: 10px;
  left: 14px;
}

.hud-br {
  right: 14px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rec {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4d;
  animation: blink 1.2s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

/* آمار */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-bottom: 44px;
}

.stat {
  padding: 18px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(20, 32, 48, 0.85), rgba(8, 13, 20, 0.85));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.25s, border-color 0.25s;
}

.stat:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 165, 36, 0.5);
}

.stat strong {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.4;
  color: #fff;
  text-shadow: -1px 1px 0 #8a96a3, -2px 2px 0 #5d6976, -3px 3px 0 #36414e;
}

.stat em {
  font-style: normal;
  color: var(--amber);
  text-shadow: -1px 1px 0 #b06d00, -2px 2px 0 #7a4b00, -3px 3px 0 #462a00;
}

.stat em.unit {
  margin-inline-start: 6px;
  font-size: 0.55em;
}

.stat span {
  font-size: 13.5px;
  color: var(--muted);
}

/* ==========================================================
   نوارهای احتیاط
   ========================================================== */

.tapes {
  position: relative;
  height: 170px;
  overflow: hidden;
  perspective: 900px;
}

.tape {
  position: absolute;
  top: 50%;
  left: -10%;
  right: -10%;
  display: flex;
  align-items: center;
  height: 50px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

.tape-a {
  z-index: 2;
  border-block: 3px solid #111;
  background: var(--amber);
  color: #111;
  transform: translateY(-50%) rotateY(-8deg) rotate(-4deg);
}

.tape-b {
  border-block: 2px solid var(--amber);
  background: #0b0f14;
  color: var(--amber);
  transform: translateY(-50%) rotateY(8deg) rotate(3deg);
}

.tape-track {
  display: flex;
  flex-shrink: 0;
  animation: tape 40s linear infinite;
}

.tape-b .tape-track {
  animation-direction: reverse;
}

.tape-track span {
  padding-inline: 14px;
}

@keyframes tape {
  to { transform: translateX(50%); }
}

/* ==========================================================
   بخش‌ها
   ========================================================== */

.section {
  position: relative;
  padding-block: 110px;
  scroll-margin-top: var(--header-h);
}

.sec-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 56px;
}

/* شماره بزرگ توخالی با پرسپکتیو */
.sec-num {
  flex-shrink: 0;
  font-size: clamp(5rem, 11vw, 9rem);
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(245, 165, 36, 0.8);
  transform: perspective(500px) rotateY(-28deg);
  filter: drop-shadow(0 0 18px rgba(245, 165, 36, 0.3));
}

.kicker {
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
}

.sec-head h2 {
  margin-top: 2px;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 900;
  line-height: 1.45;
}

.sec-head p {
  margin-top: 8px;
  color: var(--ink-soft);
}

.panel {
  position: relative;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-a), var(--panel-b));
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 1.15rem;
  font-weight: 800;
}

.panel-title::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--amber);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(245, 165, 36, 0.7);
}

.panel-title.mt {
  margin-top: 36px;
}

/* ورود سه‌بعدی بخش‌ها هنگام اسکرول */
@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 85%;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: perspective(1000px) translateY(70px) rotateX(18deg) scale(0.96);
  }
}

/* ==========================================================
   درباره من
   ========================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 64px;
}

.about-text p {
  font-size: 1.06rem;
  color: var(--ink-soft);
}

.about-text p + p {
  margin-top: 18px;
}

.about-text strong {
  font-weight: 700;
  color: var(--amber-hi);
}

/* کارت شناسایی مهندس */
.id-float {
  perspective: 1200px;
  animation: bob 6s ease-in-out infinite;
}

@keyframes bob {
  50% { transform: translateY(-12px); }
}

.id-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(76, 195, 255, 0.32);
  border-radius: 22px;
  background:
    linear-gradient(rgba(76, 195, 255, 0.06) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(76, 195, 255, 0.06) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(150deg, #15253a 0%, #0b1420 60%, #0e1a29 100%);
  box-shadow:
    -22px 28px 60px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(76, 195, 255, 0.12);
  transform: rotateY(18deg) rotateX(8deg) rotateZ(-1deg);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.id-card:hover {
  transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg) scale(1.02);
}

/* برق عبوری روی کارت */
.id-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.10) 48%, transparent 60%);
  background-size: 260% 100%;
  animation: sheen 5s ease-in-out infinite;
}

@keyframes sheen {
  from { background-position: 150% 0; }
  to { background-position: -60% 0; }
}

.id-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.id-chip {
  width: 44px;
  height: 32px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(0, 0, 0, 0.25) 45% 55%, transparent 55%),
    linear-gradient(transparent 30%, rgba(0, 0, 0, 0.25) 30% 36%, transparent 36% 64%, rgba(0, 0, 0, 0.25) 64% 70%, transparent 70%),
    linear-gradient(135deg, #ffe29a, #c98a1a);
}

.id-main {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line-strong);
}

.id-avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1c4, var(--amber) 60%, #a86a00);
  color: var(--amber-ink);
  box-shadow: 0 0 0 4px rgba(245, 165, 36, 0.2), 0 8px 18px rgba(0, 0, 0, 0.4);
}

.id-avatar svg {
  width: 36px;
  height: 36px;
  stroke-width: 2;
}

.id-main strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.5;
}

.id-main span {
  font-size: 14px;
  color: var(--muted);
}

.id-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}

.id-list span {
  color: var(--muted);
  white-space: nowrap;
}

.id-list strong {
  font-weight: 600;
  text-align: end;
}

.id-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.barcode {
  width: 120px;
  height: 30px;
  opacity: 0.7;
  background: repeating-linear-gradient(90deg,
    #cfd8e3 0 2px, transparent 2px 4px,
    #cfd8e3 4px 5px, transparent 5px 8px,
    #cfd8e3 8px 11px, transparent 11px 13px);
}

.id-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ok);
}

.id-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

/* ==========================================================
   مهارت‌ها
   ========================================================== */

.skills-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 28px;
}

/* نمودار ستونی سه‌بعدی */
.chart3d {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 330px;
  padding-bottom: 46px;
  perspective: 1100px;
  perspective-origin: 50% 0%;
}

.chart-stage {
  --cw: 40px;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  transform-style: preserve-3d;
  transform: rotateX(-16deg) rotateY(-22deg);
}

/* صفحه زیر ستون‌ها */
.chart-stage::before {
  content: "";
  position: absolute;
  left: -26px;
  right: -26px;
  bottom: -45px;
  height: 90px;
  transform: rotateX(90deg);
  border: 1px solid rgba(76, 195, 255, 0.45);
  background:
    linear-gradient(rgba(76, 195, 255, 0.18) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, rgba(76, 195, 255, 0.18) 1px, transparent 1px) 0 0 / 18px 18px,
    rgba(8, 18, 30, 0.9);
  box-shadow: 0 0 30px rgba(76, 195, 255, 0.18);
}

.col {
  position: relative;
  width: var(--cw);
  height: calc(var(--v) * 2.3px);
  transform-style: preserve-3d;
  transform-origin: 50% 100%;
  animation: grow 1.3s cubic-bezier(0.2, 0.9, 0.25, 1.1) both;
  animation-delay: calc(var(--i) * 90ms + 200ms);
}

@keyframes grow {
  from { transform: scaleY(0.001); }
}

.col > i {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cw);
  height: 100%;
}

.c-fr {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 10px;
  color: var(--amber-ink);
  background:
    repeating-linear-gradient(to top, transparent 0 22px, rgba(0, 0, 0, 0.14) 22px 23px),
    linear-gradient(to top, #e8940c, var(--amber-hi));
  transform: translateZ(calc(var(--cw) / 2));
}

.c-bk {
  background: #8a5600;
  transform: rotateY(180deg) translateZ(calc(var(--cw) / 2));
}

.c-rt {
  background:
    repeating-linear-gradient(to top, transparent 0 22px, rgba(0, 0, 0, 0.18) 22px 23px),
    linear-gradient(to top, #8f5900, #cf8608);
  transform: rotateY(90deg) translateZ(calc(var(--cw) / 2));
}

.c-lt {
  background: #b07000;
  transform: rotateY(-90deg) translateZ(calc(var(--cw) / 2));
}

.col > .c-tp {
  top: calc(var(--cw) / -2);
  height: var(--cw);
  background: linear-gradient(135deg, #fff1c4, var(--amber-hi));
  box-shadow: 0 0 24px rgba(255, 209, 102, 0.65);
  transform: rotateX(90deg);
}

.c-fr b {
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1;
}

.c-fr span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  direction: ltr;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

@supports (animation-timeline: view()) {
  .col {
    animation-timeline: view();
    animation-range: entry 20% cover 45%;
    animation-delay: 0s;
  }
}

/* آجرهای مهارت */
.bricks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 10px;
}

.bricks li {
  padding: 8px 16px;
  border: 1px solid rgba(140, 180, 220, 0.22);
  border-top-color: rgba(200, 225, 255, 0.38);
  border-radius: 8px;
  background: linear-gradient(180deg, #1e2b3c, #151f2d);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
  box-shadow: 0 5px 0 #070c13, 0 9px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, color 0.15s, border-color 0.15s;
}

.bricks li:hover {
  transform: translateY(3px);
  border-color: rgba(245, 165, 36, 0.55);
  color: var(--amber-hi);
  box-shadow: 0 2px 0 #070c13, 0 4px 8px rgba(0, 0, 0, 0.3);
}

.langs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 12px;
  border-bottom: 1px dashed var(--line-strong);
  font-weight: 700;
}

.langs li:last-child {
  border-bottom: 0;
}

.langs em {
  margin-inline-start: 8px;
  font-size: 13.5px;
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}

.meter {
  display: flex;
  gap: 4px;
}

.meter i {
  width: 18px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.meter i.on {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(245, 165, 36, 0.6);
}

/* ==========================================================
   سوابق کاری — مقطع ساختمان
   ========================================================== */

.levels {
  position: relative;
  display: grid;
  gap: 36px;
}

.levels::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  inset-inline-start: 64px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, rgba(76, 195, 255, 0.6) 0 8px, transparent 8px 14px);
}

.level {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: start;
  gap: 28px;
}

.lvl-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 24px;
}

.elev {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid rgba(76, 195, 255, 0.55);
  border-radius: 8px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(76, 195, 255, 0.2);
}

/* نماد تراز ▽ */
.elev::before {
  content: "";
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid var(--cyan);
}

.lvl-label {
  position: relative;
  margin-top: 8px;
  padding-inline: 8px;
  background: var(--bg);
  font-size: 13px;
  color: var(--muted);
}

/* دال سه‌بعدی */
.slab {
  position: relative;
  padding: 28px 30px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(160deg, #152233, #0c141e);
  box-shadow:
    -2px 2px 0 #1b2838,
    -4px 4px 0 #18242f,
    -6px 6px 0 #15202b,
    -8px 8px 0 #121c26,
    -10px 10px 0 #0f1821,
    -12px 12px 0 #0c141c,
    -18px 24px 40px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.slab:hover {
  transform: translate(5px, -5px);
  border-color: rgba(76, 195, 255, 0.45);
  box-shadow:
    -2px 2px 0 #1b2838,
    -4px 4px 0 #18242f,
    -6px 6px 0 #15202b,
    -8px 8px 0 #121c26,
    -10px 10px 0 #0f1821,
    -12px 12px 0 #0c141c,
    -14px 14px 0 #0a1118,
    -16px 16px 0 #080e14,
    -24px 32px 50px rgba(0, 0, 0, 0.6);
}

.slab.current {
  border-color: rgba(245, 165, 36, 0.55);
}

.slab.current::before {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline: 28px;
  height: 5px;
  border-radius: 0 0 4px 4px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 8px, #111 8px 16px);
}

.slab-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
}

.slab h3 {
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.5;
}

.slab-head p {
  font-size: 15px;
  color: var(--muted);
}

.period {
  align-self: flex-start;
  padding: 4px 14px;
  border: 1px solid rgba(76, 195, 255, 0.35);
  border-radius: 8px;
  background: rgba(76, 195, 255, 0.1);
  font-size: 14px;
  font-weight: 800;
  color: var(--cyan);
  white-space: nowrap;
}

.current .period {
  border-color: transparent;
  background: var(--amber);
  color: var(--amber-ink);
  box-shadow: 0 4px 0 var(--amber-deep);
}

.slab ul {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.slab ul li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--ink-soft);
}

.slab ul li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.75em;
  width: 8px;
  height: 8px;
  background: var(--amber);
  transform: rotate(45deg);
}

/* ==========================================================
   پروژه‌ها — کارت‌های چرخان
   ========================================================== */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 28px;
}

.flip {
  height: 370px;
  perspective: 1400px;
  outline: none;
  cursor: pointer;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.2, 0.85, 0.25, 1.05);
}

.flip:hover .flip-inner,
.flip:focus .flip-inner {
  transform: rotateY(180deg);
}

.flip:focus-visible .face {
  border-color: var(--amber);
}

.face {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px;
  text-align: center;
  transform-style: preserve-3d;
  background:
    radial-gradient(circle at 50% 38%, rgba(76, 195, 255, 0.24), transparent 60%),
    linear-gradient(rgba(76, 195, 255, 0.09) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(76, 195, 255, 0.09) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(170deg, #11203a, #0a121d);
}

/* اجزای جلو کارت که از سطح بیرون می‌زنند */
.front > * {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.p-type {
  position: absolute;
  top: 18px;
  inset-inline-start: 18px;
  padding: 2px 12px;
  border-radius: 7px;
  background: var(--amber);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--amber-ink);
  box-shadow: 0 3px 0 var(--amber-deep);
}

.front .p-type {
  transform: translateZ(20px);
}

.p-year {
  position: absolute;
  top: 18px;
  inset-inline-end: 20px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.p-icon {
  display: grid;
  place-items: center;
  color: #d8ecff;
  filter: drop-shadow(0 0 14px rgba(76, 195, 255, 0.6));
  transform: translateZ(70px);
}

.p-icon svg {
  width: 96px;
  height: 96px;
  stroke-width: 1.4;
}

.front h3 {
  margin-top: 22px;
  font-size: 1.25rem;
  font-weight: 900;
  transform: translateZ(40px);
}

.p-loc {
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
  transform: translateZ(30px);
}

.p-hint {
  position: absolute;
  bottom: 16px;
  inset-inline: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cyan);
  transform: translateZ(20px);
}

.back {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px;
  border-color: rgba(245, 165, 36, 0.45);
  background:
    linear-gradient(rgba(245, 165, 36, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(160deg, #1b2a40, #0d1520);
  transform: rotateY(180deg);
}

.back .p-type {
  position: static;
}

.back h3 {
  font-size: 1.25rem;
  font-weight: 900;
}

.back p {
  font-size: 15px;
  color: var(--ink-soft);
}

.p-meta {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
}

.p-meta li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.p-meta span {
  color: var(--muted);
}

.p-meta strong {
  font-weight: 700;
}

/* ==========================================================
   تحصیلات و گواهینامه‌ها
   ========================================================== */

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: start;
  gap: 28px;
}

.degrees {
  display: grid;
  gap: 20px;
}

.deg {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-a), var(--panel-b));
  transition: border-color 0.25s;
}

.deg:hover {
  border-color: rgba(245, 165, 36, 0.45);
}

.deg-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--amber-hi), var(--amber));
  color: var(--amber-ink);
  box-shadow: -4px 4px 0 var(--amber-deep), -8px 10px 20px rgba(0, 0, 0, 0.4);
}

.deg-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.9;
}

.deg-years {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cyan);
}

.deg h3 {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.6;
}

.deg-school {
  font-weight: 600;
  color: var(--amber-hi);
}

.deg-note {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.certs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(160deg, var(--panel-a), var(--panel-b));
  transition: border-color 0.25s;
}

.cert.wide {
  grid-column: 1 / -1;
  border-color: rgba(245, 165, 36, 0.45);
}

.cert:hover {
  border-color: rgba(245, 165, 36, 0.6);
}

/* مدال سکه‌ای که هنگام هاور می‌چرخد */
.medal {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1c4, var(--amber) 55%, #9c6200);
  color: var(--amber-ink);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.22), 0 6px 14px rgba(0, 0, 0, 0.4);
  transform: perspective(300px) rotateY(0deg);
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cert:hover .medal {
  transform: perspective(300px) rotateY(360deg);
}

.medal svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.8;
}

.cert strong {
  display: block;
  font-weight: 800;
  line-height: 1.7;
}

.cert div span {
  font-size: 13.5px;
  color: var(--muted);
}

/* ==========================================================
   تماس
   ========================================================== */

.contact {
  overflow: hidden;
  background:
    radial-gradient(600px 400px at 80% 50%, rgba(245, 165, 36, 0.08), transparent 70%),
    radial-gradient(500px 400px at 15% 50%, rgba(76, 195, 255, 0.10), transparent 70%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  align-items: center;
  gap: 56px;
}

.contact .sec-head {
  margin-bottom: 36px;
}

/* مکعب خدمات */
.cube-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 380px;
  perspective: 1000px;
}

.cube-stage::after {
  content: "";
  position: absolute;
  bottom: 40px;
  left: 50%;
  width: 200px;
  height: 30px;
  margin-left: -100px;
  border-radius: 50%;
  background: radial-gradient(rgba(0, 0, 0, 0.6), transparent 70%);
  filter: blur(4px);
}

.cube-bob {
  transform-style: preserve-3d;
  animation: bob 5s ease-in-out infinite;
}

.cube {
  position: relative;
  width: 180px;
  height: 180px;
  transform-style: preserve-3d;
  animation: cube-spin 18s linear infinite;
}

.cf {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 2px solid rgba(245, 165, 36, 0.8);
  background:
    linear-gradient(rgba(76, 195, 255, 0.10) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, rgba(76, 195, 255, 0.10) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(145deg, rgba(22, 42, 66, 0.95), rgba(8, 16, 26, 0.95));
  box-shadow: inset 0 0 34px rgba(76, 195, 255, 0.22);
  font-size: 1.35rem;
  font-weight: 900;
}

.cf svg {
  width: 46px;
  height: 46px;
  stroke-width: 1.6;
  color: var(--amber-hi);
  filter: drop-shadow(0 0 10px rgba(245, 165, 36, 0.55));
}

.c5 svg,
.c6 svg {
  width: 70px;
  height: 70px;
  stroke-width: 2.6;
  stroke-linecap: square;
}

.c1 { transform: translateZ(90px); }
.c2 { transform: rotateY(90deg) translateZ(90px); }
.c3 { transform: rotateY(180deg) translateZ(90px); }
.c4 { transform: rotateY(-90deg) translateZ(90px); }
.c5 { transform: rotateX(90deg) translateZ(90px); }
.c6 { transform: rotateX(-90deg) translateZ(90px); }

@keyframes cube-spin {
  from { transform: rotateX(-18deg) rotateY(0deg); }
  to { transform: rotateX(-18deg) rotateY(-360deg); }
}

.ctiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ctile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-a), var(--panel-b));
  box-shadow: 0 6px 0 #03060a, 0 12px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.2s;
}

a.ctile:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 165, 36, 0.6);
  box-shadow: 0 9px 0 #03060a, 0 16px 30px rgba(0, 0, 0, 0.4);
}

a.ctile:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 #03060a, 0 4px 10px rgba(0, 0, 0, 0.3);
}

.c-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--amber-hi), var(--amber));
  color: var(--amber-ink);
  box-shadow: 0 4px 0 var(--amber-deep);
}

.c-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

.c-label {
  font-size: 13.5px;
  color: var(--muted);
}

.ctile strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 15.5px;
  font-weight: 700;
}

/* ==========================================================
   فوتر
   ========================================================== */

.site-footer {
  background: #03060a;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 22px;
  font-size: 14px;
}

.footer-inner a:hover {
  color: var(--amber);
}

/* ==========================================================
   واکنش‌گرا
   ========================================================== */

@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 48px;
  }

  .scene-wrap {
    width: 100%;
    max-width: 540px;
  }
}

@media (max-width: 1000px) {
  .about-grid,
  .skills-grid,
  .edu-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 48px;
  }

  .id-float {
    max-width: 460px;
    margin-inline: auto;
  }

  .cube-stage {
    order: 2;
    height: 300px;
  }

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

@media (max-width: 860px) {
  :root {
    --header-h: 112px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 4px;
    padding-top: 12px;
  }

  .nav-links {
    width: calc(100% + 32px);
    margin-inline: -16px;
    padding: 0 12px 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    padding: 6px 10px;
    font-size: 14.5px;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 0;
  }

  .scene-wrap {
    height: 390px;
  }

  .scene {
    transform: scale(0.62);
    transform-origin: 50% 0;
  }

  .stats {
    gap: 10px;
  }

  .stat {
    padding: 14px 16px;
  }

  .tapes {
    height: 130px;
  }

  .tape {
    height: 42px;
    font-size: 13.5px;
  }

  .section {
    padding-block: 72px;
  }

  .sec-head {
    gap: 14px;
    margin-bottom: 36px;
  }

  .sec-num {
    font-size: 4.4rem;
  }

  .panel {
    padding: 22px;
  }

  .chart3d {
    height: 300px;
  }

  .chart-stage {
    --cw: 27px;
    gap: 8px;
  }

  .col {
    height: calc(var(--v) * 2.1px);
  }

  .c-fr b {
    font-size: 10px;
  }

  .c-fr span {
    font-size: 10.5px;
  }

  .levels::before {
    display: none;
  }

  .level {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lvl-mark {
    flex-direction: row;
    gap: 10px;
    padding-top: 0;
  }

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

  .slab {
    padding: 22px;
  }

  .flip {
    height: 360px;
  }

  .certs,
  .ctiles {
    grid-template-columns: 1fr;
  }
}

/* کاهش حرکت برای کاربرانی که ترجیح می‌دهند */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
