/* ============================================
   Portfolio Site Styles
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success: #10b981;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--light);
    overflow-x: clip;
    min-width: 0;
    -webkit-font-smoothing: antialiased;
}

img, video, svg, iframe { max-width: 100%; height: auto; display: block; }
table { max-width: 100%; }
pre, code { overflow-x: auto; max-width: 100%; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 1.5rem);
}

.container-md {
    width: 100%;
    max-width: min(1000px, var(--container));
    margin-left: auto;
    margin-right: auto;
}

.prose-width {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero-spacing {
    padding-top: clamp(6rem, 14vw, 8rem);
}

.page-inner-title {
    font-size: clamp(1.75rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--dark);
    margin: 1rem 0 1.25rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.cta-banner {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2rem);
    border-radius: clamp(16px, 3vw, 24px);
    text-align: center;
}

.cta-banner h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 1rem;
}

.cta-banner p {
    opacity: 0.9;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-image {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto 0;
}

.section-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 1.5rem);
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
}

.navbar-brand {
    font-weight: 800;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: max-content;
}

.navbar-brand picture {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.navbar-brand img,
.navbar-brand .navbar-logo {
    display: block;
    height: 36px;
    max-height: 36px;
    width: auto;
    max-width: none;
    object-fit: contain;
    flex-shrink: 0;
}

.navbar-brand .brand-dot {
    width: 10px; height: 10px;
    background: var(--gradient);
    border-radius: 50%;
}

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

.nav-links a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 0; right: 0;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}

.nav-links a.btn::after {
    display: none;
}

.nav-links a.btn.btn-primary,
.nav-links a.btn.btn-primary:hover {
    color: white;
}

.nav-links a.btn.nav-hire-btn.is-current {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    box-shadow: none;
}

.nav-links a.btn.nav-hire-btn.is-current:hover {
    background: var(--primary);
    color: white;
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark);
}

@media (max-width: 768px) {
    .nav-toggle { display: block; flex-shrink: 0; }
    .nav-links {
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--gray-200);
        transform: translateY(-200%);
        transition: var(--transition);
        z-index: 999;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        box-shadow: var(--shadow-md);
    }
    .nav-links.open { transform: translateY(0); }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; width: 100%; }
    .nav-links .btn { width: 100%; justify-content: center; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 0;
    transition: var(--transition);
    text-decoration: none;
}
.btn-primary { background: var(--gradient); color: white; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: white; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-light { background: white; color: var(--dark); box-shadow: var(--shadow); }
.btn-light:hover { transform: translateY(-2px); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    background:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 40%),
        linear-gradient(180deg, #fafbff 0%, #f3f4ff 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 20%; right: -5%;
    width: min(500px, 80vw); height: min(500px, 80vw);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
}

.hero-greeting {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-greeting::before {
    content: '';
    width: 40px; height: 2px;
    background: var(--primary);
}

.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--dark);
    overflow-wrap: anywhere;
}

.hero-title .accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-bio {
    color: var(--gray-600);
    font-size: clamp(1rem, 2.5vw, 1.05rem);
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    width: 100%;
}

.hero-image-wrapper {
    position: relative;
    width: min(360px, 85vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--gradient);
    padding: 6px;
    box-shadow: var(--shadow-lg);
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
}

.hero-image .floating-badge {
    position: absolute;
    background: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: float 4s ease-in-out infinite;
}

.floating-badge.exp { top: 10%; left: max(-10%, -1rem); }
.floating-badge.projects { bottom: 10%; right: max(-10%, -1rem); animation-delay: 1.5s; }
.floating-badge.available {
    top: 2%;
    right: max(-5%, -0.5rem);
    animation-delay: 0.75s;
    color: var(--dark);
    white-space: nowrap;
}

.floating-badge.available .availability-dot {
    flex-shrink: 0;
}

.floating-badge i { color: var(--primary); }
.floating-badge .num { color: var(--dark); font-size: 1.1rem; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@media (max-width: 992px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-greeting { justify-content: center; }
    .hero-buttons { justify-content: center; }
    .hero-bio { margin-left: auto; margin-right: auto; }
    .hero-image-wrapper { width: min(280px, 70vw); margin: 0 auto; }
    .floating-badge.exp { left: 0; }
    .floating-badge.projects { right: 0; }
    .floating-badge.available { right: 0; top: 0; }
}

@media (max-width: 576px) {
    .hero-image .floating-badge {
        position: static;
        animation: none;
        margin-top: 0.75rem;
        justify-content: center;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-image {
        flex-direction: column;
    }
}

/* ===== Sections ===== */
.section {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.section-alt { background: white; }

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

.section-eyebrow {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
}

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

@media (max-width: 576px) {
    .section-header { margin-bottom: 2.5rem; }
}

/* ===== Cards / Project grid ===== */
.grid {
    display: grid;
    gap: 1.75rem;
    min-width: 0;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

.project-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-card .cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-100);
    position: relative;
}

.project-card .cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .cover img { transform: scale(1.05); }

.project-card .badge-featured {
    position: absolute;
    top: 1rem; right: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-card .body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.project-card .desc {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tech-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
}

.project-card .actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

/* ===== Skills section ===== */
.skill-group {
    margin-bottom: 2.5rem;
}

.skill-group-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary);
}

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

.skill-pill {
    background: white;
    padding: 1.25rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.skill-pill:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.skill-pill .skill-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.skill-pill .skill-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    display: block;
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
}

.skill-bar .fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 999px;
    transition: width 1s ease-out;
}

/* ===== Services ===== */
.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.service-card .icon-wrap {
    width: 60px; height: 60px;
    border-radius: var(--radius);
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.service-card h3 {
    color: var(--dark);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ===== Experience timeline ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem; top: 6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--gradient);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-period {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-item h3 {
    color: var(--dark);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.timeline-item .company {
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.timeline-item p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ===== Stats strip ===== */
.stats-strip {
    background: var(--gradient);
    padding: 3rem 0;
    color: white;
}

.stats-strip .grid-4 { gap: 2rem; }

.stat {
    text-align: center;
}

.stat .number {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat .label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ===== About page ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    min-width: 0;
}

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

.about-image-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 1;
}

.about-image-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.info-list {
    list-style: none;
    margin-top: 1.5rem;
}

.info-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
    display: grid;
    grid-template-columns: minmax(100px, 140px) 1fr;
    gap: 1rem;
    font-size: 0.95rem;
    align-items: start;
}

.info-list .label {
    font-weight: 600;
    color: var(--gray-700);
}

.info-list .value {
    color: var(--gray-600);
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 480px) {
    .info-list li {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

/* ===== Contact ===== */
main {
    min-width: 0;
    overflow-x: clip;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    min-width: 0;
}

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

.contact-info-card {
    background: var(--gradient);
    color: white;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius-lg);
    height: fit-content;
    min-width: 0;
}

.contact-info-card h3 { color: white; margin-bottom: 1rem; }
.contact-info-card p { opacity: 0.9; margin-bottom: 2rem; font-size: 0.95rem; }

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

.contact-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 0.95rem;
    min-width: 0;
}

.contact-info-list li > div:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.contact-info-list .icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-list a { color: white; }

.social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
}

.social-icons a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

.contact-form-card {
    background: white;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    min-width: 0;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--gray-50);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

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

.form-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.turnstile-wrap {
    margin-bottom: 1rem;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== Project detail ===== */
.project-hero {
    padding: clamp(6rem, 12vw, 8rem) 0 clamp(2rem, 5vw, 4rem);
    background: linear-gradient(180deg, #fafbff 0%, white 100%);
}

.project-hero .lead {
    color: var(--gray-600);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    max-width: 800px;
    margin-bottom: 1.5rem;
}

.project-cover {
    margin-bottom: 2.5rem;
    border-radius: clamp(12px, 3vw, 20px);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.project-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.project-gallery img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.project-gallery img:hover { transform: scale(1.02); }

.project-content {
    background: white;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    line-height: 1.8;
    color: var(--gray-700);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.project-content img,
.project-content iframe,
.project-content video {
    max-width: 100%;
    height: auto;
}

.project-content h2, .project-content h3 {
    color: var(--dark);
    margin: 1.5rem 0 0.75rem;
}

.prose ul,
.prose ol {
    margin: 1rem 0 1.25rem;
    padding-left: 1.5rem;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
    margin-bottom: 0.4rem;
}

.prose li > ul,
.prose li > ol {
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

.prose blockquote {
    margin: 1.25rem 0;
    padding: 0.85rem 1.15rem;
    border-left: 4px solid var(--primary);
    background: var(--gray-50);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--gray-700);
    font-style: italic;
}

.prose strong,
.prose b {
    font-weight: 700;
    color: var(--dark);
}

.prose h2 {
    font-size: 1.45rem;
}

.prose h3 {
    font-size: 1.2rem;
}

.prose h4 {
    font-size: 1.05rem;
    color: var(--dark);
    margin: 1.25rem 0 0.5rem;
}

.prose span[style*="background-color"] {
    padding: 0.1em 0.2em;
    border-radius: 0.2em;
}

/* ===== Footer ===== */
.footer {
    background: var(--darker);
    color: var(--gray-400);
    padding: 3rem 0 1.5rem;
}

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

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

.footer h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer a {
    color: var(--gray-400);
    display: block;
    padding: 0.25rem 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer a:hover { color: white; }

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* ===== Filters bar ===== */
.filters-bar {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: stretch;
    min-width: 0;
}

.filters-bar .form-control {
    flex: 1 1 180px;
    min-width: 0;
    max-width: 100%;
}

.filters-bar .btn {
    flex-shrink: 0;
}

.filter-chip {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 0;
    text-decoration: none;
}

.filter-chip:hover, .filter-chip.active {
    background: var(--gradient);
    color: white;
}

/* ===== Empty state ===== */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

/* ===== Pagination ===== */
.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination .page-item .page-link {
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius);
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    font-size: 0.9rem;
    display: inline-block;
}

.pagination .page-item.active .page-link {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== Dynamic sections styling ===== */
.dynamic-section .content { line-height: 1.8; color: var(--gray-700); font-size: 1.05rem; overflow-wrap: anywhere; word-break: break-word; }
.dynamic-section .content p { margin-bottom: 1rem; }

/* ===== Error pages ===== */
.error-page {
    min-height: 70vh;
    min-height: 70dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(5rem, 12vw, 100px) clamp(1rem, 4vw, 2rem) 2rem;
}

.error-page-inner {
    text-align: center;
    width: 100%;
    max-width: 500px;
    padding: clamp(1rem, 4vw, 2rem);
}

.error-page-code {
    font-size: clamp(4rem, 18vw, 6rem);
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.about-bio-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--dark);
    margin-bottom: 1.25rem;
}

.about-bio-text {
    color: var(--gray-600);
    font-size: clamp(1rem, 2.5vw, 1.05rem);
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 480px) {
    .project-card .actions {
        flex-direction: column;
    }
    .project-card .actions .btn {
        width: 100%;
    }
    .service-card {
        padding: 1.5rem;
    }
    .timeline {
        padding-left: 1.5rem;
    }
    .timeline-item::before {
        left: -1.5rem;
    }
}

/* ===== Form helpers ===== */
.required-mark { color: var(--danger); }
.optional-mark { color: var(--gray-400); font-weight: 400; font-size: 0.85rem; }
.form-hint { color: var(--gray-500); font-size: 0.82rem; margin-top: 0.35rem; }
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 640px) {
    .form-row-2 { grid-template-columns: 1fr; }
}
.btn-block { width: 100%; justify-content: center; }

/* ===== Development offerings (Hire page) ===== */
.offerings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.offering-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: var(--radius);
    border: 2px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.offering-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.offering-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(6,182,212,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
}

.offering-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.offering-body p {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.offering-arrow {
    color: var(--gray-300);
    margin-left: auto;
    padding-top: 0.25rem;
    flex-shrink: 0;
}

/* ===== Hire layout ===== */
.hire-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 992px) {
    .hire-layout { grid-template-columns: 1fr; }
}

.hire-form-panel {
    background: white;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.hire-form-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.hire-form-lead {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.hire-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 6rem;
}

@media (max-width: 992px) {
    .hire-sidebar { position: static; }
}

.hire-sidebar-visual {
    background: var(--gradient);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.hire-visual-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hire-sidebar-visual h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.hire-sidebar-visual p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hire-sidebar-list {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.hire-sidebar-list h4 {
    padding: 1rem 1.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-100);
    margin: 0;
}

.hire-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--gray-50);
    color: inherit;
    transition: var(--transition);
}

.hire-sidebar-item:last-child { border-bottom: none; }

.hire-sidebar-item:hover {
    background: rgba(99,102,241,0.04);
    color: var(--primary);
}

.hire-sidebar-item .item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(99,102,241,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.hire-sidebar-item .item-text {
    flex: 1;
    min-width: 0;
}

.hire-sidebar-item .item-text strong {
    display: block;
    font-size: 0.88rem;
    color: var(--dark);
}

.hire-sidebar-item .item-text small {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 0.1rem;
}

.hire-sidebar-item .item-arrow {
    color: var(--gray-300);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.hire-sidebar-trust {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--gray-600);
}

.trust-item i { color: var(--primary); }

/* ===== Checkbox groups ===== */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem;
}

.checkbox-card {
    cursor: pointer;
}

.checkbox-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-card-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--gray-50);
    transition: var(--transition);
}

.checkbox-card-inner i {
    color: var(--primary);
    font-size: 0.9rem;
}

.checkbox-card.is-checked .checkbox-card-inner,
.checkbox-card input:checked + .checkbox-card-inner {
    border-color: var(--primary);
    background: rgba(99,102,241,0.06);
    color: var(--primary-dark);
}

.checkbox-inline-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-pill {
    cursor: pointer;
}

.checkbox-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-pill span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    background: white;
    transition: var(--transition);
}

.checkbox-pill input:checked + span {
    border-color: var(--primary);
    background: rgba(99,102,241,0.08);
    color: var(--primary-dark);
}

.whatsapp-input-group {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .whatsapp-input-group { grid-template-columns: 1fr; }
}

.country-select { font-size: 0.88rem; }

.file-input {
    padding: 0.6rem;
    background: white;
}

.checkbox-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.checkbox-terms input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* ===== Reviews ===== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.review-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-stars {
    color: #f59e0b;
    font-size: 0.95rem;
    letter-spacing: 2px;
}

.review-stars .empty {
    color: var(--gray-200);
}

.review-content {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.7;
    font-style: italic;
    flex: 1;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-100);
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.review-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.95rem;
}

.review-meta {
    font-size: 0.82rem;
    color: var(--gray-500);
}

.review-form-wrap {
    max-width: 700px;
    margin: 0 auto;
}

.review-form-card {
    background: white;
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.review-form-card h3 {
    font-size: 1.35rem;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.review-form-card > p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
}

.star-rating-input input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.star-rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--gray-200);
    transition: var(--transition);
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: #f59e0b;
}

/* ===== Form notices (contact / hire clarification) ===== */
.form-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-notice i {
    color: var(--primary);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.form-notice a {
    color: var(--primary);
    font-weight: 600;
}

.form-notice-accent {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.2);
    color: var(--gray-700);
}

/* ===== Hire FAQ ===== */
.hire-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hire-faq-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.hire-faq-item summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--dark);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hire-faq-item summary::-webkit-details-marker { display: none; }

.hire-faq-item summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--primary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.hire-faq-item[open] summary::after {
    transform: rotate(180deg);
}

.hire-faq-item p {
    padding: 0 1.25rem 1.15rem;
    margin: 0;
    color: var(--gray-600);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== Project hire CTA ===== */
.project-hire-cta {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--accent, #06b6d4));
    color: #fff;
    box-shadow: var(--shadow);
}

.project-hire-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.project-hire-cta h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.project-hire-cta p {
    margin: 0;
    opacity: 0.92;
    font-size: 0.95rem;
}

.project-hire-cta .btn-primary {
    background: #fff;
    color: var(--primary-dark);
    border-color: #fff;
    flex-shrink: 0;
}

.project-hire-cta .btn-primary:hover {
    background: var(--gray-50);
    border-color: var(--gray-50);
}

/* ===== Sticky mobile hire button ===== */
.sticky-hire-btn {
    display: none;
    position: fixed;
    bottom: 1.25rem;
    right: 1rem;
    left: 1rem;
    z-index: 900;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    border-radius: 999px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .sticky-hire-btn {
        display: inline-flex;
    }
}

/* ===== Availability badge ===== */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #047857;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.section-header .availability-badge {
    margin-bottom: 0;
}

.section-header-badge {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.availability-badge.is-compact {
    margin-bottom: 0;
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    animation: availability-pulse 2s infinite;
}

@keyframes availability-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-availability-item {
    display: flex;
    align-items: center;
}

@media (min-width: 769px) {
    .nav-availability-item {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-availability-item {
        justify-content: center;
        padding: 0.25rem 0;
    }
}
.case-study {
    margin-bottom: 2.5rem;
}

.case-study-title {
    color: var(--dark);
    margin-bottom: 1.25rem;
    font-size: 1.35rem;
}

.case-study-grid {
    display: grid;
    gap: 1rem;
}

.case-study-block {
    padding: 1.25rem 1.35rem;
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.case-study-result {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
}

.case-study-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
}

.case-study-label i {
    color: var(--primary);
}

.case-study-result .case-study-label i {
    color: #059669;
}

.case-study-body {
    color: var(--gray-600);
    line-height: 1.75;
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .case-study-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .case-study-result {
        grid-column: 1 / -1;
    }
}

/* ===== Featured review (hire page) ===== */
.featured-review {
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    text-align: center;
}

.featured-review-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
}

.featured-review-content {
    margin: 1rem auto 1.5rem;
    max-width: 640px;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--gray-700);
    font-style: italic;
}

.featured-review .review-author {
    justify-content: center;
}

/* ===== Blog ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

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

@media (max-width: 992px) {
    .blog-grid,
    .blog-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-grid,
    .blog-grid-compact {
        grid-template-columns: 1fr;
    }
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.post-card-cover {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-100);
}

.post-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-cover img {
    transform: scale(1.03);
}

.post-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem 1.35rem 1.35rem;
}

.post-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-bottom: 0.65rem;
}

.post-card-meta-sep {
    opacity: 0.6;
}

.post-card-body h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.post-card-body h3 a {
    color: var(--dark);
    text-decoration: none;
}

.post-card-body h3 a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    color: var(--gray-600);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: auto;
}

.post-card-link:hover {
    color: var(--primary-dark);
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.blog-post-header {
    margin-bottom: 2rem;
}

.blog-post-title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    color: var(--dark);
    line-height: 1.2;
    margin: 0.5rem 0 0.75rem;
}

.blog-post-excerpt {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.65;
    margin: 0;
}

.blog-post-cover {
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.blog-post-content {
    margin-bottom: 2.5rem;
}

.blog-post-cta {
    margin-bottom: 3rem;
    padding: 1.75rem 2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--accent, #06b6d4));
    color: #fff;
    box-shadow: var(--shadow);
}

.blog-post-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.blog-post-cta h2 {
    color: #fff;
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.blog-post-cta p {
    margin: 0;
    opacity: 0.92;
    font-size: 0.95rem;
}

.blog-post-cta .btn-primary {
    background: #fff;
    color: var(--primary-dark);
    border-color: #fff;
    flex-shrink: 0;
}

.blog-post-cta .btn-primary:hover {
    background: var(--gray-50);
}

.blog-recent h2 {
    color: var(--dark);
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}
