:root {
    --paper: #fff9ef;
    --paper-soft: #fffdf8;
    --ink: #16201f;
    --muted: #66716f;
    --line: #ded7ca;
    --coral: #ff6b5f;
    --mint: #4cbf9d;
    --blue: #4666ff;
    --yellow: #ffd45a;
    --black: #101414;
    --shadow: 0 18px 50px rgba(22, 32, 31, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Inter", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    background:
        linear-gradient(rgba(22, 32, 31, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 32, 31, 0.04) 1px, transparent 1px),
        var(--paper);
    background-size: 28px 28px;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(255, 107, 95, 0.12), transparent 28%),
        linear-gradient(300deg, rgba(76, 191, 157, 0.12), transparent 30%),
        linear-gradient(0deg, rgba(255, 212, 90, 0.1), transparent 40%);
    z-index: -1;
}

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

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

button {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 0;
    padding: 12px;
    border: 1px solid rgba(22, 32, 31, 0.1);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.9);
    box-shadow: 0 12px 32px rgba(22, 32, 31, 0.08);
    backdrop-filter: blur(18px);
    animation: dropIn 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--paper-soft);
    font-family: "Space Grotesk", Arial, sans-serif;
    font-weight: 700;
    background: var(--black);
    border: 3px solid var(--ink);
    border-radius: 8px;
    box-shadow: 4px 4px 0 var(--yellow);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    line-height: 1.1;
}

.brand small {
    color: var(--muted);
    font-size: 0.78rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a,
.btn,
.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 8px;
}

.site-nav a {
    padding: 8px 12px;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.88rem;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--ink);
    background: #f2eadf;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--paper-soft);
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
    align-items: center;
    gap: 56px;
    min-height: calc(100vh - 94px);
    padding: 72px 0 54px;
}

.hero-copy {
    min-width: 0;
    animation: riseIn 750ms 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 8px;
    display: inline-block;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-radius: 8px;
    background: var(--yellow);
    vertical-align: middle;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: "Space Grotesk", Arial, sans-serif;
    line-height: 1.02;
    letter-spacing: 0;
}

h1 {
    max-width: 820px;
    font-size: clamp(3rem, 7vw, 5.8rem);
    overflow-wrap: break-word;
    text-wrap: balance;
}

h2 {
    max-width: 760px;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
}

h3 {
    font-size: 1.25rem;
}

.hero-text {
    max-width: min(720px, 100%);
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 1.14rem;
    overflow-wrap: anywhere;
}

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

.btn {
    min-width: 136px;
    padding: 12px 18px;
    border: 2px solid var(--ink);
    font-weight: 800;
}

.btn.primary {
    color: #fff;
    background: var(--ink);
    box-shadow: 5px 5px 0 var(--coral);
}

.btn.ghost {
    background: var(--paper-soft);
    box-shadow: 5px 5px 0 var(--mint);
}

.btn:hover,
.project-card:hover,
.contact-link:hover {
    transform: translate(-2px, -2px);
}

.quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.quick-stats span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 253, 248, 0.72);
}

.quick-stats strong {
    color: var(--ink);
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 1.35rem;
}

.hero-card {
    position: relative;
    display: grid;
    gap: 14px;
    min-width: 0;
    animation: riseIn 750ms 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.photo-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 3px solid var(--ink);
    border-radius: 8px;
    background: var(--yellow);
    box-shadow: 12px 12px 0 var(--ink);
    animation: softFloat 6s ease-in-out infinite;
}

.photo-frame::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-card,
.code-card,
.feature-tile,
.timeline-item,
.project-card,
.skill-board article,
.note-card,
.contact-section {
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--paper-soft);
    box-shadow: var(--shadow);
}

.status-card {
    position: absolute;
    top: 28px;
    left: -22px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 230px;
    padding: 10px 12px;
    font-size: 0.88rem;
    font-weight: 800;
    animation: smallFloat 4.6s ease-in-out infinite;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 5px rgba(76, 191, 157, 0.2);
}

.code-card {
    margin-left: 42px;
    padding: 14px;
    background: #101414;
    color: #e8fff6;
    animation: smallFloat 5.2s 350ms ease-in-out infinite;
}

.code-window {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.code-window i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--coral);
}

.code-window i:nth-child(2) {
    background: var(--yellow);
}

.code-window i:nth-child(3) {
    background: var(--mint);
}

pre {
    margin: 0;
    overflow: auto;
    font-size: 0.84rem;
    line-height: 1.55;
}

.section {
    padding: 72px 0;
}

.section-heading {
    margin-bottom: 28px;
}

.work-grid,
.project-grid,
.skill-board,
.journey-grid {
    display: grid;
    gap: 18px;
}

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

.feature-tile,
.timeline-item,
.skill-board article,
.note-card {
    padding: 24px;
}

.feature-tile {
    min-height: 240px;
}

.feature-tile svg,
.feature-tile i {
    width: 42px;
    height: 42px;
    margin-bottom: 28px;
    color: var(--ink);
}

.feature-tile p,
.timeline-item p,
.project-card p,
.note-card p,
.contact-section p {
    color: var(--muted);
}

.accent-coral {
    box-shadow: 8px 8px 0 var(--coral);
}

.accent-mint {
    box-shadow: 8px 8px 0 var(--mint);
}

.accent-ink {
    box-shadow: 8px 8px 0 var(--blue);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
    gap: 40px;
    align-items: start;
}

.timeline {
    display: grid;
    gap: 16px;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    top: 26px;
    left: -10px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--ink);
    background: var(--yellow);
    border-radius: 4px;
}

.timeline-date,
.project-card span,
.note-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

.project-card {
    min-height: 220px;
    padding: 22px;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card.highlight {
    grid-column: span 2;
    background: #16201f;
    color: #fffdf8;
    box-shadow: 8px 8px 0 var(--yellow);
}

.project-card.highlight p {
    color: rgba(255, 253, 248, 0.76);
}

.skills-section {
    border-top: 2px solid rgba(22, 32, 31, 0.08);
    border-bottom: 2px solid rgba(22, 32, 31, 0.08);
}

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

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tags span {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #f7efe4;
    font-size: 0.9rem;
    font-weight: 700;
}

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

.note-card {
    background:
        linear-gradient(90deg, rgba(22, 32, 31, 0.05) 1px, transparent 1px),
        var(--paper-soft);
    background-size: 18px 18px;
}

.note-card.wide {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 0.5fr 1fr 0.55fr;
    gap: 16px;
    align-items: center;
}

.contact-section {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
    gap: 28px;
    margin: 68px 0;
    padding: 30px;
    background: var(--ink);
    color: #fffdf8;
    box-shadow: 10px 10px 0 var(--coral);
}

.contact-section h2 {
    font-size: clamp(2rem, 4vw, 3.8rem);
}

.contact-section p,
.contact-section .eyebrow {
    color: rgba(255, 253, 248, 0.76);
}

.contact-actions {
    display: grid;
    gap: 12px;
}

.contact-link {
    justify-content: flex-start;
    width: 100%;
    min-height: 54px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 253, 248, 0.2);
    color: #fffdf8;
    background: rgba(255, 253, 248, 0.08);
    transition: transform 180ms ease, background 180ms ease;
}

.contact-link:hover {
    background: rgba(255, 253, 248, 0.14);
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card.reveal.is-visible:hover {
    transform: translate(-2px, -2px);
}

.feature-tile,
.timeline-item,
.project-card,
.skill-board article,
.note-card,
.contact-section,
.btn,
.contact-link {
    will-change: transform;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes softFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-0.4deg);
    }
    50% {
        transform: translateY(-10px) rotate(0.4deg);
    }
}

@keyframes smallFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 36px;
    color: var(--muted);
    font-weight: 700;
}

.site-footer a {
    color: var(--ink);
}

@media (max-width: 980px) {
    .site-header {
        align-items: flex-start;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: 0;
        display: none;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--paper-soft);
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: grid;
    }

    .site-nav a {
        justify-content: flex-start;
    }

    .hero,
    .split-section,
    .contact-section {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 34px;
        min-height: 0;
        padding-top: 56px;
    }

    .hero-card {
        max-width: 500px;
    }

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

    .journey-grid,
    .note-card.wide {
        grid-template-columns: 1fr;
    }

    .note-card.wide {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .site-header,
    main,
    .site-footer {
        width: calc(100% - 22px);
        max-width: 1180px;
    }

    .brand small {
        display: none;
    }

    .hero {
        padding-top: 42px;
    }

    .hero-copy,
    .hero-text,
    .eyebrow {
        max-width: 350px;
    }

    .hero-copy {
        width: 350px;
        overflow: hidden;
    }

    h1 {
        font-size: 2.7rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .status-card {
        position: static;
        max-width: none;
        order: 2;
        animation: none;
    }

    .code-card {
        margin-left: 0;
        order: 3;
        animation: none;
    }

    .work-grid,
    .project-grid,
    .skill-board,
    .journey-grid {
        grid-template-columns: 1fr;
    }

    .project-card.highlight {
        grid-column: auto;
    }

    .section {
        padding: 48px 0;
    }

    .feature-tile,
    .timeline-item,
    .project-card,
    .skill-board article,
    .note-card {
        min-height: auto;
        padding: 20px;
    }

    .contact-section {
        min-width: 0;
        padding: 22px;
    }

    .contact-link {
        overflow-wrap: anywhere;
    }

    .site-footer {
        flex-direction: column;
    }
}

@media (max-width: 360px) {
    .hero-copy,
    .hero-text,
    .eyebrow {
        max-width: 300px;
    }

    .hero-copy {
        width: 300px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
