/* ============================================================
   RtaMir — Dark Modern Design System
   ============================================================ */

/* --- Google Fonts (loaded via _head.blade.php) ------------- */
/* Inter + Space Grotesk */

/* --- CSS Variables ----------------------------------------- */
:root {
    --bg-base: #09090f;
    --bg-surface: #11111c;
    --bg-card: #181825;
    --bg-card-hover: #1f1f30;
    --border: #2a2a40;
    --border-glow: #6c63ff44;

    --accent: #6c63ff;
    --accent-active: #f36315;
    --accent-dim: #6c63ff22;
    --accent-hover: #8a82ff;
    --coral: #ff6b6b;
    --coral-dim: #ff6b6b22;
    --gold: #f5a623;
    --gold-dim: #f5a62322;
    --teal: #00d4aa;
    --teal-dim: #00d4aa22;

    --text-primary: #f0f0fa;
    --text-muted: #8888a8;
    --text-subtle: #55556a;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 32px rgba(108, 99, 255, 0.15);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.6);

    --transition: 0.25s ease;
    --transition-slow: 0.5s ease;

    --nav-height: 72px;
}

/* --- Light Theme Override ----------------------------------- */
.light-theme {
    --bg-base: #f8f8fc;
    --bg-surface: #f0f0f6;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5fa;
    --border: #ddd;
    --border-glow: #6c63ff33;

    --text-primary: #1a1a2e;
    --text-muted: #555;
    --text-subtle: #888;

    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 24px rgba(108, 99, 255, 0.1);
    --shadow-hover: 0 6px 32px rgba(0, 0, 0, 0.1);

    background: var(--bg-base);
    color: var(--text-primary);
}
.light-theme h1,
.light-theme h2,
.light-theme h3,
.light-theme h4,
.light-theme h5,
.light-theme h6 {
    color: var(--text-primary);
}
.light-theme .section-label {
    color: var(--accent);
}
.light-theme .service-card {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: var(--shadow-card);
}
.light-theme .service-card:hover {
    box-shadow: var(--shadow-hover);
}
.light-theme .service-card h3 {
    color: var(--text-primary);
}
.light-theme .service-card p {
    color: var(--text-muted);
}
.light-theme .btn-primary-rtamir {
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.25);
}
.light-theme .btn-ghost-rtamir {
    border-color: #ccc;
    color: var(--text-primary);
}
.light-theme .btn-ghost-rtamir:hover {
    background: rgba(108, 99, 255, 0.08);
    border-color: var(--accent);
    color: var(--accent);
}
.light-theme .btn-coral-rtamir {
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.25);
}
.light-theme .learn-more {
    color: var(--accent);
}
.light-theme .surface-card {
    background: var(--bg-card);
    border-color: var(--border);
}
.light-theme .gradient-text {
    background: linear-gradient(135deg, #6c63ff, #00d4aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.light-theme .divider {
    background: linear-gradient(90deg, #6c63ff, #00d4aa);
}
.light-theme .page-body {
    background: #eeeef6;
}

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

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* --- Scrollbar -------------------------------------------- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.rtamir-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    background: rgba(9, 9, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.rtamir-nav.scrolled {
    background: rgba(9, 9, 15, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 44px;
    width: auto;
    transition: opacity var(--transition);
}
.nav-logo:hover img {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--accent-active);
}

.nav-cta {
    background: var(--accent) !important;
    color: #fff !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: var(--radius-sm) !important;
}
.nav-cta:hover {
    background: var(--accent-hover) !important;
    color: #fff !important;
}

/* Mobile nav */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: transform var(--transition), opacity var(--transition);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition), opacity var(--transition);
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    .nav-links li {
        width: 100%;
    }
    .nav-links a {
        display: block;
        padding: 0.75rem 2rem;
        border-radius: 0;
    }
    .nav-cta {
        margin: 0.5rem 2rem !important;
        text-align: center !important;
        border-radius: var(--radius-sm) !important;
    }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.12;
    filter: saturate(0.5);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(9, 9, 15, 0.9) 0%,
        rgba(9, 9, 15, 0.7) 50%,
        rgba(108, 99, 255, 0.1) 100%
    );
}

/* animated gradient orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: orb-float 8s ease-in-out infinite alternate;
}
.hero-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}
.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: var(--coral);
    bottom: -100px;
    left: -100px;
    animation-delay: -4s;
}

@keyframes orb-float {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(40px, 30px) scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.hero-eyebrow::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--coral) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-subtle);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: bounce-arrow 2s ease-in-out infinite;
}

@keyframes bounce-arrow {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

.hero-scroll::after {
    content: "";
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary-rtamir {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition),
        box-shadow var(--transition);
    text-decoration: none;
}
.btn-primary-rtamir:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.4);
}

/* Shatter button effect */
.pf-cta-shatter-btn {
    position: relative;
    z-index: 1;
    overflow: visible;
}
.pf-cta-shatter-btn .pf-shard {
    position: absolute;
    border-radius: 2px;
    pointer-events: none;
    will-change: transform, opacity;
    transition: transform 0.7s cubic-bezier(.22,1,.36,1), opacity 0.7s ease;
    z-index: -1;
}
.pf-cta-shatter-btn.pf-shattering {
    background: transparent !important;
    box-shadow: none !important;
}
.pf-cta-shatter-btn.pf-shattering .pf-shard {
    opacity: 0;
}

.btn-ghost-rtamir {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition),
        transform var(--transition);
    text-decoration: none;
}
.btn-ghost-rtamir:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-coral-rtamir {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--coral);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition),
        box-shadow var(--transition);
    text-decoration: none;
}
.btn-coral-rtamir:hover {
    background: #ff8585;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
}

/* ============================================================
   SECTION LAYOUT
   ============================================================ */
.section {
    padding: 6rem 1.5rem;
}

.section-sm {
    padding: 3rem 1.5rem;
}

.container-rtamir {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: border-color var(--transition), transform var(--transition),
        box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--card-accent, var(--accent)),
        transparent
    );
    opacity: 0;
    transition: opacity var(--transition);
}

.service-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card.coral {
    --card-accent: var(--coral);
}
.service-card.teal {
    --card-accent: var(--teal);
}
.service-card.gold {
    --card-accent: var(--gold);
}

.service-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    background: var(--accent-dim);
    color: var(--accent);
}

.service-card.coral .service-icon {
    background: var(--coral-dim);
    color: var(--coral);
}
.service-card.teal .service-icon {
    background: var(--teal-dim);
    color: var(--teal);
}
.service-card.gold .service-icon {
    background: var(--gold-dim);
    color: var(--gold);
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.service-card .learn-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap var(--transition);
}
.service-card.coral .learn-more {
    color: var(--coral);
}
.service-card.teal .learn-more {
    color: var(--teal);
}
.service-card.gold .learn-more {
    color: var(--gold);
}
.service-card:hover .learn-more {
    gap: 0.6rem;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.filter-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.portfolio-card {
    --card-accent: var(--accent);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition),
        border-color var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 24px color-mix(in srgb, var(--card-accent) 22%, transparent),
                0 8px 32px rgba(0,0,0,0.3);
    border-color: color-mix(in srgb, var(--card-accent) 50%, transparent);
}

.portfolio-thumb {
    position: relative;
    height: 200px;
    background: var(--bg-surface);
    overflow: hidden;
}

.portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.portfolio-card:hover .portfolio-thumb img {
    transform: scale(1.06);
}

.portfolio-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-subtle);
    background: linear-gradient(135deg, var(--bg-surface), var(--bg-card));
}

.portfolio-body {
    padding: 1.2rem 1.5rem 1.5rem;
}

.portfolio-body h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.portfolio-body p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============================================================
   HOMEPAGE — Light Services Parallax
   ============================================================ */
.hp-services-light {
    position: relative;
    overflow: hidden;
    padding: 5rem 1.5rem;
    background: linear-gradient(170deg, #f4f4fb 0%, #eaeaf4 50%, #f0f0f8 100%);
}
.hp-services-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.hp-services-light .section-header {
    position: relative;
    z-index: 2;
}

.hp-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}
.hp-svc-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    text-decoration: none;
    color: #333;
    transition: transform var(--transition), box-shadow var(--transition),
        border-color var(--transition), background var(--transition);
    cursor: pointer;
}
.hp-svc-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--svc-accent);
    color: #333;
}
.hp-svc-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.hp-svc-card h3 {
    font-size: 1.05rem;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}
.hp-svc-card p {
    color: #666;
    font-size: 0.87rem;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
}
.hp-svc-link {
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
@media (max-width: 768px) {
    .hp-services-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   HOMEPAGE — Portfolio 3D Perspective Tilt
   ============================================================ */
.hp-pf-stage {
    display: flex;
    gap: 1rem;
    perspective: 1200px;
    min-height: 320px;
}
.hp-pf-card {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.15, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.15, 1),
        opacity 0.6s cubic-bezier(0.4, 0, 0.15, 1),
        box-shadow 0.6s cubic-bezier(0.4, 0, 0.15, 1), border-color 0.4s ease;
}
.hp-pf-card:hover {
    border-color: var(--accent);
}
.hp-pf-card-img {
    position: relative;
    height: 190px;
    overflow: hidden;
}
.hp-pf-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.hp-pf-card:hover .hp-pf-card-img img {
    transform: scale(1.04);
}
.hp-pf-card-body {
    padding: 1.25rem;
}
.hp-pf-card-body h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    transition: font-size 0.4s ease;
}
.hp-pf-card-body p {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}
.hp-pf-full {
    display: none;
}
.hp-pf-techs {
    display: none;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ── Expanded card ── */
.hp-pf-card.pf-active {
    flex: 3.5 1 0;
    transform: rotateY(0deg) scale(1);
    box-shadow: 0 8px 40px rgba(108, 99, 255, 0.15), 0 0 0 1px var(--accent);
    border-color: var(--accent);
    z-index: 2;
}
.hp-pf-card.pf-active .hp-pf-card-img {
    height: 260px;
}
.hp-pf-card.pf-active .hp-pf-card-body h3 {
    font-size: 1.25rem;
}
.hp-pf-card.pf-active .hp-pf-short {
    display: none;
}
.hp-pf-card.pf-active .hp-pf-full {
    display: block;
}
.hp-pf-card.pf-active .hp-pf-techs {
    display: flex;
}

/* ── Collapsed cards (3D tilt away) ── */
.hp-pf-card.pf-away {
    flex: 0 0 70px;
    opacity: 0.5;
    transform: rotateY(18deg) scale(0.88) translateZ(-40px);
    cursor: pointer;
}
.hp-pf-card.pf-away .hp-pf-card-img {
    height: 100%;
    position: absolute;
    inset: 0;
}
.hp-pf-card.pf-away .hp-pf-card-body {
    position: relative;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        transparent 100%
    );
    padding: 0.6rem;
    display: flex;
    align-items: flex-end;
    height: 100%;
}
.hp-pf-card.pf-away .hp-pf-card-body h3 {
    font-size: 0.7rem;
    color: #fff;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
}
.hp-pf-card.pf-away .hp-pf-card-body p,
.hp-pf-card.pf-away .hp-pf-techs {
    display: none;
}
.hp-pf-card.pf-away:hover {
    opacity: 0.8;
    transform: rotateY(10deg) scale(0.92) translateZ(-20px);
    border-color: var(--accent);
}

/* Cards that are to the LEFT of the active card tilt the other way */
.hp-pf-card.pf-away-left {
    transform: rotateY(-18deg) scale(0.88) translateZ(-40px);
}
.hp-pf-card.pf-away-left:hover {
    transform: rotateY(-10deg) scale(0.92) translateZ(-20px);
}

@media (max-width: 768px) {
    .hp-pf-stage {
        flex-direction: column;
        perspective: none;
    }
    .hp-pf-card.pf-away {
        flex: 0 0 60px;
        transform: rotateX(8deg) scale(0.95);
        opacity: 0.6;
    }
    .hp-pf-card.pf-away-left {
        transform: rotateX(-8deg) scale(0.95);
    }
    .hp-pf-card.pf-away:hover,
    .hp-pf-card.pf-away-left:hover {
        transform: rotateX(0deg) scale(0.98);
        opacity: 0.8;
    }
    .hp-pf-card.pf-active .hp-pf-card-img {
        height: 200px;
    }
}

/* ============================================================
   HOMEPAGE — Blog Infinite Carousel
   ============================================================ */
.hp-blog-carousel {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 0.5rem 0 1rem;
}
.hp-blog-track {
    display: flex;
    gap: 1.5rem;
    will-change: transform;
}
.hp-blog-slide {
    flex-shrink: 0;
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.hp-blog-slide:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    color: var(--text-primary);
}
.hp-blog-slide-img {
    height: 180px;
    overflow: hidden;
}
.hp-blog-slide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.hp-blog-slide:hover .hp-blog-slide-img img {
    transform: scale(1.05);
}
.hp-blog-slide-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.hp-blog-slide-body h3 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}
.hp-blog-slide-body p {
    color: var(--text-muted);
    font-size: 0.83rem;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 0.75rem;
}
@media (max-width: 768px) {
    .hp-blog-slide {
        width: 280px;
    }
    .hp-blog-slide-img {
        height: 150px;
    }
}

/* ============================================================
   BLOG / RLOG  — Modern Notebook-Inspired Design
   ============================================================ */

/* --- Page wrapper --- */
.rlog-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 2rem) 1.5rem 4rem;
}

/* Shared meta & read-link */
.rlog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--text-subtle);
    margin-bottom: 0.6rem;
}
.rlog-meta i {
    margin-right: 0.2rem;
}

/* --- Pagination --- */
.rlog-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}
.rlog-pagination .pagination {
    gap: 0.25rem;
}
.rlog-pagination .page-link {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
}
.rlog-pagination .page-link:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}
.rlog-pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ============================================================
   SINGLE ARTICLE  — Reader View
   ============================================================ */

/* Reading progress */
.rlog-progress {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--coral));
    z-index: 999;
    transition: width 0.1s linear;
}

.rlog-article {
    max-width: 780px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 2rem) 1.5rem 4rem;
}

/* Header */
.rlog-back {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition);
}
.rlog-back:hover {
    color: var(--accent);
}

.rlog-article-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.25;
    margin-bottom: 1.25rem;
}

/* Author */
.rlog-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.rlog-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--coral));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}
.rlog-author strong {
    display: block;
    font-size: 0.9rem;
}
.rlog-author-role {
    font-size: 0.78rem;
    color: var(--text-subtle);
}

/* Cover */
.rlog-cover {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
}
.rlog-cover img {
    width: 100%;
    display: block;
}

/* Article body typography */
.rlog-article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-primary);
}
.rlog-article-body h2 {
    font-size: 1.45rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.rlog-article-body h3 {
    font-size: 1.15rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}
.rlog-article-body p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}
.rlog-article-body strong {
    color: var(--text-primary);
}
.rlog-article-body a {
    color: var(--accent);
    text-decoration: underline;
}
.rlog-article-body ul,
.rlog-article-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}
.rlog-article-body li {
    margin-bottom: 0.4rem;
}
.rlog-article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--accent-dim);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-muted);
    font-style: italic;
}
.rlog-article-body img {
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}
.rlog-article-body code {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.88em;
    color: var(--coral);
}
.rlog-article-body pre {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.rlog-article-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-primary);
}

/* Share bar */
.rlog-share {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.rlog-share-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}
.rlog-share-buttons {
    display: flex;
    gap: 0.5rem;
}
.rlog-share-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.rlog-share-btn:hover {
    border-color: var(--accent);
    color: #fff;
}
.rlog-share-linkedin:hover {
    background: #0a66c2;
    border-color: #0a66c2;
}
.rlog-share-x:hover {
    background: #000;
    border-color: #333;
}
.rlog-share-fb:hover {
    background: #1877f2;
    border-color: #1877f2;
}
.rlog-share-copy:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* Prev / Next nav */
.rlog-nav-posts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
}
.rlog-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition);
}
.rlog-nav-link:hover {
    border-color: var(--accent);
    color: inherit;
}
.rlog-nav-next {
    text-align: right;
}
.rlog-nav-dir {
    font-size: 0.75rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.rlog-nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* --- Blog Responsive --- */
@media (max-width: 768px) {
    .rlog-nav-posts {
        grid-template-columns: 1fr;
    }
    .rlog-share {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
}

.stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item .stat-value {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-item .stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.contact-info h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    transition: border-color var(--transition), color var(--transition);
}

.contact-link-item:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.contact-link-item .link-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.contact-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.contact-form-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.contact-form-card .form-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.92rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.form-control-rtamir {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control-rtamir:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-control-rtamir::placeholder {
    color: var(--text-subtle);
}

select.form-control-rtamir option {
    background: var(--bg-card);
    color: var(--text-primary);
}

textarea.form-control-rtamir {
    resize: vertical;
    min-height: 140px;
}

.service-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.service-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.service-checkbox input[type="checkbox"] {
    display: none;
}

.service-checkbox.checked,
.service-checkbox:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--text-primary);
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero {
    padding: 8rem 1.5rem 4rem;
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

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

.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.skill-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.rtamir-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 4rem 1.5rem 2rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}
@media (max-width: 540px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
}

.footer-brand img {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.65;
    max-width: 260px;
    margin-bottom: 1.25rem;
}

.footer-social {
    display: flex;
    gap: 0.6rem;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: border-color var(--transition), color var(--transition),
        background var(--transition);
}
.social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.footer-col h6 {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color var(--transition);
}
.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom p {
    color: var(--text-subtle);
    font-size: 0.82rem;
    margin: 0;
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash-message {
    position: fixed;
    top: calc(var(--nav-height) + 1rem);
    right: 1.5rem;
    z-index: 2000;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slide-in-right 0.3s ease;
}

.flash-message.success {
    border-left: 3px solid var(--teal);
}
.flash-message.error {
    border-left: 3px solid var(--coral);
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-accent {
    color: var(--accent);
}
.text-coral {
    color: var(--coral);
}
.text-teal {
    color: var(--teal);
}
.text-gold {
    color: var(--gold);
}
.text-muted-r {
    color: var(--text-muted);
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--coral) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.surface-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.divider {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--coral));
    border-radius: 2px;
    margin: 1rem auto;
}

/* page wrapper offset for fixed nav */
.page-body {
    padding-top: var(--nav-height);
}

/* fade-up animation for sections */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 768px) {
    .section {
        padding: 4rem 1rem;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    .stats-inner {
        grid-template-columns: repeat(2, 1fr);
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    .service-checkboxes {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   LIGHT THEME NAV & FOOTER
   ============================================================ */
.rtamir-nav.nav-light {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid #ddd;
}
.rtamir-nav.nav-light.scrolled {
    background: rgba(255, 255, 255, 0.98);
}
.rtamir-nav.nav-light .nav-links a {
    color: #555;
}
.rtamir-nav.nav-light .nav-links a:hover,
.rtamir-nav.nav-light .nav-links a.active {
    color: #1a1a2e;
    background: rgba(0, 0, 0, 0.05);
}
.rtamir-nav.nav-light .nav-links a.active {
    color: var(--accent-active);
}
.rtamir-nav.nav-light .nav-cta {
    color: #fff !important;
}
.rtamir-nav.nav-light .nav-toggle {
    color: #1a1a2e;
}
.rtamir-nav.nav-light .nav-toggle span {
    background: #1a1a2e;
}
/* Logo theme switching — white logo default, dark logo for light nav */
.nav-logo .logo-light { display: none; }
.nav-logo .logo-default { display: block; }
.rtamir-nav.nav-light .nav-logo .logo-default { display: none; }
.rtamir-nav.nav-light .nav-logo .logo-light { display: block; }

@media (max-width: 768px) {
    .rtamir-nav.nav-light .nav-links {
        background: #f8f8fc;
        border-bottom: 1px solid #ddd;
    }
}

.rtamir-footer.footer-light {
    background: #ffffff;
    border-top: 1px solid #ddd;
}
.rtamir-footer.footer-light p,
.rtamir-footer.footer-light .footer-bottom p {
    color: #555;
}
.rtamir-footer.footer-light h6 {
    color: #1a1a2e;
}
.rtamir-footer.footer-light .footer-links a {
    color: #666;
}
.rtamir-footer.footer-light .footer-links a:hover {
    color: var(--accent);
}
.rtamir-footer.footer-light .social-btn {
    background: #f0f0f6;
    border-color: #ddd;
    color: #555;
}
.rtamir-footer.footer-light .social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(108, 99, 255, 0.08);
}
/* Footer logo theme switching — same as nav */
.footer-logo-link .logo-light { display: none; }
.footer-logo-link .logo-default { display: block; }
.rtamir-footer.footer-light .footer-logo-link .logo-default { display: none; }
.rtamir-footer.footer-light .footer-logo-link .logo-light { display: block; }
