:root {
    --bg-primary: #07070c;
    --bg-secondary: #0d0d15;
    --bg-card: #14141e;
    --bg-card-hover: #1a1a26;
    --text-primary: #ececf1;
    --text-secondary: #a4a4be;
    --text-muted: #6b6b85;
    --accent: #ff6b3d;
    --accent-2: #ff9a6c;
    --accent-glow: rgba(255, 107, 61, 0.4);
    --green: #2dd4bf;
    --blue: #4d7cff;
    --purple: #a78bfa;
    --border: #1e1e2e;
    --border-light: #2a2a3c;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 60px rgba(255, 107, 61, 0.15);
    --transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--accent); color: #fff; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: default;
}

/* ── Animated background mesh ── */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.bg-mesh::before,
.bg-mesh::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: float-blob 20s ease-in-out infinite;
}
.bg-mesh::before {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,107,61,0.5), transparent 70%);
    top: -200px; left: -200px;
}
.bg-mesh::after {
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(77,124,255,0.35), transparent 70%);
    bottom: -250px; right: -250px;
    animation-delay: -10s;
}
@keyframes float-blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, -60px) scale(1.1); }
    66% { transform: translate(-50px, 40px) scale(0.95); }
}

#particles-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 2;
}

/* ── Cursor glow follower ── */
.cursor-glow {
    position: fixed;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,107,61,0.08), transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1;
    transition: opacity 0.3s;
    mix-blend-mode: screen;
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 18px 0;
    transition: var(--transition);
}
.nav.scrolled {
    background: rgba(7, 7, 12, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}
.nav-logo {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-logo .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent-glow);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 14px var(--accent-glow); transform: scale(1); }
    50% { box-shadow: 0 0 28px var(--accent-glow), 0 0 50px rgba(255,107,61,0.5); transform: scale(1.15); }
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 36px;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.93rem;
    transition: var(--transition);
    position: relative;
    padding: 4px 0;
}
.nav-links a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 2px;
    transition: width 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff !important;
    padding: 10px 22px !important;
    border-radius: 50px;
    font-weight: 600 !important;
    box-shadow: 0 4px 20px var(--accent-glow);
    white-space: nowrap;
    transition: all 0.3s var(--ease-out) !important;
}
.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
}
.nav-mobile-toggle { display: none; }

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    position: relative;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 70px;
    align-items: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,107,61,0.08);
    border: 1px solid rgba(255,107,61,0.25);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fade-in-up 0.8s var(--ease-out) 0.2s forwards;
}
.hero-badge .status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px rgba(45,212,191,0.7);
    animation: pulse-dot 2s ease-in-out infinite;
}
.hero h1 {
    font-size: clamp(1.5rem, 2.95vw, 2.55rem);;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
    opacity: 0;
    animation: fade-in-up 1s var(--ease-out) 0.4s forwards;
}
.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent) 0%, #ff9a6c 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
    display: inline-block;
}
@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.hero-subtitle {
    font-size: 1.13rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 500px;
    line-height: 1.75;
    opacity: 0;
    animation: fade-in-up 1s var(--ease-out) 0.6s forwards;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-in-up 1s var(--ease-out) 0.8s forwards;
}
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s var(--ease-out);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.6s;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
    box-shadow: 0 12px 40px var(--accent-glow);
    transform: translateY(-3px);
}
.btn-secondary {
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(255,107,61,0.08);
    transform: translateY(-3px);
}
.btn .arrow {
    transition: transform 0.3s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ── Code window ── */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fade-in-up 1.2s var(--ease-out) 0.5s forwards;
}
.code-window {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s var(--ease-out);
}
.code-window::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255,107,61,0.1), transparent 50%);
    pointer-events: none;
}
.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
}
.code-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
}
.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }
.code-filename {
    margin-left: 12px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-family: 'JetBrains Mono', monospace;
}
.code-body {
    padding: 22px 26px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.75;
    min-height: 240px;
    white-space: pre;
}
.code-body .php-tag { color: #e06c75; }
.code-body .keyword { color: #c678dd; }
.code-body .class-name { color: #61afef; }
.code-body .string { color: #98c379; }
.code-body .comment { color: #5c6370; font-style: italic; }
.code-body .laravel { color: #ff6b3d; font-weight: 500; }
.code-body .cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--accent);
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: middle;
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ── Stats ── */
.stats-section {
    padding: 70px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(13, 13, 21, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}
.stat-item .stat-number {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent), #ff9a6c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 10px;
    display: inline-block;
}
.stat-item .stat-label {
    color: var(--text-muted);
    font-size: 0.93rem;
    font-weight: 500;
}

/* ── Sections common ── */
section { position: relative; }
.section-head {
    margin-bottom: 60px;
    max-width: 700px;
}
.section-eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.section-title {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 18px;
    line-height: 1.15;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ── About ── */
.about { padding: 120px 0; }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 60px;
    align-items: start;
}
.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.04rem;
    line-height: 1.75;
}
.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}
.tech-tag {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s var(--ease-out);
    cursor: default;
}
.tech-tag:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(255,107,61,0.08);
    transform: translateY(-2px);
}

/* ── Timeline ── */
.timeline {
    position: relative;
    padding-left: 28px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 6px; bottom: 6px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--border));
}
.timeline-item {
    position: relative;
    padding-bottom: 32px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px; top: 6px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px rgba(255,107,61,0.15);
    transition: all 0.3s;
}
.timeline-item:hover::before {
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(255,107,61,0.2);
}
.timeline-date {
    font-size: 0.83rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.timeline-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ── Services ── */
.services {
    padding: 120px 0;
    background: var(--bg-secondary);
    position: relative;
}
.services::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(255,107,61,0.06), transparent 60%);
    pointer-events: none;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.service-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255,107,61,0.15), rgba(255,107,61,0.05));
    border: 1px solid rgba(255,107,61,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 22px;
    transition: transform 0.4s var(--ease-out);
}
.service-card:hover .service-icon {
    transform: rotate(-8deg) scale(1.05);
}
.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ── Projects ── */
.projects {
    padding: 120px 0;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}
.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(255,107,61,0.08), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    border-radius: var(--radius-lg);
}
.project-card:hover::after { opacity: 1; }
.project-card:hover {
    border-color: var(--border-light);
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(0,0,0,0.5);
}
.project-card h3 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.project-stack span {
    background: rgba(255,107,61,0.1);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}
.project-card p {
    color: var(--text-secondary);
    font-size: 0.97rem;
    line-height: 1.7;
    margin-bottom: 18px;
}
.project-metric {
    display: flex;
    gap: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.project-metric div {
    display: flex;
    flex-direction: column;
}
.project-metric .num {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.05rem;
}
.project-metric .lbl {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ── Contact ── */
.contact {
    padding: 120px 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}
.contact::before {
    content: '';
    position: absolute;
    top: -50%; left: 50%;
    width: 800px; height: 800px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255,107,61,0.08), transparent 60%);
    pointer-events: none;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: start;
}
.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1.05rem;
}
.contact-list {
    list-style: none;
    margin-top: 32px;
}
.contact-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.contact-list li:last-child { border-bottom: none; }
.contact-list .ic {
    width: 44px; height: 44px;
    border-radius: var(--radius);
    background: rgba(255,107,61,0.1);
    border: 1px solid rgba(255,107,61,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-list .lbl {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.contact-list .val {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
}
.contact-list .val:hover { color: var(--accent); }

.contact-form {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-top: 48px;
    align-self: stretch;
    display: flex;
    padding: 18px;
}
.contact-form .contact-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    border-radius: var(--radius);
}

/* ── Footer ── */
.footer {
    padding: 36px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { color: var(--accent-2); }

/* ── Reveal animation ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Responsive ── */
@media (max-width: 960px) {
    .hero-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .services-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .nav-links {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(7,7,12,0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 28px;
        z-index: 999;
    }
    .nav-links.active { display: flex; }
    .nav-links a { font-size: 1.2rem; }
    .nav-mobile-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
        padding: 8px;
    }
    .nav-mobile-toggle span {
        display: block;
        width: 24px; height: 2px;
        background: var(--text-primary);
        margin: 5px 0;
        transition: var(--transition);
        border-radius: 2px;
    }
    .nav-mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .container { padding: 0 24px; }
    .cursor-glow { display: none; }
}
