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

:root {
    --bg:      #0c0c0e;
    --surface: #131316;
    --card:    #18181c;
    --border:  #25252b;
    --text:    #e2e2e8;
    --muted:   #6b6b7a;
    --accent:  #7b61ff;
    --accent2: #a78bfa;
    --green:   #4ade80;
    --cyan:    #22d3ee;
    --orange:  #fb923c;
    --mono:    'JetBrains Mono', 'Fira Code', monospace;
    --sans:    'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── NAV ── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 6vw;
    height: 155px;
    background: rgba(12,12,14,.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    text-decoration: none;
    display: flex; align-items: center;
    line-height: 1;
}
.nav-logo-img {
    height: 135px;
    width: auto;
    display: block;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.nav-links {
    display: flex; align-items: center; gap: 32px;
    list-style: none;
}
.nav-links a {
    color: var(--muted); font-size: 13px; text-decoration: none;
    font-family: var(--mono);
    transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
    background: var(--accent); color: #fff !important;
    padding: 6px 16px; border-radius: 4px;
    transition: background .2s !important;
}
.nav-cta:hover { background: var(--accent2) !important; color: #fff !important; }

.nav-toggle {
    display: none; background: none; border: none;
    color: var(--text); font-size: 20px; cursor: pointer;
}

/* ── LAYOUT ── */
main { padding-top: 155px; flex: 1; }

section {
    padding: 96px 6vw;
    max-width: 1200px;
    margin: 0 auto;
}

section.full-width {
    max-width: none;
    padding-left: 6vw; padding-right: 6vw;
}

/* ── SECTION LABEL ── */
.label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent2);
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.label::before {
    content: '//';
    color: var(--muted);
}

/* ── HEADINGS ── */
h1, h2, h3 { font-family: var(--mono); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(36px, 5vw, 64px); }
h2 { font-size: clamp(24px, 3vw, 38px); margin-bottom: 48px; color: var(--text); }
h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; }

/* ── HERO ── */
#hero {
    min-height: calc(100vh - 60px);
    display: flex; flex-direction: column; justify-content: center;
    padding-top: 80px; padding-bottom: 80px;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-left {}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--green);
    letter-spacing: .1em;
    margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px;
}
.hero-eyebrow::before { content: '>_'; color: var(--muted); }

.hero-title {
    font-size: clamp(36px, 4.5vw, 58px);
    line-height: 1.1;
    margin-bottom: 24px;
}
.hero-title .highlight {
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
    max-width: 420px;
    margin-bottom: 36px;
}

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 24px;
    font-family: var(--mono); font-size: 13px;
    text-decoration: none; border: none; cursor: pointer;
    border-radius: 4px; transition: all .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--green); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }

/* Hero code card */
.hero-code {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.8;
}
.hero-code-bar {
    background: var(--surface);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 6px;
}
.hc-dot { width: 10px; height: 10px; border-radius: 50%; }
.hc-dot.r { background: #ff5f57; }
.hc-dot.y { background: #febc2e; }
.hc-dot.g { background: #28c840; }
.hc-filename { font-size: 11px; color: var(--muted); margin-left: 8px; }
.hero-code-body { padding: 20px 24px; }
.hcl { display: block; }
.c-kw  { color: #569cd6; }
.c-tp  { color: #4ec9b0; }
.c-str { color: #ce9178; }
.c-cm  { color: #6a9955; }
.c-fn  { color: #dcdcaa; }
.c-vr  { color: #9cdcfe; }
.c-nm  { color: #b5cea8; }
.c-op  { color: #e2e2e8; }
.c-ln  { color: #3c3c3c; user-select:none; margin-right: 16px; display: inline-block; min-width: 16px; text-align: right; }

/* ── SERVICES ── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.svc-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    position: relative;
}
.svc-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(123,97,255,.08);
}
.svc-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    margin-bottom: 16px;
    display: block;
}
.svc-icon { font-size: 28px; margin-bottom: 12px; display: block; }
.svc-title { font-family: var(--mono); font-size: 15px; color: var(--text); font-weight: 600; margin-bottom: 10px; }
.svc-desc { color: var(--muted); font-size: 13px; line-height: 1.75; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tech-tag {
    font-family: var(--mono);
    font-size: 10px;
    padding: 3px 10px;
    background: rgba(123,97,255,.1);
    border: 1px solid rgba(123,97,255,.25);
    color: var(--accent2);
    border-radius: 3px;
}

/* ── STACK ── */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.stack-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 16px;
    display: flex; align-items: center; gap: 10px;
    transition: border-color .2s, transform .15s;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
}
.stack-item:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.stack-item .si-icon { font-size: 18px; }

/* ── PROJECTS ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.proj-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    display: flex; flex-direction: column; gap: 12px;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    cursor: pointer;
}
.proj-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(123,97,255,.08);
}

.proj-header {
    display: flex; align-items: center; justify-content: space-between;
}

.proj-type {
    font-family: var(--mono); font-size: 10px;
    padding: 3px 10px; border-radius: 3px; letter-spacing: .06em;
}
.proj-type.wp  { background: rgba(33,155,209,.12); border: 1px solid rgba(33,155,209,.3); color: #36b5e8; }
.proj-type.cs  { background: rgba(123,97,255,.12); border: 1px solid rgba(123,97,255,.3); color: var(--accent2); }
.proj-type.web { background: rgba(74,222,128,.1);  border: 1px solid rgba(74,222,128,.25); color: var(--green); }

.proj-status {
    font-family: var(--mono); font-size: 10px; color: var(--muted);
}
.proj-status.live { color: var(--green); }

.proj-name {
    font-family: var(--mono); font-size: 15px;
    color: var(--text); font-weight: 600;
}

.proj-desc {
    color: var(--muted); font-size: 13px; line-height: 1.75; flex: 1;
}

.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

.proj-more {
    font-family: var(--mono); font-size: 11px;
    color: var(--border); margin-top: 8px;
    transition: color .2s;
    text-decoration: none; display: inline-block;
}
.proj-card:hover .proj-more { color: var(--accent2); }

/* ── PROJECT MODAL ── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 400;
    background: rgba(12,12,14,.8);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
}
.modal-overlay.visible { opacity: 1; pointer-events: all; }

.modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 100%; max-width: 600px;
    max-height: 88vh; overflow-y: auto;
    transform: translateY(20px);
    transition: transform .25s ease;
}
.modal-overlay.visible .modal { transform: translateY(0); }

.modal-header {
    position: sticky; top: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
}
.modal-header-left { display: flex; align-items: center; gap: 10px; }

.modal-close {
    background: none; border: none;
    color: var(--muted); font-size: 16px;
    cursor: pointer; padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--mono);
    transition: color .15s;
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 28px 24px; }

.modal-title {
    font-family: var(--mono); font-size: 20px;
    color: var(--text); font-weight: 700;
    margin-bottom: 14px; line-height: 1.2;
}
.modal-intro {
    color: var(--muted); font-size: 14px;
    line-height: 1.8; margin-bottom: 28px;
}
.modal-section-label {
    font-family: var(--mono); font-size: 11px;
    color: var(--accent2); letter-spacing: .1em;
    text-transform: uppercase; margin-bottom: 12px;
    display: flex; align-items: center; gap: 6px;
}
.modal-section-label::before { content: '//'; color: var(--muted); }

.modal-features {
    list-style: none; padding: 0;
    display: flex; flex-direction: column; gap: 9px;
    margin-bottom: 28px;
}
.modal-features li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13px; color: var(--muted); line-height: 1.6;
}
.modal-features li::before {
    content: '✓'; color: var(--green);
    font-family: var(--mono); font-size: 11px;
    flex-shrink: 0; margin-top: 2px;
}
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.modal-year {
    font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.modal-link {
    font-family: var(--mono); font-size: 12px;
    color: var(--accent2); text-decoration: none;
    transition: color .2s;
}
.modal-link:hover { color: var(--text); }

/* ── ABOUT ── */
#about {
    display: flex; flex-direction: column;
}

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

.about-text p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-list {
    list-style: none;
    margin-top: 28px;
    display: flex; flex-direction: column; gap: 10px;
}
.about-list li {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: var(--muted);
}
.about-list li::before {
    content: '✓';
    color: var(--green);
    font-family: var(--mono);
    font-size: 12px;
}

.about-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    font-family: var(--mono);
    font-size: 12px;
}
.about-card-header {
    background: var(--surface);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    color: var(--muted);
    display: flex; align-items: center; gap: 6px;
}
.about-card-body { padding: 20px 24px; line-height: 1.9; }
.ac-line { display: block; }

/* ── CONTACT ── */

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

.contact-info h3 {
    font-size: 20px; margin-bottom: 12px;
}
.contact-info p { color: var(--muted); font-size: 14px; line-height: 1.75; margin-bottom: 28px; }

.contact-detail {
    display: flex; flex-direction: column; gap: 12px;
    margin-top: 8px;
}
.cd-item {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-size: 12px;
    color: var(--muted);
}
.cd-key   { color: var(--accent2); }
.cd-eq    { color: var(--border); }
.cd-value { color: var(--c-str, #ce9178); color: #ce9178; }

.contact-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
}

.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-family: var(--mono); font-size: 11px;
    color: var(--accent2); margin-bottom: 6px;
    letter-spacing: .06em;
}
.form-input, .form-textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--mono); font-size: 13px;
    padding: 10px 14px;
    border-radius: 4px;
    outline: none;
    transition: border-color .2s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-submit {
    width: 100%;
    background: var(--accent); color: #fff;
    border: none; padding: 12px;
    font-family: var(--mono); font-size: 13px;
    border-radius: 4px; cursor: pointer;
    transition: background .2s;
}
.form-submit:hover { background: var(--accent2); }
.form-submit:disabled { opacity: .6; cursor: not-allowed; }

.form-success {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 16px;
    padding: 48px 24px; text-align: center;
}
.form-success span {
    font-size: 32px; color: var(--green);
    font-family: var(--mono);
}
.form-success p {
    color: var(--muted); font-size: 14px; line-height: 1.7;
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--border);
    padding: 28px 6vw;
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--mono); font-size: 11px;
    color: var(--accent);
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ── COOKIE BANNER ── */
#cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 500;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 20px 6vw;
    transform: translateY(100%);
    transition: transform .35s ease;
}
#cookie-banner.visible { transform: translateY(0); }

.cookie-content {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center;
    justify-content: space-between; gap: 32px;
}
.cookie-label {
    font-family: var(--mono); font-size: 11px;
    color: var(--accent2); display: block; margin-bottom: 4px;
}
.cookie-text p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.cookie-text a { color: var(--accent2); text-decoration: none; }
.cookie-text a:hover { color: var(--text); }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
    font-family: var(--mono); font-size: 12px;
    padding: 8px 18px; border-radius: 4px;
    cursor: pointer; transition: all .2s; white-space: nowrap;
}
.cookie-btn.secondary {
    background: transparent; color: var(--muted);
    border: 1px solid var(--border);
}
.cookie-btn.secondary:hover { border-color: var(--accent); color: var(--text); }
.cookie-btn.primary { background: var(--accent); color: #fff; border: none; }
.cookie-btn.primary:hover { background: var(--accent2); }

/* ── LEGAL PAGES ── */
.legal-content { max-width: 720px; }
.legal-content h3 {
    font-family: var(--mono); font-size: 14px; color: var(--text);
    margin-top: 40px; margin-bottom: 8px;
}
.legal-content h3:first-child { margin-top: 0; }
.legal-content p, .legal-content li {
    color: var(--muted); font-size: 14px; line-height: 1.85;
}
.legal-content p { margin-bottom: 12px; }
.legal-content ul { list-style: none; padding: 0; margin-bottom: 12px; }
.legal-content ul li { display: flex; gap: 10px; }
.legal-content ul li::before { content: '—'; color: var(--border); flex-shrink: 0; }
.legal-content a { color: var(--accent2); text-decoration: none; }
.legal-content a:hover { color: var(--text); }
.legal-block {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 8px; padding: 20px 24px; margin: 12px 0 20px;
    font-family: var(--mono); font-size: 12px; line-height: 1.9;
    color: var(--muted);
}

/* ── FADE IN ── */
.reveal {
    opacity: 0; transform: translateY(24px);
    transition: opacity .55s ease, transform .55s ease;
}
.reveal.show { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .hero-layout, .about-layout, .contact-layout { grid-template-columns: 1fr; }
    .hero-code { display: none; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    nav { height: 72px; }
    .nav-logo-img { height: 52px; }
    main { padding-top: 72px; }
    section { padding: 64px 5vw; }

    /* Mobile menu: hidden by default, shown when .open is toggled via JS */
    .nav-links {
        display: none;
        position: fixed;
        top: 72px; left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 8px 0;
        z-index: 99;
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; padding: 14px 6vw; font-size: 14px; }
    .nav-cta { border-radius: 0; padding: 14px 6vw; }

    .nav-toggle { display: block; }
    .services-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    #hero { min-height: auto; padding-top: 48px; padding-bottom: 48px; }
    h2 { margin-bottom: 32px; }
    footer { flex-direction: column; gap: 8px; text-align: center; }
    .cookie-content { flex-direction: column; gap: 16px; }
    .cookie-actions { width: 100%; }
    .cookie-btn { flex: 1; text-align: center; }
}
