/* =========================================================================
   piccoweb — Personal Portfolio
   Design tokens
   رنگ‌ها دقیقاً از روی عکس مرجع نمونه‌برداری شده‌اند:
   فقط هدر/هیرو و پنل تماس/فوتر تیره (سرمه‌ای) هستند، بقیه‌ی بخش‌ها سفید.
   ========================================================================= */
:root {
  /* --- سطوح تیره (هدر، هیرو، پنل تماس، فوتر) --- */
  --bg-deep: #020c21;
  --bg-panel-2: #08132b;
  --border-soft-dark: rgba(255, 255, 255, 0.1);
  --border-strong-dark: rgba(255, 255, 255, 0.16);

  /* متن روی سطح تیره */
  --text-hi: #ffffff;
  --text-mid: #c5c7d0;
  --text-low: #aeb4c2;

  /* --- سطوح روشن (بقیه‌ی بخش‌ها) --- */
  --surface: #ffffff;
  --surface-card: #ffffff;
  --border-soft: rgba(11, 15, 26, 0.08);
  --border-strong: rgba(11, 15, 26, 0.14);

  /* متن روی سطح روشن */
  --ink-hi: #0b0f1a;
  --ink-mid: #565a66;
  --ink-low: #8a8e99;

  /* --- برند --- */
  --blue: #2174fe;
  --blue-soft: #4e96ff;
  --cyan: #2174fe;
  --icon-bg: #ebf1fc;

  --grad-brand: linear-gradient(135deg, #2174fe 0%, #4e96ff 100%);
  --grad-bg-radial:
    radial-gradient(circle at 80% 0%, rgba(33, 116, 254, 0.3), transparent 45%),
    radial-gradient(circle at 0% 30%, rgba(33, 116, 254, 0.16), transparent 40%);

  --font-fa: "Vazirmatn", "Tahoma", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.16, 0.84, 0.44, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink-hi);
  font-family: var(--font-fa);
  direction: rtl;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
::selection {
  background: var(--blue);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-pad {
  padding: 110px 0;
}
@media (max-width: 768px) {
  .section-pad {
    padding: 72px 0;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--blue);
  background: rgba(33, 116, 254, 0.08);
  border: 1px solid rgba(33, 116, 254, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
}
/* روی سطح تیره (هیرو) رنگ eyebrow روشن‌تر می‌شود */
.hero .eyebrow {
  color: #7fb1ff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}
.hero .eyebrow::before {
  background: #7fb1ff;
  box-shadow: 0 0 8px #7fb1ff;
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink-hi);
}
.section-head p {
  color: var(--ink-mid);
  margin: 0;
  font-size: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}
.btn-primary {
  background: var(--grad-brand);
  color: #ffffff;
  box-shadow: 0 8px 24px -8px rgba(33, 116, 254, 0.65);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -8px rgba(33, 116, 254, 0.75);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong-dark);
  color: var(--text-hi);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
}
.btn:hover svg {
  transform: translateX(-3px);
}

/* =========================================================================
   Header — همیشه تیره (سرمه‌ای)
   ========================================================================= */
.site-header {
  position: sticky;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding: 0;
  background: #fff;
  transition:
    background 0.35s var(--ease),
    padding 0.35s var(--ease),
    border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 86px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  width: 178px;
  height: auto;
  max-height: 114px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 16.5px;
  font-weight: 500;
  color: #000;
  transition:
    color 0.2s,
    background 0.2s;
}
.nav-links a:hover {
  color: #114cab;
  background: rgba(255, 255, 255, 0.06);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-strong-dark);
  background: rgba(255, 255, 255, 0.04);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text-hi);
  transition:
    transform 0.3s,
    opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================================
   Hero — تیره (سرمه‌ای)، مطابق عکس مرجع
   ========================================================================= */
.hero {
  position: relative;
  padding: 110px 0 100px;
  overflow: hidden;
  background: var(--bg-deep);
  background-image: var(--grad-bg-radial);
  color: var(--text-hi);
  border-radius: 25px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--text-hi);
}
.hero h1 span {
  background: linear-gradient(135deg, #4e96ff, #7fb1ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  color: var(--text-mid);
  font-size: 17px;
  max-width: 520px;
  margin: 0 0 34px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 34px;
}
@media (max-width: 560px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.hero-stats .stat-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-hi);
}
.hero-stats .stat-num span {
  color: #7fb1ff;
}
.hero-stats .stat-label {
  font-size: 13px;
  color: var(--text-low);
  margin-top: 4px;
}

/* --- signature element: animated code terminal --- */
.terminal {
  background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-deep));
  border: 1px solid var(--border-soft-dark);
  border-radius: var(--radius-lg);
  box-shadow:
    0 30px 60px -25px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-soft-dark);
  direction: ltr;
}
.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.terminal-dot:nth-child(1) {
  background: #ff5f57;
}
.terminal-dot:nth-child(2) {
  background: #febc2e;
}
.terminal-dot:nth-child(3) {
  background: #28c840;
}
.terminal-title {
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-low);
}
.terminal-body {
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  color: #c9d4f2;
  direction: ltr;
  text-align: left;
  min-height: 280px;
  white-space: pre-wrap;
}
.terminal-body .caret {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--blue-soft);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.terminal-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(33, 116, 254, 0.35),
    transparent 65%
  );
  filter: blur(10px);
  z-index: -1;
  top: -60px;
  left: -40px;
}

.stack-row {
  display: flex;
  gap: 22px;
  margin-top: 40px;
  flex-wrap: wrap;
  align-items: center;
}
.stack-row span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-low);
  border: 1px solid var(--border-soft-dark);
  padding: 6px 11px;
  border-radius: 8px;
}

/* =========================================================================
   Reveal-on-scroll
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 {
  transition-delay: 0.08s;
}
.reveal-delay-2 {
  transition-delay: 0.16s;
}
.reveal-delay-3 {
  transition-delay: 0.24s;
}

/* =========================================================================
   Services — سطح روشن
   ========================================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 980px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
  box-shadow: 0 2px 14px -6px rgba(11, 15, 26, 0.06);
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(33, 116, 254, 0.3);
  box-shadow: 0 16px 30px -14px rgba(11, 15, 26, 0.16);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-bg);
  border: 1px solid rgba(33, 116, 254, 0.15);
  color: var(--blue);
}
.card-icon svg {
  width: 22px;
  height: 22px;
}
.card h3 {
  font-size: 17px;
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--ink-hi);
}
.card p {
  margin: 0;
  color: var(--ink-mid);
  font-size: 14.5px;
}

/* =========================================================================
   Portfolio — سطح روشن
   ========================================================================= */
.portfolio-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 980px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

.proj-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
  position: relative;
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s,
    box-shadow 0.35s;
  box-shadow: 0 2px 14px -6px rgba(11, 15, 26, 0.06);
}
.proj-card:hover {
  transform: translateY(-6px);
  border-color: rgba(33, 116, 254, 0.3);
  box-shadow: 0 16px 30px -14px rgba(11, 15, 26, 0.16);
}
.proj-thumb {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--icon-bg), #f4f8ff);
}
.proj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.proj-card:hover .proj-thumb img {
  transform: scale(1.06);
}
.proj-thumb .ph-icon {
  width: 36%;
  height: 36%;
  opacity: 0.6;
  color: var(--blue);
}
.proj-body {
  padding: 18px 18px 20px;
}
.proj-body h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-hi);
}
.proj-cat {
  font-size: 12.5px;
  color: var(--ink-low);
  margin-bottom: 10px;
}
.proj-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.proj-tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blue);
  background: var(--icon-bg);
  border: 1px solid rgba(33, 116, 254, 0.18);
  padding: 3px 8px;
  border-radius: 6px;
}

/* =========================================================================
   About — سطح روشن
   ========================================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 920px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.about-photo {
  position: relative;
}
.about-photo .frame {
  aspect-ratio: 1/1.05;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(155deg, var(--icon-bg), #f4f8ff);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-photo .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-photo .avatar-fallback {
  font-family: var(--font-mono);
  font-size: 96px;
  font-weight: 700;
  color: rgba(33, 116, 254, 0.3);
}
.about-photo .badge {
  position: absolute;
  bottom: -18px;
  inset-inline-end: -18px;
  background: var(--grad-brand);
  color: #ffffff;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 14px;
  box-shadow: 0 14px 30px -10px rgba(33, 116, 254, 0.5);
}
.about-text h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  margin: 0 0 18px;
  color: var(--ink-hi);
}
.about-text p {
  color: var(--ink-mid);
  margin: 0 0 30px;
  font-size: 16px;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 560px) {
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.about-stats .stat-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink-hi);
}
.about-stats .stat-label {
  font-size: 12.5px;
  color: var(--ink-low);
  margin-top: 3px;
}

/* =========================================================================
   Process — سطح روشن
   ========================================================================= */
.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
@media (max-width: 920px) {
  .process-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .process-list {
    grid-template-columns: 1fr;
  }
}
.process-item {
  position: relative;
  padding-top: 14px;
}
.process-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue);
  display: inline-block;
  margin-bottom: 14px;
}
.process-item h3 {
  font-size: 16.5px;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--ink-hi);
}
.process-item p {
  margin: 0;
  color: var(--ink-mid);
  font-size: 14px;
}
.process-item::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 36px;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 2px;
}

/* =========================================================================
   Testimonials — سطح روشن
   ========================================================================= */
.testi-track-wrap {
  overflow: hidden;
}
.testi-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s var(--ease);
}
.testi-card {
  min-width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 2px 14px -6px rgba(11, 15, 26, 0.06);
}
@media (min-width: 760px) {
  .testi-card {
    min-width: calc(50% - 10px);
  }
}
@media (min-width: 1080px) {
  .testi-card {
    min-width: calc(33.333% - 14px);
  }
}
.testi-quote {
  color: var(--blue);
  width: 26px;
  height: 20px;
}
.testi-card p {
  margin: 0;
  color: var(--ink-mid);
  font-size: 14.5px;
  flex: 1;
}
.testi-person {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testi-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
  font-size: 14px;
  overflow: hidden;
}
.testi-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.testi-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-hi);
}
.testi-role {
  font-size: 12.5px;
  color: var(--ink-low);
}
.testi-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 30px;
}
.testi-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  border: none;
  padding: 0;
  transition:
    background 0.3s,
    width 0.3s;
}
.testi-dots button.active {
  background: var(--blue);
  width: 22px;
  border-radius: 5px;
}

/* =========================================================================
   Contact — تیره (سرمه‌ای)، مطابق عکس مرجع
   ========================================================================= */
.contact-panel {
  background: linear-gradient(135deg, var(--bg-panel-2), var(--bg-deep));
  border: 1px solid var(--border-soft-dark);
  border-radius: 26px;
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 860px) {
  .contact-panel {
    grid-template-columns: 1fr;
    padding: 36px 26px;
  }
}
.contact-panel::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(33, 116, 254, 0.3), transparent 65%);
  top: -160px;
  inset-inline-end: -160px;
  filter: blur(6px);
}
.contact-info h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--text-hi);
}
.contact-info .subtitle {
  color: #7fb1ff;
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 15px;
  display: block;
}
.contact-info p {
  color: var(--text-mid);
  margin: 0 0 28px;
  max-width: 400px;
}
.contact-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text-hi);
}
.contact-row .ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-soft-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7fb1ff;
  flex-shrink: 0;
}
.contact-row .ic svg {
  width: 17px;
  height: 17px;
}
.contact-row .lbl {
  color: var(--text-low);
  font-size: 12px;
}
.socials {
  display: flex;
  gap: 10px;
}
.socials a {
  padding: 9px 15px;
  border: 1px solid var(--border-soft-dark);
  border-radius: 9px;
  font-size: 13px;
  color: var(--text-mid);
  transition: 0.25s;
}
.socials a:hover {
  color: var(--text-hi);
  border-color: rgba(33, 116, 254, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft-dark);
  border-radius: 11px;
  padding: 14px 16px;
  color: var(--text-hi);
  font-family: inherit;
  font-size: 14.5px;
  transition:
    border-color 0.25s,
    background 0.25s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-low);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue-soft);
  background: rgba(255, 255, 255, 0.08);
}
.contact-form textarea {
  resize: vertical;
  min-height: 110px;
}
.contact-form .btn {
  align-self: flex-start;
  border: none;
}
.form-note {
  font-size: 12px;
  color: var(--text-low);
  margin-top: -4px;
}

/* =========================================================================
   Footer — تیره (سرمه‌ای)، مطابق عکس مرجع
   ========================================================================= */
.site-footer {
  padding: 28px 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--border-soft-dark);
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer p {
  margin: 0;
  color: var(--text-low);
  font-size: 13.5px;
}
.to-top {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-soft-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  transition: 0.25s;
}
.to-top:hover {
  color: #7fb1ff;
  border-color: rgba(33, 116, 254, 0.4);
  transform: translateY(-3px);
}

/* =========================================================================
   Focus visibility (accessibility floor)
   ========================================================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}


/* ========================================================================
   PiccoWeb final polish — portfolio results + responsive header
   ======================================================================== */
.proj-card { display: block; color: inherit; }
.proj-body { display: flex; flex-direction: column; min-height: 250px; }
.proj-result { margin: 0 0 14px; color: var(--ink-mid); font-size: 13.3px; line-height: 1.95; }
.proj-result strong { color: var(--ink-hi); font-weight: 700; }
.proj-action { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 6px; color: var(--blue); font-size: 13px; font-weight: 700; }
.proj-action svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.proj-card:hover .proj-action svg { transform: translateX(-3px); }
.card h3 { line-height: 1.6; }
.card p { line-height: 1.95; }
.site-header.scrolled { background: rgba(255,255,255,.96); border-bottom-color: var(--border-soft); box-shadow: 0 10px 30px rgba(11,15,26,.05); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav-links a.active { color: var(--blue); background: rgba(33,116,254,.07); }

@media (max-width: 1100px) {
  .site-header .container { padding-inline: 20px; }
  .brand img { width: 165px; }
  .nav-links a { padding-inline: 9px; font-size: 14px; }
  .header-cta .btn { padding: 12px 17px; font-size: 14px; }
}

@media (max-width: 920px) {
  .site-header .container { min-height: 74px; }
  .brand img { width: 154px; max-height: 54px; }
  .header-cta .btn { display: none; }
  .nav-toggle { display: flex; color: var(--ink-hi); border-color: rgba(11,15,26,.12); background: #fff; }
  .nav-toggle span { background: var(--ink-hi); }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    background: rgba(255,255,255,.98);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(11,15,26,.14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 11px 14px; font-size: 14px; color: var(--ink-hi); }
  .hero { padding: 78px 0 72px; border-radius: 0 0 24px 24px; }
  .hero-grid { gap: 46px; }
  .terminal { transform: none; }
}

@media (max-width: 680px) {
  .container { padding-inline: 18px; }
  .section-pad { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head h2 { font-size: clamp(25px, 7vw, 32px); line-height: 1.45; }
  .section-head p { font-size: 14px; line-height: 1.9; }
  .hero h1 { font-size: clamp(31px, 9vw, 43px); line-height: 1.3; }
  .hero p.lead { font-size: 15px; line-height: 2; }
  .hero-actions { gap: 10px; margin-bottom: 38px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero-stats { gap: 22px 14px; }
  .terminal-body { min-height: 225px; padding: 18px 16px; font-size: 11.5px; line-height: 1.8; overflow-x: auto; }
  .stack-row { gap: 8px; margin-top: 24px; }
  .stack-row span { font-size: 10px; padding: 5px 8px; }
  .card { padding: 24px 20px; }
  .proj-body { min-height: 0; padding: 16px 15px 18px; }
  .proj-body h3 { font-size: 15px; }
  .proj-result { font-size: 12.8px; }
  .about-grid { gap: 34px; }
  .about-photo .badge { inset-inline-end: 10px; bottom: -14px; }
  .about-text p { font-size: 14.5px; line-height: 2; }
  .process-list { gap: 28px; }
  .contact-panel { padding: 30px 20px; border-radius: 22px; }
  .contact-form .btn { align-self: stretch; justify-content: center; }
  .socials { flex-wrap: wrap; }
  .socials a { padding-inline: 12px; }
  .site-footer .container { justify-content: center; text-align: center; }
}

@media (max-width: 390px) {
  .brand img { width: 140px; }
  .site-header .container { padding-inline: 14px; }
  .nav-links { inset-inline: 14px; }
  .eyebrow { font-size: 11px; }
  .hero { padding-top: 62px; }
  .hero h1 { font-size: 29px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats .stat-num { font-size: 22px; }
}
