:root {
    --bg-paper: #fdfbf7;
    --bg-card: #fffdf9;
    --bg-note: #fff9c4;
    --bg-muted: #e5e0d8;
    --ink: #2d2d2d;
    --muted-ink: #6b6259;
    --accent: #ff4d4d;
    --accent-blue: #2d5da1;
    --border: #2d2d2d;
    --shadow: 4px 4px 0 0 #2d2d2d;
    --shadow-lg: 8px 8px 0 0 #2d2d2d;
    --wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
    --wobble-md: 28px 18px 24px 20px / 18px 26px 20px 24px;
    --wobble-sm: 20px 14px 18px 12px / 14px 18px 12px 16px;
    --max-width: 1120px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-paper);
    background-image: radial-gradient(#e5e0d8 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--ink);
    font-family: "Patrick Hand", cursive;
    line-height: 1.55;
    margin: 0;
    overflow-x: hidden;
}

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

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

.container {
    margin: 0 auto;
    max-width: var(--max-width);
    padding: 0 1.25rem;
}

.page-shell {
    margin-top: 0;
    position: relative;
    padding-top: 0;
}

.scribble {
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.scribble-top {
    left: 2rem;
    top: 7rem;
}

.scribble-right {
    right: 1rem;
    top: 18rem;
}

.page-shell > :not(.scribble) {
    position: relative;
    z-index: 1;
}

.site-header {
    margin-top: 0;
    padding: 0.65rem 0 0;
    position: sticky;
    top: 0;
    z-index: 70;
}

.nav-card {
    align-items: center;
    background: rgba(255, 253, 249, 0.92);
    backdrop-filter: blur(8px);
    border: 3px solid var(--border);
    border-radius: var(--wobble-md);
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    position: relative;
    z-index: 50;
    margin-top: 0;
}

.brand {
    align-items: center;
    display: flex;
    gap: 0.9rem;
}

.brand-mark {
    align-items: center;
    background: var(--bg-note);
    border: 3px solid var(--border);
    border-radius: 21px 15px 24px 11px / 17px 20px 13px 24px;
    box-shadow: 3px 3px 0 0 #2d2d2d;
    display: flex;
    font-size: 1.35rem;
    height: 3rem;
    justify-content: center;
    transform: rotate(-4deg);
    width: 3rem;
}

.brand-text strong {
    display: block;
    font-family: "Kalam", cursive;
    font-size: 1.25rem;
    line-height: 1.1;
}

.brand-text span {
    color: var(--muted-ink);
    display: block;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-toggle {
    align-items: center;
    background: #fff;
    border: 3px solid var(--border);
    border-radius: var(--wobble-sm);
    box-shadow: 3px 3px 0 0 #2d2d2d;
    color: var(--ink);
    display: none;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.nav-links {
    align-items: center;
    display: flex;
    gap: 1rem;
}

.nav-links a {
    font-size: 1.15rem;
    position: relative;
}

.nav-links a::after {
    background: var(--accent);
    bottom: -0.2rem;
    content: "";
    height: 3px;
    left: 0;
    opacity: 0;
    position: absolute;
    transform: scaleX(0.6) rotate(-1deg);
    transform-origin: left;
    transition: 0.15s ease;
    width: 100%;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    opacity: 1;
    transform: scaleX(1) rotate(-1deg);
}

.btn {
    align-items: center;
    background: #fff;
    border: 3px solid var(--border);
    border-radius: var(--wobble);
    box-shadow: var(--shadow);
    display: inline-flex;
    gap: 0.55rem;
    justify-content: center;
    min-height: 3rem;
    padding: 0.85rem 1.2rem;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease, color 0.1s ease;
}

.btn:hover {
    box-shadow: 2px 2px 0 0 #2d2d2d;
    transform: translate(2px, 2px) rotate(1deg);
}

.btn:active {
    box-shadow: 0 0 0 0 #2d2d2d;
    transform: translate(4px, 4px);
}

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

.btn-secondary {
    background: var(--bg-muted);
}

.btn-secondary:hover {
    background: var(--accent-blue);
    color: #fff;
}

.btn-ghost {
    background: #fff;
}

.hero {
    padding: 1rem 0 2rem;
}

.hero-grid {
    align-items: center;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1.1fr 0.9fr;
}

.sticky-tag {
    background: var(--bg-note);
    border: 3px solid var(--border);
    border-radius: 18px 14px 20px 12px / 12px 18px 14px 22px;
    box-shadow: 3px 3px 0 0 #2d2d2d;
    display: inline-block;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    padding: 0.35rem 0.9rem;
    transform: rotate(-3deg);
}

.hero-copy h1,
.section-heading h2,
.card-title,
.page-title,
.footer-card h2,
.chat-panel h3 {
    font-family: "Kalam", cursive;
}

.hero-copy h1 {
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 1;
    margin-bottom: 1rem;
}

.hero-copy p {
    color: var(--muted-ink);
    font-size: 1.35rem;
    max-width: 38rem;
    margin-bottom: 1.5rem;
}

.marker {
    color: var(--accent);
    display: inline-block;
    transform: rotate(-2deg);
}

.marker-blue {
    color: var(--accent-blue);
    display: inline-block;
    transform: rotate(1deg);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-notes {
    color: var(--muted-ink);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-note {
    background: rgba(255, 255, 255, 0.7);
    border: 2px dashed var(--border);
    border-radius: var(--wobble-sm);
    padding: 0.5rem 0.9rem;
    transform: rotate(-1deg);
}

.hero-panel {
    background: #fff;
    border: 3px solid var(--border);
    border-radius: 34px 20px 38px 18px / 20px 34px 18px 34px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    transform: rotate(2deg);
}

.hero-panel::before,
.hero-panel::after {
    border: 3px dashed var(--border);
    content: "";
    height: 40px;
    position: absolute;
    width: 40px;
}

.hero-panel::before {
    border-bottom: 0;
    border-right: 0;
    left: 1rem;
    top: 1rem;
}

.hero-panel::after {
    border-left: 0;
    border-top: 0;
    bottom: 1rem;
    right: 1rem;
}

.hero-panel img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: top;
    width: 100%;
}

.panel-note {
    background: var(--bg-note);
    border: 3px solid var(--border);
    border-radius: var(--wobble-sm);
    box-shadow: 3px 3px 0 0 #2d2d2d;
    max-width: 14rem;
    padding: 0.8rem 1rem;
    position: absolute;
    right: -1rem;
    top: -1rem;
    transform: rotate(-7deg);
}

.section {
    padding: 4.5rem 0;
}

.section-heading {
    margin-bottom: 2rem;
    max-width: 42rem;
}

.section-heading h2,
.page-title {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.05;
    margin-bottom: 0.75rem;
}

.section-heading p,
.page-intro {
    color: var(--muted-ink);
    font-size: 1.2rem;
}

.grid-two,
.grid-three {
    display: grid;
    gap: 1.4rem;
}

.grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.speech,
.page-hero-card,
.footer-card,
.faq-item,
.chat-panel {
    background: var(--bg-card);
    border: 3px solid var(--border);
    box-shadow: var(--shadow);
}

.card {
    border-radius: var(--wobble-md);
    padding: 1.5rem;
    position: relative;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.card:hover {
    transform: rotate(1deg) translateY(-2px);
}

.card-note::before {
    background: rgba(148, 148, 148, 0.28);
    content: "";
    height: 18px;
    left: 50%;
    position: absolute;
    top: -10px;
    transform: translateX(-50%) rotate(-4deg);
    width: 86px;
}

.card-pin::before {
    background: var(--accent);
    border: 3px solid var(--border);
    border-radius: 999px;
    content: "";
    height: 16px;
    left: 50%;
    position: absolute;
    top: -9px;
    transform: translateX(-50%);
    width: 16px;
}

.card-yellow {
    background: var(--bg-note);
}

.card h3,
.card h4,
.card-title {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

.eyebrow {
    background: #fff;
    border: 2px dashed var(--border);
    border-radius: var(--wobble-sm);
    display: inline-block;
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
    padding: 0.2rem 0.65rem;
    transform: rotate(-2deg);
}

.contact-list,
.check-list {
    display: grid;
    gap: 0.75rem;
    list-style: none;
}

.check-list li,
.contact-list li {
    align-items: flex-start;
    display: flex;
    gap: 0.7rem;
}

.check-list i,
.contact-list i {
    color: var(--accent-blue);
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.project-frame {
    background: #fff;
    border: 3px solid var(--border);
    border-radius: 28px 18px 26px 20px / 16px 28px 18px 30px;
    overflow: hidden;
    position: relative;
    transform: rotate(-1deg);
}

.project-frame img {
    aspect-ratio: 16 / 10;
    cursor: zoom-in;
    object-fit: cover;
    object-position: top;
    width: 100%;
}

.project-topline {
    align-items: center;
    background: var(--bg-muted);
    border-bottom: 3px solid var(--border);
    display: flex;
    gap: 0.35rem;
    padding: 0.75rem 0.9rem;
}

.dot {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 999px;
    display: inline-block;
    height: 0.8rem;
    width: 0.8rem;
}

.badge {
    align-self: flex-start;
    border: 2px solid var(--border);
    border-radius: var(--wobble-sm);
    display: inline-block;
    font-size: 0.95rem;
    padding: 0.2rem 0.7rem;
}

.badge-business {
    background: #fff;
}

.badge-student {
    background: var(--bg-note);
}

.badge-code {
    background: #dce8ff;
}

.speech {
    border-radius: 24px 19px 27px 18px / 16px 26px 18px 28px;
    padding: 1.5rem;
    position: relative;
}

.speech::after {
    border-left: 18px solid transparent;
    border-right: 3px solid transparent;
    border-top: 18px solid var(--border);
    bottom: -18px;
    content: "";
    left: 2rem;
    position: absolute;
}

.speech::before {
    border-left: 15px solid transparent;
    border-right: 2px solid transparent;
    border-top: 15px solid #fff;
    bottom: -13px;
    content: "";
    left: 2.15rem;
    position: absolute;
    z-index: 1;
}

.quote-meta {
    align-items: center;
    display: flex;
    gap: 0.9rem;
    margin-bottom: 0.9rem;
}

.avatar {
    align-items: center;
    background: var(--bg-note);
    border: 3px solid var(--border);
    border-radius: 22px 18px 23px 14px / 16px 22px 14px 23px;
    display: flex;
    font-family: "Kalam", cursive;
    font-size: 1.15rem;
    height: 3rem;
    justify-content: center;
    transform: rotate(-5deg);
    width: 3rem;
}

.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
    align-items: center;
    background: #fff;
    border: 3px solid var(--border);
    border-radius: 36px 20px 28px 18px / 20px 28px 22px 34px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 9rem;
    padding: 1rem;
    text-align: center;
}

.stat strong {
    display: block;
    font-family: "Kalam", cursive;
    font-size: 2rem;
}

.contact-grid {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr 1fr;
}

.form-group {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 1.05rem;
}

.form-group textarea,
.form-group select,
.form-group input {
    background: #fff;
    border: 3px solid var(--border);
    border-radius: 22px 15px 24px 14px / 14px 25px 16px 22px;
    color: var(--ink);
    min-height: 3.25rem;
    padding: 0.8rem 1rem;
    width: 100%;
}

.form-group textarea {
    min-height: 8rem;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(45, 93, 161, 0.18);
    outline: none;
}

.helper,
.seo-note,
.page-intro,
.section-heading p {
    color: var(--muted-ink);
}

.page-hero {
    padding: 3rem 0 1.5rem;
}

.page-hero-card {
    border-radius: 40px 22px 34px 18px / 20px 36px 18px 38px;
    padding: 2rem;
    transform: rotate(-1deg);
}

.faq-list {
    display: grid;
    gap: 1rem;
}

.faq-item {
    border-radius: var(--wobble-md);
    overflow: hidden;
}

.faq-trigger {
    align-items: center;
    display: flex;
    font-size: 1.25rem;
    justify-content: space-between;
    padding: 1.15rem 1.25rem;
    text-align: left;
    width: 100%;
}

.faq-trigger i {
    transition: transform 0.12s ease;
}

.faq-item.active .faq-trigger i {
    transform: rotate(180deg);
}

.faq-panel {
    color: var(--muted-ink);
    display: none;
    padding: 0 1.25rem 1.25rem;
}

.faq-item.active .faq-panel {
    display: block;
}

.faq-panel ul {
    margin-left: 1.2rem;
}

.footer-support {
    margin-top: 1.1rem;
}

.floating-actions {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
}

.fab {
    align-items: center;
    background: #fff;
    border: 3px solid var(--border);
    border-radius: var(--wobble-sm);
    box-shadow: var(--shadow);
    display: inline-flex;
    gap: 0.55rem;
    height: auto;
    justify-content: center;
    min-height: 3rem;
    padding: 0.8rem 1rem;
    position: relative;
    width: auto;
}

.floating-actions .fab:first-child {
    justify-self: start;
}

.floating-actions .fab:last-child {
    justify-self: end;
}

.fab-whatsapp {
    background: #d7ffd7;
}

.fab i {
    font-size: 1.15rem;
}

.chat-panel {
    border-radius: 26px 18px 28px 16px / 18px 24px 18px 28px;
    display: none;
    margin-top: 0.9rem;
    max-width: 24rem;
    padding: 1rem;
    position: static;
    width: 100%;
    z-index: auto;
}

.chat-panel.open {
    display: block;
}

.chat-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.chat-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.chat-close {
    align-items: center;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 999px;
    box-shadow: 2px 2px 0 0 #2d2d2d;
    display: inline-flex;
    font-size: 1rem;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.chat-body {
    display: grid;
    gap: 0.75rem;
}

.bot-msg {
    background: var(--bg-muted);
    border: 2px dashed var(--border);
    border-radius: var(--wobble-sm);
    padding: 0.8rem 0.9rem;
}

.chat-response {
    background: #fff;
    border: 2px solid var(--border);
}

.chat-btn {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--wobble-sm);
    padding: 0.7rem 0.9rem;
    text-align: left;
    width: 100%;
}

.site-footer {
    padding: 1rem 0 3rem;
}

.footer-card {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    border-radius: 34px 20px 32px 18px / 18px 32px 18px 30px;
    padding: 1.35rem 1.5rem;
}

.footer-card h2 {
    font-size: 2rem;
}

.footer-simple-top {
    align-items: start;
    display: grid;
    gap: 1rem 1.5rem;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.footer-simple-top p {
    color: var(--muted-ink);
}

.footer-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
}

.footer-brand p,
.footer-section p,
.footer-credit {
    color: var(--muted-ink);
}

.footer-section h3,
.footer-brand h2 {
    margin-bottom: 0.65rem;
}

.footer-list {
    display: grid;
    gap: 0.55rem;
    list-style: none;
}

.footer-list li {
    color: var(--muted-ink);
}

.footer-contact {
    display: grid;
    gap: 0.7rem;
}

.footer-contact a,
.footer-links a,
.footer-credit a {
    text-decoration: none;
}

.footer-bottom {
    border-top: 2px dashed rgba(45, 45, 45, 0.35);
    display: grid;
    gap: 0.75rem 1.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    width: 100%;
}

.footer-bottom .footer-credit {
    white-space: nowrap;
}

.footer-credit a {
    color: var(--accent-blue);
    font-weight: 700;
}

.footer-bottom .footer-credit:last-child {
    text-align: right;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.footer-links a:hover {
    text-decoration: line-through;
}

.center {
    text-align: center;
}

.lightbox {
    background: rgba(45, 45, 45, 0.92);
    inset: 0;
    position: fixed;
    z-index: 80;
}

.lightbox img {
    left: 50%;
    max-height: 80vh;
    max-width: 90vw;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
}

.close-lightbox {
    color: #fff;
    font-size: 2rem;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

@media (max-width: 900px) {
    .hero-grid,
    .contact-grid,
    .footer-card,
    .footer-grid,
    .grid-two,
    .grid-three,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        align-items: flex-start;
        background: #fff;
        border: 3px solid var(--border);
        border-radius: var(--wobble-md);
        box-shadow: none;
        display: none;
        margin-top: 0.75rem;
        padding: 1rem;
        position: static;
        width: 100%;
    }

    .nav-card.menu-open .nav-links {
        display: grid;
    }

    .nav-card {
        align-items: flex-start;
        flex-wrap: wrap;
        position: relative;
    }

    .hero-panel,
    .page-hero-card {
        transform: none;
    }

    .hero {
        padding-top: 0.9rem;
    }

    .hero-copy h1 {
        font-size: clamp(2.3rem, 9vw, 3.8rem);
    }

    .hero-copy p {
        font-size: 1.15rem;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .project-card,
    .card,
    .speech,
    .page-hero-card,
    .footer-card {
        transform: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-simple-top {
        grid-template-columns: 1fr;
    }

    .chat-panel {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 0.9rem;
    }

    .site-header {
        padding-top: 0.25rem;
    }

    .nav-card {
        border-radius: 0 0 24px 24px / 0 0 18px 18px;
        left: 0;
        right: 0;
        padding: 0.8rem 0.9rem;
        width: 100%;
    }

    .brand {
        gap: 0.65rem;
    }

    .brand-mark {
        height: 2.7rem;
        width: 2.7rem;
    }

    .brand-text strong {
        font-size: 1.05rem;
    }

    .brand-text span {
        font-size: 0.78rem;
    }

    .hero {
        padding-top: 0.65rem;
    }

    .hero-copy p,
    .section-heading p,
    .page-intro {
        font-size: 1.1rem;
    }

    .hero-copy h1,
    .section-heading h2,
    .page-title {
        font-size: clamp(2.05rem, 10vw, 3rem);
        line-height: 0.98;
    }

    .section {
        padding: 3.2rem 0;
    }

    .sticky-tag {
        font-size: 0.92rem;
        margin-bottom: 0.9rem;
    }

    .hero-actions,
    .floating-actions {
        gap: 0.65rem;
    }

    .btn,
    .fab {
        width: 100%;
    }

    .floating-actions {
        grid-template-columns: 1fr;
    }

    .floating-actions .fab:first-child,
    .floating-actions .fab:last-child {
        justify-self: stretch;
    }

    .chat-panel {
        max-width: none;
    }

    .contact-grid .card,
    .grid-two .card,
    .grid-three .card,
    .grid-two .speech,
    .grid-three .speech {
        min-width: 0;
    }

    .project-frame img {
        aspect-ratio: 16 / 11;
    }

    .footer-links {
        gap: 0.5rem 0.8rem;
    }

    .footer-bottom {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .footer-bottom .footer-credit:last-child {
        text-align: left;
    }

    .panel-note,
    .scribble {
        display: none;
    }
}
