:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #64748b;
    --line: #e2e8f0;
    --accent: #0ea5e9;
    --accent-light: #38bdf8;
    --dark: #1f2937;
    --radius: 22px;
    --max: 1240px;
}

/* --------------------------------------------------
   LEGAL MODALS
-------------------------------------------------- */

.site-modal {
    width: min(90vw, 560px);
    max-height: 80vh;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
}

.site-modal::backdrop {
    background: rgba(15, 15, 15, .55);
    backdrop-filter: blur(3px);
}

.site-modal-inner {
    position: relative;
    max-height: 80vh;
    padding: 44px;
    overflow-y: auto;
}

.site-modal h2 {
    font-size: 28px;
    letter-spacing: -.03em;
    margin-bottom: 22px;
    max-width: 90%;
}

.site-modal h3 {
    font-size: 14px;
    margin: 26px 0 8px;
}

.site-modal h3:first-of-type {
    margin-top: 0;
}

.site-modal p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 4px;
}

.site-modal-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);

    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 650px) {
    .site-modal-inner {
        padding: 30px 24px;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea {
    font: inherit;
}

.container {
    width: min(calc(100% - 48px), var(--max));
    margin: 0 auto;
}

/* --------------------------------------------------
   NAVIGATION
-------------------------------------------------- */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 245, 242, .88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid transparent;
}

nav {
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 750;
    letter-spacing: -.04em;
    font-size: 20px;
}

.logo-dot {
    width: 13px;
    height: 13px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 14px;
    font-weight: 550;
}

.nav-links a {
    color: #444;
    transition: color .2s ease;
}

.nav-links a:hover {
    color: #000;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 14px 20px;
    border-radius: 100px;
    border: 1px solid var(--dark);

    font-weight: 650;
    font-size: 14px;

    transition:
        transform .2s ease,
        background .2s ease,
        color .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-dark {
    background: var(--dark);
    color: #fff;
}

.button-dark:hover {
    background: #292929;
}

.button-light {
    background: transparent;
}

.button-light:hover {
    background: #fff;
}

.button-accent {
    background: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}

/* --------------------------------------------------
   HERO
-------------------------------------------------- */

.hero {
    min-height: calc(100vh - 82px);
    display: flex;
    align-items: center;
    padding: 64px 0 84px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 70px;
    align-items: center;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;

    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.eyebrow::before {
    content: "";
    width: 30px;
    height: 2px;
    background: var(--text);
}

h1 {
    font-size: clamp(62px, 7vw, 108px);
    line-height: .91;
    letter-spacing: -.075em;
    font-weight: 760;
    max-width: 900px;
}

.hero-highlight {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.hero-highlight::after {
    content: "";
    position: absolute;
    left: -2%;
    right: -4%;
    bottom: 7%;
    height: 22%;
    background: var(--accent);
    z-index: -1;
    transform: rotate(-1deg);
}

.hero-description {
    max-width: 620px;
    margin-top: 38px;

    color: var(--muted);
    font-size: 19px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 36px;
}

.credential-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;

    padding: 9px 18px 9px 9px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: var(--surface);

    font-size: 13px;
    font-weight: 600;
}

.credential-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;

    background: var(--accent);
    border-radius: 50%;

    font-size: 11px;
    color: var(--dark);
}

/* terminal */

.terminal {
    background: #111;
    color: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 35px 70px rgba(0, 0, 0, .15);
    transform: rotate(2deg);
    transition: transform .35s ease;
}

.terminal:hover {
    transform: rotate(0deg) translateY(-6px);
}

.terminal-top {
    height: 48px;
    border-bottom: 1px solid #2b2b2b;
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 7px;
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #444;
}

.terminal-title {
    margin-left: 10px;
    color: #777;
    font-size: 11px;
    font-family: monospace;
}

.terminal-body {
    padding: 32px;
    min-height: 390px;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 13px;
    line-height: 2;
}

.terminal-muted {
    color: #737373;
}

.terminal-green {
    color: var(--accent-light);
}

.terminal-white {
    color: #eee;
}

.cursor {
    display: inline-block;
    width: 7px;
    height: 15px;
    vertical-align: middle;
    background: var(--accent-light);
    animation: blink 1s steps(1) infinite;
}

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

/* --------------------------------------------------
   GENERAL SECTIONS
-------------------------------------------------- */

section {
    padding: 96px 0;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 60px;
}

.section-number {
    display: block;
    margin-bottom: 14px;
    color: #8a8a84;
    font-family: monospace;
    font-size: 12px;
}

h2 {
    font-size: clamp(44px, 5vw, 72px);
    line-height: .98;
    letter-spacing: -.055em;
}

.section-description {
    max-width: 420px;
    color: var(--muted);
    font-size: 16px;
}

/* --------------------------------------------------
   SERVICES
-------------------------------------------------- */

.services {
    background: #fff;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
}

.service {
    padding: 40px 36px 45px 0;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--line);
}

.service + .service {
    border-left: 1px solid var(--line);
    padding-left: 36px;
}

.service-index {
    color: #999;
    font-family: monospace;
    font-size: 12px;
    margin-bottom: 60px;
}

.service h3 {
    font-size: 29px;
    letter-spacing: -.04em;
    margin-bottom: 18px;
}

.service p {
    color: var(--muted);
    max-width: 320px;
    font-size: 15px;
    line-height: 1.7;
}

.service-arrow {
    margin-top: auto;
    font-size: 23px;
}

/* --------------------------------------------------
   PROBLEMS
-------------------------------------------------- */

.problems {
    background: var(--dark);
    color: #fff;
}

.problems h2 {
    max-width: 800px;
}

.problem-list {
    margin-top: 70px;
    border-top: 1px solid #333;
}

.problem {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 20px;

    padding: 27px 0;
    border-bottom: 1px solid #333;

    font-size: clamp(19px, 2vw, 27px);
    letter-spacing: -.025em;

    transition: padding .2s ease;
}

.problem:hover {
    padding-left: 12px;
}

.problem-number {
    font-family: monospace;
    color: #666;
    font-size: 11px;
}

.problem-arrow {
    color: var(--accent-light);
}

.solution {
    display: flex;
    justify-content: flex-end;
    margin-top: 50px;
}

.solution-box {
    width: min(100%, 550px);
    padding: 30px;
    background: var(--accent);
    color: var(--dark);
    border-radius: 18px;

    font-size: 22px;
    font-weight: 650;
    letter-spacing: -.03em;
}

/* --------------------------------------------------
   PROJECTS
-------------------------------------------------- */

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.project {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 520px;
    display: flex;
    flex-direction: column;
}

.project-visual {
    height: 270px;
    background: #e8e8e4;
    padding: 35px;
    position: relative;
    overflow: hidden;
}

.project-visual.dark {
    background: #171717;
    color: #fff;
}

.fake-window {
    width: 80%;
    height: 190px;
    position: absolute;
    right: -25px;
    bottom: -25px;

    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 15px 40px rgba(0,0,0,.12);
}

.dark .fake-window {
    background: #252525;
}

.fake-window-bar {
    height: 32px;
    border-bottom: 1px solid #ddd;
}

.dark .fake-window-bar {
    border-color: #3a3a3a;
}

.fake-lines {
    padding: 20px;
}

.fake-line {
    height: 8px;
    background: #ddd;
    margin-bottom: 12px;
    border-radius: 5px;
}

.dark .fake-line {
    background: #3a3a3a;
}

.fake-line:nth-child(1) { width: 65%; }
.fake-line:nth-child(2) { width: 85%; }
.fake-line:nth-child(3) { width: 45%; }

.project-body {
    padding: 35px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-type {
    color: var(--muted);
    font-family: monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.project h3 {
    font-size: 32px;
    letter-spacing: -.045em;
    margin: 13px 0;
}

.project p {
    color: var(--muted);
    line-height: 1.65;
    max-width: 520px;
}

.tags {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 25px;
}

.tag {
    padding: 7px 11px;
    border: 1px solid #ddd;
    border-radius: 100px;
    font-family: monospace;
    font-size: 10px;
}

/* --------------------------------------------------
   STACK
-------------------------------------------------- */

.stack {
    background: #e9e9e5;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #ccc;
    border: 1px solid #ccc;
}

.stack-item {
    background: var(--bg);
    padding: 32px;
    min-height: 210px;
}

.stack-item h3 {
    font-size: 15px;
    margin-bottom: 30px;
}

.stack-item p {
    color: var(--muted);
    line-height: 2;
    font-family: monospace;
    font-size: 12px;
}

/* --------------------------------------------------
   ABOUT
-------------------------------------------------- */

.about-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 100px;
    align-items: center;
}

.portrait {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius);
}

.about h2 {
    margin-bottom: 30px;
}

.about-lead {
    font-size: clamp(23px, 3vw, 36px);
    line-height: 1.3;
    letter-spacing: -.035em;
    max-width: 720px;
}

.about-copy {
    margin-top: 30px;
    max-width: 650px;
    color: var(--muted);
    line-height: 1.75;
}

.about-values {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 45px;
    padding-top: 25px;
    border-top: 1px solid var(--line);
}

.about-value strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.about-value span {
    color: var(--muted);
    font-size: 12px;
}

.about-more {
    margin-top: 28px;
}

.about-more summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 14px 22px;
    border: 1px solid var(--line);
    border-radius: 100px;

    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.about-more summary::-webkit-details-marker {
    display: none;
}

.about-more-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg);

    font-size: 14px;
    transition: transform .2s ease;
}

.about-more[open] .about-more-icon {
    transform: rotate(45deg);
}

.about-more-content {
    padding: 8px 22px 4px;
}

.about-more-content h4 {
    margin: 22px 0 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.about-more-content h4:first-child {
    margin-top: 0;
}

.about-more-content p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
}

/* --------------------------------------------------
   PROCESS
-------------------------------------------------- */

.process {
    padding-top: 20px;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.process-step {
    border-top: 2px solid var(--dark);
    padding: 25px 30px 30px 0;
    position: relative;
}

.process-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: 20px;
    top: 18px;
    color: #999;
}

.process-step span {
    font-family: monospace;
    color: #999;
    font-size: 11px;
}

.process-step h3 {
    font-size: 21px;
    margin: 25px 0 10px;
}

.process-step p {
    color: var(--muted);
    font-size: 13px;
    max-width: 220px;
}

/* --------------------------------------------------
   TESTIMONIALS
-------------------------------------------------- */

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.testimonial {
    display: flex;
    flex-direction: column;
    gap: 28px;

    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.testimonial-quote {
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -.01em;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.testimonial-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);

    font-size: 12px;
    font-weight: 700;
    color: var(--dark);
}

.testimonial-author strong {
    display: block;
    font-size: 14px;
}

.testimonial-author span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.testimonial-empty {
    grid-column: 1 / -1;

    max-width: 560px;
    margin: 0 auto;
    padding: 60px 44px;
    text-align: center;

    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.testimonial-empty-icon {
    display: inline-block;
    font-size: 32px;
    margin-bottom: 18px;
}

.testimonial-empty h3 {
    font-size: 24px;
    letter-spacing: -.03em;
    margin-bottom: 14px;
}

.testimonial-empty p {
    max-width: 420px;
    margin: 0 auto 28px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

/* --------------------------------------------------
   CTA
-------------------------------------------------- */

.cta {
    padding: 0 0 30px;
}

.cta-box {
    background: var(--accent);
    border-radius: 30px;
    padding: 64px;
    position: relative;
    overflow: hidden;
}

.cta-box::after {
    content: "</>";
    position: absolute;
    right: 50px;
    bottom: -65px;

    font-family: monospace;
    font-size: 230px;
    font-weight: 900;
    opacity: .07;
    letter-spacing: -.15em;
}

.cta h2 {
    max-width: 800px;
    font-size: clamp(50px, 6vw, 85px);
}

.cta p {
    max-width: 520px;
    margin: 25px 0 35px;
    font-size: 17px;
}

/* --------------------------------------------------
   CONTACT FORM
-------------------------------------------------- */

.contact-form {
    position: relative;
    max-width: 480px;
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-form .form-row {
    display: flex;
    gap: 10px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid var(--dark);
    border-radius: 14px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    resize: none;
    transition: box-shadow .2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, .15);
}

.contact-form button {
    align-self: flex-start;
    margin-top: 4px;
    cursor: pointer;
}

.contact-form-note {
    margin-top: 10px;
    font-size: 12px;
    color: #1a1a1a;
    opacity: 0;
    transition: opacity .2s ease;
}

.contact-form-note.visible {
    opacity: .8;
}

.contact-form-note.error {
    color: #7f1d1d;
}

.contact-form-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */

footer {
    padding: 45px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    color: var(--muted);
    font-size: 12px;
}

.footer-links {
    display: flex;
    gap: 25px;
}

/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */

@media (max-width: 950px) {

    .nav-links {
        display: none;
    }

    .hero {
        min-height: auto;
    }

    .hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .terminal {
        max-width: 600px;
        transform: none;
    }

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

    .service + .service {
        border-left: none;
        padding-left: 0;
    }

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

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

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

    .process-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .about-grid {
        gap: 50px;
    }

    .portrait {
        max-width: 450px;
    }
}

@media (max-width: 650px) {

    .container {
        width: min(calc(100% - 30px), var(--max));
    }

    nav {
        height: 70px;
    }

    nav > .button {
        display: none;
    }

    .hero {
        padding: 65px 0 80px;
    }

    h1 {
        font-size: clamp(54px, 17vw, 80px);
    }

    section {
        padding: 80px 0;
    }

    .section-header {
        display: block;
    }

    .section-description {
        margin-top: 25px;
    }

    .stack-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }

    .problem {
        grid-template-columns: 35px 1fr auto;
        font-size: 18px;
    }

    .terminal-body {
        padding: 23px;
        min-height: 330px;
        font-size: 11px;
    }

    .cta-box {
        padding: 50px 28px;
        border-radius: 20px;
    }

    .cta-box::after {
        display: none;
    }

    .contact-form .form-row {
        flex-direction: column;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
