/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:              #0D1117;
    --bg-elevated:     #161B22;
    --bg-card:         #1C2128;
    --bg-card-hover:   #21262D;
    --border:          #30363D;
    --border-light:    #3D4450;
    --text:            #E6EDF3;
    --text-secondary:  #8B949E;
    --text-muted:      #484F58;
    --accent:          #D97706;
    --accent-light:    #F59E0B;
    --accent-dim:      #B45309;
    --accent-subtle:   rgba(217, 119, 6, 0.08);
    --radius:          16px;
    --radius-sm:       10px;
    --radius-xs:       6px;
    --shadow-sm:       0 1px 4px rgba(0,0,0,0.2);
    --shadow-md:       0 4px 16px rgba(0,0,0,0.25);
    --shadow-lg:       0 8px 32px rgba(0,0,0,0.3);
    --ease:            cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:        cubic-bezier(0, 0, 0.2, 1);
    --transition:      0.3s var(--ease);
}

html {
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
}
/* Lenis smooth scroll overrides */
html.lenis, html.lenis body {
    height: auto;
}
.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(217, 119, 6, 0.25);
    color: #fff;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px);
}

/* ===== NAV ===== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: background var(--transition), border-color var(--transition);
}
.nav.scrolled {
    background: rgba(13, 17, 23, 0.95);
    border-bottom-color: var(--border);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px);
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.nav-logo {
    font-weight: 800; font-size: 1.3rem;
    color: var(--text);
    letter-spacing: -0.02em;
}
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
    font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
    transition: color var(--transition);
    position: relative;
}
.nav-links a:not(.nav-cta)::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width var(--transition);
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { width: 100%; }
.nav-email {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem !important;
    color: var(--text-muted) !important;
    transition: color var(--transition);
}
.nav-email:hover { color: var(--accent) !important; }
.nav-email::after { display: none !important; }

.nav-cta.nav-cta {
    background: var(--accent); color: #fff;
    padding: 9px 22px; border-radius: var(--radius-xs); font-weight: 600;
    font-size: 0.85rem; letter-spacing: 0.01em;
    transition: all var(--transition);
}
.nav-cta.nav-cta:hover {
    background: var(--accent-light);
}

/* Mobile nav */
.nav-toggle {
    display: none; background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 5px; padding: 8px 4px;
    -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
    display: none; flex-direction: column;
    padding: 8px 24px 20px;
    background: rgba(13, 17, 23, 0.97);
}
.nav-mobile a {
    padding: 14px 0; font-size: 1rem; font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: color var(--transition), padding-left var(--transition);
}
.nav-mobile a:hover { color: var(--text); padding-left: 8px; }
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile.active { display: flex; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center;
    padding: 100px 0 60px;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(
        ellipse 60% 40% at 70% 50%,
        rgba(217, 119, 6, 0.04) 0%,
        transparent 65%
    );
}

.hero-layout {
    position: relative;
    display: flex; align-items: center; justify-content: flex-start;
    gap: clamp(40px, 5vw, 60px);
    width: 100%;
}
.hero-content { flex: 1; max-width: 560px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 18px; border-radius: var(--radius-xs);
    background: transparent;
    border: 1px solid var(--border-light);
    font-size: 0.78rem; font-weight: 600; color: var(--text-secondary);
    letter-spacing: 0.03em; margin-bottom: 28px;
}
.hero-badge::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 800; line-height: 1.0;
    letter-spacing: -0.02em; margin-bottom: 28px;
}
.hero h1 span {
    display: block; overflow: hidden;
}
.hero h1 span > span {
    display: block;
    transform: translateY(110%);
    animation: line-reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero h1 span:nth-child(2) > span { animation-delay: 0.1s; }
.hero h1 span:nth-child(3) > span { animation-delay: 0.2s; }

@keyframes line-reveal {
    to { transform: translateY(0); }
}

/* Typewriter role */
.hero-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    color: var(--accent); margin-bottom: 16px;
    min-height: 1.5em;
}
.typewriter::after {
    content: '|';
    animation: blink-cursor 0.7s infinite;
    margin-left: 1px;
    color: var(--accent);
}
@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Scramble chars */
.scramble-char {
    color: var(--accent);
}

.hero-sub {
    font-size: clamp(0.92rem, 1.5vw, 1.05rem);
    color: var(--text-secondary); max-width: 500px;
    line-height: 1.75; margin-bottom: 36px;
}
.hero-actions {
    display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px;
}

/* Profile / Avatar */
.hero-profile {
    flex-shrink: 0; text-align: center;
    will-change: transform;
}
.hero-avatar {
    width: clamp(160px, 18vw, 220px);
    height: clamp(160px, 18vw, 220px);
    border-radius: var(--radius);
    overflow: hidden; position: relative;
    border: 1px solid var(--border);
}
.hero-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}

.hero-socials {
    display: flex; justify-content: center; gap: 12px; margin-top: 20px;
}
.hero-socials a {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-xs);
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}
.hero-socials a:hover {
    border-color: var(--accent); color: var(--accent);
}
.hero-socials svg { width: 17px; height: 17px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 30px; font-size: 0.88rem; font-weight: 600;
    border-radius: var(--radius-xs); cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none; font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover {
    border-radius: 999px;
}
.btn-primary {
    background: var(--accent); color: #fff;
}
.btn-primary:hover {
    background: var(--accent-light);
}
.btn-primary:active { transform: scale(0.98); }
.btn-outline {
    background: transparent; color: var(--text);
    border: 1px solid var(--border-light);
}
.btn-outline:hover {
    border-color: var(--accent); color: var(--accent-light);
}
.btn-full { width: 100%; }

/* Stats */
.hero-stats { display: flex; gap: clamp(28px, 4vw, 48px); }
.stat { min-width: 0; }
.stat-num {
    display: block;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 800; color: var(--text);
    line-height: 1.2;
}
.stat-label {
    font-size: 0.72rem; color: var(--text-muted); font-weight: 500;
    letter-spacing: 0.04em; text-transform: uppercase;
}

/* ===== HERO BADGE STACK + FRESHWORKS BADGE ===== */
.hero-badge-stack {
    display: flex; flex-direction: column; gap: 10px;
    margin-bottom: 28px;
}
.hero-badge-stack .hero-badge { margin-bottom: 0; }
.hero-badge-fresh {
    background: rgba(217, 119, 6, 0.08);
    border-color: rgba(217, 119, 6, 0.35) !important;
    color: var(--accent-light) !important;
}
.fresh-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.6);
    animation: pulse-fresh 2s ease-in-out infinite;
}
@keyframes pulse-fresh {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

/* ===== FRESHWORKS SPOTLIGHT ===== */
.freshworks-spotlight {
    padding: clamp(48px, 8vw, 80px) 0;
    background: var(--bg);
}
.fresh-card {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.04) 0%, rgba(217, 119, 6, 0.01) 100%);
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-radius: var(--radius);
    padding: clamp(32px, 5vw, 56px);
    position: relative; overflow: hidden;
}
.fresh-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--accent);
}
.fresh-head { max-width: 720px; margin-bottom: 40px; }
.fresh-kicker {
    display: inline-block; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--accent); margin-bottom: 14px;
    padding: 5px 12px;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.25);
    border-radius: var(--radius-xs);
}
.fresh-head h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.6rem, 3.2vw, 2.3rem);
    font-weight: 800; line-height: 1.15;
    letter-spacing: -0.02em; margin-bottom: 16px;
}
.fresh-head p {
    color: var(--text-secondary); font-size: 1rem;
    line-height: 1.75;
}
.fresh-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 20px; margin-bottom: 36px;
}
.fresh-product {
    padding: 20px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.fresh-product:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}
.fresh-product h4 {
    font-size: 0.95rem; font-weight: 700; color: var(--accent);
    margin-bottom: 8px; letter-spacing: -0.01em;
}
.fresh-product p {
    font-size: 0.85rem; color: var(--text-secondary);
    line-height: 1.6;
}
.fresh-cta {
    display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
}

@media (max-width: 640px) {
    .fresh-products { grid-template-columns: 1fr; }
    .fresh-cta { flex-direction: column; width: 100%; }
    .fresh-cta .btn { width: 100%; }
}

/* ===== CREDENTIALS BAR ===== */
.credentials {
    padding: 36px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}
.credentials-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.credential {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.credential:hover { background: rgba(255,255,255,0.02); }
.credential-logo {
    width: 44px; height: 44px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; font-weight: 800;
    background: var(--accent-subtle);
    border: 1px solid rgba(217, 119, 6, 0.15);
    border-radius: var(--radius-xs); color: var(--accent);
    transition: all var(--transition);
}
.credential h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 1px; line-height: 1.3; }
.credential h4 a { color: inherit; transition: color var(--transition); }
.credential h4 a:hover { color: var(--accent); }
.credential p { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.3; }
.credential > div > span { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.01em; }

/* ===== SECTIONS SHARED ===== */
.section-header {
    text-align: center; max-width: 580px; margin: 0 auto 60px;
}
.section-tag {
    display: inline-block; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--text-muted); margin-bottom: 14px;
}
.section-header h2 {
    font-size: clamp(1.7rem, 3.5vw, 2.8rem); font-weight: 800;
    letter-spacing: -0.025em; margin-bottom: 14px;
    line-height: 1.12;
}
.section-header p {
    color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7;
}

/* ===== SERVICES ===== */
.services { padding: clamp(72px, 10vw, 110px) 0; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 20px;
}
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px;
    transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
    position: relative; overflow: hidden;
    transform-style: preserve-3d;
}
/* 3D tilt shine overlay */
.card-shine {
    position: absolute; inset: 0;
    pointer-events: none; opacity: 0;
    transition: opacity 0.3s var(--ease);
    border-radius: var(--radius);
    z-index: 1;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 2px; background: var(--accent);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.4s var(--ease);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}
.service-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-subtle);
    border: 1px solid rgba(217, 119, 6, 0.12);
    border-radius: var(--radius-xs); margin-bottom: 20px;
}
.service-icon svg { width: 22px; height: 22px; color: var(--accent); }
.service-card h3 {
    font-size: 1.08rem; font-weight: 700; margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.service-card > p {
    color: var(--text-secondary); font-size: 0.88rem;
    margin-bottom: 20px; line-height: 1.65;
}
.service-details li {
    position: relative; padding-left: 18px; margin-bottom: 7px;
    font-size: 0.82rem; color: var(--text-muted); line-height: 1.5;
}
.service-details li::before {
    content: ''; position: absolute; left: 0; top: 7px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent);
}

/* ===== EXPERTISE ===== */
.expertise {
    padding: clamp(72px, 10vw, 110px) 0;
    background: var(--bg-elevated);
}
.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 28px;
}
.tech-category { padding: 4px 0; }
.tech-category h3 {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 14px;
}
.tech-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-pills span {
    padding: 7px 14px; font-size: 0.78rem; font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs); color: var(--text-secondary);
    transition: all var(--transition);
    cursor: default;
}
.tech-pills span:hover {
    border-color: var(--accent); color: var(--accent-light);
}

/* ===== PORTFOLIO ===== */
.portfolio { padding: clamp(72px, 10vw, 110px) 0; }
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.project-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px;
    transition: all 0.35s var(--ease);
}
.project-card:hover {
    border-color: var(--border-light);
}
/* Bento: featured spans 2 cols */
.project-card:nth-child(1) { grid-column: span 2; }
.project-card:nth-child(10) { grid-column: span 2; }

.project-featured {
    border-color: rgba(217, 119, 6, 0.2);
    background: rgba(217, 119, 6, 0.02);
    padding: 36px;
}
.project-featured:hover {
    border-color: var(--accent);
}
.project-tags { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tag-industry {
    padding: 4px 12px; font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    border-radius: var(--radius-xs);
    background: var(--accent-subtle); color: var(--accent);
    border: 1px solid rgba(217, 119, 6, 0.12);
}
.tag-role {
    padding: 4px 12px; font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    border-radius: var(--radius-xs);
    background: rgba(217, 119, 6, 0.05); color: var(--accent-light);
    border: 1px solid rgba(217, 119, 6, 0.08);
}
.project-card h3 {
    font-size: 1.2rem; font-weight: 700; margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.project-card > p {
    color: var(--text-secondary); font-size: 0.85rem;
    margin-bottom: 14px; line-height: 1.65;
}
.project-tech { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.project-tech span {
    padding: 3px 10px; font-size: 0.68rem; font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs); color: var(--text-muted);
    letter-spacing: 0.01em;
}
.project-highlights { display: grid; gap: 7px; }
.project-highlights div {
    position: relative; padding-left: 16px;
    font-size: 0.83rem; color: var(--text-secondary); line-height: 1.5;
}
.project-highlights div::before {
    content: ''; position: absolute; left: 0; top: 7px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent);
}

/* ===== PROCESS ===== */
.process {
    padding: clamp(72px, 10vw, 110px) 0;
    background: var(--bg-elevated);
}
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.process-step {
    padding: 0 12px 0 24px;
    border-left: 2px solid var(--accent);
    text-align: left;
}
.step-num {
    font-size: 0.72rem; font-weight: 700; line-height: 1;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.process-step h3 {
    font-size: 1.05rem; font-weight: 700; margin-bottom: 10px;
}
.process-step p {
    color: var(--text-secondary); font-size: 0.88rem; line-height: 1.65;
}

/* ===== CONTACT CTA ===== */
.contact {
    padding: clamp(80px, 12vw, 140px) 0;
    position: relative;
    overflow: hidden;
}
.contact::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(
        ellipse 50% 50% at 50% 100%,
        rgba(217, 119, 6, 0.03) 0%,
        transparent 60%
    );
    pointer-events: none;
}
.contact-cta {
    position: relative; text-align: center;
    max-width: 600px; margin: 0 auto;
}
.contact-cta h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700;
    font-style: italic;
    letter-spacing: -0.02em; margin-bottom: 18px; line-height: 1.12;
}
.contact-cta p {
    color: var(--text-secondary); font-size: 1rem;
    line-height: 1.75; margin-bottom: 36px;
    max-width: 520px; margin-left: auto; margin-right: auto;
}
.btn-lg {
    padding: 18px 40px; font-size: 1rem;
}

/* ===== FOOTER ===== */
.footer {
    padding: 36px 0; border-top: 1px solid var(--border);
}
.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
}
.footer-brand p {
    font-size: 0.78rem; color: var(--text-muted); margin-top: 4px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a {
    font-size: 0.78rem; color: var(--text-muted);
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--text); }
.footer-location {
    margin-top: 20px; padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.72rem; color: var(--text-muted);
    text-align: center; letter-spacing: 0.03em;
}
.skip-link {
    position: absolute; top: -40px; left: 0;
    background: var(--accent); color: #fff;
    padding: 8px 16px; font-size: 0.85rem;
    font-weight: 600; z-index: 1000;
    border-radius: 0 0 var(--radius-xs) 0;
    transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Scroll-driven reveals (progressive enhancement) */
@supports (animation-timeline: view()) {
    .service-card,
    .project-card,
    .tech-category,
    .process-step,
    .credential {
        animation: card-reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 25%;
    }
    @keyframes card-reveal {
        from { opacity: 0; transform: translateY(20px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

/* ===== RESPONSIVE - LARGE TABLET ===== */
@media (max-width: 1024px) {
    .hero-layout { gap: 40px; }
    .credentials-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .project-card:nth-child(1) { grid-column: span 2; }
    .project-card:nth-child(10) { grid-column: span 2; }
    .process-steps { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .process-step { padding: 0 12px 0 20px; }
}

/* ===== RESPONSIVE - TABLET / MOBILE ===== */
@media (max-width: 768px) {
    .hero {
        min-height: auto; padding: 96px 0 48px;
    }
    .hero-layout {
        flex-direction: column-reverse; text-align: center;
        gap: 28px;
    }
    .hero-content { max-width: 100%; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-avatar { width: 160px; height: 160px; }

    .credentials { padding: 28px 0; }
    .credentials-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .credential { padding: 10px 12px; gap: 12px; }

    .services-grid { grid-template-columns: 1fr; }

    .portfolio-grid { grid-template-columns: 1fr; }
    .project-card:nth-child(1),
    .project-card:nth-child(10) { grid-column: 1; }
    .project-featured { padding: 24px; }

    .process-steps { grid-template-columns: 1fr 1fr; gap: 24px; }

    .contact-cta p { font-size: 0.95rem; }

    .footer-inner {
        flex-direction: column; gap: 16px; text-align: center;
    }

    .section-header { margin-bottom: 44px; }
}

/* ===== RESPONSIVE - SMALL MOBILE ===== */
@media (max-width: 480px) {
    .hero { padding: 84px 0 36px; }
    .hero-avatar { width: 130px; height: 130px; }
    .hero-stats { flex-wrap: wrap; gap: 16px 32px; }
    .hero-actions {
        flex-direction: column; width: 100%;
    }
    .hero-actions .btn { width: 100%; }

    .credentials-grid { grid-template-columns: 1fr; gap: 8px; }
    .credential { flex-direction: row; text-align: left; padding: 10px 8px; }
    .credential-logo { width: 38px; height: 38px; font-size: 0.95rem; }

    .service-card { padding: 24px 20px; }
    .project-card { padding: 20px 18px; }
    .process-steps { grid-template-columns: 1fr; gap: 8px; }
    .process-step { padding: 16px 0 16px 20px; }

    .btn { padding: 13px 24px; font-size: 0.85rem; }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover { border-color: var(--border); background: var(--bg-card); }
    .service-card:hover::before { transform: scaleX(0); }
    .project-card:hover { border-color: var(--border); }
    .tech-pills span:hover { border-color: var(--border); color: var(--text-secondary); }
    .btn:hover { border-radius: var(--radius-xs); }

    .nav-mobile a { padding: 16px 0; min-height: 48px; }
    .hero-socials a { width: 48px; height: 48px; }
    .btn { min-height: 48px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .fade-in { opacity: 1; transform: none; }
    .hero h1 span > span { transform: none; }
}
