/* ==========================================================================
   Zahra Ghaderi - Personal Portfolio Landing Page
   Dark Mode UI/UX Design matching image_0.png strictly
   ========================================================================== */

/* Font Imports */
/*
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');
*/

#freelance-txt{
  font-size: 16px;
  font-weight: bolder;
  color: #C097FF;
  border-bottom: 0.1px solid #6850508f;
}
#freelance-txt:hover{
  font-size: 17px;
  transition: 1s;
}
/* CSS Variables */
:root {
  --bg-dark: #121316;
  --bg-card: #18191e;
  --bg-card-hover: #202229;
  --bg-light-section: #ede7dc;
  --bg-light-card: #f5f0e6;

  --accent-orange: #6D28D9;
--accent-orange-glow: rgba(109, 40, 217, 0.35);
--accent-orange-light: #F3E8FF;

  --text-white: #ffffff;
  --text-gray-light: #c5c8d0;
  --text-gray-muted: #848995;
  --text-dark: #1e2024;
  --text-dark-muted: #5e626d;

  --font-main: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  --font-persian: 'Vazirmatn', sans-serif;
  --font-handwritten: 'Caveat', cursive;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-orange: 0 10px 30px rgba(109, 40, 217, 0.28);
}

/* @font-face {
  font-family: Kalligraaf-Medium;
  src: url("../font/Kalligraaf-Medium.otf");
}
@font-face {
  font-family: iphone-Medium;
  src: url("../font/iphone-Medium.ttf");
} */
@font-face {
  font-family: digi-kodak;
  src: url("../font/digi-kodak.ttf");
}
*:not(i) {
  font-family: digi-kodak!important;
}
/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

/* Typography Utilities */
.persian-text {
  font-family: var(--font-persian);
  direction: rtl;
}

.handwritten {
  font-family: var(--font-handwritten);
}

/* Background Mountain Layer */
.mountain-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 70% 30%, rgba(255, 107, 44, 0.12) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(18, 19, 22, 0.4) 0%, rgba(18, 19, 22, 0.95) 85%, var(--bg-dark) 100%);
  z-index: 1;
  pointer-events: none;
}

.mountain-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../pics/mountain_bg.jpg');
  background-size: 110% 110%;
  background-position: center 20%;
  filter: blur(28px) opacity(0.2);
  transform: none;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

/* Navigation Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.5rem 0;
  transition: var(--transition-smooth);
}

header.scrolled {
  background: rgba(18, 19, 22, 0.85);
  backdrop-filter: blur(16px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-handwritten);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.logo span.star {
  color: var(--accent-orange);
  font-size: 1.4rem;
}

.logo .star-before,
.logo .star-after {
  display: inline-flex;
  align-items: center;
}

.logo .star-before {
  display: none;
}

.logo-english {
  display: inline;
}

.logo-persian {
  display: inline;
}

.logo:hover {
  transform: scale(1.03);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text-white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text-white);
}

.btn-lets-talk {
  background: var(--accent-orange);
  color: var(--text-white);
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: var(--shadow-orange);
  transition: var(--transition-smooth);
  border: 2px solid transparent;
}

.btn-lets-talk:hover {
  transform: translateY(-2px) scale(1.03);
  background: #7E3AF2;
  box-shadow: 0 12px 30px rgba(109, 40, 217, 0.45);
}

/* HERO SECTION */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 9rem;
  padding-bottom: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

/* Background Layer */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(18, 19, 22, 0.28) 0%,
      rgba(18, 19, 22, 0.38) 40%,
      rgba(18, 19, 22, 0.58) 100%);
  pointer-events: none;
}

/* Decorative hero arrows */
.arrow-left-decor,
.arrow-right-decor {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  opacity: 0.95;
}

.arrow-left-decor {
  left: 1rem;
  bottom: -12.5rem;
  width: clamp(220px, 24vw, 320px);
  transform: rotate(-6deg);
  width: 21rem;
}

.arrow-right-decor {
  right: 14.5rem;
  bottom: 4rem;
  width: clamp(240px, 28vw, 360px);
  transform: rotate(26deg);
  width: 23rem;
  z-index: 5;
}
/* Subject Layer — absolute bottom anchor */
.hero-subject-wrapper {
  position: absolute;
  bottom: 0;
  left: 43%;
  transform: translateX(-54%);
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  height: calc(100% - 4.5rem);
}

/* Ambient glow behind the subject */
.hero-subject-wrapper::before {
  content: '';
  position: absolute;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  width: 76%;
  height: 62%;
  background: radial-gradient(
    ellipse at 50% 82%,
    rgba(255, 107, 44, 0.10) 0%,
    rgba(125, 90, 220, 0.08) 42%,
    rgba(18, 19, 22, 0.02) 62%,
    transparent 78%
  );
  filter: blur(28px);
  z-index: -1;
  pointer-events: none;
}

/* Bottom fade */
.hero-subject-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  height: 38%;
  background: radial-gradient(
    ellipse at center bottom,
    rgba(18,19,22,.96) 0%,
    rgba(18,19,22,.78) 32%,
    rgba(18,19,22,.38) 60%,
    transparent 100%
  );
  filter: blur(18px);
  z-index: 2;
  pointer-events: none;
}

.hero-subject {
  width: auto;
  max-width: min(620px, 55vw);
  max-height: 100%;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  position: relative;
  z-index: 1;

  filter:
    drop-shadow(0 30px 38px rgba(0,0,0,.34))
    drop-shadow(0 12px 22px rgba(0,0,0,.22))
    drop-shadow(0 0 18px rgba(255,107,44,.05));
}

/* Hero Layout Grid */
.hero-layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(140px, 0.85fr) 1fr minmax(280px, 1fr);
  align-items: end;
  gap: 1.5rem 2rem;
  width: 100%;
  min-height: calc(100vh - 9rem);
  padding-bottom: 0;
}

/* Left Side: Feature Badges */
.hero-badges {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.35rem;
  align-self: center;
  position: relative;
  z-index: 5;
  padding-bottom: 1rem;
}

.hero-sparkle {
  position: absolute;
  top: -2rem;
  left: 0.5rem;
  color: var(--accent-orange);
  font-size: 1.4rem;
  transform: rotate(12deg);
  animation: heroSparkle 2.5s ease-in-out infinite;
}

@keyframes heroSparkle {

  0%,
  100% {
    opacity: 1;
    transform: rotate(12deg) scale(1);
  }

  50% {
    opacity: 0.6;
    transform: rotate(12deg) scale(1.15);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-persian);
  font-size: 0.9rem;
  font-weight: 600;
  direction: rtl;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: var(--transition-smooth);
}

.hero-badge i {
  font-size: 0.85rem;
}

.hero-badge--orange {
  background: var(--accent-orange);
  color: var(--text-white);
  transform: rotate(-2deg);
}

.hero-badge--dark {
  background: #252830;
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-badge--light {
  background: #e6e1d8;
  color: var(--text-dark);
  transform: rotate(1.5deg);
}

.hero-badge:hover {
  transform: translateY(-2px) scale(1.04);
}

/* Right Side: Text Content */
.hero-content {
  grid-column: 3;
  grid-row: 1;
  position: relative;
  z-index: 3;
  align-self: center;
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
  max-width: 480px;
  justify-self: end;
}

.hero-headline {
  font-family: var(--font-persian);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
  margin-bottom: 1rem;
  direction: rtl;
  text-align: right;
  letter-spacing: -0.3px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-name-highlight {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 0 0.25rem;
  position: relative;
}

.hero-crown {
  line-height: 1;
  position: absolute;
  top: -22px;
  padding-left: 22px;
  transform: rotateY(180deg);
  font-size: 2.6rem;
}

.hero-crown--desktop {
  display: inline-block;
}

.hero-crown--mobile {
  display: none;
}

.hero-name {
  color: #FF8A4C;
}

.hero-subtitle {
  font-family: var(--font-persian);
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 0.75rem;
  direction: rtl;
  text-align: right;
  line-height: 1.85;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-secondary-line {
  font-family: var(--font-persian);
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 2rem;
  direction: rtl;
  text-align: right;
  line-height: 1.85;
  unicode-bidi: isolate;
  opacity: 0.92;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
  direction: rtl;
}

.hero-social {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 1rem;
  direction: rtl;
  padding-top: 40px;
}

.hero-social-label {
  font-family: var(--font-persian);
  font-size: 0.9rem;
  color: var(--text-gray-muted);
  direction: rtl;
  text-align: right;
}

.hero-social-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.hero-social-link:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

.hero-actions .btn-primary,
.hero-actions .btn-outline {
  font-family: var(--font-persian);
  direction: rtl;
}

.btn-primary {
  background: var(--accent-orange);
  color: var(--text-white);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-orange);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 30px var(--accent-orange-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-white);
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: var(--transition-smooth);
}

.btn-outline:hover {
  border-color: var(--text-white);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
}

/* SHOWREEL SECTION */
.section {
  padding: 6rem 0;
}

/* SHOWREEL SECTION - RTL BANNER LAYOUT */
.showreel-section {
  padding: 4rem 0;
}

.showreel-banner-card {
  background: #14151a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.8rem;
  display: flex;
  flex-direction: row-reverse;
  /* RTL Layout: Text right, Video left */
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.showreel-banner-card:hover {
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(124, 58, 237, 0.2);
  transform: translateY(-2px);
}

.showreel-text-wrapper {
  flex: 0 0 35%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  padding-right: 0.5rem;
  direction: rtl;
}

.showreel-small-tag {
  font-family: var(--font-persian);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-gray-muted);
  letter-spacing: 0;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

.showreel-main-title {
  font-family: var(--font-persian);
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.45;
  margin-bottom: 1.75rem;
  position: relative;
  display: inline-block;
  direction: rtl;
  text-align: right;
}

.showreel-main-title br {
  display: inline;
}

.purple-underline-doodle {
  display: block;
  width: 100%;
  max-width: 150px;
  height: 14px;
  margin-top: -22px;
  margin-bottom: 20px;
}

.purple-underline-doodle svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.btn-play-showreel {
  background: #0f1014;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-persian);
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  direction: rtl;
  transition: var(--transition-smooth);
}

.btn-play-showreel .play-icon-triangle {
  font-size: 0.65rem;
  color: var(--text-white);
  transition: transform 0.3s ease;
}

.showreel-banner-card:hover .btn-play-showreel {
  background: #7c3aed;
  border-color: #7c3aed;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45);
}

.showreel-banner-card:hover .btn-play-showreel .play-icon-triangle {
  transform: translateX(3px);
}

/* Left Side Video Wrapper */
.showreel-video-wrapper {
  flex: 1;
  position: relative;
  height: 350px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Triptych Slanted Panels */
.triptych-container {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  background: #090a0d;
}

.triptych-container.single-image-preview {
  display: block;
}

.triptych-single-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.showreel-banner-card:hover .triptych-single-image {
  transform: scale(1.06);
}

.triptych-panel {
  height: 100%;
  position: relative;
  overflow: hidden;
}

.triptych-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.showreel-banner-card:hover .triptych-panel img {
  transform: scale(1.06);
}

.triptych-panel-1 {
  width: 39%;
  clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
  z-index: 1;
}

.triptych-panel-2 {
  width: 42%;
  margin-left: -9%;
  clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%);
  z-index: 2;
}

.triptych-panel-3 {
  width: 38%;
  margin-left: -9%;
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 1;
}

/* Center White Play Button */
.showreel-play-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

.play-btn-white-circle {
  width: 72px;
  height: 72px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 255, 255, 0.4);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

.play-btn-white-circle i {
  color: #7c3aed;
  font-size: 1.6rem;
  margin-left: 4px;
}

.showreel-banner-card:hover .play-btn-white-circle {
  transform: scale(1.12);
  background: #ffffff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 35px rgba(124, 58, 237, 0.65);
}

/* Bottom Left Overlay: Software Badges & Duration */
.showreel-thumb-bottom-left {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.software-badges-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.badge-app-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.badge-pr {
  background: linear-gradient(135deg, #00005b, #0005a3);
  color: #40c4ff;
  border: 1px solid rgba(64, 196, 255, 0.35);
}

.badge-ae {
  background: linear-gradient(135deg, #2d003b, #450059);
  color: #d580ff;
  border: 1px solid rgba(213, 128, 255, 0.35);
}

.badge-dv {
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.duration-text {
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* Bottom Right Sparkle Icon */
.showreel-thumb-sparkle {
  position: absolute;
  bottom: 1.25rem;
  right: 1.5rem;
  z-index: 10;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  animation: sparklePulse 3s infinite ease-in-out;
}

@keyframes sparklePulse {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

@media (max-width: 992px) {
  .hero-crown {
    transform: none !important; /* یا اگر نیاز به چرخش خاصی دارد تنظیم کنید، با none به حالت پیش‌فرض برمی‌گردد */
  }
  
  .showreel-banner-card {
    flex-direction: column-reverse;
    gap: 1.5rem;
  }

  .showreel-text-wrapper {
    flex: 1;
    width: 100%;
    align-items: center;
    text-align: center;
    padding-left: 0;
  }

  .showreel-video-wrapper {
    width: 100%;
    height: 260px;
  }
}

@media (max-width: 640px) {
  .showreel-main-title br {
    display: none;
  }

  .showreel-section {
    padding: 3rem 0;
  }

  .showreel-banner-card {
    padding: 1rem;
    gap: 1rem;
  }

  .showreel-video-wrapper {
    height: 210px;
  }

  .showreel-play-center {
    transform: translate(-50%, -50%) scale(0.7);
  }

  .showreel-thumb-bottom-left {
    left: 0.75rem;
    bottom: 0.75rem;
    gap: 0.4rem;
  }

  .badge-app-box {
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
  }

  .duration-text {
    font-size: 0.54rem;
    letter-spacing: 0.8px;
  }

  .showreel-thumb-sparkle {
    right: 0.8rem;
    bottom: 0.8rem;
    transform: scale(0.9);
  }

  .btn-play-showreel {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
  }

  .showreel-main-title {
    font-size: 1.2rem;
    line-height: 1.35;
    margin-bottom: 1rem;
  }
}

.duration-tag {
  color: var(--accent-orange);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ABOUT ME SECTION - Screenshot Inspired Dark Design */
.section-about {
  background: #0f1015;
  color: var(--text-white);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  grid-template-areas: "favs text photo";
  gap: 3rem;
  align-items: center;
}

/* LEFT COLUMN: FAVORITES */
.about-favorites-wrapper {
  grid-area: favs;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  direction: rtl;
  text-align: right;
  font-family: var(--font-persian);
}

.fav-header {
  margin-bottom: 0.5rem;
}

.fav-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fav-star {
  font-size: 1.1rem;
}

.fav-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.fav-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
  cursor: default;
}

.fav-item:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateX(-4px);
}

.fav-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.2);
  transition: var(--transition-smooth);
}

.fav-item:hover .fav-icon-circle {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.6);
  transform: scale(1.08);
}

.fav-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fav-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
}

.fav-desc {
  font-size: 0.82rem;
  color: var(--text-gray-muted);
}

/* CENTER COLUMN: TEXT CONTENT */
.about-text-center {
  grid-area: text;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  direction: rtl;
  font-family: var(--font-persian);
}

.about-tag {
  font-family: var(--font-persian);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-gray-muted);
  letter-spacing: 0;
  margin-bottom: 0.6rem;
  direction: rtl;
  text-align: right;
  width: 100%;
}

.about-main-heading {
  font-family: var(--font-persian);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.35;
  margin-bottom: 1.8rem;
  position: relative;
  direction: rtl;
  text-align: right;
  width: 100%;
}

.dot-accent {
  color: var(--accent-orange);
}

.heading-underline-svg {
  position: absolute;
  bottom: -8px;
  right: 0;
  left: auto;
  width: 120px;
  height: 12px;
}

.about-bio-body {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
  direction: rtl;
  text-align: right;
}

.about-bio-p {
  font-size: 1.02rem;
  color: var(--text-gray-light);
  line-height: 1.9;
  text-align: right;
  direction: rtl;
  text-align: justify;
}

.about-bio-p.highlight {
  font-weight: 600;
  color: var(--text-white);
}

.btn-more-about {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-persian);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  direction: rtl;
  transition: var(--transition-smooth);
}

.btn-more-about:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  box-shadow: 0 8px 25px rgba(255, 107, 44, 0.4);
  transform: translateY(-2px);
}

.btn-more-about i {
  transition: transform 0.3s ease;
}

.btn-more-about:hover i {
  transform: translateX(-4px);
}

/* RIGHT COLUMN: PORTRAIT IMAGE */
.about-photo-wrapper {
  grid-area: photo;
  display: flex;
  justify-content: center;
  position: relative;
}

.about-photo-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 4.8;
  border-radius: 28px;
  overflow: visible;
  padding: 0.6rem;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.16), rgba(255,255,255,0.03));
  border: 1px solid rgba(167, 139, 250, 0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 40px rgba(0, 0, 0, 0.35);
}

.photo-dark-backdrop {
  position: absolute;
  inset: -10px -10px 10px 10px;
  background: radial-gradient(circle at 20% 20%, rgba(167, 139, 250, 0.18), transparent 42%), rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 32px;
  z-index: 1;
  pointer-events: none;
  filter: blur(0.2px);
}

.about-portrait-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease;
  filter: saturate(1.05) contrast(1.02) brightness(1.02);
}

.about-photo-card:hover .about-portrait-img {
  transform: scale(1.02);
  filter: saturate(1.15) contrast(1.08) brightness(1.05);
  box-shadow: 0 24px 48px rgba(109, 40, 217, 0.22);
}

.photo-dots-matrix {
  position: absolute;
  bottom: -20px;
  left: -20px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.dot-row {
  display: flex;
  gap: 8px;
}

.dot-row span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.photo-sparkle-badge {
  position: absolute;
  bottom: -15px;
  right: -15px;
  z-index: 4;
  color: var(--accent-orange);
  animation: sparklePulse 3s infinite ease-in-out;
}

/* FEATURED PROJECTS SECTION (Matching reference screenshot) */
.work-section {
  padding: 5rem 0;
  position: relative;
  background: var(--bg-dark);
}

.work-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.2rem;
  direction: rtl;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.work-title-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  text-align: right;
  direction: rtl;
}

/* WORK CATEGORY TOGGLE SWITCH */
.work-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-toggle-pill {
  display: inline-flex;
  align-items: center;
  background: #101117;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-gray-muted);
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-persian);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.toggle-btn i {
  font-size: 0.85rem;
  opacity: 0.8;
  transition: transform 0.3s ease;
}

.toggle-btn:hover {
  color: var(--text-white);
}

.toggle-btn.active {
  color: var(--text-white);
  background: var(--accent-orange);
  box-shadow: 0 4px 15px rgba(255, 107, 44, 0.4);
}

.toggle-btn.active i {
  transform: scale(1.15);
}

.work-small-tag {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-gray-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.work-section-heading {
  font-family: var(--font-persian);
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
}

.accent-sparkle {
  font-size: 1.3rem;
}

.work-link-all {
  color: var(--text-gray-muted);
  text-decoration: none;
  font-family: var(--font-persian);
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  direction: rtl;
  transition: var(--transition-smooth);
}

.work-link-all:hover {
  color: var(--text-white);
  transform: translateX(-4px);
}

/* Slider Wrapper & Navigation Buttons */
.work-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  overflow: visible;
  padding-top: 1.5rem;
}

.work-slider-counter {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  font-family: var(--font-persian);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-gray-muted);
}

.work-slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.work-slider-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: var(--transition-smooth);
}

.work-slider-dots .dot.active {
  background: var(--accent-orange);
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.15);
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.slider-nav-btn:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 107, 44, 0.4);
}

.slider-nav-btn.prev {
  right: 0.5rem;
}

.slider-nav-btn.next {
  left: 0.5rem;
}

/* Work Cards Grid / Slider */
.work-cards-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.5rem 0;
  align-items: stretch;
}

.work-cards-grid::-webkit-scrollbar {
  display: none;
}

/* Featured Card Item */
.featured-card {
  background: #14151b;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
  min-width: 0;
  flex: 0 0 280px;
  max-width: 280px;
}

.featured-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 107, 44, 0.4);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 107, 44, 0.15);
}

.featured-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10.5;
  overflow: hidden;
  background: #0d0e12;
}

.featured-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-card-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  pointer-events: none;
}

.featured-card-play-overlay i {
  color: #ffffff;
  font-size: 1rem;
}

.featured-card:hover .featured-card-play-overlay {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.featured-card:hover .featured-card-thumb img {
  transform: scale(1.06);
}

.featured-card-info {
  padding: 0.5rem 1rem 0rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
  direction: rtl;
  font-family: var(--font-persian);
  flex-grow: 1;
}

.featured-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.3;
}

.featured-card-sub {
  font-size: 0.82rem;
  color: var(--text-gray-muted);
  line-height: 1.5;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card-tag {
  font-family: var(--font-main);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-gray-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: auto;
  opacity: 0.75;
}

/* Card 5 Sparkle Badge */
.card-has-sparkle {
  position: relative;
}

.card-sparkle-icon {
  position: absolute;
  bottom: 1.1rem;
  left: 1.1rem;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.featured-card:hover .card-sparkle-icon {
  color: var(--accent-orange);
  transform: scale(1.2) rotate(15deg);
}

/* EXPERIENCE TIMELINE SECTION */
#experience{
  padding-top: 0px!important;
  padding-bottom: 0px!important;
}
.experience-header {
  margin-bottom: 2rem;
  text-align: right;
}

.experience-header h2 {
  font-family: var(--font-handwritten);
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  color: var(--text-white);
  margin: 0;
}

.experience-timeline {
  margin-top: 3rem;
  position: relative;
  padding: 2rem 0;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 1;
}

.timeline-nodes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--transition-smooth);
}

.timeline-node:hover {
  transform: translateY(-5px);
  border-color: var(--accent-orange);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.node-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}

.node-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-white);
  flex-shrink: 0;
}

.icon-shatel {
  background: var(--accent-orange);
  box-shadow: 0 0 15px rgba(255, 107, 44, 0.4);
}

.icon-peivast {
  background: #1e40af;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.icon-candoo {
  background: #27272a;
  border: 2px solid var(--accent-orange);
}

.icon-freelance {
  background: #3f3f46;
}

.node-title-group {
  direction: rtl;
  font-family: var(--font-persian);
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.node-company {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
}

.node-role {
  font-size: 0.85rem;
  color: var(--text-gray-muted);
}

.node-date {
  font-size: 0.85rem;
  color: var(--accent-orange);
  font-weight: 600;
  margin-top: 0.5rem;
  text-align: center;
  width: 100%;
}

/* SKILLS & CONTACT SECTION */
.skills-contact-grid {
  display: grid;
  grid-template-columns: 0.5fr 0.8fr;
  gap: 3.5rem;
  align-items: flex-start;
}

.skills-header {
  text-align: right;
}

.skills-header h2 {
  font-family: var(--font-handwritten);
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  color: var(--text-white);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  text-align: right;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.software-ring-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-smooth);
}

.ring-container {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent-orange) 0%, rgba(255, 255, 255, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.software-ring-card:hover .ring-container {
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--accent-orange-glow);
}

.app-box {
  width: 100%;
  height: 100%;
  background: #191b20;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-white);
}

/* App Box Specific Colors */
.app-pr {
  color: #9999ff;
  border: 1px solid #00005b;
}

.app-ae {
  color: #d699ff;
  border: 1px solid #330066;
}

.app-ps {
  color: #31a8ff;
  border: 1px solid #001e36;
}

.app-ai {
  color: #ff9a00;
  border: 1px solid #331d00;
}

.app-davinci {
  color: #00e5ff;
}

.app-blender {
  color: #ea7600;
}

.skills-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: flex-end;
}

.cat-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: var(--text-gray-light);
  font-weight: 500;
  transition: var(--transition-smooth);
}

.cat-pill:hover {
  background: rgba(255, 107, 44, 0.15);
  border-color: var(--accent-orange);
  color: var(--text-white);
}
/* Contact Paper Card - Optimized */
.contact-paper-card {
  /* پس‌زمینه روشن‌تر و شفاف‌تر برای ایجاد کنتراست */
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.57), rgba(15, 23, 42, 0.62));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  /* اصلاح رنگ متن به سفید کاملاً واضح */
  color: #ffffff;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 92, 246, 0.4);
  
  /* گلیپ و سایه نرم بنفش */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 58, 237, 0.25);
  position: relative;
  transform: rotate(2deg);
  transition: var(--transition-smooth);
  text-align: right;
  direction: rtl;
}

.contact-paper-card:hover {
  transform: rotate(0deg) scale(1.02);
  border-color: rgba(167, 139, 250, 0.8);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 30px rgba(124, 58, 237, 0.4);
}

/* استایل تکه چسب بالای کارت */
.contact-paper-card::before {
  content: '';
  position: absolute;
  top: -10px;
  right: 25%;
  width: 80px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  transform: rotate(-2deg);
  border-radius: 2px;
}

/* اصلاح رنگ عناوین و متون داخلی */
.contact-paper-card h2,
.contact-paper-card h3,
.contact-paper-card p,
.contact-paper-card span,
.contact-paper-card a {
  color: #f8fafc !important; /* تضمین خوانایی کامل */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* اصلاح رنگ آیکون‌ها */
.contact-paper-card svg,
.contact-paper-card i {
  color: #a78bfa !important; /* بنفش روشن جذاب */
  fill: #a78bfa !important;
}

.contact-header {
  margin-bottom: 2rem;
  text-align: right;
}

.contact-header h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  list-style: none;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  font-size: 0.98rem;
  color: var(--text-dark-muted);
  text-align: right;
}

.contact-item i {
  color: var(--accent-orange);
  font-size: 1rem;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.contact-item a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.contact-item a:hover {
  color: var(--accent-orange);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 3rem 0 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-persian);
  color: rgba(255, 255, 255, 0.9);
}

footer .footer-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.8;
  letter-spacing: 0.15px;
  max-width: 36rem;
  margin: 0 auto;
}

footer span.smile-emoji {
  color: var(--accent-orange);
  font-size: 1.4rem;
}

/* VIDEO MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: min(92vw, 1120px);
  max-width: 1120px;
  max-height: 90vh;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.modal-text-content {
  width: 100%;
  max-height: 85vh;
  padding: 1.8rem 1.6rem;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.16), rgba(255,255,255,0.03));
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  direction: rtl;
  text-align: right;
}

.modal-text-header {
  text-align: right;
  direction: rtl;
  margin-top: 20px;
}

.modal-title {
  font-family: var(--font-persian);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 0.35rem;
  text-align: right;
  direction: rtl;
}

.modal-subtitle {
  font-family: var(--font-persian);
  font-size: 0.95rem;
  color: var(--text-gray-light);
  text-align: right;
  direction: rtl;
}

.modal-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  padding-right: 1.2rem;
}

.modal-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, rgba(109, 40, 217, 0.9), rgba(255,255,255,0.1));
}

.modal-timeline-entry {
  position: relative;
  padding-right: 1.25rem;
}

.modal-timeline-entry::before {
  content: '';
  position: absolute;
  top: 0.4rem;
  right: -0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-orange);
  box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.18);
}

.modal-timeline-period {
  font-family: var(--font-persian);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-orange-light);
  margin-bottom: 0.5rem;
  text-align: right;
  direction: rtl;
}

.modal-timeline-roles {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.modal-role-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.modal-role-title {
  font-family: var(--font-persian);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.25rem;
  text-align: right;
  direction: rtl;
}

.modal-role-company {
  font-family: var(--font-persian);
  font-size: 0.92rem;
  color: var(--accent-orange-light);
  margin-bottom: 0.45rem;
  text-align: right;
  direction: rtl;
}

.modal-role-list {
  padding-right: 1rem;
  color: var(--text-gray-light);
  font-size: 0.92rem;
  line-height: 1.8;
  text-align: right;
  direction: rtl;
  text-align: right;
}

@media (max-width: 640px) {
  .hero-layout{
    gap: 6.5rem 1rem!important;
  }
  .modal-text-content {
    max-height: 75vh;
    padding: 1rem 0.85rem;
  }

  .modal-title {
    font-size: 1.3rem;
  }

  .modal-subtitle {
    font-size: 0.88rem;
  }

  .modal-role-card {
    padding: 0.75rem 0.8rem;
  }
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  background: var(--accent-orange);
}

.modal-video-box {
  width: 100%;
  aspect-ratio: var(--showreel-ratio, 16 / 9);
  min-height: 280px;
  max-height: 90vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modalVideoContent {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #0b0c0e;
  overflow: hidden;
}

#modalVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.modal-overlay-controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 3;
}

#modalVideoContent:hover .modal-overlay-controls,
#modalVideoContent:focus-within .modal-overlay-controls {
  opacity: 1;
  pointer-events: auto;
}

.video-toolbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.72) 100%);
  color: #fff;
  flex-wrap: wrap;
}

.video-toolbar-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.video-toolbar-btn:hover {
  background: rgba(255,255,255,0.24);
  transform: translateY(-1px);
}

.video-toolbar-btn--play {
  background: var(--accent-orange);
}

.video-toolbar-btn--play:hover {
  background: #7E3AF2;
}

.video-progress,
.video-volume {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.26);
  outline: none;
  cursor: pointer;
}

.video-progress::-webkit-slider-thumb,
.video-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-orange);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}

.video-progress {
  flex: 1;
  min-width: 0;
}

.video-volume {
  width: 90px;
  max-width: 100%;
}

.video-time {
  font-size: 0.9rem;
  min-width: 54px;
  text-align: center;
  flex-shrink: 0;
}

#skills{
  padding-top: 0px;
  padding-bottom: 30px;
}
@media (max-width: 640px) {
  #skills{
    padding-top: 0px!important;
    padding-bottom: 30px!important;
  }
  .experience-header{
    margin-bottom: -50px!important;
  }
  .work-section{
    padding: 2rem 0;
  }
  .modal-video-box {
    aspect-ratio: 16 / 9;
    min-height: 620px;
  }
  .purple-underline-doodle {
    max-width: 100%!important;
    height: 23px!important;
    margin-top: 4px!important;
    margin-bottom: -5px!important;
  }
  .video-toolbar {
    gap: 0.45rem;
    padding: 0.7rem 0.7rem 0.8rem;
  }

  .video-toolbar-btn {
    width: 32px;
    height: 32px;
  }

  .video-progress {
    order: 4;
    width: 100%;
    flex-basis: 100%;
  }

  .video-volume {
    width: 70px;
  }

  .video-time {
    font-size: 0.8rem;
    min-width: 46px;
  }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2rem 1rem;
    min-height: auto;
    padding-bottom: 0;
  }

  .hero-content {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    max-width: 540px;
    width: 100%;
    padding-bottom: 0;
    padding-top: 1rem;
  }

  .hero-subject-wrapper {
    transform: translateX(-50%);
    height: calc(100% - 4rem);
  }

  .hero-subject {
    max-width: min(480px, 75vw);
  }

  .hero-badges {
    grid-column: 1;
    grid-row: 2;
    align-items: center;
    padding-bottom: 0;
    margin-bottom: 1rem;
  }

  .hero-dashed-arrow {
    display: none;
  }

  .showreel-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photo"
      "text"
      "favs";
    gap: 2.5rem;
  }

  .skills-contact-grid {
    grid-template-columns: 1fr;
  }

  .timeline-nodes {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-subject-wrapper {
    left: 50%;
  }

  .arrow-left-decor,
  .arrow-right-decor {
    display: none;
  }

  .hero-social {
    padding-top: 0px;
    padding-bottom: 90px;
  }

  .hero-layout {
    margin-top: -25px !important;
  }

  .hero-crown--desktop {
    display: none;
  }

  .hero-crown--mobile {
    display: inline-block;
    font-size: 1.6rem;
    top: -18px;
    padding-right: 32px;
    transform: scaleX(-1);
  }

  .hero {
    padding-top: 7.5rem;
  }

  .hero-headline {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  .hero-subtitle,
  .hero-secondary-line {
    font-size: 0.95rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-social {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-subject-wrapper {
    height: 55vh;
  }

  .hero-subject {
    max-width: min(420px, 85vw);
  }

  .hero-badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  .hero-badges {
    gap: 1.1rem;
  }
}

@media (max-width: 640px) {
  .skills-contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .skills-contact-grid > .contact-paper-card {
    order: 2;
  }

  .skills-contact-grid > div:last-child {
    order: 1;
  }

  .nav-menu {
    display: none;
  }

  .logo {
    font-size: 1.7rem;
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .logo-english {
    display: inline;
  }

  .logo .star-before {
    display: inline-flex;
  }

  .logo .star-after {
    display: inline-flex;
  }

  .logo-persian {
    display: none;
  }

  .btn-more-about {
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .hero-subject-wrapper {
    height: 48vh;
  }

  .hero-subject {
    max-width: min(360px, 90vw);
  }

  .timeline-nodes {
    grid-template-columns: 1fr;
  }

  .timeline-node {
    align-items: center;
    text-align: center;
  }

  .node-header {
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
  }

  .node-title-group {
    align-items: center;
    text-align: center;
  }

  .node-date {
    text-align: center;
  }

  .work-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .work-toggle-container {
    width: 100%;
    justify-content: center;
    overflow: hidden;
  }

  .work-toggle-pill {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem;
  }

  .toggle-btn {
    flex: 1 1 calc(50% - 0.2rem);
    justify-content: center;
    min-width: 0;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
  }

  .work-slider-wrapper {
    overflow: hidden;
    padding-top: 1.8rem;
  }

  .work-slider-counter {
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }

  .work-slider-dots {
    margin-top: 0.75rem;
  }

  .work-cards-grid {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.25rem 0.15rem 0.75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .work-cards-grid::-webkit-scrollbar {
    display: none;
  }

  .featured-card {
    flex: 0 0 calc(100% - 0.15rem);
    max-width: calc(100% - 0.15rem);
    min-width: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
  }

  .slider-nav-btn {
    display: flex;
    width: 36px;
    height: 36px;
  }

  .slider-nav-btn.prev {
    right: 0.2rem;
  }

  .slider-nav-btn.next {
    left: 0.2rem;
  }

  .software-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}