/* ===== سمیرا هادوی | صفحه «در حال طراحی» =====
   ایده: کل صفحه شبیه یک Figure در MATLAB است؛
   شبکه‌ی نمودار + موج‌هایی با رنگ‌های پیش‌فرض متلب. */

:root {
  --bg: #f3f6f9;
  --paper: #ffffff;
  --ink: #14233a;
  --muted: #5a6b80;
  --grid: rgba(20, 35, 58, .07);

  /* رنگ‌های پیش‌فرض نمودار در MATLAB */
  --m-blue: #0072bd;
  --m-orange: #d95319;
  --m-yellow: #edb120;
  --m-purple: #7e2f8e;

  --font: "Vazirmatn", "Vazir", "IRANSans", Tahoma, system-ui, sans-serif;
}

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

html, body {
  height: 100%;
  overflow: hidden;           /* بدون اسکرول */
}

body {
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* محو شدن شبکه در لبه‌ها */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 35%, var(--bg) 100%);
  pointer-events: none;
  z-index: 0;
}

#signal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ===== چیدمان اصلی ===== */
.stage {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100dvh;
  max-width: 1200px;
  margin-inline: auto;
  padding: clamp(20px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1.1fr .9fr;   /* در RTL ستون اول سمت راست است */
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
}

/* ===== متن‌ها ===== */
.info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(10px, 2vh, 20px);
  min-width: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: clamp(.8rem, 1.2vw, .95rem);
  font-weight: 500;
  color: var(--m-orange);
  background: rgba(217, 83, 25, .08);
  border: 1px solid rgba(217, 83, 25, .25);
  border-radius: 999px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--m-orange);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(217, 83, 25, .55); }
  100% { box-shadow: 0 0 0 12px rgba(217, 83, 25, 0); }
}

.name {
  font-size: clamp(2.6rem, 7.2vw, 5.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
}

.role {
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  font-weight: 500;
  color: var(--m-blue);
  line-height: 1.7;
}

.exp {
  font-size: clamp(.95rem, 1.5vw, 1.15rem);
  color: var(--muted);
  line-height: 1.9;
  max-width: 34ch;
}

.exp strong {
  color: var(--ink);
  font-weight: 800;
}

.latin {
  display: inline-block;
  font-family: Consolas, "SF Mono", Menlo, monospace;
  font-weight: 700;
  color: var(--m-orange);
  background: var(--paper);
  padding: 0 .5em;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(20, 35, 58, .1);
}

/* ===== پنجره‌ی Command Window ===== */
.cmd {
  margin-top: clamp(4px, 1.5vh, 16px);
  width: min(100%, 340px);
  background: var(--paper);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(20, 35, 58, .09),
    0 18px 40px -18px rgba(20, 35, 58, .35);
}

.cmd-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #e8eef4;
  font-family: var(--font);
  font-size: .72rem;
  color: var(--muted);
}

.cmd-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c5d0db;
}

.cmd-bar span { margin-inline-start: 6px; }

.cmd pre {
  min-height: 7.4em;
  padding: 12px 16px 14px;
  font-family: Consolas, "SF Mono", Menlo, monospace;
  font-size: .85rem;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  text-align: left;
}

.cmd .p { color: var(--m-blue); font-weight: 700; }
.cmd .s { color: var(--m-purple); }

.cmd .caret {
  display: inline-block;
  width: .55em;
  height: 1.05em;
  vertical-align: -.2em;
  background: var(--m-orange);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ===== عکس ===== */
.portrait {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  min-height: 0;
}

.frame {
  position: relative;
  height: min(76dvh, 640px);
  aspect-ratio: 4 / 5;
  max-width: 100%;
  border-radius: 999px 999px 28px 28px;   /* قوس بالا مثل پنجره‌ی نمودار */
  background: linear-gradient(160deg, #dfe9f2, #f7f9fb);
  isolation: isolate;
}

/* قاب نارنجی با فاصله */
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(-16px, 16px);
  border: 2px solid var(--m-orange);
  border-radius: inherit;
  z-index: -1;
}

/* بلوک آبی پشت عکس */
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(14px, -10px);
  background: var(--m-blue);
  opacity: .12;
  border-radius: inherit;
  z-index: -2;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
  display: block;
  box-shadow: 0 30px 60px -28px rgba(20, 35, 58, .55);
}

.initials {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  font-size: 4rem;
  font-weight: 900;
  color: var(--m-blue);
}

.frame.no-img img { display: none; }
.frame.no-img .initials { display: grid; }

/* ===== موبایل و تبلت ===== */
@media (max-width: 820px) {
  .stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-content: center;
    justify-items: center;
    text-align: center;
    gap: clamp(14px, 3dvh, 28px);
    padding: clamp(16px, 4vw, 32px);
  }

  .portrait {
    order: -1;
    height: auto;
  }

  .frame {
    height: clamp(170px, 34dvh, 340px);
  }

  .frame::before { transform: translate(-10px, 10px); }
  .frame::after  { transform: translate(9px, -6px); }

  .info {
    align-items: center;
    gap: clamp(8px, 1.6dvh, 16px);
  }

  .name { font-size: clamp(2.2rem, 10vw, 3.4rem); }
  .exp  { max-width: 30ch; }
}

/* صفحه‌های کوتاه: پنجره‌ی کد حذف می‌شود تا همه‌چیز بدون اسکرول جا شود */
@media (max-height: 700px) {
  .cmd { display: none; }
}

@media (max-width: 820px) and (max-height: 760px) {
  .frame { height: clamp(140px, 28dvh, 240px); }
  .exp { font-size: .9rem; line-height: 1.7; }
}

/* موبایل در حالت افقی */
@media (max-height: 480px) and (orientation: landscape) {
  .stage {
    grid-template-columns: 1.1fr .9fr;
    grid-template-rows: none;
    text-align: right;
    justify-items: stretch;
    padding: 12px 24px;
  }
  .portrait { order: 0; height: 100%; }
  .frame { height: 78dvh; }
  .info { align-items: flex-start; }
  .name { font-size: clamp(1.8rem, 6vw, 2.8rem); }
  .status { padding: 4px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .dot, .cmd .caret { animation: none; }
}
