/* ── FONTS ── */
@font-face {
    font-family: 'Organetto';
    src: url('fonts/Organetto-Bold.ttf') format('truetype');
    font-weight: 700;
}
@font-face {
    font-family: 'Organetto';
    src: url('fonts/organetto-regular.ttf') format('truetype');
    font-weight: 400;
}
@font-face {
    font-family: 'Organetto';
    src: url('fonts/Organetto-Light.ttf') format('truetype');
    font-weight: 300;
}
@font-face {
    font-family: 'Organetto';
    src: url('fonts/Fontspring-DEMO-organetto-thin.otf') format('opentype');
    font-weight: 100;
}
@font-face {
    font-family: 'Organetto';
    src: url('fonts/Fontspring-DEMO-organetto-ultrabold.otf') format('opentype');
    font-weight: 900;
}
@font-face {
    font-family: 'Organetto';
    src: url('fonts/Organetto-BoldExt.ttf') format('truetype');
    font-weight: 800;
}

/* Organetto regular completa (suporta & e -) — usada nos títulos dos serviços */
@font-face {
    font-family: 'Organetto-Full';
    src: url('fonts/organetto-regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Relidux';
    src: url('fonts/Relidux.otf') format('opentype');
    font-weight: 400;
}

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

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #0f1520;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --cyan: #00d4ff;
    --cyan-dim: #0097b8;
    --cyan-glow: rgba(0, 212, 255, 0.3);
    --teal: #00b8a9;
    --text-primary: #e8edf5;
    --text-secondary: #8892a4;
    --text-muted: #4a5568;
    --border: rgba(0, 212, 255, 0.12);
    --font: 'Organetto', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--cyan-dim) var(--bg-primary);
    overflow-x: hidden;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── SIDEBAR NAV ── */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 70px;
    height: 100vh;
    background: rgba(10, 14, 23, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    z-index: 100;
    gap: 6px;
}

/* Hamburger menu toggle at top */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: var(--cyan);
}

.menu-toggle svg {
    width: 22px;
    height: 22px;
}

/* Logo symbol at bottom of sidebar */
.sidebar-logo-bottom {
    width: 30px;
    height: 30px;
    margin-top: auto;
    margin-bottom: 10px;
    opacity: 0.5;
    filter: drop-shadow(0 0 8px var(--cyan-glow));
    transition: opacity 0.3s ease;
}

.sidebar-logo-bottom:hover {
    opacity: 0.8;
}

/* ── TOP LOGO BAR ── */
.top-bar {
    position: absolute;
    top: 0;
    left: 70px;
    width: calc(100% - 70px);
    padding: 24px 40px;
    z-index: 10;
    display: flex;
    align-items: center;
}

.top-logo {
    height: 32px;
    width: auto;
    filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.2));
}

.nav-item {
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-secondary);
    position: relative;
    gap: 3px;
}

.nav-item svg { width: 18px; height: 18px; }

.nav-icon-img {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    object-fit: contain;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    display: block;
}

.nav-item:hover .nav-icon-img,
.nav-item.active .nav-icon-img {
    opacity: 1;
}

.nav-item span {
    font-size: 6.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.nav-item:hover, .nav-item.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--cyan);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--cyan);
    border-radius: 0 3px 3px 0;
}

/* ── MAIN CONTENT ── */
.main-content {
    margin-left: 70px;
    min-height: 100vh;
}

/* ── HERO SECTION ── */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-left: -70px;
    width: calc(100% + 70px);
}

.hero .hero-content {
    margin-left: 70px;
}

#wave-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 80px;
    max-width: 650px;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-content p {
    font-size: 0.85rem;
    font-weight: 300;
    color: #e8edf5;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 32px;
    margin-left:5px;
}

.btn-primary {
    display: inline-block;
    padding: 14px 36px;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: var(--bg-primary);
}

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

.hero-logo {
    position: absolute;
    right: 18%;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(220px, 26vw, 400px);
    z-index: 1;
    filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.25));
    opacity: 0.85;
}

/* ── SECTIONS ── */
section {
    padding: 50px 80px;
}

#portfolio {
    background: #0a0f19;
}

#servicos {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #0b111c;
}

#sobre {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #0c131e;
    position: relative;
}

#faq {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #0d1520;
}

#contato {
    background: #0e1722;
}

.section-label {
    font-size: 0.65rem;
    color: var(--cyan);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400;
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 40px;
    letter-spacing: 1px;
}

/* ── BENTO GRID (SERVICES) — Fibonacci Layout ── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    grid-template-rows: repeat(5, minmax(80px, auto));
    gap: 14px;
    max-width: 1100px;
    margin: 0 auto;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bento-grid:hover .bento-card {
    opacity: 0.45;
    transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.bento-grid:hover .bento-card:hover {
    opacity: 1;
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 8px 40px rgba(0, 212, 255, 0.1), inset 0 0 30px rgba(0, 212, 255, 0.03), 0 0 0 1px rgba(0, 212, 255, 0.15);
    transform: translateY(-2px);
}

/* ── Fibonacci block sizes (todos diferentes) ── */
/* Areas: 24, 10, 5, 12, 8, 6 — cada bloco único */

/* Card 1 — 8 cols × 3 rows = 24 (maior) */
.bento-card:nth-child(1) {
    grid-column: 1 / 9;
    grid-row: 1 / 4;
    padding: 36px 32px;
    justify-content: flex-end;
}

/* Wave canvas decorativo no card principal */
.bento-main {
    position: relative;
}

.bento-wave-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.bento-main .bento-header,
.bento-main .bento-body {
    position: relative;
    z-index: 1;
}

.bento-main .bento-icon {
    width: 55px;
    height: 55px;
    border-radius: 16px;
}

.bento-main .bento-icon svg {
    width: 28px;
    height: 28px;
}
.bento-card:nth-child(1) h3 { font-size: 1.1rem; }
.bento-card:nth-child(1) p { max-width: 520px; }

/* Card 2 — 5 cols × 2 rows = 10 */
.bento-card:nth-child(2) {
    grid-column: 9 / 14;
    grid-row: 1 / 3;
}

/* Card 3 — 5 cols × 1 row = 5 */
.bento-card:nth-child(3) {
    grid-column: 9 / 14;
    grid-row: 3 / 4;
}

/* Card 4 — 5 cols × 2 rows = 10 */
.bento-card:nth-child(4) {
    grid-column: 1 / 6;
    grid-row: 4 / 6;
}

/* Card 5 — 4 cols × 2 rows = 8 */
.bento-card:nth-child(5) {
    grid-column: 6 / 10;
    grid-row: 4 / 6;
}

/* Card 6 — 4 cols × 2 rows = 8 */
.bento-card:nth-child(6) {
    grid-column: 10 / 14;
    grid-row: 4 / 6;
}

/* ── Fibonacci color progression (cores das ondas) ── */
/* Tint sutil das wave colors: #0077aa → #0088ff → #00ddff */
.bento-card:nth-child(1) { background: #111827; } /* Plataformas — #1 base */
.bento-card:nth-child(2) { background: #101B2E; } /* Design Apps — #2 */
.bento-card:nth-child(3) { background: #0F1E35; } /* Identidade — #3 */
.bento-card:nth-child(4) { background: #0A2F50; } /* Dashboards — #6 cyan */
.bento-card:nth-child(5) { background: #0C2846; } /* Auditoria — #5 */
.bento-card:nth-child(6) { background: #0E223D; } /* Setup Visual — #4 */

/* Desktop: show header inline, body always visible, hide arrow */
.bento-header {
    display: contents;
}
.bento-arrow {
    display: none;
}
.bento-body {
    display: contents;
}

/* Ícone */
.bento-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 212, 255, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.bento-card:hover .bento-icon {
    background: rgba(0, 212, 255, 0.14);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.12);
}

.bento-icon svg {
    width: 22px;
    height: 22px;
    color: var(--cyan);
}

/* Título */
.bento-card h3 {
    font-family: 'Organetto', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* Descrição */
.bento-card p {
    font-size: 0.85rem;
    font-family: var(--font-body);
    color: rgba(232, 237, 245, 0.7);
    font-weight: 300;
    line-height: 1.75;
    letter-spacing: 0.2px;
}

/* ── ABOUT + SERVICES LAYOUT ── */
.mid-section {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

/* ── ABOUT / QUEM SOMOS ── */
.about-layout {
    display: flex;
    gap: 60px;
    align-items: stretch;
    max-width: 1100px;
    margin: 0 auto;
}

.about-left {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
}

.about-photo-wrapper {
    position: relative;
    width: 300px;
    height: 370px;
}

.about-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 14px;
    border: 1px solid var(--border);
    filter: grayscale(15%) brightness(0.92);
    transition: filter 0.5s ease, border-color 0.5s ease;
}

.about-photo-wrapper:hover .about-photo {
    filter: grayscale(0%) brightness(1);
    border-color: rgba(0, 212, 255, 0.3);
}

.about-photo-glow {
    position: absolute;
    bottom: -6px;
    left: 20%;
    right: 20%;
    height: 12px;
    background: var(--cyan);
    border-radius: 50%;
    filter: blur(14px);
    opacity: 0.25;
    transition: opacity 0.5s ease;
}

.about-photo-wrapper:hover .about-photo-glow {
    opacity: 0.45;
}

/* Stats */
.about-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 85px;
    flex: 1;
    transition: border-color 0.3s ease;
}

.stat-item:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.stat-number {
    display: block;
    font-family: 'Relidux', sans-serif;
    font-size: 1.6rem;
    color: #1391DE;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.55rem;
    font-family: var(--font-body);
    color: rgba(232, 237, 245, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Right side */
.about-right {
    flex: 1;
}

.about-name {
    margin-bottom: 6px;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-role {
    font-size: 0.65rem;
    font-family: var(--font-body);
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    display: block;
    margin-bottom: 28px;
}

.bio-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--cyan);
    margin-bottom: 10px;
    margin-top: 4px;
}

.bio-heading:not(:first-child) {
    margin-top: 20px;
}

.about-bio p {
    font-size: 0.88rem;
    font-family: var(--font-body);
    font-weight: 300;
    color: rgba(232, 237, 245, 0.85);
    line-height: 1.9;
    margin-bottom: 16px;
}

/* Skills */
.about-skills {
    display: flex;
    gap: 30px;
    margin-top: 28px;
}

.skills-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-dash {
    width: 16px;
    height: 1px;
    background: var(--cyan);
    display: block;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.skill-item:hover .skill-dash {
    width: 24px;
}

.skill-text {
    font-size: 0.68rem;
    font-family: var(--font-body);
    color: rgba(232, 237, 245, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.skill-item:hover .skill-text {
    color: rgba(232, 237, 245, 0.75);
}

/* ── PORTFOLIO ── */
/* ── PORTFOLIO TABS ── */
.portfolio-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
}

.portfolio-tab {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.6rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-tab:hover {
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}

.portfolio-tab.active {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--cyan);
    color: var(--cyan);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-item {
    aspect-ratio: 16/10;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(0, 184, 169, 0.03));
}

.portfolio-item:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.1);
}

.portfolio-placeholder {
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 2;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.portfolio-cat {
    font-size: 0.65rem;
    font-family: var(--font-body);
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ── PROJECT MODAL — DECK ── */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
    touch-action: none;
    overscroll-behavior: contain;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Close button — floating top-right */
.project-modal > .modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: rgba(0, 150, 220, 0.12);
    border: 1.5px solid var(--cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    z-index: 10;
    color: var(--cyan);
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.project-modal > .modal-close:hover {
    color: #fff;
    border-color: var(--cyan);
    background: rgba(0, 212, 255, 0.25);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
}

.project-modal > .modal-close svg {
    width: 18px;
    height: 18px;
}

/* Deck navigation arrows */
.deck-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(0, 150, 220, 0.12);
    border: 1.5px solid var(--cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    color: var(--cyan);
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(6px);
}

.deck-arrow:hover {
    color: #fff;
    border-color: var(--cyan);
    background: rgba(0, 212, 255, 0.25);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
}

.deck-arrow svg {
    width: 22px;
    height: 22px;
}

.deck-arrow-left { left: -68px; }
.deck-arrow-right { right: -68px; }

.deck-arrow:disabled {
    opacity: 0.15;
    cursor: default;
    pointer-events: none;
}

/* Counter */
.modal-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-family: var(--font);
    color: var(--text-muted);
    letter-spacing: 2px;
    z-index: 10;
}

/* Deck container — holds all cards */
.deck-container {
    position: relative;
    width: 42%;
    max-width: 700px;
    height: 82vh;
    z-index: 1;
    margin-left: 8%;
}

/* Individual deck card */
.deck-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, filter 0.5s ease;
    will-change: transform, opacity;
    cursor: grab;
}

.deck-card:active { cursor: grabbing; }

.deck-card.dragging {
    transition: none !important;
    cursor: grabbing;
}

/* Cards behind: stacked to the right, progressively smaller */
.deck-card[data-deck-pos="0"] {
    z-index: 5;
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: brightness(1);
}
.deck-card[data-deck-pos="1"] {
    z-index: 4;
    transform: translateX(calc(100% + 30px)) scale(0.92);
    filter: brightness(0.4);
    pointer-events: none;
}
.deck-card[data-deck-pos="2"] {
    z-index: 3;
    transform: translateX(calc(100% + 60px)) scale(0.84);
    filter: brightness(0.25);
    pointer-events: none;
}
.deck-card[data-deck-pos="3"] {
    z-index: 2;
    transform: translateX(calc(100% + 80px)) scale(0.77);
    filter: brightness(0.15);
    pointer-events: none;
}
/* Cards further back — hidden */
.deck-card[data-deck-pos="4"],
.deck-card[data-deck-pos="5"],
.deck-card[data-deck-pos="6"],
.deck-card[data-deck-pos="7"] {
    z-index: 1;
    transform: translateX(calc(100% + 90px)) scale(0.74);
    opacity: 0;
    pointer-events: none;
}

/* Cards that went to the left (already seen) */
.deck-card[data-deck-pos="-1"] {
    z-index: 4;
    transform: translateX(calc(-100% - 30px)) scale(0.92);
    filter: brightness(0.4);
    pointer-events: none;
}
.deck-card[data-deck-pos="-2"] {
    z-index: 3;
    transform: translateX(calc(-100% - 60px)) scale(0.84);
    filter: brightness(0.25);
    pointer-events: none;
}
.deck-card[data-deck-pos="-3"] {
    z-index: 2;
    transform: translateX(calc(-100% - 80px)) scale(0.77);
    filter: brightness(0.15);
    pointer-events: none;
}
.deck-card[data-deck-pos="-4"],
.deck-card[data-deck-pos="-5"],
.deck-card[data-deck-pos="-6"],
.deck-card[data-deck-pos="-7"] {
    z-index: 1;
    transform: translateX(calc(-100% - 90px)) scale(0.74);
    opacity: 0;
    pointer-events: none;
}

/* Card inner elements */
.deck-card .modal-image {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.deck-card .modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.deck-card .modal-info {
    padding: 32px;
}

.modal-label {
    font-size: 0.6rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    display: block;
    margin-bottom: 8px;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.modal-desc {
    font-size: 0.88rem;
    font-family: var(--font-body);
    font-weight: 300;
    color: rgba(232, 237, 245, 0.8);
    line-height: 1.85;
    margin-bottom: 24px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-tag {
    padding: 6px 14px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 20px;
    font-size: 0.6rem;
    font-family: var(--font-body);
    color: rgba(232, 237, 245, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ── BOTTOM SECTION: PORTFOLIO + CONTACT ── */
.bottom-section {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 60px;
    align-items: start;
}

/* ── CONTACT — full page ── */
.contact-fullpage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px;
    position: relative;
}

.section-header-abs,
.contact-header {
    position: absolute;
    top: 50px;
    left: 80px;
}

.contact-center {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contact-center.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-center .section-label {
    margin-bottom: 24px;
}

.contact-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 40px;
}

.contact-line {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.8;
    letter-spacing: 0.3px;
}

.contact-line a {
    color: var(--cyan);
    text-decoration: none;
    font-family: var(--font-body);
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    padding-bottom: 2px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.contact-line a:hover {
    border-color: var(--cyan);
}

.contact-line-dim {
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 24px;
}

.contact-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.contact-links a {
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-links a:hover {
    color: var(--cyan);
}

.contact-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* ── FOOTER ── */
footer {
    padding: 30px 80px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--cyan);
}

.social-links svg { width: 18px; height: 18px; }

/* ── DECORATIVE STAR ── */
.deco-star {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 24px;
    height: 24px;
    z-index: 50;
    opacity: 0.4;
    animation: rotateStar 12s linear infinite;
}

@keyframes rotateStar {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── FAQ ── */
.faq-layout {
    display: grid;
    grid-template-columns: 5fr 8fr;
    gap: 60px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.faq-header {
    align-self: start;
    position: sticky;
    top: calc(50vh - 120px);
}

.faq-header .section-label {
    margin-bottom: 16px;
}

.faq-heading {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.25;
    margin-bottom: 20px;
}

.faq-heading-dim {
    color: var(--text-muted);
    font-weight: 300;
}

.faq-subtitle {
    font-size: 0.82rem;
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 28px;
}

.btn-faq-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    border: 1px solid var(--cyan);
    color: var(--cyan);
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 2px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-faq-cta svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.btn-faq-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-faq-cta:hover {
    color: var(--bg-primary);
}

.btn-faq-cta:hover::before {
    opacity: 1;
}

.btn-faq-cta:hover svg {
    transform: translate(2px, -2px);
}

/* FAQ list */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.faq-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.faq-item.open {
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 4px 24px rgba(0, 212, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(0, 212, 255, 0.03);
}

.faq-number {
    font-family: 'Relidux', sans-serif;
    font-size: 0.85rem;
    color: var(--cyan-dim);
    opacity: 0.5;
    flex-shrink: 0;
    min-width: 24px;
}

.faq-text {
    flex: 1;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.faq-toggle {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
    color: var(--cyan);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 24px 0 24px;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 24px 24px 24px;
}

.faq-answer p {
    font-size: 0.82rem;
    font-family: var(--font-body);
    color: rgba(232, 237, 245, 0.65);
    font-weight: 300;
    line-height: 1.85;
    letter-spacing: 0.2px;
    padding-top: 4px;
    border-top: 1px solid rgba(0, 212, 255, 0.08);
}

/* Fibonacci stagger delays */
.faq-item:nth-child(1) { transition-delay: 0ms; }
.faq-item:nth-child(2) { transition-delay: 80ms; }
.faq-item:nth-child(3) { transition-delay: 130ms; }
.faq-item:nth-child(4) { transition-delay: 210ms; }
.faq-item:nth-child(5) { transition-delay: 340ms; }
.faq-item:nth-child(6) { transition-delay: 470ms; }
.faq-item:nth-child(7) { transition-delay: 600ms; }
.faq-item:nth-child(8) { transition-delay: 760ms; }

/* ── SCROLL ANIMATIONS ── */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Portfolio items — alternate slide directions per row */
.portfolio-item {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.portfolio-item.anim-from-right {
    transform: translateX(60px);
}
.portfolio-item.anim-from-left {
    transform: translateX(-60px);
}
.portfolio-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Bento cards — directional entries following Fibonacci path */
.bento-card {
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.bento-card.anim-fade {
    transform: scale(0.95);
}
.bento-card.anim-from-left {
    transform: translateX(-80px);
}
.bento-card.anim-from-bottom {
    transform: translateY(60px);
}
.bento-card.anim-from-right {
    transform: translateX(80px);
}
.bento-card.visible {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Hover dimming overrides visible state */
.bento-grid:hover .bento-card.visible {
    opacity: 0.45;
}
.bento-grid:hover .bento-card.visible:hover {
    opacity: 1;
}

/* About — stat items pop in */
.stat-item {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.stat-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* About — skill items enter one by one from left */
.skill-item {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.skill-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .mid-section,
    .bottom-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .bento-card:nth-child(n) { grid-column: auto; grid-row: auto; }
    .bento-card:nth-child(1) { grid-column: 1 / -1; }
    .portfolio-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        bottom: 0;
        top: auto;
        padding: 0 10px;
        justify-content: center;
    }
    .menu-toggle { display: none; }
    .sidebar-logo-bottom { display: none; }
    .nav-item { width: 44px; height: 44px; }
    .nav-item span { display: none; }
    .nav-item.active::before { display: none; }
    .main-content { margin-left: 0; margin-bottom: 60px; }
    section { padding: 24px 24px; }
    .hero-content { padding: 0 24px; }
    .hero-logo { display: none; }
    .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; gap: 8px; }
    .bento-card:nth-child(n) { grid-column: auto; grid-row: auto; }

    /* Accordion mode for bento cards on mobile */
    .bento-card { padding: 0; cursor: pointer; border-radius: 12px; overflow: hidden; }
    .bento-card:hover { transform: none; box-shadow: none; }
    .bento-grid:hover .bento-card,
    .bento-grid:hover .bento-card.visible,
    .bento-grid:hover .bento-card.visible:hover { opacity: 1; }
    /* Reset Fibonacci sizing — all cards equal on mobile */
    .bento-card:nth-child(1) { padding: 0; }
    .bento-card:nth-child(1) h3 { font-size: 0.7rem; }
    .bento-card:nth-child(1) p { max-width: none; }
    .bento-header {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 20px 20px 16px;
        text-align: center;
        position: relative;
    }
    .bento-header .bento-icon { width: 40px; height: 40px; border-radius: 12px; }
    .bento-header h3 { font-size: 0.7rem; margin: 0; }
    .bento-arrow {
        display: block !important;
        width: 18px;
        height: 18px;
        color: var(--text-secondary);
        transition: transform 0.3s ease;
        flex-shrink: 0;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    .bento-card.open .bento-arrow { transform: rotate(180deg); }
    .bento-body {
        display: block !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
        padding: 0 20px;
    }
    .bento-card.open .bento-body {
        max-height: 300px;
        padding: 0 20px 20px;
    }
    .bento-card p { font-size: 0.82rem; }
    /* Fibonacci color progression — sequential order on mobile */
    .bento-card:nth-child(1) { background: #111827; }
    .bento-card:nth-child(2) { background: #101B2E; }
    .bento-card:nth-child(3) { background: #0F1E35; }
    .bento-card:nth-child(4) { background: #0E223D; }
    .bento-card:nth-child(5) { background: #0C2846; }
    .bento-card:nth-child(6) { background: #0A2F50; }
    .about-layout { flex-direction: column; align-items: center; text-align: center; }
    .about-name { text-align: center; }
    .about-photo-wrapper { width: 200px; height: 240px; }
    .about-bio p { text-align: justify; }
    .about-skills {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }
    .skills-col {
        display: contents;
    }
    .skill-item {
        padding: 9px 20px;
        border: 1px solid rgba(0, 212, 255, 0.25);
        border-radius: 24px;
        gap: 0;
        transition: border-color 0.3s ease, background 0.3s ease;
    }
    .skill-item:hover {
        border-color: var(--cyan);
        background: rgba(0, 212, 255, 0.06);
    }
    .skill-dash { display: none; }
    .skill-text { font-size: 0.65rem; letter-spacing: 2px; color: rgba(232, 237, 245, 0.7); }
    .portfolio-grid { grid-template-columns: 1fr; }
    .portfolio-item { border: none; }
    .portfolio-overlay { opacity: 1; transform: translateY(0); }
    .portfolio-img { filter: brightness(0.7); }
    .deck-container { width: 85%; margin-left: auto; margin-right: auto; height: 74vh; }
    .deck-card .modal-info { padding: 24px; }
    .deck-card .modal-title { font-size: 1.1rem; }
    .deck-card .modal-desc { font-size: 0.82rem; }
    .deck-card[data-deck-pos="1"] { transform: translateX(30px) scale(0.93); }
    .deck-card[data-deck-pos="2"] { transform: translateX(55px) scale(0.86); }
    .deck-card[data-deck-pos="3"] { transform: translateX(75px) scale(0.80); }
    .deck-card[data-deck-pos="-1"] { transform: translateX(-30px) scale(0.93); }
    .deck-card[data-deck-pos="-2"] { transform: translateX(-55px) scale(0.86); }
    .deck-card[data-deck-pos="-3"] { transform: translateX(-75px) scale(0.80); }
    .project-modal > .modal-close { top: 12px; right: 12px; width: 36px; height: 36px; }
    .deck-arrow { display: none; }
    .modal-counter { bottom: 16px; }
    .modal-info { padding: 24px; }
    .modal-title { font-size: 1.1rem; }
    .modal-desc { font-size: 0.82rem; }
    .top-bar { left: 0; width: 100%; padding: 16px 20px; justify-content: center; }
    .hero { min-height: 100vh; min-height: 100dvh; height: auto; padding: 0; margin-left: 0; width: 100%; display: flex; align-items: center; }
    .hero .hero-content {
        margin-left: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
        justify-content: center;
        padding-bottom: 100px;
    }
    .hero .hero-content .btn-primary {
        align-self: center;
        margin-top: auto;
        position: absolute;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
    }
    #faq { padding-top: 24px; min-height: auto; justify-content: flex-start; }
    .faq-layout { grid-template-columns: 1fr; gap: 20px; }
    .faq-header { position: static; text-align: center; }
    .faq-heading { font-size: 1.4rem; }
    .faq-subtitle { font-size: 0.78rem; }
    .btn-faq-cta { font-size: 0.6rem; }
    .faq-question { padding: 16px 18px; gap: 12px; }
    .faq-text { font-size: 0.7rem; }
    .faq-answer { padding-left: 18px; padding-right: 18px; }
    .faq-item.open .faq-answer { padding: 0 18px 18px 18px; }
    .contact-fullpage { min-height: 100vh; min-height: 100dvh; padding: 24px; flex-direction: column; }
    .contact-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: -70px; }
    .section-header-abs,
    .contact-header { position: static; margin-bottom: 30px; align-self: flex-start; text-align: left; }
    .contact-title { font-size: 2.2rem; margin-bottom: 30px; }
    .contact-links { flex-direction: column; gap: 14px; }
    .contact-dot { display: none; }
    footer { padding: 20px 24px; flex-direction: column; gap: 12px; margin-bottom: 10px; }
}
