/* ===== V3: Dubai x Hacker — Light, Warm, Sharp ===== */
:root {
    --sand: #F6F1E9;
    --sand-deep: #EDE5D8;
    --cream: #FDFAF5;
    --ink: #1B1B1F;
    --ink-soft: #3A3A42;
    --ink-muted: #7C7C86;
    --gold: #C6932B;
    --gold-light: #D4A84B;
    --gold-wash: rgba(198, 147, 43, 0.08);
    --gold-border: rgba(198, 147, 43, 0.25);
    --teal: #1A8A7D;
    --teal-wash: rgba(26, 138, 125, 0.07);
    --font: 'Space Grotesk', sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --max-w: 1140px;
    --transition: 0.22s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: var(--font);
    background: var(--cream);
    color: var(--ink);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 28px;
}

.section {
    padding: 100px 0;
}

.gold {
    color: var(--gold);
}

/* Section labels — code-comment style */
.section-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.sec-heading {
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 48px;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 14px 0;
    background: rgba(253, 250, 245, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(27, 27, 31, 0.06);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 1px 20px rgba(27, 27, 31, 0.06);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.logo-bracket {
    color: var(--gold);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-muted);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--ink);
}

.nav-cta {
    background: var(--ink) !important;
    color: var(--cream) !important;
    padding: 7px 16px !important;
    border-radius: 0 !important;
}

.nav-cta:hover {
    background: var(--gold) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    width: 28px;
    height: 20px;
}

.nav-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ink);
    transition: var(--transition);
}

.nav-toggle span:first-child {
    top: 0;
}

.nav-toggle span:last-child {
    bottom: 0;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 28px 60px;
    overflow: hidden;
    background: var(--sand);
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(27, 27, 31, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(27, 27, 31, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
}

.hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.terminal-line {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--ink-muted);
    margin-bottom: 20px;
}

.term-prompt {
    color: var(--gold);
    font-weight: 700;
}

.term-cmd {
    color: var(--teal);
}

.hero-title {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-gold {
    color: var(--gold);
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--ink-soft);
    max-width: 460px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    font-family: var(--mono);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-gold {
    background: var(--gold);
    color: #fff;
}

.btn-gold:hover {
    background: #B5841F;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 2px solid var(--ink);
}

.btn-outline:hover {
    background: var(--ink);
    color: var(--cream);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-arrow {
    transition: transform 0.2s;
}

.btn:hover .btn-arrow {
    transform: translateX(3px);
}

.hero-stats {
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-family: var(--mono);
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ink);
}

.stat-plus {
    font-size: 1rem;
    color: var(--gold);
    font-weight: 700;
}

.stat-lbl {
    font-size: 0.72rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-left: 4px;
}

.stat-sep {
    color: var(--ink-muted);
    font-size: 1.2rem;
    opacity: 0.3;
}

/* Hero photo */
.hero-photo-wrap {
    position: relative;
}

.hero-photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    filter: grayscale(0.25) contrast(1.05) brightness(1.03);
    border: 1px solid rgba(27, 27, 31, 0.08);
    box-shadow: 0 20px 60px rgba(27, 27, 31, 0.18);
}

/* Code window */
.code-window {
    background: #1E1E2E;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(27, 27, 31, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.code-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    background: #15151F;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot.red {
    background: #FF5F57;
}

.code-dot.yellow {
    background: #FFBD2E;
}

.code-dot.green {
    background: #28C840;
}

.code-title {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-left: auto;
}

.code-body {
    padding: 20px;
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.8;
    color: #CDD6F4;
    overflow-x: auto;
}

.c-kw {
    color: #CBA6F7;
}

.c-cls {
    color: #89DCEB;
}

.c-fn {
    color: #A6E3A1;
}

.c-str {
    color: #F9E2AF;
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--gold);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}



/* ===== ABOUT ===== */
.about {
    background: var(--cream);
}

.about-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 56px;
    align-items: start;
}

.about-code-wrap {
    position: relative;
}

.photo-tag {
    position: absolute;
    bottom: -14px;
    left: 16px;
    background: var(--ink);
    color: var(--cream);
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #28C840;
    animation: blink 2s ease infinite;
}

.about-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.lead {
    font-size: 1.05rem;
    color: var(--ink-soft);
    margin-bottom: 12px;
}

.about-content p {
    color: var(--ink-soft);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.about-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.pill {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 14px;
    background: var(--gold-wash);
    border: 1px solid var(--gold-border);
    color: var(--gold);
}

/* ===== SERVICES ===== */
.services {
    background: var(--sand);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: rgba(27, 27, 31, 0.08);
}

.srv-card {
    padding: 36px;
    background: var(--cream);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.srv-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gold);
    transition: width 0.4s ease;
}

.srv-card:hover::after {
    width: 100%;
}

.srv-card:hover {
    background: #FFFDF8;
}

.srv-idx {
    font-family: var(--mono);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--sand-deep);
    line-height: 1;
    margin-bottom: 12px;
    transition: var(--transition);
}

.srv-card:hover .srv-idx {
    color: var(--gold);
}

.srv-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.srv-card p {
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin-bottom: 16px;
    line-height: 1.7;
}

.srv-card ul {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.srv-card li {
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--ink-muted);
    padding-left: 16px;
    position: relative;
}

.srv-card li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
}

/* ===== REFERENCES / RESULTS ===== */
.results {
    background: var(--cream);
}

.ref-carousel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ref-carousel-wrap::before,
.ref-carousel-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ref-carousel-wrap::before {
    left: 60px;
    background: linear-gradient(to right, var(--cream), transparent);
}

.ref-carousel-wrap::after {
    right: 60px;
    background: linear-gradient(to left, var(--cream), transparent);
}

.ref-carousel-wrap.show-fade-left::before {
    opacity: 1;
}

.ref-carousel-wrap.show-fade-right::after {
    opacity: 1;
}

.ref-carousel {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
}

.ref-carousel::-webkit-scrollbar {
    display: none;
}

.ref-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(27, 27, 31, 0.15);
    background: var(--cream);
    color: var(--ink);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-family: var(--mono);
}

.ref-arrow:hover {
    background: var(--ink);
    color: var(--cream);
    border-color: var(--ink);
}

.res-card {
    min-width: 290px;
    max-width: 310px;
    padding: 32px;
    background: var(--sand);
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.res-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    transition: var(--transition);
}

.res-card:hover::before {
    background: var(--gold);
}

.res-tag {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--teal);
    margin-bottom: 10px;
}

.res-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.res-card>p {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 20px;
    line-height: 1.7;
}

.res-tech {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--ink-muted);
    letter-spacing: 0.03em;
    border-top: 1px solid rgba(27, 27, 31, 0.08);
    padding-top: 12px;
}

/* Carousel pagination indicators */
.ref-indicators {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.ref-bar {
    width: 36px;
    height: 3px;
    background: rgba(27, 27, 31, 0.12);
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.ref-bar.active {
    background: var(--gold);
    transform: scaleY(1.3);
}

/* ===== TECH STACK ===== */
.stack {
    background: var(--sand);
}

.stack-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: rgba(27, 27, 31, 0.08);
}

.stk-col {
    padding: 28px;
    background: var(--cream);
    transition: var(--transition);
}

.stk-col:hover {
    background: #FFFDF8;
}

.stk-col h4 {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(27, 27, 31, 0.06);
}

.stk-col li {
    font-size: 0.9rem;
    color: var(--ink-soft);
    padding: 4px 0;
}

/* ===== PROCESS ===== */
.process {
    background: var(--sand);
}

.proc-grid {
    max-width: 620px;
}

.proc-step {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(27, 27, 31, 0.06);
}

.proc-step:last-child {
    border-bottom: none;
}

.proc-num {
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
    width: 36px;
    padding-top: 2px;
}

.proc-step h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.proc-step p {
    font-size: 0.88rem;
    color: var(--ink-soft);
}

/* ===== CONTACT ===== */
.contact {
    background: var(--cream);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.contact-left h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
}

.contact-left p {
    color: var(--ink-soft);
    margin-bottom: 32px;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: var(--mono);
    font-size: 0.85rem;
}

.ci-key {
    color: var(--gold);
    font-weight: 600;
}

.contact-form {
    background: var(--cream);
    padding: 36px;
    border: 1px solid rgba(27, 27, 31, 0.08);
    box-shadow: 0 8px 32px rgba(27, 27, 31, 0.06);
}

.fg {
    margin-bottom: 18px;
}

.fg label {
    display: block;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.fg input,
.fg textarea {
    width: 100%;
    background: var(--sand);
    border: 1px solid rgba(27, 27, 31, 0.1);
    padding: 12px 16px;
    color: var(--ink);
    font-family: var(--font);
    font-size: 0.92rem;
    transition: var(--transition);
    outline: none;
}

.fg input:focus,
.fg textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(198, 147, 43, 0.12);
    background: #fff;
}

.fg input::placeholder,
.fg textarea::placeholder {
    color: var(--ink-muted);
}

.fg textarea {
    resize: vertical;
    min-height: 90px;
}

.contact-form .btn-gold {
    margin-top: 8px;
}

.contact-form .btn-gold:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form feedback message */
.form-feedback {
    margin-top: 16px;
    padding: 0;
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
}

.form-feedback.show {
    max-height: 80px;
    opacity: 1;
    padding: 14px 18px;
}

.form-feedback.success {
    background: rgba(40, 200, 64, 0.08);
    border: 1px solid rgba(40, 200, 64, 0.25);
    color: #1a7a2e;
}

.form-feedback.error {
    background: rgba(220, 53, 53, 0.08);
    border: 1px solid rgba(220, 53, 53, 0.25);
    color: #a82020;
}

/* Loading spinner */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== FOOTER ===== */
.footer {
    padding: 24px 0;
    border-top: 1px solid rgba(27, 27, 31, 0.06);
    background: var(--cream);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 0.95rem;
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--ink-muted);
}

/* ===== ANIMATIONS ===== */
[data-animate] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .about-photo-wrap {
        max-width: 300px;
    }

    .res-card {
        min-width: 280px;
    }

    .stack-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 72px 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(253, 250, 245, 0.97);
        backdrop-filter: blur(14px);
        padding: 16px 28px;
        gap: 12px;
        border-bottom: 1px solid rgba(27, 27, 31, 0.06);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

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

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 12px;
    }

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

    .ref-carousel-wrap::before,
    .ref-carousel-wrap::after {
        width: 30px;
    }

    .ref-carousel-wrap::before {
        left: 48px;
    }

    .ref-carousel-wrap::after {
        right: 48px;
    }

    .ref-arrow {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .ref-carousel-wrap {
        gap: 10px;
    }

    .res-card {
        min-width: 260px;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .stack-row {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 90px 20px 50px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .ref-arrow {
        display: none;
    }

    .ref-carousel-wrap {
        gap: 0;
    }

    .ref-carousel-wrap::before,
    .ref-carousel-wrap::after {
        width: 20px;
    }

    .ref-carousel-wrap::before {
        left: 0;
    }

    .ref-carousel-wrap::after {
        right: 0;
    }

    .res-card {
        min-width: 240px;
        padding: 20px;
    }
}