/* ==========================================================================
   RESUME SITE — Beige / Brown Monotone
   Palette is intentionally two-tone (warm beige + dark charcoal-brown),
   with tints/shades of those same two colors used for hierarchy —
   no third accent color is introduced, per the "monotone" brief.
   ========================================================================== */

:root{
  /* --- Color tokens (edit these to re-theme the whole site) --- */
  --bg:        #F4EBE1;                 /* warm beige — page background   */
  --bg-deep:   #EAD9C4;                 /* deeper beige — panels/tags     */
  --ink:       #332C27;                 /* dark charcoal-brown — text/UI  */
  --ink-soft:  #5C4E40;                 /* muted brown — secondary text   */
  --line:      rgba(51, 44, 39, 0.16);  /* hairline dividers / grid       */
  --line-strong: rgba(51, 44, 39, 0.32);
  --shadow:    rgba(51, 44, 39, 0.22);

  /* --- Type --- */
  --font-fa:     'Vazirmatn', Tahoma, sans-serif;
  --font-serif:  'Playfair Display', 'Times New Roman', serif;

  /* --- Motion --- */
  --ease: cubic-bezier(.22,1,.36,1);
  --dur:  .7s;
}

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

html{
  scroll-behavior: smooth;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-fa);
  direction: rtl;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

::selection{
  background: var(--ink);
  color: var(--bg);
}

img{ max-width: 100%; display: block; }

/* Faint blueprint grid — a quiet nod to the industrial / structured subject */
.grid-overlay{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 40%, transparent 85%);
}

.page{
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) clamp(1.25rem, 5vw, 2.5rem);
}

/* ==========================================================================
   Eyebrow labels — small serif English captions, the "elegant serif heading"
   requirement realised as bilingual editorial labels above each section.
   ========================================================================== */
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  direction: ltr; /* keep the Latin label reading naturally */
  justify-content: flex-end; /* align to the right, matching RTL page flow */
  width: 100%;
}
.eyebrow::before{
  content: '';
  width: 30px;
  height: 1px;
  background: var(--ink-soft);
  display: inline-block;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
  min-height: 78vh;
  padding-block: 2rem;
}

/* --- Photo block --- */
.hero-media{
  position: relative;
  padding: 22px;
  justify-self: center;
}

.frame-marks .mark{
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--ink-soft);
  border-style: solid;
  opacity: .55;
}
.mark--tl{ top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.mark--tr{ top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.mark--bl{ bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }
.mark--br{ bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }

.arch-photo{
  position: relative;
  width: min(80vw, 320px);
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg-deep);
  border: 1.5px solid var(--ink);
  border-radius: 50% 50% 0 0;
  box-shadow: 0 30px 55px -25px var(--shadow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.hero-media:hover .arch-photo{
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 40px 65px -25px var(--shadow);
}

.profile-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.photo-placeholder{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  color: var(--ink-soft);
  font-size: .78rem;
  text-align: center;
  padding: 1rem;
}

.media-caption{
  display: block;
  text-align: center;
  margin-top: .9rem;
  font-size: .78rem;
  color: var(--ink-soft);
  letter-spacing: .04em;
}

/* --- Text block --- */
.hero-content{ min-width: 0; }

.name{
  font-family: var(--font-fa);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.15;
  margin: 0 0 .5rem;
  letter-spacing: -.01em;
}

.subtitle{
  margin: 0 0 1.4rem;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--ink-soft);
  font-weight: 400;
}

.tags{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2rem;
}
.tag{
  font-size: .8rem;
  padding: .4rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(51,44,39,0.03);
}

.actions{
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}

/* ==========================================================================
   Buttons — transparent, thin border, fill sweeps in on hover/focus
   ========================================================================== */
.btn{
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .9rem 1.9rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-fa);
  font-weight: 500;
  font-size: .95rem;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: color .5s var(--ease), transform .3s var(--ease);
}

.btn::before{
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .5s var(--ease);
}

.btn:hover,
.btn:focus-visible{
  color: var(--bg);
}
.btn:hover::before,
.btn:focus-visible::before{
  transform: scaleX(1);
}
.btn:active{ transform: scale(.97); }

.btn:focus-visible{
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ==========================================================================
   Dividers — small arch echo, ties hero photo shape to the rest of the page
   ========================================================================== */
.divider{
  position: relative;
  height: 1px;
  background: var(--line-strong);
  margin: clamp(2rem, 6vw, 4rem) 0;
}
.divider-arch{
  position: absolute;
  top: -9px;
  right: 50%;
  transform: translateX(50%);
  width: 18px;
  height: 9px;
  border: 1.5px solid var(--ink);
  border-bottom: none;
  border-radius: 50% 50% 0 0;
  background: var(--bg);
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about{
  max-width: 760px;
  margin: 0 auto;
  text-align: right;
}

.section-title{
  font-family: var(--font-fa);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 1.4rem;
}

.about-text{
  font-size: 1.03rem;
  line-height: 1.95;
  color: var(--ink);
  opacity: .92;
  margin: 0 0 1.2rem;
}
.about-text:last-child{ margin-bottom: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer{
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--ink-soft);
}

/* ==========================================================================
   REVEAL ANIMATIONS — fade-in + slide-up, staggered
   ========================================================================== */
[data-reveal]{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--delay, 0) * 110ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible{
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce){
  [data-reveal]{
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-media:hover .arch-photo{ transform: none; }
  .btn, .btn::before{ transition: none; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 860px){
  .hero{
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
    gap: 2.5rem;
    padding-block: 1rem;
  }
  .eyebrow{ justify-content: center; }
  .tags, .actions{ justify-content: center; }
  .about{ text-align: center; }
}

@media (max-width: 420px){
  .actions{ flex-direction: column; align-items: stretch; }
  .btn{ text-align: center; }
}
