/* ═══════════════════════════════════════════════════════════
   lonfy Portfolio — Premium Futuristic Stylesheet
   ═══════════════════════════════════════════════════════════ */

:root {
    --black: #000000;
    --white: #ffffff;
    --g1: #111111;
    --g2: #1a1a1a;
    --g3: #2a2a2a;
    --g4: #888888;
    --g5: #444444;
    --accent: #ffffff;
    --accent-dim: rgba(255,255,255,0.06);
    --glass: rgba(255,255,255,0.04);
    --glass-border: rgba(255,255,255,0.08);
    --font: 'Outfit', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --radius: 16px;
    --radius-sm: 10px;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--g3) var(--black);
}

body {
    font-family: var(--font);
    background: var(--black);
    color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ═══ NOISE TEXTURE ═══ */
.noise {
    position: fixed; inset: 0; z-index: 9999; pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
}

/* ═══ CURSOR GLOW ═══ */
.cursor-glow {
    position: fixed; width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    pointer-events: none; z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

/* ═══ NAV ═══ */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 40px;
    backdrop-filter: blur(20px);
    background: rgba(0,0,0,0.6);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.4s var(--ease);
}
.nav.scrolled { padding: 14px 40px; background: rgba(0,0,0,0.85); }
.nav__logo {
    font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em;
}
.nav__dot { color: var(--g4); }
.nav__links { display: flex; gap: 32px; align-items: center; }
.nav__links a {
    font-size: 0.85rem; font-weight: 400; letter-spacing: 0.04em;
    color: var(--g4); transition: color 0.3s;
    text-transform: uppercase;
}
.nav__links a:hover { color: var(--white); }
.nav__cta {
    padding: 8px 20px !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 100px;
    background: var(--glass) !important;
    transition: all 0.3s !important;
}
.nav__cta:hover { background: rgba(255,255,255,0.1) !important; border-color: rgba(255,255,255,0.2) !important; }
.nav__burger { display: none; flex-direction: column; gap: 6px; padding: 8px; }
.nav__burger span { display: block; width: 24px; height: 1.5px; background: var(--white); transition: all 0.3s; }

/* Mobile menu */
.mobile-menu {
    position: fixed; inset: 0; z-index: 99;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
    background: rgba(0,0,0,0.96);
    backdrop-filter: blur(30px);
    opacity: 0; visibility: hidden;
    transition: all 0.4s var(--ease);
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a {
    font-size: 1.6rem; font-weight: 300; letter-spacing: 0.06em;
    color: var(--g4); transition: color 0.3s; text-transform: uppercase;
}
.mobile-menu a:hover { color: var(--white); }

@media (max-width: 768px) {
    .nav__links { display: none; }
    .nav__burger { display: flex; }
    .nav { padding: 16px 20px; }
}

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; border-radius: 100px;
    font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em;
    transition: all 0.4s var(--ease);
    position: relative; overflow: hidden;
}
.btn--primary {
    background: var(--white); color: var(--black);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,255,255,0.15); }
.btn--ghost {
    border: 1px solid var(--glass-border);
    background: var(--glass); color: var(--white);
}
.btn--ghost:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); }

/* ═══ HERO ═══ */
.hero {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 120px 24px 60px;
    position: relative; overflow: hidden;
}
.hero__grid-bg {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black, transparent);
}
.hero__content { text-align: center; margin-bottom: 60px; position: relative; z-index: 2; }
.hero__tag {
    font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.2em;
    color: var(--g4); margin-bottom: 20px;
}
.hero__name {
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 700; letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #fff 30%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero__dot {
    -webkit-text-fill-color: var(--g5);
}
.hero__desc {
    font-size: 1.15rem; color: var(--g4); font-weight: 300;
    line-height: 1.7; margin-bottom: 36px;
}
.hero__buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Hero split cards */
.hero__split {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    max-width: 700px; width: 100%; position: relative; z-index: 2;
}
.hero__card {
    padding: 32px 28px; border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    background: var(--glass);
    backdrop-filter: blur(20px);
    display: flex; flex-direction: column; gap: 12px;
    transition: all 0.4s var(--ease);
    position: relative; overflow: hidden;
}
.hero__card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), transparent 60%);
    opacity: 0; transition: opacity 0.4s;
}
.hero__card:hover::before { opacity: 1; }
.hero__card:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-4px); }
.hero__card-icon { color: var(--g4); }
.hero__card h3 { font-size: 1.15rem; font-weight: 600; }
.hero__card p { font-size: 0.85rem; color: var(--g4); font-weight: 300; }
.hero__card-arrow {
    font-size: 1.4rem; color: var(--g5);
    transition: all 0.3s; margin-top: auto;
}
.hero__card:hover .hero__card-arrow { color: var(--white); transform: translateX(4px); }

.hero__scroll {
    position: absolute; bottom: 30px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll span { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--g5); }
.hero__scroll-line {
    width: 1px; height: 40px; background: var(--g3);
    position: relative; overflow: hidden;
}
.hero__scroll-line::after {
    content: ''; position: absolute; top: -100%; left: 0;
    width: 100%; height: 50%; background: var(--white);
    animation: scrollLine 2s var(--ease) infinite;
}
@keyframes scrollLine {
    0% { top: -50%; }
    100% { top: 150%; }
}

@media (max-width: 600px) {
    .hero__split { grid-template-columns: 1fr; }
    .hero { padding: 100px 20px 60px; }
}

/* ═══ SECTIONS ═══ */
.section { padding: 120px 0; position: relative; }
.section__tag {
    font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em;
    color: var(--g5); margin-bottom: 12px;
}
.section__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700; letter-spacing: -0.03em;
    margin-bottom: 60px;
}

/* ═══ SERVICES ═══ */
.services__grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.service-block {
    padding: 40px 36px; border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    background: var(--g1);
    transition: all 0.4s var(--ease);
}
.service-block:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-2px); }
.service-block__header {
    display: flex; align-items: center; gap: 14px; margin-bottom: 28px;
}
.service-block__header svg { color: var(--g4); }
.service-block__header h3 { font-size: 1.2rem; font-weight: 600; }
.service-block__list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.service-block__list li {
    font-size: 0.95rem; color: var(--g4); font-weight: 300;
    display: flex; gap: 10px; align-items: baseline;
}
.li-dash { color: var(--g5); font-weight: 400; }

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

/* ═══ PROJECTS ═══ */
.projects__tabs {
    display: flex; gap: 8px; margin-bottom: 40px; flex-wrap: wrap;
}
.tab {
    padding: 10px 24px; border-radius: 100px;
    font-size: 0.85rem; font-weight: 400;
    border: 1px solid var(--glass-border);
    background: transparent; color: var(--g4);
    transition: all 0.3s var(--ease);
}
.tab:hover { border-color: rgba(255,255,255,0.15); color: var(--white); }
.tab.active { background: var(--white); color: var(--black); border-color: var(--white); }

.projects__grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px;
}

.project-card {
    border-radius: var(--radius); border: 1px solid var(--glass-border);
    background: var(--g1);
    overflow: hidden; cursor: pointer;
    transition: all 0.4s var(--ease);
    position: relative;
}
.project-card:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-4px); }
.project-card__img {
    width: 100%; height: 200px; object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
    background: var(--g2);
}
.project-card__img-placeholder {
    width: 100%; height: 200px;
    background: linear-gradient(135deg, var(--g2), var(--g1));
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid var(--glass-border);
}
.project-card__img-placeholder svg { color: var(--g3); }
.project-card__body { padding: 28px; }
.project-card__cat {
    font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.15em;
    color: var(--g5); text-transform: uppercase; margin-bottom: 10px;
}
.project-card__title { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.project-card__desc {
    font-size: 0.85rem; color: var(--g4); font-weight: 300;
    line-height: 1.6; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.project-card__tech {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.tech-tag {
    font-family: var(--mono); font-size: 0.65rem;
    padding: 4px 10px; border-radius: 100px;
    border: 1px solid var(--glass-border);
    color: var(--g4); letter-spacing: 0.03em;
}

.projects__empty {
    grid-column: 1 / -1;
    text-align: center; padding: 60px 20px;
    color: var(--g5); font-size: 0.95rem;
}

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

/* ═══ MODAL ═══ */
.modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all 0.3s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
}
.modal__body {
    position: relative; z-index: 1;
    max-width: 700px; width: calc(100% - 40px);
    max-height: 85vh; overflow-y: auto;
    background: var(--g1); border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    padding: 40px;
    transform: translateY(20px);
    transition: transform 0.4s var(--ease);
}
.modal.open .modal__body { transform: translateY(0); }
.modal__close {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--g2); border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; color: var(--g4);
    transition: all 0.3s;
}
.modal__close:hover { background: var(--g3); color: var(--white); }

.modal__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }
.modal__section { margin-bottom: 24px; }
.modal__label {
    font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.15em;
    color: var(--g5); text-transform: uppercase; margin-bottom: 8px;
}
.modal__text { font-size: 0.95rem; color: var(--g4); font-weight: 300; line-height: 1.7; }
.modal__features { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.modal__features li { font-size: 0.9rem; color: var(--g4); font-weight: 300; padding-left: 18px; position: relative; }
.modal__features li::before { content: '›'; position: absolute; left: 0; color: var(--g5); }
.modal__tech { display: flex; gap: 6px; flex-wrap: wrap; }
.modal__link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 24px; border-radius: 100px;
    border: 1px solid var(--glass-border);
    font-size: 0.85rem; color: var(--white);
    transition: all 0.3s;
}
.modal__link:hover { background: rgba(255,255,255,0.08); }

.modal__gallery { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.modal__gallery img {
    height: 160px; border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    flex-shrink: 0; cursor: pointer;
    transition: all 0.3s;
}
.modal__gallery img:hover { border-color: rgba(255,255,255,0.2); transform: scale(1.02); }

/* ═══ REVIEWS ═══ */
.reviews__track {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.review-card {
    padding: 28px; border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    background: var(--g1);
    transition: all 0.4s var(--ease);
}
.review-card:hover { border-color: rgba(255,255,255,0.12); }
.review-card__header {
    display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.review-card__avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--g3); display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.85rem; color: var(--g4);
    flex-shrink: 0; overflow: hidden;
}
.review-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-card__name { font-size: 0.95rem; font-weight: 500; }
.review-card__user { font-size: 0.75rem; color: var(--g5); font-family: var(--mono); }
.review-card__text { font-size: 0.9rem; color: var(--g4); font-weight: 300; line-height: 1.7; }
.review-card__date { font-size: 0.7rem; color: var(--g5); margin-top: 12px; font-family: var(--mono); }

.reviews__empty {
    text-align: center; padding: 40px; color: var(--g5); font-size: 0.95rem;
    grid-column: 1 / -1;
}

/* ═══ ABOUT ═══ */
.about__content {
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; align-items: start;
}
.about__text p { font-size: 0.95rem; color: var(--g4); font-weight: 300; line-height: 1.8; margin-bottom: 16px; }
.about__text strong { color: var(--white); font-weight: 600; }
.about__tag {
    display: inline-block;
    font-family: var(--mono); font-size: 0.7rem;
    padding: 4px 12px; border-radius: 100px;
    border: 1px solid var(--glass-border);
    color: var(--g4); margin: 2px;
}
.about__stats { display: flex; flex-direction: column; gap: 32px; }
.stat { display: flex; flex-direction: column; }
.stat__num {
    font-size: 3rem; font-weight: 700; letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(180deg, #fff, #666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat__plus { font-size: 2rem; -webkit-text-fill-color: var(--g5); }
.stat__label { font-size: 0.85rem; color: var(--g5); margin-top: 4px; }

@media (max-width: 768px) {
    .about__content { grid-template-columns: 1fr; gap: 40px; }
    .about__stats { flex-direction: row; flex-wrap: wrap; gap: 24px; }
}

/* ═══ CONTACT ═══ */
.contact { border-top: 1px solid var(--glass-border); }
.contact__grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.contact__card {
    padding: 32px 28px; border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    background: var(--g1);
    display: flex; align-items: center; gap: 20px;
    transition: all 0.4s var(--ease);
}
.contact__card:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.contact__card svg { flex-shrink: 0; color: var(--g4); }
.contact__card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.contact__card p { font-size: 0.85rem; color: var(--g4); font-weight: 300; }

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

/* ═══ FOOTER ═══ */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 30px 0;
}
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer__logo { font-size: 1.1rem; font-weight: 700; }
.footer__copy { font-size: 0.75rem; color: var(--g5); }

/* ═══ REVEAL ANIMATION ═══ */
.reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
    opacity: 1; transform: translateY(0);
}

/* ═══ BODY SCROLLBAR ═══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--g3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--g5); }

/* Modal scrollbar */
.modal__body::-webkit-scrollbar { width: 4px; }
.modal__body::-webkit-scrollbar-thumb { background: var(--g3); border-radius: 2px; }
