:root {
    --bg-color: #09090b;
    --card-bg: rgba(18, 15, 11, 0.92);
    --card-border: rgba(255, 255, 255, 0.07);
    --text-main: #fafaf9;
    --text-muted: #78716c;
    --accent-primary: #d97706;
    --accent-warm: #f59e0b;
    --accent-secondary: #059669;
    --accent-glow: rgba(217, 119, 6, 0.35);
    --font-heading: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    scroll-behavior: smooth;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: rgba(217, 119, 6, 0.22); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(217, 119, 6, 0.42); }

/* ─── Noise Overlay ─── */
.noise-overlay {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    mix-blend-mode: overlay;
}

/* ─── Aurora Background ─── */
.aurora-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.09;
    animation: aurora-float 22s ease-in-out infinite;
    will-change: transform;
}

.aurora-1 {
    width: 650px; height: 650px;
    background: radial-gradient(circle, #f59e0b, transparent 70%);
    top: -220px; left: -120px;
}

.aurora-2 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, #10b981, transparent 70%);
    top: 28%; right: -160px;
    animation-delay: -7s;
}

.aurora-3 {
    width: 440px; height: 440px;
    background: radial-gradient(circle, #d97706, transparent 70%);
    bottom: 8%; left: 18%;
    animation-delay: -14s;
}

@keyframes aurora-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -52px) scale(1.08); }
    66%       { transform: translate(-22px, 30px) scale(0.94); }
}

/* ─── Container ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Header ─── */
header {
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
    pointer-events: none;
    z-index: 0;
}

header .container {
    position: relative;
    z-index: 1;
}

/* ─── Badge ─── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.28);
    color: #fbbf24;
    padding: 0.4rem 1.25rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fbbf24;
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}

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

/* ─── Logo ─── */
.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin: 1.75rem 0 0;
}

.logo-eyebrow {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.1;
    color: #d97706;
}

.logo-main {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(4rem, 8.6vw, 7.3rem);
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.1;
    color: #f5f0e8;
}

/* ─── Subtitle & Count ─── */
.subtitle {
    color: var(--text-muted);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.project-count {
    color: var(--text-muted);
    font-size: 1.6rem;
    margin-top: 0;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
}

.count-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #d97706;
}

/* ─── Profile ─── */
.profile-wrapper {
    margin: 0;
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 148px; height: 148px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(217, 119, 6, 0.5);
    box-shadow:
        0 0 0 7px rgba(217, 119, 6, 0.07),
        0 0 0 14px rgba(217, 119, 6, 0.03),
        0 0 50px rgba(217, 119, 6, 0.22);
    transition: var(--transition);
}

.profile-img:hover {
    transform: scale(1.05) rotate(3deg);
    border-color: var(--accent-primary);
    box-shadow:
        0 0 0 8px rgba(217, 119, 6, 0.12),
        0 0 0 16px rgba(217, 119, 6, 0.05),
        0 0 60px rgba(217, 119, 6, 0.35);
}

/* ─── Hero Layout ─── */
.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-text {
    flex: 1;
    min-width: 0;
}

.hero-profile {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.hero-line {
    width: 2.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    margin: 1.5rem 0 1.1rem;
}

.hero-categories {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.7rem;
}

.hero-categories span {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

.hero-dot {
    color: rgba(217, 119, 6, 0.4) !important;
    font-weight: 300 !important;
    letter-spacing: 0 !important;
}

.hero-role {
    font-size: 1.2rem;
    color: rgba(120, 113, 108, 0.6);
    letter-spacing: 0.06em;
    font-weight: 400;
}

/* ─── Marquee ─── */
.marquee-section {
    position: relative;
    padding: 1.4rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.marquee-section::before,
.marquee-section::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 130px;
    z-index: 2;
    pointer-events: none;
}

.marquee-section::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg-color), transparent);
}

.marquee-section::after {
    right: 0;
    background: linear-gradient(-90deg, var(--bg-color), transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 44s linear infinite;
    will-change: transform;
}

.marquee-track:hover { animation-play-state: paused; }

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0 1.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.marquee-item .dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0.5;
    flex-shrink: 0;
}

.marquee-accent { color: #fbbf24; }

/* ─── Controls ─── */
.controls {
    margin: 3rem 0 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
}

#search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-right: 3.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    backdrop-filter: blur(12px);
}

#search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

#search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(217, 119, 6, 0.5);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.1);
}

.search-icon {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    opacity: 0.5;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.55rem 1.5rem;
    border-radius: 100px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    transition: var(--transition);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.5);
    color: #fbbf24;
    box-shadow: 0 0 16px rgba(217, 119, 6, 0.16);
}

/* ─── Grid ─── */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
    padding-bottom: 5rem;
}

/* ─── Cards ─── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(24px);
    height: 100%;
    padding: 0;
    will-change: transform;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 20px;
}

.card:hover {
    transform: translateY(-8px) scale(1.012);
    border-color: rgba(217, 119, 6, 0.28);
    box-shadow:
        0 24px 48px -12px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(217, 119, 6, 0.08),
        0 0 30px rgba(217, 119, 6, 0.1);
}

.card:hover::after { opacity: 1; }

/* Image */
.card-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.card-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(18, 15, 11, 0.7), transparent);
    pointer-events: none;
    z-index: 1;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image { transform: scale(1.06); }

/* Card content */
.card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.card-header { margin-bottom: 0.9rem; }

.card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-secondary);
    font-weight: 700;
    margin-bottom: 0.45rem;
    display: inline-block;
    opacity: 0.9;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.card-body {
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.22rem 0.7rem;
    border-radius: 50px;
    transition: var(--transition);
    letter-spacing: 0.01em;
}

.card:hover .tag {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.22);
    color: #fbbf24;
}

.card-footer { margin-top: auto; }

/* Visit Button */
.visit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 44px;
    backdrop-filter: blur(8px);
}

.visit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
}

.visit-btn span,
.visit-btn i {
    position: relative;
    z-index: 1;
}

.visit-btn:hover {
    border-color: transparent;
    box-shadow: 0 8px 20px -4px rgba(217, 119, 6, 0.38);
    transform: scale(1.02);
}

.visit-btn:hover::before { opacity: 1; }

/* ─── Scroll Reveal ─── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.7s cubic-bezier(0.2, 0.9, 0.3, 1),
        transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── No Results ─── */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.01);
    border-radius: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* ─── Tag Interactions ─── */
.tag { cursor: pointer; }
.tag:hover {
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.22);
    color: #fbbf24;
}

/* ─── Fav Button ─── */
.fav-btn {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 44px; height: 44px;
    background: rgba(15, 12, 8, 0.72);
    border: none;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
    font-size: 0.9rem;
    transition: background 0.22s ease, transform 0.18s ease;
}

.fav-btn i {
    color: rgba(245, 158, 11, 0.55);
    -webkit-text-stroke: 0;
    transition: color 0.22s ease, filter 0.22s ease;
    display: block;
}

.fav-btn:hover {
    background: rgba(180, 90, 0, 0.55);
    transform: scale(1.12);
}

.fav-btn:hover i {
    color: rgba(251, 191, 36, 0.9);
}

.fav-btn.active {
    background: #d97706;
}

.fav-btn.active i {
    color: #fff8e1;
    filter: drop-shadow(0 0 3px rgba(255, 220, 100, 0.6));
}

.fav-btn.fav-pop {
    animation: fav-star-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fav-star-pop {
    0%   { transform: scale(0.5) rotate(-20deg); }
    55%  { transform: scale(1.4) rotate(8deg); }
    100% { transform: scale(1.0) rotate(0deg); }
}

.card-preview-trigger { cursor: zoom-in; }

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background: #14110d;
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 24px;
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(28px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(217, 119, 6, 0.2) transparent;
}

.modal-overlay.open .modal-card {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: var(--transition);
    font-size: 0.9rem;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-main);
    transform: scale(1.08);
}

.modal-image-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body { padding: 1.75rem 2rem 2rem; }

.modal-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-secondary);
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.modal-tags { margin-bottom: 1.5rem; }

/* ─── Footer ─── */
footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

.footer-slogan {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, rgba(250, 250, 249, 0.65) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-slogan .highlight {
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #d97706 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── Accessibility ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
    .project-grid { gap: 1.5rem; }
}

@media (max-width: 768px) {
    header { padding: 3rem 0 2rem; }

    .hero-inner {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        text-align: center;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .logo { align-items: center; }
    .logo-eyebrow { font-size: clamp(1.5rem, 4.5vw, 2.2rem); }
    .logo-main { font-size: clamp(2.8rem, 9vw, 5rem); }

    .project-count {
        font-size: 1.1rem;
        white-space: normal;
        flex-wrap: wrap;
        justify-content: center;
    }
    .count-num { font-size: 2rem; }
    .subtitle { font-size: 1.2rem; }
    .hero-role { font-size: 0.95rem; }
    .hero-profile { gap: 0.5rem; }
    .profile-img { width: 120px; height: 120px; }

    .hero-line {
        background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    }

    .controls { margin: 2rem 0 2rem; gap: 1.25rem; }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.4rem;
    }

    .filter-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        width: 100%;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-buttons::-webkit-scrollbar { display: none; }
    .filter-btn { flex-shrink: 0; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }

    /* Hero */
    .hero-inner { gap: 1.5rem; }
    .logo-eyebrow { font-size: clamp(1.2rem, 6vw, 1.7rem); }
    .logo-main { font-size: clamp(2.2rem, 11vw, 3rem); }
    .project-count { font-size: 0.88rem; white-space: normal; flex-wrap: wrap; justify-content: center; gap: 0.2rem; }
    .count-num { font-size: 1.7rem; }
    .subtitle { font-size: 1rem; }
    .hero-role { font-size: 0.8rem; }
    .hero-profile { gap: 0.4rem; }
    .profile-img { width: 100px; height: 100px; }
    .hero-line { margin: 1rem 0 0.75rem; }

    /* Search & Filter */
    .search-wrapper { max-width: 100%; }
    #search-input { padding: 0.8rem 3rem 0.8rem 1.2rem; font-size: 1rem; }
    .filter-btn { padding: 0.5rem 1rem; font-size: 0.83rem; }

    /* Cards */
    .project-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .card-content { padding: 1.4rem; }
    .card-title { font-size: 1.25rem; }
    .visit-btn { padding: 0.75rem; }

    /* Modal */
    .modal-card { width: 96%; max-height: 90vh; border-radius: 16px 16px 0 0; }
    .modal-image-wrapper { height: 200px; border-radius: 16px 16px 0 0; }
    .modal-body { padding: 1.25rem 1.25rem 1.75rem; }
    .modal-title { font-size: 1.4rem; }

    /* Footer */
    footer { padding: 2.5rem 0; }
    .footer-slogan { font-size: 1.25rem; margin-bottom: 1.1rem; }
}

/* ─── Touch Devices ─── */
@media (hover: none) {
    .card:hover {
        transform: none;
        border-color: var(--card-border);
        box-shadow: none;
    }

    .card:hover .card-image { transform: none; }
    .card:hover::after { opacity: 0; }

    .card:hover .tag {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.06);
        color: var(--text-muted);
    }

    .filter-btn:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.04);
        color: var(--text-muted);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .filter-btn.active {
        background: rgba(217, 119, 6, 0.12);
        color: #fbbf24;
    }

    .profile-img:hover {
        transform: none;
        border-color: rgba(217, 119, 6, 0.4);
        box-shadow: 0 0 0 5px rgba(217, 119, 6, 0.07), 0 0 28px rgba(217, 119, 6, 0.18);
    }

    .visit-btn:hover {
        transform: none;
        box-shadow: none;
    }

    .visit-btn:hover::before { opacity: 0; }

    .card:active {
        border-color: rgba(217, 119, 6, 0.28);
        box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.4);
        transition: all 0.15s ease;
    }

    .visit-btn:active {
        opacity: 0.82;
        transform: scale(0.98);
        transition: all 0.1s ease;
    }

    .filter-btn:active {
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-main);
        transition: all 0.1s ease;
    }
}
