/* =========================================================
   Dr. Alireza Emamzade — personal site
   Plain CSS, no build step. Edit the variables below to
   change the whole color scheme.
   ========================================================= */

:root {
  --bg: #f7faf9;
  --surface: #ffffff;
  --ink: #0c2a2f;
  --ink-soft: #33525a;
  --muted: #526d76;
  --line: #e0eae8;

  --brand: #0e7c6b;
  --brand-dark: #095a4e;
  --brand-soft: #e7f4f0;
  --accent: #c98a2b;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --shadow-sm: 0 2px 8px rgba(12, 42, 47, .05);
  --shadow: 0 14px 40px -18px rgba(12, 42, 47, .30);
  --shadow-lg: 0 30px 70px -30px rgba(12, 42, 47, .40);

  --container: 1120px;
  --header-h: 76px;

  --font: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
}

/* ---------- fonts (self-hosted, offline-friendly) ---------- */
@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
  letter-spacing: -.01em;
}

p { margin: 0; }
ul { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.icon { width: 1.15em; height: 1.15em; flex: none; }

.skip-link {
  position: fixed;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 10px 10px;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 250, 249, .82);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, .92);
}

.header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-inline-end: auto;
}

.brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  box-shadow: 0 8px 18px -8px rgba(14, 124, 107, .8);
}
.brand__mark svg { width: 20px; height: 20px; }

.brand__text { display: flex; flex-direction: column; line-height: 1.35; }
.brand__text strong { font-size: .98rem; color: var(--ink); font-weight: 700; }
.brand__text small { font-size: .74rem; color: var(--muted); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  font-size: .93rem;
  color: var(--ink-soft);
}
.nav__links a {
  position: relative;
  padding-block: .35rem;
  transition: color .2s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}
.nav__links a:hover { color: var(--brand-dark); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary {
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 26px -14px rgba(14, 124, 107, .9);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px -16px rgba(14, 124, 107, .95);
}
.btn--ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  transform: translateY(-2px);
}
.btn--sm { padding: .62rem 1.15rem; font-size: .86rem; }
.btn--block { width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3rem, 7vw, 6rem);
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(46% 60% at 78% 12%, rgba(14, 124, 107, .16), transparent 70%),
    radial-gradient(38% 55% at 12% 0%, rgba(201, 138, 43, .13), transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.1rem;
  padding: .4rem .9rem .4rem .75rem;
  border: 1px solid rgba(14, 124, 107, .22);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .8rem;
  font-weight: 600;
}
.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(14, 124, 107, .16);
}
.eyebrow__en { font-weight: 500; opacity: .8; }

.hero__title {
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
}
.text-accent {
  color: var(--brand-dark);
  position: relative;
  white-space: nowrap;
}
.text-accent::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: .08em;
  height: .28em;
  border-radius: 4px;
  background: rgba(201, 138, 43, .22);
  z-index: -1;
}

.hero__lead {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 1.5rem;
}

.hero__list {
  list-style: none;
  display: grid;
  gap: .55rem;
  margin-bottom: 1.9rem;
  max-width: 48ch;
}
.hero__list li {
  position: relative;
  padding-inline-start: 1.9rem;
  font-size: .97rem;
  color: var(--ink);
}
.hero__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .55em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e7c6b' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 11px no-repeat;
  transform: translateY(-50%);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

/* portrait */
.hero__media { display: flex; justify-content: center; }

.portrait {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 4 / 5;
  margin: 0;
}
.portrait::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 22px -18px -18px 22px;
  border-radius: 42px;
  background: linear-gradient(145deg, rgba(14, 124, 107, .16), rgba(201, 138, 43, .18));
  border: 1px solid rgba(14, 124, 107, .14);
}
.portrait__glow {
  position: absolute;
  inset: -6% -4% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(14, 124, 107, .26), rgba(201, 138, 43, .14), transparent 72%);
  filter: blur(30px);
  z-index: 0;
}
.portrait__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  border-radius: 40px;
  border: 7px solid var(--surface);
  background: var(--brand-soft);
  box-shadow: var(--shadow-lg);
}
.portrait__badge {
  position: absolute;
  z-index: 2;
  inset-inline-start: -.25rem;
  bottom: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .58rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: .84rem;
  font-weight: 600;
}
.portrait__badge svg { width: 16px; height: 16px; color: var(--brand); }

/* ---------- quick facts strip ---------- */
.stats {
  position: relative;
  z-index: 2;
  margin-top: -1.5rem;
}
.stats__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 1.5rem .75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.stat {
  padding-inline: 1.1rem;
  text-align: center;
}
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat strong {
  display: block;
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--brand-dark);
}
.stat span {
  display: block;
  font-size: .8rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tint {
  background:
    linear-gradient(180deg, rgba(231, 244, 240, .55), rgba(231, 244, 240, .15));
  border-block: 1px solid var(--line);
}

.section__head { max-width: 62ch; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.section__kicker {
  display: inline-block;
  margin-bottom: .55rem;
  color: var(--brand);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.section__title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  margin-bottom: .6rem;
}
.section__desc { color: var(--muted); }

/* ---------- service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}
.card {
  padding: 1.6rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 124, 107, .35);
  box-shadow: var(--shadow);
}
.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  border-radius: 14px;
  color: var(--brand-dark);
  background: var(--brand-soft);
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .45rem; }
.card p { font-size: .92rem; color: var(--muted); line-height: 1.85; }

/* ---------- resume ---------- */
.resume {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(1.8rem, 5vw, 3.5rem);
  align-items: start;
}

.checklist {
  list-style: none;
  display: grid;
  gap: .85rem;
  margin-top: 1.6rem;
}
.checklist li {
  position: relative;
  padding-inline-start: 2.1rem;
  color: var(--ink-soft);
  font-size: .96rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .5em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(14, 124, 107, .28);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e7c6b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 11px no-repeat;
  transform: translateY(-50%);
}

.resume-card {
  padding: 1.9rem 1.6rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.resume-card__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 26px -14px rgba(14, 124, 107, .9);
}
.resume-card__icon svg { width: 28px; height: 28px; }
.resume-card h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.resume-card > p { color: var(--muted); font-size: .88rem; }
.resume-card .btn { margin-block: 1.25rem .9rem; }
.resume-card__hint {
  font-size: .8rem !important;
  line-height: 1.8;
  color: var(--muted);
  padding-top: .9rem;
  border-top: 1px dashed var(--line);
}

/* ---------- direct contact ---------- */
.direct {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .9rem;
  margin-bottom: 1.1rem;
}
.direct__card {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.05rem 1.2rem;
  background: var(--brand-soft);
  border: 1px solid rgba(14, 124, 107, .18);
  border-radius: var(--radius);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .25s ease;
}
.direct__card:hover {
  transform: translateY(-2px);
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.direct__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
  color: var(--brand-dark);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.direct__icon svg { width: 21px; height: 21px; }
.direct__body { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.direct__body small { font-size: .76rem; color: var(--muted); }
.direct__body strong {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- socials ---------- */
.socials {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .9rem;
}
.socials > li { grid-column: span 2; }
.socials > li:nth-child(4),
.socials > li:nth-child(5) { grid-column: span 3; }

.social {
  --c: var(--brand);
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.social:hover {
  transform: translateY(-3px);
  border-color: var(--c);
  box-shadow: 0 18px 34px -22px rgba(12, 42, 47, .55);
}
.social__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  color: var(--c);
  background: #f1f7f6;
  transition: background .25s ease, color .25s ease;
}
.social:hover .social__icon { background: var(--c); color: #fff; }
.social__icon svg { width: 24px; height: 24px; }

/* app-icon style tiles for messengers (official logos) */
.social__icon--app { background: transparent; border-radius: 14px; }
.social__icon--app img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 9px;
  transition: transform .25s ease;
}
.social:hover .social__icon--app { background: transparent; color: inherit; }
.social:hover .social__icon--app img { transform: scale(1.07); }

.icon--brand { border-radius: 50%; object-fit: contain; }

.social__body { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.social__body strong { font-size: .96rem; color: var(--ink); font-weight: 700; }
.social__body small {
  font-size: .8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.social__arrow {
  width: 18px;
  height: 18px;
  margin-inline-start: auto;
  color: var(--muted);
  opacity: .6;
  transition: transform .25s ease, opacity .25s ease, color .25s ease;
}
.social:hover .social__arrow {
  transform: translateX(-4px);
  opacity: 1;
  color: var(--c);
}

.social--telegram { --c: #229ed9; }
.social--whatsapp { --c: #1faa55; }
.social--linkedin { --c: #0a66c2; }
.social--bale     { --c: #00b894; }
.social--eitaa    { --c: #ff7634; }

/* ---------- footer ---------- */
.site-footer {
  padding-block: 1.8rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .85rem;
  color: var(--muted);
}
.footer__brand { display: flex; flex-direction: column; line-height: 1.5; }
.footer__brand strong { color: var(--ink); font-size: .95rem; }
.footer__brand span { font-size: .78rem; }
.footer__note { margin: 0; }
.footer__top { color: var(--brand-dark); font-weight: 600; }

/* ---------- reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .portrait { width: min(100%, 330px); }
  .resume { grid-template-columns: 1fr; }
  .resume-card { max-width: 460px; }
}

@media (max-width: 980px) {
  .socials { grid-template-columns: repeat(2, 1fr); }
  .socials > li,
  .socials > li:nth-child(4),
  .socials > li:nth-child(5) { grid-column: span 1; }
  .socials > li:last-child { grid-column: span 2; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    inset-inline: 0;
    top: var(--header-h);
    padding-inline: 1.25rem;
  }
  .nav__links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: .4rem;
    padding: .5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { display: block; padding: .75rem .9rem; border-radius: 10px; }
  .nav__links a::after { content: none; }
  .nav__links a:hover { background: var(--brand-soft); }
  .header__cta { display: none; }

  .site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 760px) {
  .stats__inner { grid-template-columns: repeat(2, 1fr); row-gap: 1.3rem; }
  .stat + .stat { border-inline-start: 0; }
  .stat:nth-child(even) { border-inline-start: 1px solid var(--line); }
  .direct { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 1.75rem, var(--container)); }
  .socials { grid-template-columns: 1fr; }
  .socials > li:last-child { grid-column: span 1; }
  .brand__text small { display: none; }
  .eyebrow__en { display: none; }
  .hero__actions .btn { flex: 1 1 100%; }
  .portrait__badge { inset-inline-start: 0; bottom: .6rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .hero__actions, .site-footer, .social__arrow { display: none; }
  body { background: #fff; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
