/* === FONT FACE === */
@font-face {
    font-family: 'YekanBakh';
    src: url('/assets/Font/YekanBakh-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/assets/Font/YekanBakh-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* === VARIABLES === */
:root {
    --font-yekan: 'YekanBakh', system-ui, -apple-system, sans-serif;
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --text-muted: #9c9c9c;
    --accent-silver: #E5E4E2;
    --accent-silver-light: #e6e6e6;
    --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-yekan);
    font-weight: 700;
    background: #0a0a0a;
    color: var(--text-secondary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === HEADINGS === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-yekan);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 2vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 1vw, 1.5rem); }

p {
    font-family: var(--font-yekan);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: clamp(0.9375rem, 1vw, 1.0625rem);
    line-height: 1.7;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ───────── Header ───────── */
.page-header {
    padding: 80px 0 1px;
    text-align: center;
    background: none;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    margin-top: 10px;
    line-height: 1.15;
}

.page-subtitle {
    font-family: var(--font-yekan);
    font-weight: 700;
    color: var(--text-muted);
    font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
    max-width: 640px;
    margin: 0 auto 20px;
    line-height: 1.7;
}

.breadcrumb {
    font-family: var(--font-yekan);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 4rem;
}

.breadcrumb a {
    color: #ffffff;
    text-decoration: none;
    transition: color var(--transition-base);
}

.breadcrumb span {
    color: #ffffff;
    margin: 2px;
}

/* ───────── Filters ───────── */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 40px 0;
    list-style: none;
}

.filter-btn {
    font-family: var(--font-yekan);
    font-weight: 700;
    padding: 10px 24px;
    border: 1px solid #262626;
    background: #121212;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
}

.filter-btn:hover {
    background: #1f1f1f;
    color: #ffffff;
    border-color: #525252;
}

.filter-btn.active {
    background: #ffffff;
    color: #0a0a0a;
    border-color: #ffffff;
    font-weight: 900;
}

/* ───────── Scrollbar ───────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, rgba(201, 201, 201, 0.1), rgba(255, 255, 255, 0.4), rgba(201, 201, 201, 0.1));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ───────── Grid — 3 Columns ───────── */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 20px 0 80px;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ───────── Card — Compact Rectangle ───────── */
.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #111111;
    border: 1px solid #1e1e1e;
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base),
                box-shadow var(--transition-base),
                border-color var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Shine Effect ── */
.portfolio-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.12) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    transition: left 0.7s ease-in-out;
    pointer-events: none;
    z-index: 3;
}

.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.06);
    border-color: #333333;
}

.portfolio-item:hover::after {
    left: 150%;
}

.portfolio-item.hidden {
    display: none;
}

/* ── Image Area — Fixed Height with Contain ── */
.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 240px;
    background: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.portfolio-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.4s ease;
    opacity: 0.9;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
    opacity: 1;
}

/* ── Overlay ── */
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* ── View Button (Circle) ── */
.portfolio-link {
    width: 60px;
    height: 60px;
    border: 1.5px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0a;
    text-decoration: none;
    background: #ffffff;
    transform: rotate(0deg) scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.portfolio-item:hover .portfolio-overlay .portfolio-link {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.portfolio-link:hover {
    background: #0a0a0a;
    border-color: #ffffff;
    color: #ffffff;
    transform: rotate(45deg) scale(1);
}

.portfolio-link svg {
    width: 26px;
    height: 26px;
    transition: transform 0.4s ease;
}

/* ── Category Tag ── */
.category-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    background: rgba(17, 17, 17, 0.88);
    backdrop-filter: blur(6px);
    border: 1px solid #2a2a2a;
    border-radius: 2rem;
    transition: all var(--transition-base);
}

.category-tag:hover {
    background: #ffffff;
    border-color: #ffffff;
}

.category-tag a {
    font-family: var(--font-yekan);
    font-weight: 700;
    display: inline-block;
    padding: 5px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: color var(--transition-base);
}

.category-tag:hover a {
    color: #0a0a0a;
}

/* ── Content Area — Compact ── */
.portfolio-content {
    padding: 18px 20px 22px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portfolio-title {
    font-family: var(--font-yekan);
    font-weight: 900;
    font-size: clamp(1.75rem, 2vw, 2.75rem);
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.15;
    text-align: center;
    letter-spacing: -0.02em;
}

.portfolio-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

.portfolio-title a:hover {
    color: #ffffff;
}

.portfolio-excerpt {
    font-family: var(--font-yekan);
    font-weight: 700;
    font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
    color: var(--text-muted);
    line-height: 1.7;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Fade-in Animation ── */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-item.visible {
    animation: fadeIn 0.5s ease forwards;
}

/* ── Staggered animation delays ── */
.portfolio-item.visible:nth-child(1)  { animation-delay: 0.05s; }
.portfolio-item.visible:nth-child(2)  { animation-delay: 0.10s; }
.portfolio-item.visible:nth-child(3)  { animation-delay: 0.15s; }
.portfolio-item.visible:nth-child(4)  { animation-delay: 0.20s; }
.portfolio-item.visible:nth-child(5)  { animation-delay: 0.25s; }
.portfolio-item.visible:nth-child(6)  { animation-delay: 0.30s; }
.portfolio-item.visible:nth-child(7)  { animation-delay: 0.35s; }
.portfolio-item.visible:nth-child(8)  { animation-delay: 0.40s; }
.portfolio-item.visible:nth-child(9)  { animation-delay: 0.45s; }
.portfolio-item.visible:nth-child(10) { animation-delay: 0.50s; }
.portfolio-item.visible:nth-child(11) { animation-delay: 0.55s; }
.portfolio-item.visible:nth-child(12) { animation-delay: 0.60s; }
.portfolio-item.visible:nth-child(13) { animation-delay: 0.65s; }
.portfolio-item.visible:nth-child(14) { animation-delay: 0.70s; }
.portfolio-item.visible:nth-child(15) { animation-delay: 0.75s; }