/* =========================================================
   PART 1 — ROOT VARIABLES & GLOBAL LAYOUT
   (LIGHT MODE BASELINE)
========================================================= */
:root {
    --esk-bg: transparent;
    --esk-text: #0b1220;
    --esk-text-muted: #334155;

    --esk-card-bg: rgba(236, 255, 255, 0.55);
    --esk-card-border: rgba(255,255,255,0.65);
    --esk-card-shadow: 0 22px 55px rgba(15,23,42,0.28);

    --esk-primary: #7727ff;
    --esk-yellow: #fbbf24;

    --esk-radius: 24px;
    --esk-max-width: 1120px;
}

/* =========================================================
   PERFORMANCE-OPTIMIZED BACKGROUND VIA GPU COMPOSITOR
========================================================= */
html {
    background-color: #060a12;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15), rgba(255,255,255,0.10)),
                url("/assets/images/bg-01.webp") center top / cover no-repeat;
    transform: translateZ(0);
    will-change: transform;
}

@media (prefers-color-scheme: dark) {
    body::before {
        background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0.25)),
                    url("/assets/images/bg-01dark.webp") center top / cover no-repeat;
    }
}

/* =========================================================
   LIGHT-MODE TEXT SHADOW (BETTER READABILITY)
========================================================= 
html:not(.dark) h1,
html:not(.dark) h2,
html:not(.dark) h3,
html:not(.dark) h4,
html:not(.dark) h5,
html:not(.dark) h6,
html:not(.dark) p,
html:not(.dark) li,
html:not(.dark) .esk-subtitle {
    text-shadow: 0 1px 2px rgba(255,255,255,0.45);
}*/

/* =========================================================
   BASE TYPOGRAPHY
========================================================= */
body {
    margin: 0;
    padding: 0;

    font-family: 'IRANYekan', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    color: var(--esk-text);
    background-image: unset !important;
    background-color: unset !important;
}

.esk-container {
    max-width: var(--esk-max-width);
    margin: 3rem auto 0 auto;
    padding: 0 1.25rem 3rem 1.25rem;

    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.esk-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--esk-text);
}

.esk-subtitle {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--esk-text-muted);
    margin-bottom: 1.8rem;
}

/* =========================================================
   BUTTONS
========================================================= */
.esk-btn {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    border-radius: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.esk-btn-primary {
    background: linear-gradient(155deg, var(--esk-primary), var(--esk-yellow));
    color: #fff;
    box-shadow: 0 6px 20px rgba(124,58,237,0.3);
    backdrop-filter: blur(8px);
}

.esk-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(124,58,237,0.45);
}

/* =========================================================
   HERO SECTION
========================================================= */
.esk-hero {
    display: flex;
    justify-content: space-between;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.esk-hero > div { flex: 1; }

.esk-hero > div:last-child {
    max-width: 420px;
}

/* =========================================================
   GRID LAYOUT
========================================================= */
.esk-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* =========================================================
   GLASS HEADER (LIGHT MODE BASE)
========================================================= */
.esk-header {
    position: sticky;
    top: 0.75rem;
    z-index: 9999;

    max-width: var(--esk-max-width);
    margin: 0.75rem auto 0.75rem auto;

    padding: 0.8rem 1.8rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;

    border-radius: 28px;

    backdrop-filter: blur(8px);

    box-shadow: 0 6px 28px rgba(0,0,0,0.18);
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;

    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.42);
}

/* =========================================================
   GLASS HEADER — DARK MODE
========================================================= */
@media (prefers-color-scheme: dark) {
    .esk-header {
        background: rgba(8,12,22,0.40);
        border: 1px solid rgba(255,255,255,0.15);
        box-shadow: 0 18px 45px rgba(0,0,0,0.65);
    }
}

/* =========================================================
   HEADER INNER BLOCKS
========================================================= */
.esk-header-left {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.esk-header-name {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--esk-text);
    text-decoration: none;
    margin-bottom: 0.2rem;
}

.esk-header-role {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--esk-primary);
    opacity: 0.9;
}

/* =========================================================
   NAVIGATION (DESKTOP)
========================================================= */
.esk-header-nav {
    display: flex;
    gap: 1.4rem;
    align-items: center;
    justify-content: flex-end;
}

.esk-nav {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.98rem;
    color: var(--esk-text);
    opacity: 0.9;

    padding: 0.4rem 0.2rem;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.esk-nav:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-1px);
}

@media (prefers-color-scheme: dark) {
    .esk-nav:hover {
        background: rgba(255,255,255,0.10);
    }
}

/* =========================================================
   PART 2 — CARDS, SECTIONS, SKILLS, QUICK NAV
========================================================= */

/* =========================================================
   GLASS CARDS (LIGHT MODE BASE)
========================================================= */
.esk-card {
    position: relative;
    border-radius: var(--esk-radius);
    padding: 2.2rem;

    background: var(--esk-card-bg);
    background-clip: padding-box;

    border: 1px solid var(--esk-card-border);
    box-shadow: var(--esk-card-shadow);

    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.esk-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 60px rgba(15,23,42,0.35);
}

/* featured cards */
.esk-card-featured {
    background: rgba(236,252,255,0.7);
    backdrop-filter: blur(5px) saturate(1.15);
}

/* =========================================================
   SKILL CARDS — BULLET LIST
========================================================= */
.esk-skill-card ul {
    margin: 1rem 0 0 0;
    padding-left: 1.3rem;
    list-style-type: disc;
    line-height: 1.7;
}

.esk-skill-card ul li {
    margin-bottom: 0.4rem;
    font-size: 0.97rem;
    color: var(--esk-text-muted);
}

/* =========================================================
   QUICK NAVIGATION BAR
========================================================= */
.esk-quicknav {
    margin: 4.5rem auto 4.5rem auto;
    display: flex;
    justify-content: center;
}

.esk-quicknav-inner {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.8rem;

    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(6px);

    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 18px 40px rgba(15,23,42,0.18);

    transition: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .esk-quicknav-inner {
        background: rgba(20,26,38,0.42);
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 16px 44px rgba(0,0,0,0.55);
    }
}

.esk-qnav-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;

    padding: 0.6rem 1rem;
    border-radius: 16px;

    text-decoration: none;
    font-weight: 600;
    color: var(--esk-text-muted);

    transition: 0.25s ease;
}

.esk-qnav-icon {
    font-size: 1.15rem;
    opacity: 0.9;
}

.esk-qnav-item:hover {
    background: rgba(255,255,255,0.30);
    color: var(--esk-text);
    transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
    .esk-qnav-item:hover {
        background: rgba(255,255,255,0.09);
        color: rgba(255,255,255,0.95);
    }
}

/* =========================================================
   EDUCATION — HORIZONTAL PILL CARDS
========================================================= */
.esk-edu-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.esk-edu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 1.4rem 1.8rem;
    border-radius: 22px;

    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(8px);

    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 16px 40px rgba(15,23,42,0.18);

    transition: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .esk-edu-item {
        background: rgba(20,26,38,0.42);
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 20px 50px rgba(0,0,0,0.55);
    }
}

.esk-edu-left h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.esk-edu-place {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

.esk-edu-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;

    text-align: right;
    min-width: 220px;
    gap: 0.35rem;
}

.esk-edu-detail {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.45;
    display: block;
}

/* =========================================================
   EXPERIENCE — HORIZONTAL PILL CARDS
========================================================= */
.esk-exp-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.esk-exp-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 1.4rem 1.8rem;
    border-radius: 22px;

    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(8px);

    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 16px 40px rgba(15,23,42,0.18);

    transition: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .esk-exp-item {
        background: rgba(20,26,38,0.42);
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 20px 50px rgba(0,0,0,0.55);
    }
}

.esk-exp-left h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.esk-exp-time {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.85;

    /* انتقال به سمت راست */
    margin-left: auto;
    white-space: nowrap;
}


.esk-exp-right {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;

    min-width: 220px;
    max-width: 95%;
    gap: 0.35rem;
}

.esk-exp-detail {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.45;
    display: block;
}

/* ======================================
   EXPERIENCE / PROJECTS — NEW LAYOUT
====================================== */

.esk-exp-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
}

.esk-exp-left {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* توضیح زیر عنوان */
.esk-exp-detail {
    margin-top: 0.35rem;
    padding-left: 0.1rem;

    font-size: 0.97rem;
    line-height: 1.6;
    color: var(--esk-text-muted);

    max-width: 92%;
}


/* ======================================
   EXPERIENCE / PROJECTS — FIX DETAILS
====================================== */

.esk-exp-item {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "title date"
        "detail detail";
    row-gap: 0.6rem;
}

/* عنوان */
.esk-exp-left {
    grid-area: title;
    display: flex;
    align-items: center;
}

/* تاریخ */
.esk-exp-time {
    grid-area: date;
    margin-left: 1rem;
    white-space: nowrap;
    opacity: 0.85;
}

/* توضیح */
.esk-exp-right {
    grid-area: detail;
    display: block !important;
}

.esk-exp-detail {
    margin-top: 0.15rem;
    font-size: 0.97rem;
    line-height: 1.65;
    color: var(--esk-text-muted);
    max-width: 92%;
}



/* ======================================
   EXPERIENCE / PROJECTS — FINAL TEXT FIX
====================================== */

.esk-exp-item {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "title date"
        "detail detail";
    row-gap: 0.6rem;
}

/* عنوان */
.esk-exp-left {
    grid-area: title;
    display: flex;
    align-items: center;
}

/* تاریخ */
.esk-exp-time {
    grid-area: date;
    white-space: nowrap;
    opacity: 0.85;
}

/* کانتینر توضیح */
.esk-exp-right {
    grid-area: detail;
    width: 100%;
    display: block !important;
}

/* خود متن توضیح */
.esk-exp-detail {
    width: 100%;
    max-width: 100%;      /* ⬅️ محدودیت عرض برداشته شد */
    margin-top: 0.35rem;

    text-align: left;     /* ⬅️ چپ‌چین */
    font-size: 0.97rem;
    line-height: 1.65;
    color: var(--esk-text-muted);
}

/* ======================================
   COURSES/CERTS — META ROW (TYPE + ISSUER)
====================================== */

.esk-exp-meta{
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  align-items: center;
  margin-top: 0.25rem;
}

.esk-badge{
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.18);
  color: rgba(15, 35, 55, 0.9);
}

.esk-issuer{
  font-size: 0.9rem;
  opacity: 0.85;
}

/* make sure detail stays full width + left aligned */
.esk-exp-detail{
  width: 100%;
  max-width: 100%;
  text-align: left;
}




/* =========================================================
   PUBLICATIONS — HORIZONTAL PILL CARDS
========================================================= */
.esk-pub-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.esk-pub-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 1.4rem 1.8rem;
    border-radius: 22px;

    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(6px);

    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 16px 40px rgba(15,23,42,0.18);

    transition: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .esk-pub-item {
        background: rgba(20,26,38,0.42);
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 20px 50px rgba(0,0,0,0.55);
    }
}

.esk-pub-left h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.esk-pub-meta {
    margin-top: 0.25rem;
    font-size: 0.95rem;
    opacity: 0.85;
    display: block;
}

.esk-pub-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;

    min-width: 240px;
    max-width: 370px;
    gap: 0.35rem;
}

.esk-pub-detail {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.45;
    display: block;
}

/* =========================================================
   HONORS — HORIZONTAL PILL CARDS
========================================================= */
.esk-honor-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.esk-honor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 1.4rem 1.8rem;
    border-radius: 22px;

    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(8px);

    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 16px 40px rgba(15,23,42,0.18);

    transition: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    .esk-honor-item {
        background: rgba(20,26,38,0.42);
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 20px 50px rgba(0,0,0,0.55);
    }
}

.esk-honor-left h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.esk-honor-time {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

.esk-honor-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;

    min-width: 240px;
    max-width: 450px;
    gap: 0.35rem;
}

.esk-honor-detail {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.45;
    display: block;
}

/* =========================================================
   PART 3 — RESPONSIVE + MOBILE + HEADER OVERRIDES + CLEANUP
========================================================= */

/* =========================================================
   RESPONSIVE — TABLET
========================================================= */
@media (max-width: 992px) {
    .esk-hero {
        flex-direction: column;
    }

    .esk-grid-2 {
        grid-template-columns: 1fr;
    }

    .esk-quicknav-inner {
        overflow-x: auto;
        padding: 1rem;
        gap: 1rem;
    }

    .esk-qnav-item {
        white-space: nowrap;
    }
}

/* =========================================================
   RESPONSIVE — MOBILE (<= 820px)
========================================================= */
@media (max-width: 820px) {

    html, body {
        overflow-x: hidden;
    }

    .esk-container {
        margin-top: 1.2rem;
        padding: 0 1rem 2.5rem 1rem;
    }

    /* MOBILE HEADER */
    .esk-header {
        position: sticky;
        top: 0;
        z-index: 9999;

        max-width: 100%;
        margin: 0;
        padding: 0.7rem 1rem;

        border-radius: 0;

        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;

        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);

        background: rgba(15,23,42,0.80);
        border-bottom: 1px solid rgba(148,163,184,0.35);
        box-shadow: 0 4px 18px rgba(0,0,0,0.4);
    }

    @media (prefers-color-scheme: dark) {
        .esk-header {
            background: rgba(6,10,18,0.96);
        }
    }

    .esk-header-left {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        transform: scale(0.92);
        transform-origin: left top;
    }

    .esk-header-name {
        font-size: 1.3rem;
    }

    .esk-header-role {
        font-size: 0.86rem;
    }

    .esk-header nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem 0.9rem;
        margin-top: 0.2rem;
    }

    .esk-nav {
        font-size: 0.9rem;
        padding: 0.25rem 0.45rem;
        border-radius: 999px;
        background: rgba(15,23,42,0.6);
        color: #e5e7eb;
    }

    .esk-nav:hover {
        background: rgba(59,130,246,0.9);
        color: #f9fafb;
    }

    /* Mobile Titles */
    .esk-title {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .esk-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.4rem;
    }

    /* Mobile Cards */
    .esk-card,
    .esk-edu-item,
    .esk-exp-item,
    .esk-pub-item,
    .esk-honor-item {
        padding: 1rem 1.2rem;
        border-radius: 18px;
        margin-bottom: 1.2rem;
    }

    .esk-card h3,
    .esk-edu-left h3,
    .esk-exp-left h3,
    .esk-pub-left h3,
    .esk-honor-left h3 {
        font-size: 1rem;
        line-height: 1.35;
    }

    .esk-cta-card {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Horizontal Cards → Column in Mobile */
    .esk-edu-item,
    .esk-exp-item,
    .esk-pub-item,
    .esk-honor-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .esk-edu-right,
    .esk-exp-right,
    .esk-pub-right,
    .esk-honor-right {
        align-items: flex-start;
        text-align: left;
        min-width: auto;
        max-width: 100%;
        margin-top: 0.4rem;
    }

    section {
        margin-bottom: 2rem !important;
    }
}

/* =========================================================
   DARK MODE — BASE TEXT OVERRIDES (AUTO)
========================================================= */
@media (prefers-color-scheme: dark) {
    body,
    .esk-title,
    h1, h2, h3, h4, h5 {
        color: rgba(245,247,255,0.96) !important;
    }

    .esk-subtitle,
    p,
    li {
        color: rgba(220,220,235,0.78) !important;
    }
}

/* =========================================================
   HEADER FIX — DESKTOP OVERRIDES (>= 821px)
========================================================= */
@media (min-width: 821px) {
    .esk-header {
        position: sticky;
        top: 20px;
        z-index: 9999;

        max-width: calc(100vw - 13%);
        margin: 200px auto 10px auto;

        padding: 35px 70px;
        border-radius: 30px;

        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;

        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);

        background: rgba(255,255,255,0.55);
        border: 1px solid rgba(255,255,255,0.50);
        box-shadow: 0 18px 45px rgba(15,23,42,0.18);
    }

    @media (prefers-color-scheme: dark) {
        .esk-header {
            background: rgba(8,12,22,0.40);
            border-color: rgba(255,255,255,0.16);
            box-shadow: 0 18px 45px rgba(0,0,0,0.65);
        }
    }

    .esk-header nav {
        display: flex;
        align-items: center;
        gap: 1.6rem;
    }

    .esk-header-left {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.1;
    }

    .esk-header-name {
        font-size: 1.55rem;
        font-weight: 700;
        color: var(--esk-text);
        text-decoration: none;
    }

    .esk-header-role {
        margin-top: 2px;
        font-size: 0.92rem;
        font-weight: 600;
        color: var(--esk-primary);
        opacity: 0.9;
    }

    .esk-nav {
        text-decoration: none;
        font-weight: 500;
        font-size: 0.98rem;
        color: var(--esk-text);
        opacity: 0.9;

        padding: 0.35rem 0.2rem;
        border-radius: 12px;
        transition: background 0.2s ease, transform 0.15s ease, color 0.15s ease;
    }

    .esk-nav:hover {
        background: rgba(255,255,255,0.35);
        transform: translateY(-1px);
    }

    @media (prefers-color-scheme: dark) {
        .esk-nav:hover {
            background: rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.96);
        }
    }

    /* جلوگیری از دخالت قالب */
    header, .site-header {
        background: transparent !important;
    }
}

/* =========================================================
   CTA — Structured AI Partner (Desktop + Mobile)
========================================================= */

.esk-cta-wrapper {
    margin: 4rem auto;
}

.esk-cta-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 2.2rem 2.8rem;
    border-radius: 28px;

    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 20px 50px rgba(15,23,42,0.18);

    transition: 0.3s ease;
}

/* dark mode */
@media (prefers-color-scheme: dark) {
    .esk-cta-card {
        background: rgba(20,26,38,0.42);
        border-color: rgba(255,255,255,0.12);
        box-shadow: 0 26px 60px rgba(0,0,0,0.55);
    }
}

.esk-cta-text {
    flex: 1;
}

.esk-cta-text h2 {
    margin: 0 0 0.7rem 0;
    font-size: 1.9rem;
    font-weight: 800;
}

.esk-cta-text p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--esk-text-muted);
}

/* CTA button area */
.esk-cta-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 240px;
}

/* MOBILE VERSION */
@media (max-width: 820px) {

    .esk-cta-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.6rem 1.4rem;
        gap: 1.2rem;
    }

    .esk-cta-text h2 {
        font-size: 1.35rem;
        margin-bottom: 0.4rem;
    }

    .esk-cta-action {
        width: 100%;
        justify-content: flex-start;
        min-width: auto;
    }
}

/* =========================================================
   MOBILE FIXES — Sticky Header + Background Gap
========================================================= */

/* 1) جلوگیری از فاصله سفید هنگام اسکرول */
html, body {
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    background-color: transparent !important;
}

/* 2) هدر باید همیشه بچسبد به بالای صفحه */
@media (max-width: 820px) {
    .esk-header {
        position: fixed !important;
        top: 0 !important;
        left: 0;
        right: 0;

        width: 100% !important;
        max-width: 100% !important;

        margin: 0 !important;
        border-radius: 0 !important;

        z-index: 99999 !important;
    }

    /* ایجاد فاصله زیر هدر برای جلوگیری از روی هم افتادن محتوا */
    .esk-container {
        margin-top: 110px !important;
    }
}

/* 3) جلوگیری از background gap در پایین صفحه */
html::before {
    position: fixed !important;
}

/* =========================================================
   MOBILE BACKGROUND FIX — Prevent White Bottom Gap
========================================================= */
@media (max-width: 820px) {
    html {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        background-position: top center !important;
    }

    html::before {
        position: absolute !important;
        height: 100% !important;
        top: 0;
        bottom: 0;
    }

    body {
        background: transparent !important;
        overflow-x: hidden !important;
    }
}


/* =========================================================
   BASE RESET — COMMON TO BOTH DESKTOP & MOBILE
========================================================= */

.esk-header {
    position: fixed !important;
    top: 0;
    z-index: 9999;

    width: 100%;
    max-width: var(--esk-max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    justify-content: space-between;
    align-items: center;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 28px;

    transition: background 0.3s ease, border-color 0.3s ease;
}

/* light */
:root:not([data-color-mode="dark"]) .esk-header {
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 8px 28px rgba(15,23,42,0.18);
}

/* dark */
:root[data-color-mode="dark"] .esk-header {
    background: rgba(8,12,22,0.45);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 35px rgba(0,0,0,0.5);
}

/* عمومی */
.esk-header-left {
    display: flex;
    flex-direction: column;
}

.esk-header-name {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--esk-text);
    text-decoration: none;
}

.esk-header-role {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--esk-primary);
    opacity: 0.9;
}

/* Desktop Nav */
.esk-header-nav {
    display: flex;
    gap: 1.6rem;
}

.esk-nav {
    color: var(--esk-text);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    opacity: 0.9;
    padding: 0.35rem 0.2rem;
    border-radius: 12px;
    transition: 0.2s ease;
}

:root:not([data-color-mode="dark"]) .esk-nav:hover {
    background: rgba(255,255,255,0.35);
}

:root[data-color-mode="dark"] .esk-nav:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.96);
}

/* Hide mobile header by default */
.esk-header-mobile,
.esk-mobile-menu {
    display: none;
}

/* =========================================================
   DESKTOP (>= 821px)
========================================================= */

@media (min-width: 821px) {
    .esk-header {
        position: sticky;
        top: 20px;

        padding: 35px 70px;
        border-radius: 30px;
        max-width: calc(100vw - 13%);
    }

    /* Desktop shows full */
    .esk-header-left,
    .esk-header-nav {
        display: flex !important;
    }

    /* Hide mobile elements */
    .esk-header-mobile,
    .esk-mobile-menu {
        display: none !important;
    }
}

/* =========================================================
   MOBILE (<= 820px)
========================================================= */

@media (max-width: 820px) {

    /* Desktop parts off */
    .esk-header-nav,
    .esk-header-left {
        display: none !important;
    }

    /* Mobile header ON */
    .esk-header {
        position: fixed;
        top: 0;

        border-radius: 0;
        padding: 0.9rem 1.2rem !important;

        max-width: 100%;
    }

    :root:not([data-color-mode="dark"]) .esk-header {
        background: rgba(255,255,255,0.70);
        border-bottom: 1px solid rgba(200,200,200,0.3);
    }

    :root[data-color-mode="dark"] .esk-header {
        background: rgba(8,12,22,0.90);
        border-bottom: 1px solid rgba(255,255,255,0.12);
    }

    /* Mobile header visible */
    .esk-header-mobile {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .esk-mobile-name {
        font-size: 1.35rem;
        font-weight: 700;
        color: var(--esk-text);
    }

    .esk-mobile-role {
        font-size: 0.85rem;
        color: var(--esk-primary);
        opacity: 0.85;
    }

    .esk-burger {
        font-size: 2rem;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--esk-text);
    }

    /* Mobile dropdown */
    .esk-mobile-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        width: 100%;

        display: none;
        flex-direction: column;
        gap: 1.4rem;

        padding: 1.6rem 1.2rem;

        background: rgba(0,0,0,0.65);
        backdrop-filter: blur(8px);

        z-index: 99999;
    }

    .esk-mobile-menu.show {
        display: flex !important;
    }

    .esk-mobile-menu a {
        color: #e6e6ff;
        font-size: 1.2rem;
        font-weight: 600;
        text-align: center;
        text-decoration: none;
        transition: 0.2s;
    }

    .esk-mobile-menu a:hover {
        opacity: 0.8;
    }
}

/* ======================================
   FIX: Mobile menu should always start hidden
====================================== */
#esk-mobile-menu {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* When JS toggles .show → menu becomes visible */
#esk-mobile-menu.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}



/* ====================================================
   MOBILE BACKGROUND — FIXED HEIGHT + FLEXIBLE WIDTH
   ==================================================== */
@media (max-width: 820px) {

    html {
        background-color: #060a12;
    }
}



/* ==========================================
   FINAL FIX — FORCE MOBILE MENU TO OPEN
   ========================================== */

@media (max-width: 820px) {

    /* خنثی کردن همه‌ی display:none های قبلی */
    #esk-mobile-menu,
    .esk-mobile-menu {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* نسخه صحیح برای باز شدن */
    #esk-mobile-menu.show {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.4rem !important;

        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;

        position: fixed !important;
        top: 64px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;

        padding: 1.6rem 1.2rem !important;

        background: rgba(0,0,0,0.65) !important;
        backdrop-filter: blur(8px) !important;

        z-index: 999999 !important;
    }
}



/* ======================================
   PHOTOGRAPHY — COLLECTION GALLERY
====================================== */

.esk-photo-collections {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.esk-photo-collection {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.esk-photo-title {
    font-size: 1.6rem;
    font-weight: 700;
}

.esk-photo-desc {
    max-width: 720px;
    line-height: 1.6;
    color: var(--esk-text-muted);
}

.esk-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.1rem;
    margin-top: 0.6rem;
}

.esk-photo-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.esk-photo-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}



/* ======================================
   PHOTOGRAPHY — SWIPE COLLECTION SLIDER
====================================== */

.esk-photo-collections {
    display: flex;
    flex-direction: column;
    gap: 4.5rem;
}

.esk-photo-header {
    max-width: 760px;
    margin-bottom: 1rem;
}

.esk-photo-title {
    font-size: 1.6rem;
    font-weight: 700;
}

.esk-photo-desc {
    color: var(--esk-text-muted);
    line-height: 1.6;
}

/* Slider */
.esk-slider {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
}

.esk-slider-track {
    display: flex;
    gap: 1.2rem;
    transition: transform 0.45s ease;
    will-change: transform;
}

.esk-slider-track img {
    width: 100%;
    max-width: 520px;
    object-fit: cover;
    border-radius: 20px;
    flex-shrink: 0;
}

/* Buttons */
.esk-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    cursor: pointer;

    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(6px);
    font-size: 1.8rem;
    line-height: 1;
    z-index: 5;

    transition: background 0.25s ease, transform 0.25s ease;
}

.esk-slider-btn:hover {
    background: rgba(255,255,255,0.6);
    transform: translateY(-50%) scale(1.05);
}

.esk-slider-btn.prev { left: 12px; }
.esk-slider-btn.next { right: 12px; }

/* Mobile */
@media (max-width: 768px) {
    .esk-slider-track img {
        max-width: 82vw;
    }
}



/* ======================================
   PHOTOGRAPHY — PAGE & GALLERY
====================================== */

.esk-photo-page-header {
    margin: 3.5rem 0 4.5rem;
    max-width: 820px;
}

.esk-photo-kicker {
    font-weight: 600;
    color: var(--esk-primary);
    margin-bottom: 0.4rem;
}

.esk-photo-main-title {
    font-size: 2.6rem;
    margin-bottom: 0.8rem;
}

.esk-photo-lead {
    color: var(--esk-text-muted);
    line-height: 1.7;
}

/* Categories */
.esk-photo-collections {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.esk-photo-category {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.esk-photo-cat-title {
    font-size: 1.9rem;
    font-weight: 800;
}

.esk-photo-cat-desc {
    max-width: 780px;
    line-height: 1.7;
    color: var(--esk-text-muted);
}

/* Slider */
.esk-slider {
    position: relative;
    overflow: hidden;
    padding: 1.3rem;
    border-radius: 26px;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(8px);
}

.esk-slider-track {
    display: flex;
    gap: 1.2rem;
    transition: transform 0.45s ease;
    will-change: transform;
}

.esk-slider-track img {
    width: 100%;
    max-width: 520px;
    object-fit: cover;
    border-radius: 20px;
    flex-shrink: 0;
    filter: saturate(1.05) contrast(1.03);
}

/* Slider Buttons */
.esk-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(6px);
    font-size: 1.8rem;
    line-height: 1;
    z-index: 5;
    transition: background 0.25s ease, transform 0.25s ease;
}

.esk-slider-btn:hover {
    background: rgba(255,255,255,0.75);
    transform: translateY(-50%) scale(1.05);
}

.esk-slider-btn.prev { left: 14px; }
.esk-slider-btn.next { right: 14px; }

/* External link */
.esk-photo-external {
    margin: 6rem 0 3rem;
    text-align: center;
}

.esk-photo-external p {
    margin-bottom: 0.6rem;
    color: var(--esk-text-muted);
}

.esk-photo-external a {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--esk-primary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.25s ease;
}

.esk-photo-external a:hover {
    border-color: var(--esk-primary);
}

/* Mobile */
@media (max-width: 768px) {
    .esk-slider-track img {
        max-width: 82vw;
    }
}

/* === Dynamic image orientation === */

.esk-slider-track img {
    width: auto;
    height: auto;
    max-height: 72vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: 20px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.08);
}

/* Landscape images */
.esk-slider-track img.is-landscape {
    max-width: 720px;
}

/* Portrait images */
.esk-slider-track img.is-portrait {
    max-width: 420px;
}

/* Square images */
.esk-slider-track img.is-square {
    max-width: 520px;
}

/* Mobile tuning */
@media (max-width: 768px) {
    .esk-slider-track img.is-landscape {
        max-width: 90vw;
    }

    .esk-slider-track img.is-portrait {
        max-width: 70vw;
    }
}

/* ======================================
   PHOTOGRAPHY — SLIDER FIXES
====================================== */

/* Slider container: no padding, no fake box */
.esk-slider {
    position: relative;
    overflow: visible;   /* مهم: اجازه بده دکمه‌ها بیرون باشند */
    padding: 0;
    background: none;
    border-radius: 0;
    backdrop-filter: none;
}

/* Track hugs the images exactly */
.esk-slider-track {
    display: flex;
    align-items: center;
    gap: 2.2rem; /* فاصله منطقی بین عکس‌ها */
}

/* Images define the box size */
.esk-slider-track img {
    display: block;
    width: auto;
    height: auto;

    max-width: none;
    max-height: 70vh;

    object-fit: contain;
    border-radius: 18px;

    background: transparent;
    box-shadow: none;
}

/* Orientation control (keep previous logic) */
.esk-slider-track img.is-landscape {
    max-width: 760px;
}

.esk-slider-track img.is-portrait {
    max-width: 420px;
}

.esk-slider-track img.is-square {
    max-width: 520px;
}

/* ======================================
   SLIDER NAV — OUTSIDE, MINIMAL
====================================== */

.esk-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    background: none;
    border: none;
    padding: 0;

    font-size: 3rem;
    font-weight: 300;
    color: rgba(0,0,0,0.45);

    cursor: pointer;
    z-index: 10;

    transition: color 0.25s ease, transform 0.25s ease;
}

/* Hover feel */
.esk-slider-btn:hover {
    color: rgba(0,0,0,0.75);
    transform: translateY(-50%) scale(1.1);
}

/* Position buttons OUTSIDE image box */
.esk-slider-btn.prev {
    left: -64px;
}

.esk-slider-btn.next {
    right: -64px;
}

/* Dark mode safety */
@media (prefers-color-scheme: dark) {
    .esk-slider-btn {
        color: rgba(255,255,255,0.55);
    }

    .esk-slider-btn:hover {
        color: rgba(255,255,255,0.9);
    }
}

/* Mobile tuning */
@media (max-width: 768px) {
    .esk-slider-btn.prev {
        left: -36px;
    }

    .esk-slider-btn.next {
        right: -36px;
    }

    .esk-slider-track img.is-landscape {
        max-width: 88vw;
    }

    .esk-slider-track img.is-portrait {
        max-width: 68vw;
    }
}

/* ======================================
   FIX: Preserve original photo colors in Dark Mode
====================================== */

/* Neutralize ALL visual filters on gallery images */
.esk-slider-track img {
    filter: none !important;
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    background: transparent !important;
}

/* Explicit dark-mode override (defensive) */
@media (prefers-color-scheme: dark) {
    .esk-slider-track img {
        filter: none !important;
        mix-blend-mode: normal !important;
        opacity: 1 !important;
    }
}

/* ======================================
   DARK MODE FIX — Tone down gallery images
====================================== */

.esk-slider-track img {
    filter: brightness(0.7) !important;
}

/* اگر خواستی فقط در دارک‌مود اعمال شود */
@media (prefers-color-scheme: dark) {
    .esk-slider-track img {
        filter: brightness(0.7) !important;
    }
}





/* =========================================================
   END OF FILE
========================================================= */