/* =========================================================
   ABOUT / PORTFOLIO — POLISHED DARK MINIMAL
   ========================================================= */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0b0b0d;
  --bg-soft: #101012;
  --surface: #141417;
  --surface-2: #19191d;
  --surface-3: #202024;
  --surface-4: #28282d;

  --text: #f4f1eb;
  --text-soft: #aaa69e;
  --text-muted: #706c65;
  --text-faint: #4b4843;

  --line: rgba(244, 241, 235, .075);
  --line-strong: rgba(244, 241, 235, .14);
  --line-bright: rgba(244, 241, 235, .22);

  --accent: #dedbd3;
  --green: #7da58e;
  --green-soft: rgba(125, 165, 142, .10);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-2xl: 38px;

  --ease: cubic-bezier(.2, .7, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(255,255,255,.045), transparent 32rem),
    var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgba(244,241,235,.16);
  color: var(--text);
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* =========================
   HEADER
   ========================= */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,11,13,.72);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1120px, calc(100% - 48px));
  height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.6px;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  position: relative;
  padding: 9px 13px;
  color: var(--text-soft);
  font-size: .82rem;
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: .25s var(--ease);
}

.nav a:not(.nav-btn)::after {
  content: "";
  position: absolute;
  right: 13px;
  left: 13px;
  bottom: 4px;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s var(--ease);
}

.nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,.035);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.nav-btn {
  margin-right: 8px;
  padding: 9px 17px !important;
  background: var(--text) !important;
  color: var(--bg) !important;
  box-shadow: 0 5px 18px rgba(0,0,0,.28);
}

.nav-btn:hover {
  transform: translateY(-1px);
  background: #fff !important;
}

/* =========================
   HERO
   ========================= */

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 72px;
  padding: 0 0 82px;
}

.hero-content {
  padding-right: 18px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid rgba(125,165,142,.22);
  border-radius: 100px;
  background: var(--green-soft);
  color: var(--green);
  font-size: .74rem;
  font-weight: 600;
}

.dot,
.tag-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.dot {
  animation: pulse 2.4s ease-in-out infinite;
}

.hero-location {
  color: var(--text-muted);
  font-size: .7rem;
  letter-spacing: 1.1px;
  direction: ltr;
}

.hero h1 {
  max-width: 750px;
  font-size: clamp(2.65rem, 5vw, 4.65rem);
  line-height: 1.1;
  letter-spacing: -3.4px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 span {
  display: inline;
  color: #d5d1c8;
  position: relative;
}

.hero-copy {
  max-width: 560px;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 2.15;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 24px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font: inherit;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  transition: .28s var(--ease);
}

.btn svg {
  transition: transform .28s var(--ease);
}

.btn:hover svg {
  transform: translateX(-4px);
}

.btn-primary {
  color: var(--bg);
  background: var(--text);
  border-color: rgba(255,255,255,.25);
  box-shadow: 0 7px 24px rgba(0,0,0,.25);
}

.btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.36);
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--line-bright);
  transform: translateY(-2px);
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: .8rem;
}

.hero-note-line {
  width: 38px;
  height: 1px;
  background: var(--line-bright);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.portrait-wrap {
  width: min(100%, 365px);
  position: relative;
}

.portrait-index {
  position: absolute;
  top: -25px;
  left: 0;
  color: var(--text-faint);
  font-size: .65rem;
  letter-spacing: 2px;
  direction: ltr;
}

.avatar-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 6px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2xl);
  background: linear-gradient(145deg, #252528, #111113 70%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.07) inset,
    0 24px 70px rgba(0,0,0,.44);
    transition: 0.4s;
}
.avatar-frame:hover{
  transform: scale(1.015);
}
.avatar-frame::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: calc(var(--r-2xl) - 6px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
  pointer-events: none;
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--r-2xl) - 6px);
  filter: grayscale(.12) contrast(1.03);
}

.avatar-tag {
  position: absolute;
  right: -17px;
  bottom: 45px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--text);
  background: rgba(20,20,23,.94);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  font-size: .75rem;
  font-weight: 600;
  z-index: 2;
  direction: ltr;
}

.tag-dot {
  color: var(--green);
}

.portrait-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 4px 0;
  color: var(--text-muted);
  font-size: .72rem;
  direction: ltr;
}

.portrait-caption span:last-child {
  letter-spacing: 1.4px;
}

/* =========================
   STATS
   ========================= */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin-bottom: 70px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--line);
  box-shadow: 0 16px 45px rgba(0,0,0,.18);
}

.stat {
  position: relative;
  padding: 32px 20px;
  text-align: center;
  background: var(--surface);
  transition: .3s var(--ease);
}

.stat + .stat {
  border-right: 1px solid var(--line);
}

.stat:hover {
  background: var(--surface-2);
}

.stat-num {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -1.3px;
}

.stat-num span {
  margin-right: 2px;
  color: var(--text-soft);
  font-size: 1rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: .82rem;
}

/* =========================
   SECTIONS
   ========================= */

.section {
  padding: 120px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}

.section-header {
  max-width: 720px;
  margin: 0 auto 58px;
  text-align: center;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  color: var(--text-soft);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: rgba(255,255,255,.018);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.section-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-soft);
}

.section-header h2,
.section-intro h2 {
  color: var(--text);
  font-size: clamp(1.9rem, 3.5vw, 2.7rem);
  line-height: 1.35;
  letter-spacing: -1.4px;
  font-weight: 700;
}

.section-header > p {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 2.05;
}

/* =========================
   ABOUT
   ========================= */

.section-intro {
  display: grid;
  grid-template-columns: 1fr .9fr;
  align-items: end;
  gap: 80px;
  margin-bottom: 68px;
}

.section-intro .section-label {
  margin-bottom: 16px;
}

.section-intro-copy {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 2.05;
  max-width: 460px;
}

.about-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 70px;
  align-items: start;
}

.about-story {
  padding-top: 5px;
}

.about-story .lead {
  margin-bottom: 24px;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.95;
  font-weight: 500;
}

.about-story p:not(.lead) {
  color: var(--text-soft);
  font-size: .95rem;
  font-weight: 300;
  line-height: 2.15;
  margin-bottom: 18px;
}

.about-story p:not(.lead):last-child {
  margin-bottom: 0;
}

.principles {
  border-top: 1px solid var(--line);
}

.principle {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.principle-number {
  color: var(--text-faint);
  font-size: .72rem;
  letter-spacing: 1px;
  direction: ltr;
  padding-top: 4px;
}

.principle h3 {
  margin-bottom: 7px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.principle p {
  color: var(--text-muted);
  font-size: .85rem;
  line-height: 1.95;
}

/* =========================
   SKILLS
   ========================= */

.skills-content {
  max-width: 850px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: auto;
}

.skill {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: right;
  transition: .3s var(--ease);
}

.skill:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.skill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
  font-size: .9rem;
}

.skill-head > span:first-child {
  color: var(--text);
  font-weight: 600;
}

.skill-val {
  color: var(--text-muted);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #09090a;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #77736d, #e2ded6);
  transition: width 1.2s var(--ease-out);
}

.tech-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
  color: var(--text-faint);
  font-size: .72rem;
  letter-spacing: 1.1px;
  direction: ltr;
}

.tech-strip i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
}

/* =========================
   PROJECT
   ========================= */

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: .85fr 1fr auto;
  gap: 34px;
  align-items: center;
  max-width: 980px;
  margin: auto;
  padding: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface), #111113);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  box-shadow: 0 18px 55px rgba(0,0,0,.28);
  transition: .4s var(--ease);
  text-align: right;
}

.project-card::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  top: -180px;
  right: -120px;
  border-radius: 50%;
  background: rgba(255,255,255,.035);
  filter: blur(2px);
  transition: .4s var(--ease);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-bright);
  box-shadow: 0 28px 70px rgba(0,0,0,.38);
}

.project-card:hover::before {
  transform: scale(1.2);
}

.project-preview {
  position: relative;
  min-height: 185px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: #0d0d0f;
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
  direction: ltr;
}

.browser-bar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #171719;
}

.browser-bar span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #55535e;
}

.browser-bar b {
  margin-left: auto;
  margin-right: auto;
  color: #6c6970;
  font-size: 8px;
  font-weight: 500;
}

.browser-body {
  padding: 28px 22px;
}

.preview-line {
  width: 42%;
  height: 7px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #353439;
}

.preview-line.long {
  width: 72%;
  height: 12px;
  background: #d8d4cc;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 24px;
}

.preview-grid span {
  height: 58px;
  border: 1px solid #29282c;
  border-radius: 8px;
  background: #17171a;
}

.project-info {
  position: relative;
  z-index: 1;
}

.project-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--green);
  font-size: .72rem;
  font-weight: 600;
}

.pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.8s ease-in-out infinite;
}

.project-title {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.8px;
  direction: ltr;
  text-align: right;
}

.project-card p {
  max-width: 460px;
  color: var(--text-soft);
  font-size: .9rem;
  line-height: 2.05;
  font-weight: 300;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}

.project-tags span {
  padding: 5px 11px;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: .7rem;
  direction: ltr;
}

.project-arrow {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface-2);
  transition: .35s var(--ease-out);
}

.project-card:hover .project-arrow {
  color: var(--bg);
  background: var(--text);
  transform: rotate(-45deg);
}

/* CAPABILITIES (بخش جدید نمونه کار) */

.capabilities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--line);
}

.capability {
  position: relative;
  padding: 30px 26px;
  background: var(--surface);
  text-align: right;
  transition: .3s var(--ease);
}

.capability:hover {
  background: var(--surface-2);
}

.capability-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--text-soft);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  transition: .3s var(--ease);
}

.capability:hover .capability-icon {
  color: var(--text);
  border-color: var(--line-bright);
  background: var(--surface-3);
}

.capability h3 {
  margin-bottom: 9px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.2px;
}

.capability p {
  color: var(--text-muted);
  font-size: .84rem;
  line-height: 1.95;
  font-weight: 300;
}

/* =========================
   PROCESS
   ========================= */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.process-card {
  min-height: 230px;
  padding: 32px 26px;
  border-left: 1px solid var(--line);
  transition: .4s var(--ease);
}

.process-card:first-child {
  border-right: 0;
}
.process-card:last-child {
  border-left: 0;
}
.process-card:hover {
  background: rgba(255,255,255,.018);
}

.process-number {
  display: block;
  margin-bottom: 58px;
  color: var(--text-faint);
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  direction: rtl;
}

.process-card h3 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.2px;
}

.process-card p {
  color: var(--text-muted);
  font-size: .84rem;
  line-height: 2;
  font-weight: 300;
  text-align: right;
}

/* =========================
   CONTACT
   ========================= */

.contact-section {
  padding-bottom: 130px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 80px;
  align-items: center;
}

.contact-intro h2 {
  margin: 4px 0 20px;
  color: var(--text);
  font-size: clamp(2.2rem, 4.2vw, 3.5rem);
  line-height: 1.32;
  letter-spacing: -2.2px;
}

.contact-intro h2 em {
  color: #bdb9b1;
  font-style: normal;
}

.contact-intro p {
  max-width: 470px;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 2.05;
}

.contact-card {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  box-shadow: 0 18px 55px rgba(0,0,0,.28);
}

.contact-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 26px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.contact-avatar {
  width: 90px;
  height: 90px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-3);
}

.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.contact-name {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.2px;
}

.contact-role {
  color: var(--text-muted);
  font-size: .72rem;
  letter-spacing: 1px;
  direction: ltr;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: var(--r);
  transition: .28s var(--ease);
}

.contact-item:hover {
  background: var(--surface-2);
  border-color: var(--line);
}

.contact-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-3);
  transition: .28s var(--ease);
}

.contact-item:hover .contact-icon {
  color: var(--bg);
  background: var(--text);
}

.contact-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.contact-label {
  color: var(--text-muted);
  font-size: .68rem;
}

.contact-value {
  color: var(--text);
  font-size: .86rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-arrow {
  color: var(--text-faint);
  transition: .28s var(--ease);
}

.contact-item:hover .contact-arrow {
  color: var(--text);
  transform: translateX(-3px);
}

/* =========================
   CTA
   ========================= */

.cta {
  position: relative;
  overflow: hidden;
  padding: 115px 24px 125px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.cta::before,
.cta::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.035);
  border-radius: 50%;
}

.cta::before {
  width: 540px;
  height: 540px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.cta::after {
  width: 700px;
  height: 700px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: .5;
}

.cta > * {
  position: relative;
  z-index: 1;
}

.cta-eyebrow {
  display: block;
  margin-bottom: 20px;
  color: var(--text-faint);
  font-size: .68rem;
  letter-spacing: 2.5px;
  direction: ltr;
}

.cta h2 {
  margin-bottom: 20px;
  color: var(--text);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.28;
  letter-spacing: -2.2px;
}

.cta h2 span {
  color: #aaa69e;
}

.cta p {
  max-width: 520px;
  margin: 0 auto 34px;
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 2.05;
}

/* =========================
   FOOTER
   ========================= */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1120px, calc(100% - 48px));
  min-height: 90px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--text-faint);
  font-size: .74rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-links a {
  transition: color .2s;
}

.footer-links a:hover {
  color: var(--text);
}

/* =========================
   REVEAL
   ========================= */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   MOTION
   ========================= */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ============================================================
   RESPONSIVE — Large Tablet (≤ 980px)
   ============================================================ */
@media (max-width: 980px) {
  .container,
  .header-inner,
  .footer-inner {
    width: min(100% - 40px, 1120px);
  }

  .header-inner {
    height: 68px;
  }

  .nav a {
    padding: 8px 11px;
    font-size: .78rem;
  }

  .nav-btn {
    padding: 8px 15px !important;
  }

  /* HERO */
  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
    min-height: auto;
    padding: 60px 0 70px;
    margin-top: 0;
    text-align: center;
  }

  .hero-content {
    padding-right: 0;
    max-width: 640px;
    margin: 0 auto;
  }

  .hero-kicker {
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 26px;
  }

  .hero h1 {
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -2.4px;
    margin-bottom: 24px;
  }

  .hero-copy {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 32px;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-note {
    justify-content: center;
    margin-top: 32px;
  }

  .portrait-wrap {
    width: min(100%, 340px);
  }

  /* STATS */
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat {
    padding: 28px 18px;
  }

  .stat + .stat {
    border-right: 0;
  }

  .stat:nth-child(even) {
    border-right: 1px solid var(--line);
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  /* SECTIONS */
  .section {
    padding: 88px 0;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .section-intro {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
    margin-bottom: 52px;
  }

  .section-intro-copy {
    margin-left: auto;
    margin-right: auto;
    max-width: 520px;
  }

  /* ABOUT */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-story {
    text-align: center;
    max-width: 580px;
    margin: 0 auto;
  }

  /* PRINCIPLES */
  .principle {
    grid-template-columns: 44px 1fr;
    gap: 18px;
    text-align: right;
  }

  /* SKILLS */
  .skills-content {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  /* PROJECT */
  .project-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .project-preview {
    min-height: 200px;
  }

  .project-arrow {
    position: static;
    justify-self: end;
  }

  /* CAPABILITIES */
  .capabilities {
    grid-template-columns: repeat(2, 1fr);
  }

  /* PROCESS */
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-card {
    min-height: 200px;
    padding: 26px 22px;
  }

  .process-card:nth-child(2) {
    border-left: 0;
  }

  .process-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .process-number {
    margin-bottom: 40px;
  }

  /* CONTACT */
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-intro {
    text-align: center;
    max-width: 580px;
    margin: 0 auto;
  }

  .contact-intro p {
    margin-left: auto;
    margin-right: auto;
  }

  /* CTA */
  .cta {
    padding: 95px 20px 105px;
  }
}

/* ============================================================
   RESPONSIVE — Small Tablet / Phone (≤ 700px)
   ============================================================ */
@media (max-width: 700px) {
  .container,
  .header-inner,
  .footer-inner {
    width: min(100% - 32px, 1120px);
  }

  .header-inner {
    height: 64px;
  }

  .logo {
    font-size: 1rem;
  }

  .nav a:not(.nav-btn) {
    display: none;
  }

  .nav-btn {
    margin-right: 0;
    padding: 8px 16px !important;
    font-size: .78rem;
  }

  /* HERO */
  .hero {
    padding: 50px 0 60px;
    gap: 48px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 9.5vw, 3.4rem);
    letter-spacing: -1.8px;
    line-height: 1.22;
  }

  .hero-copy {
    font-size: 1rem;
    line-height: 2;
  }

  .portrait-wrap {
    width: min(100%, 300px);
  }

  .avatar-tag {
    right: 50%;
    transform: translateX(50%);
    bottom: 28px;
    font-size: .7rem;
    padding: 9px 14px;
  }

  .portrait-index {
    top: -22px;
    font-size: .6rem;
  }

  /* STATS */
  .stat {
    padding: 24px 14px;
  }

  .stat-num {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: .76rem;
  }

  /* SECTIONS */
  .section {
    padding: 72px 0;
  }

  .section-header {
    margin-bottom: 42px;
  }

  .section-header h2,
  .section-intro h2 {
    font-size: clamp(1.7rem, 6.5vw, 2.2rem);
    letter-spacing: -1.1px;
  }

  .section-header > p,
  .section-intro-copy {
    font-size: .92rem;
    line-height: 2;
  }

  .section-label {
    font-size: .68rem;
    padding: 6px 12px;
    margin-bottom: 16px;
  }

  /* ABOUT */
  .about-grid {
    gap: 40px;
  }

  .about-story .lead {
    font-size: 1.1rem;
    line-height: 1.85;
  }

  .about-story p:not(.lead) {
    font-size: .92rem;
    line-height: 2.05;
  }

  /* PRINCIPLES */
  .principle {
    padding: 22px 0;
    gap: 14px;
    grid-template-columns: 34px 1fr;
  }

  .principle-number {
    font-size: .68rem;
  }

  .principle h3 {
    font-size: .96rem;
  }

  .principle p {
    font-size: .82rem;
  }

  /* SKILLS */
  .skills-content {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .skill {
    padding: 20px 22px;
  }

  .tech-strip {
    margin-top: 30px;
    gap: 12px;
    font-size: .68rem;
  }

  /* PROJECT */
  .project-card {
    padding: 20px;
    gap: 20px;
  }

  .project-preview {
    min-height: 180px;
  }

  .project-title {
    font-size: 1.5rem;
  }

  .project-card p {
    font-size: .86rem;
  }

  /* دکمه پیکان — سفید در موبایل */
  .project-arrow {
    width: 52px;
    height: 52px;
    color: var(--bg);
    background: var(--text);
    border-color: transparent;
  }

  .project-card:hover .project-arrow {
    transform: none;
  }

  /* CAPABILITIES */
  .capabilities {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .capability {
    padding: 26px 24px;
  }

  /* PROCESS */
  .process-grid {
    grid-template-columns: 1fr;
  }

  .process-card,
  .process-card:nth-child(2) {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    min-height: auto;
    padding: 26px 22px;
  }

  .process-card:last-child {
    border-bottom: 0;
  }

  .process-number {
    margin-bottom: 20px;
  }

  .process-card h3 {
    font-size: .98rem;
  }

  .process-card p {
    font-size: .82rem;
  }

  /* CONTACT */
  .contact-layout {
    gap: 34px;
  }

  .contact-intro h2 {
    font-size: clamp(1.9rem, 7.5vw, 2.6rem);
    letter-spacing: -1.6px;
  }

  .contact-intro p {
    font-size: .92rem;
  }

  .contact-card {
    padding: 22px;
  }

  .contact-top {
    padding-bottom: 20px;
    gap: 14px;
  }

  .contact-avatar {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
  }

  .contact-name {
    font-size: 1rem;
  }

  .contact-item {
    padding: 12px;
  }

  .contact-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

  .contact-value {
    font-size: .82rem;
  }

  /* CTA */
  .cta {
    padding: 80px 20px 90px;
  }

  .cta h2 {
    font-size: clamp(1.9rem, 7.5vw, 2.8rem);
    letter-spacing: -1.6px;
  }

  .cta p {
    font-size: .88rem;
  }

  .cta::before {
    width: 380px;
    height: 380px;
  }

  .cta::after {
    width: 500px;
    height: 500px;
  }

  /* FOOTER */
  .footer-inner {
    flex-direction: column;
    gap: 14px;
    padding: 28px 0;
    text-align: center;
  }

  .footer-links {
    gap: 18px;
  }
}

/* ============================================================
   RESPONSIVE — Small Phone (≤ 430px)
   ============================================================ */
@media (max-width: 430px) {
  .container,
  .header-inner,
  .footer-inner {
    width: calc(100% - 28px);
  }

  /* HERO */
  .hero {
    padding: 40px 0 50px;
    gap: 42px;
  }

  .hero h1 {
    font-size: clamp(1.95rem, 10vw, 2.8rem);
    letter-spacing: -1.4px;
  }

  .hero-copy {
    font-size: .95rem;
  }

  .hero-status {
    font-size: .7rem;
    padding: 6px 11px;
  }

  .hero-location {
    font-size: .6rem;
  }

  .portrait-wrap {
    width: min(100%, 260px);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    min-height: 46px;
    padding: 12px 20px;
    font-size: .82rem;
  }

  /* STATS */
  .stat {
    padding: 22px 10px;
  }

  .stat-num {
    font-size: 1.6rem;
    letter-spacing: -1px;
  }

  .stat-num span {
    font-size: .85rem;
  }

  .stat-label {
    font-size: .7rem;
  }

  /* SECTIONS */
  .section {
    padding: 62px 0;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .section-header h2,
  .section-intro h2 {
    font-size: clamp(1.55rem, 7.5vw, 1.9rem);
    letter-spacing: -.9px;
  }

  .section-label {
    font-size: .64rem;
    padding: 5px 11px;
    letter-spacing: 1.2px;
  }

  /* ABOUT */
  .about-story .lead {
    font-size: 1.02rem;
  }

  .about-story p:not(.lead) {
    font-size: .88rem;
    line-height: 2;
  }

  /* PRINCIPLES */
  .principle {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 20px 0;
  }

  .principle-number {
    padding-top: 0;
    font-size: .65rem;
  }

  .principle h3 {
    font-size: .92rem;
  }

  .principle p {
    font-size: .8rem;
  }

  /* SKILLS */
  .skill {
    padding: 18px 20px;
  }

  .skill-head {
    font-size: .84rem;
  }

  /* PROJECT */
  .project-card {
    padding: 16px;
    gap: 18px;
    border-radius: var(--r-lg);
  }

  .project-preview {
    min-height: 160px;
  }

  .browser-bar {
    height: 30px;
  }

  .browser-body {
    padding: 18px 16px;
  }

  .project-title {
    font-size: 1.3rem;
  }

  .project-card p {
    font-size: .82rem;
  }

  .project-arrow {
    width: 48px;
    height: 48px;
  }

  /* CAPABILITIES */
  .capability {
    padding: 22px 20px;
  }

  .capability-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 16px;
  }

  .capability h3 {
    font-size: .92rem;
  }

  .capability p {
    font-size: .8rem;
  }

  /* PROCESS */
  .process-card,
  .process-card:nth-child(2) {
    padding: 24px 20px;
  }

  .process-number {
    margin-bottom: 16px;
  }

  .process-card h3 {
    font-size: .94rem;
  }

  .process-card p {
    font-size: .8rem;
  }

  /* CONTACT */
  .contact-intro h2 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
    letter-spacing: -1.3px;
  }

  .contact-intro p {
    font-size: .88rem;
  }

  .contact-card {
    padding: 18px;
  }

  .contact-top {
    gap: 12px;
    padding-bottom: 18px;
  }

  .contact-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
  }

  .contact-name {
    font-size: .94rem;
  }

  .contact-item {
    padding: 10px;
    gap: 10px;
  }

  .contact-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .contact-label {
    font-size: .62rem;
  }

  .contact-value {
    font-size: .78rem;
  }

  /* CTA */
  .cta {
    padding: 70px 16px 80px;
  }

  .cta h2 {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
    letter-spacing: -1.3px;
  }

  .cta p {
    font-size: .84rem;
  }

  .cta::before {
    width: 300px;
    height: 300px;
  }

  .cta::after {
    width: 400px;
    height: 400px;
  }

  /* FOOTER */
  .footer-inner {
    font-size: .68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}