/* ==========================================================================
   Salah Ahmed — Portfolio Website
   SKEUOMORPHIC Design System
   Mobile-First Responsive CSS Architecture
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens) — Skeuomorphic Palette
   -------------------------------------------------------------------------- */
:root {
    /* Colors - Brand (Polished Gold Metal) */
    --color-primary: #d4a017;
    --color-primary-hover: #b8860b;
    --color-primary-light: #f0d060;
    --color-primary-gradient: linear-gradient(180deg, #f0d060 0%, #d4a017 40%, #b8860b 100%);

    /* Colors - Functional */
    --color-success: #3a7d44;
    --color-warning: #c97d1e;
    --color-error: #a33030;

    /* Backgrounds — Rich Leather / Warm Surfaces */
    --bg-body: #424242;
    --bg-body-texture: none;
    --bg-surface: #424242;
    --bg-surface-hover: #424242;
    --bg-surface-raised: #424242;
    --bg-overlay: rgba(20, 12, 8, 0.8);

    /* Header — Brushed Metal */
    --bg-header: #424242;
    --bg-header-shine: none;

    /* Card Surfaces */
    --bg-card: #424242;

    /* Text Colors */
    --text-main: #f0e6d6;
    --text-muted: #c4b49e;
    --text-on-primary: #1e1206;
    --text-inverse: #1e1206;

    /* Borders — Stitched / Embossed */
    --border-color: #5c4e42;
    --border-highlight: rgba(255, 255, 255, 0.08);
    --border-groove: rgba(0, 0, 0, 0.4);

    /* Shadows — Multi-layered for depth */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.15);
    --shadow-md: 0 3px 8px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
    --shadow-xl: 0 16px 40px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.3);
    --shadow-inset: inset 0 2px 6px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(0,0,0,0.1);
    --shadow-pressed: inset 0 3px 8px rgba(0,0,0,0.5), inset 0 1px 2px rgba(0,0,0,0.3);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius — Softer, cushioned edges */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Layout */
    --max-width: 1200px;
    --header-height: 120px;
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    background-image: var(--bg-body-texture);
    min-height: 100vh;
    overflow-x: hidden;
}

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

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Visibility Utilities */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: inline-flex !important;
}

@media (max-width: 767px) {
    .mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   Header — Brushed Metal Toolbar
   -------------------------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-header);
    box-shadow:
        0 3px 10px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -1px 0 rgba(0,0,0,0.3);
    z-index: 1000;
    border-bottom: 2px solid var(--border-groove);
}

/* Metal shine overlay */
.header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-header-shine);
    pointer-events: none;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    flex-wrap: wrap;
    gap: 10px;
    direction: ltr;
    position: relative;
    z-index: 1;
}

.header__logo {
    display: flex;
    align-items: center;
    height: 100px;
    margin-right: auto;
}

.header__logo img {
    height: 100px;
    width: 100px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.1);
}

.header__logo-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* --------------------------------------------------------------------------
   Language Switcher — Metal Toggle Pills
   -------------------------------------------------------------------------- */
.language-switcher {
    display: flex;
    gap: var(--space-xs);
    margin-inline-end: var(--space-md);
}

.language-switcher__btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-muted);
    background: #424242;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: var(--radius-md);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all var(--transition-fast);
}

.language-switcher__btn:hover {
    background: #424242;
    color: var(--text-main);
}

.language-switcher__btn.active {
    color: var(--text-on-primary);
    background: var(--color-primary-gradient);
    border-color: var(--color-primary-hover);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
    text-shadow: 0 1px 0 rgba(255,255,255,0.2);
}

/* --------------------------------------------------------------------------
   Customer Portal Button — Polished Gold
   -------------------------------------------------------------------------- */
.portal-button {
    display: inline-flex;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-on-primary);
    background: var(--color-primary-gradient);
    border: 1px solid var(--color-primary-hover);
    border-radius: var(--radius-full);
    box-shadow:
        0 3px 8px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all var(--transition-base);
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255,255,255,0.15);
}

/* Mobile Header Layout */
@media (max-width: 767px) {
    .header__inner {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .header__logo {
        order: 1;
        height: 80px;
    }

    .header__logo img {
        height: 80px;
        width: 80px;
    }

    .language-switcher {
        order: 2;
        margin-inline-end: 0;
        margin-inline-start: auto;
    }

    .hamburger {
        order: 3;
    }
}

/* Mobile Portal Button Container */
.mobile-portal-container {
    justify-content: center;
    width: 100%;
    padding: 0;
    margin: 0;
}

.mobile-portal-container .portal-button {
    width: 100%;
    border-radius: 0;
    justify-content: center;
    box-shadow: none;
}

.portal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
    color: var(--text-on-primary);
}

/* --------------------------------------------------------------------------
   Hamburger Menu Button — Raised Metal Knob
   -------------------------------------------------------------------------- */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    background: #424242;
    border: 1px solid rgba(0,0,0,0.3);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all var(--transition-base);
}

.hamburger:hover {
    background: #424242;
}

.hamburger:active {
    box-shadow: var(--shadow-pressed);
    transform: translateY(1px);
}

.hamburger__line {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}

.hamburger__line:not(:last-child) {
    margin-bottom: 6px;
}

/* Hamburger animation when open */
.hamburger.is-open .hamburger__line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.is-open .hamburger__line:nth-child(2) {
    opacity: 0;
}

.hamburger.is-open .hamburger__line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Side Menu Panel — Leather Panel with Stitching
   -------------------------------------------------------------------------- */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 1001;
}

.menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #424242;
    box-shadow:
        -4px 0 20px rgba(0,0,0,0.6),
        inset 1px 0 0 rgba(255,255,255,0.05);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 1002;
    overflow-y: auto;
    /* Stitching left border */
    border-left: 3px solid var(--border-groove);
}

/* Stitched edge decoration */
.side-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 6px;
    bottom: 0;
    width: 1px;
    background: repeating-linear-gradient(
        180deg,
        rgba(200,180,140,0.3) 0px,
        rgba(200,180,140,0.3) 4px,
        transparent 4px,
        transparent 8px
    );
}

/* Disable transitions during direction change */
.side-menu.no-transition {
    transition: none !important;
}

[dir="rtl"] .side-menu {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    border-left: none;
    border-right: 3px solid var(--border-groove);
}

[dir="rtl"] .side-menu::before {
    left: auto;
    right: 6px;
}

.side-menu.is-open {
    transform: translateX(0);
}

.side-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 2px solid var(--border-groove);
    box-shadow: 0 1px 0 var(--border-highlight);
    background: #424242;
}

.side-menu__title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.side-menu__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: var(--font-size-xl);
    color: var(--text-main);
    border-radius: 50%;
    background: #424242;
    border: 1px solid rgba(0,0,0,0.3);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.08);
    transition: all var(--transition-fast);
}

.side-menu__close:hover {
    background: #424242;
    color: var(--color-primary);
}

.side-menu__close:active {
    box-shadow: var(--shadow-pressed);
    transform: translateY(1px);
}

.side-menu__content {
    padding: var(--space-lg);
}

.side-menu__section {
    margin-bottom: var(--space-xl);
}

.side-menu__section-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* --------------------------------------------------------------------------
   Contact Links — Glossy App Icon Buttons
   -------------------------------------------------------------------------- */
.contact-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-groove);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-sm);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

/* Glass shine overlay */
.contact-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    pointer-events: none;
}

.contact-link:hover {
    background: var(--color-primary-gradient);
    color: var(--text-on-primary);
    border-color: var(--color-primary-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.contact-link:active {
    transform: translateY(0);
    box-shadow: var(--shadow-pressed);
}

.contact-link__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
}

.contact-link__text {
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Map Button — Polished Gold Button
   -------------------------------------------------------------------------- */
.btn-map {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    color: var(--text-on-primary);
    background: var(--color-primary-gradient);
    border: 1px solid var(--color-primary-hover);
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 10px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all var(--transition-base);
    text-shadow: 0 1px 0 rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
}

/* Glass shine */
.btn-map::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    pointer-events: none;
}

.btn-map:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
    color: var(--text-on-primary);
}

.btn-map:active {
    transform: translateY(0);
    box-shadow: var(--shadow-pressed);
}

/* --------------------------------------------------------------------------
   Main Content
   -------------------------------------------------------------------------- */
main {
    padding-top: var(--header-height);
}

.section {
    padding: var(--space-2xl) 0;
}

.section__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    text-align: center;
    /* Embossed gold text */
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}

.section__description {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

/* --------------------------------------------------------------------------
   Introduction Section — Parchment / Linen Surface
   -------------------------------------------------------------------------- */
.intro {
    background: #424242;
    padding: var(--space-3xl) 0;
    text-align: center;
    position: relative;
}

/* Subtle linen texture */
.intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 1px,
        rgba(255,255,255,0.008) 1px,
        rgba(255,255,255,0.008) 2px
    );
    pointer-events: none;
}

.intro__greeting {
    font-size: var(--font-size-xl);
    font-weight: bold;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
    position: relative;
}

.intro__name {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: var(--space-sm);
    /* Embossed text effect */
    text-shadow:
        0 1px 0 rgba(255,255,255,0.08),
        0 -1px 0 rgba(0,0,0,0.5),
        0 2px 8px rgba(0,0,0,0.3);
    position: relative;
}

.intro__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-lg);
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
    position: relative;
}

.intro__description {
    font-size: var(--font-size-xl);
    color: var(--text-muted);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    font-weight: bold;
    text-align: justify;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    position: relative;
}

/* --------------------------------------------------------------------------
   Works Section — Physical Tile Cards
   -------------------------------------------------------------------------- */
.works {
    background: #424242;
    position: relative;
}

/* Groove top/bottom borders */
.works::before,
.works::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
}
.works::before {
    top: 0;
    background: rgba(0,0,0,0.3);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.works::after {
    bottom: 0;
    background: rgba(0,0,0,0.3);
    box-shadow: 0 -1px 0 rgba(255,255,255,0.05);
}

/* Category Buttons — Raised Capsule Toggles */
.category-buttons {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.category-btn {
    padding: 16px 48px;
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: var(--text-muted);
    background: #424242;
    border: 1px solid var(--border-groove);
    border-radius: var(--radius-full);
    box-shadow:
        0 3px 8px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.08);
    transition: all var(--transition-fast);
    width: 100%;
    text-align: center;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* Glass highlight on top */
.category-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 100%);
    border-radius: var(--radius-full);
    pointer-events: none;
}

.category-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-light);
    background: #424242;
    box-shadow:
        0 4px 10px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.category-btn.active {
    background: var(--color-primary-gradient);
    border-color: var(--color-primary-hover);
    color: var(--text-on-primary);
    box-shadow:
        var(--shadow-pressed),
        0 0 0 1px var(--color-primary-hover);
    text-shadow: 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(1px);
}

/* Works Grid */
.works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.works-placeholder {
    padding: var(--space-sm);
    color: var(--text-muted);
    font-size: var(--font-size-xl);
    font-weight: bold;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Work Card — Physical Tile with Bezel */
.work-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    border: 1px solid var(--border-groove);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    min-height: 120px;
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

/* Top-edge highlight (bezel reflection) */
.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

/* Subtle inner glow */
.work-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    pointer-events: none;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.work-card:hover {
    box-shadow:
        0 12px 30px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transform: translateY(-4px);
}

.work-card:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.work-card__title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
    overflow-wrap: break-word;
    word-break: break-word;
    position: relative;
    z-index: 1;
}

.work-card__description {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: var(--text-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: break-word;
    word-break: break-word;
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   UI Versions Section — Photo Frame Cards
   -------------------------------------------------------------------------- */
.ui-versions {
    background: var(--bg-body);
}

.ui-versions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.ui-version-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    /* Thick beveled frame effect */
    border: 3px solid #5c4e42;
    box-shadow:
        0 6px 16px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -1px 0 rgba(0,0,0,0.2);
    transition: all var(--transition-base);
    background: var(--bg-surface);
}

.ui-version-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 30px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.1);
    border-color: var(--color-primary);
}

.ui-version-card__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.ui-version-card__header {
    background: #424242;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

.ui-version-card__label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-main);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* --------------------------------------------------------------------------
   Footer — Stamped Metal Bar
   -------------------------------------------------------------------------- */
.footer {
    background: #424242;
    color: var(--text-main);
    padding: var(--space-2xl) 0;
    border-top: 2px solid var(--border-groove);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
}

/* Stitching line */
.footer::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        rgba(200,180,140,0.2) 0px,
        rgba(200,180,140,0.2) 6px,
        transparent 6px,
        transparent 12px
    );
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
}

.footer__contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

/* Footer Contact Links — Glossy Badge/Pin */
.footer__contact-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-main);
    background: #424242;
    border: 1px solid var(--border-groove);
    border-radius: var(--radius-full);
    box-shadow:
        0 2px 6px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.08);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

/* Glass shine */
.footer__contact-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 100%);
    pointer-events: none;
}

.footer__contact-link:hover {
    background: var(--color-primary-gradient);
    color: var(--text-on-primary);
    border-color: var(--color-primary-hover);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.footer__contact-link:active {
    transform: translateY(0);
    box-shadow: var(--shadow-pressed);
}

.footer-icon {
    width: 50px;
    height: 50px;
    vertical-align: middle;
    margin-right: 6px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

.footer__copyright {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-align: center;
    width: 100%;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* --------------------------------------------------------------------------
   Tablet Breakpoint (768px+)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
    :root {
        --font-size-3xl: 2.5rem;
        --font-size-4xl: 3rem;
    }

    .container {
        padding: 0 var(--space-lg);
    }

    .intro__name {
        font-size: var(--font-size-4xl);
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    .section__title {
        font-size: var(--font-size-3xl);
    }
}

/* --------------------------------------------------------------------------
   Desktop Breakpoint (1024px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .works-placeholder {
        grid-column: 1 / -1;
    }

    .ui-versions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-lg);
    }

    .intro {
        padding: var(--space-3xl) 0 var(--space-3xl);
    }
}

/* --------------------------------------------------------------------------
   RTL Support
   -------------------------------------------------------------------------- */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .header__inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-switcher {
    margin-right: 0;
    margin-left: var(--space-md);
}

[dir="rtl"] .header__logo {
    margin-right: 0;
    margin-left: auto;
}

@media (max-width: 767px) {
    [dir="rtl"] .language-switcher {
        margin-left: 0;
        margin-right: auto;
    }
}

[dir="rtl"] .hamburger__line:nth-child(1) {
    transform-origin: right center;
}

[dir="rtl"] .hamburger__line:nth-child(3) {
    transform-origin: right center;
}

[dir="rtl"] .contact-link {
    flex-direction: row-reverse;
}

[dir="rtl"] .footer__contact-link {
    flex-direction: row-reverse;
}

/* --------------------------------------------------------------------------
   Animations — Skeuomorphic Press & Shine
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shineGlint {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

.fade-in {
    animation: fadeIn var(--transition-base) ease-out;
}

.slide-up {
    animation: slideUp var(--transition-slow) ease-out;
}

/* Staggered animation for cards */
.work-card,
.ui-version-card {
    animation: slideUp var(--transition-slow) ease-out backwards;
}

.work-card:nth-child(1),
.ui-version-card:nth-child(1) {
    animation-delay: 0.1s;
}

.work-card:nth-child(2),
.ui-version-card:nth-child(2) {
    animation-delay: 0.2s;
}

.work-card:nth-child(3),
.ui-version-card:nth-child(3) {
    animation-delay: 0.3s;
}

.work-card:nth-child(4),
.ui-version-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* --------------------------------------------------------------------------
   Read More & Modal
   -------------------------------------------------------------------------- */
.work-card__read-more {
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--space-sm);
    display: inline-block;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border: none;
    padding: 0;
    position: relative;
    z-index: 1;
    transition: opacity var(--transition-fast);
}

.work-card__read-more:hover {
    opacity: 0.8;
    text-decoration: underline;
    -webkit-text-decoration-color: var(--color-primary);
    text-decoration-color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Modal Base Styles — Padded Leather Dialog
   -------------------------------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 6, 4, 0.7);
    backdrop-filter: blur(6px);
}

.modal__content {
    position: relative;
    background: #424242;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-groove);
    box-shadow:
        0 20px 50px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(255,255,255,0.08);
    z-index: 1001;
    transform: translateY(20px);
    transition: transform var(--transition-base);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Stitched border inside modal */
.modal__content::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px dashed rgba(200,180,140,0.15);
    border-radius: calc(var(--radius-xl) - 3px);
    pointer-events: none;
    z-index: 1;
}

.modal.is-open .modal__content {
    transform: translateY(0);
}

.modal__header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 2px solid var(--border-groove);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: #424242;
}

/* Close button — Polished Round Knob */
.modal__close {
    background: #424242;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
    padding: 0;
    line-height: 1;
    transition: all var(--transition-fast);
}

.modal__close:hover {
    background: #424242;
    color: var(--color-primary);
}

.modal__close:active {
    box-shadow: var(--shadow-pressed);
    transform: translateY(1px);
}

.modal__body {
    padding: var(--space-lg);
    overflow-y: auto;
}

/* Modal specific styles for work details */
.modal__content--work {
    max-width: 600px;
    width: 90%;
}

.work-details__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

.work-details__description {
    font-size: var(--font-size-base);
    color: var(--text-main);
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Separator Image */
.separator-image-container {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.separator-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   UI Version Image Preview Modal
   -------------------------------------------------------------------------- */
.modal__content--image {
    background: transparent;
    box-shadow: none;
    border: none;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal__content--image::before {
    display: none;
}

.modal__close--image {
    position: absolute;
    top: -40px;
    right: 0;
    background: #424242;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all var(--transition-fast);
    z-index: 1002;
}

.modal__close--image:hover {
    background: var(--color-primary-gradient);
    color: var(--text-on-primary);
}

.modal__close--image:active {
    box-shadow: var(--shadow-pressed);
    transform: translateY(1px);
}

.ui-version-preview__image {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    border: 3px solid #5c4e42;
    box-shadow:
        0 16px 40px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(255,255,255,0.08);
    object-fit: contain;
}

/* Make UI version card images clickable */
.ui-version-card__image {
    cursor: pointer;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.ui-version-card__image:hover {
    opacity: 0.9;
}