:root {
    --bg: #fff9f1;
    --bg-secondary: #f4f8ff;
    --panel: rgba(255, 255, 255, 0.82);
    --panel-strong: rgba(255, 255, 255, 0.94);
    --text: #171d2d;
    --muted: #5c6479;
    --line: rgba(41, 60, 112, 0.15);
    --blue: #3477f5;
    --blue-deep: #1c4db2;
    --orange: #ff8f5b;
    --yellow: #ffd76e;
    --ink: #10131d;
    --shadow: 0 24px 60px rgba(31, 42, 78, 0.14);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --container: 1180px;
}

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

html {
    scroll-behavior: smooth;
    cursor: auto;
}

body {
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 186, 111, 0.22), transparent 26%),
        radial-gradient(circle at top right, rgba(115, 167, 255, 0.28), transparent 28%),
        linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 48%, var(--bg-secondary) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(64, 89, 153, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(64, 89, 153, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.55;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 85%);
}

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

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

button,
input,
textarea,
select {
    cursor: pointer;
}

textarea,
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="number"] {
    cursor: text;
}

main {
    width: min(calc(100% - 40px), var(--container));
    margin: 0 auto;
    padding-bottom: 54px;
}

.site-header {
    width: min(calc(100% - 40px), var(--container));
    margin: 18px auto 0;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 16px;
    z-index: 10;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 34px rgba(47, 67, 113, 0.1);
}

.brand {
    position: relative;
    padding: 10px 14px 10px 18px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.brand::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    transform: translateY(-50%);
    box-shadow: 0 0 0 6px rgba(255, 215, 110, 0.16);
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topnav a {
    padding: 10px 15px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.topnav a:hover,
.topnav a:focus-visible {
    background: rgba(52, 119, 245, 0.1);
    color: var(--blue-deep);
    transform: translateY(-1px);
}

.hero-section,
.projects-section,
.about-section,
.contact-section {
    padding-top: 64px;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.82fr);
    gap: 26px;
    align-items: stretch;
    min-height: calc(100vh - 132px);
}

.hero-copy,
.hero-panel,
.project-card,
.about-grid,
.contact-card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-copy {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 4.5vw, 58px);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 255, 0.86)),
        linear-gradient(130deg, rgba(255, 143, 91, 0.16), transparent 38%),
        linear-gradient(320deg, rgba(52, 119, 245, 0.12), transparent 38%);
}

.hero-copy::before {
    content: none;
}

.eyebrow,
.panel-label,
.project-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(52, 119, 245, 0.14);
    color: var(--blue-deep);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow::before,
.panel-label::before,
.project-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--yellow));
}

.hero-copy h1 {
    max-width: 10ch;
    margin-top: 22px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(3.3rem, 7vw, 6.2rem);
    line-height: 0.92;
    letter-spacing: -0.07em;
}

.hero-text,
.section-heading p,
.project-description,
.hero-panel p,
.about-grid p,
.contact-card p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}

.hero-text {
    max-width: 58ch;
    margin-top: 22px;
}

.hero-actions,
.hero-meta,
.project-tags,
.project-actions,
.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions,
.project-actions,
.contact-links {
    margin-top: 28px;
}

.hero-meta {
    margin-top: 24px;
}

.primary-link,
.secondary-link,
.panel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.primary-link {
    background: linear-gradient(135deg, var(--ink), #243252);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(18, 23, 36, 0.16);
}

.secondary-link,
.panel-link {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    color: var(--text);
}

.primary-link:hover,
.secondary-link:hover,
.panel-link:hover,
.primary-link:focus-visible,
.secondary-link:focus-visible,
.panel-link:focus-visible {
    transform: translateY(-2px);
}

.hero-meta span,
.project-tags span {
    padding: 11px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(41, 60, 112, 0.12);
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 38px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 255, 0.88));
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 24px;
    border: 1px dashed rgba(52, 119, 245, 0.2);
    border-radius: 26px;
    pointer-events: none;
}

.hero-panel h2,
.section-heading h2,
.project-content h3,
.contact-card h2 {
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: -0.05em;
}

.hero-panel h2 {
    margin-top: 18px;
    font-size: clamp(2.1rem, 4vw, 3.1rem);
}

.hero-panel p {
    margin-top: 14px;
    max-width: 28ch;
}

.hero-panel .panel-link {
    margin-top: 22px;
}

.section-heading {
    max-width: 740px;
    margin-bottom: 20px;
}

.section-heading h2,
.contact-card h2 {
    margin-top: 16px;
    font-size: clamp(2.3rem, 4vw, 3.4rem);
    line-height: 0.96;
}

.section-heading p,
.contact-card p {
    margin-top: 14px;
}

.projects-note {
    font-size: 0.92rem;
}

.projects-note code {
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(41, 60, 112, 0.12);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.85rem;
}

.project-card {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: start;
    overflow: hidden;
    border-radius: 36px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.9));
    width: min(100%, 920px);
    box-shadow: none;
}

.project-preview-shell {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 14px;
    background: transparent;
    border-right: none;
}

.project-preview {
    width: 100%;
    max-height: min(48vh, 500px);
    object-fit: contain;
    object-position: center;
    border-radius: 24px;
    background: #dce8fb;
}

.project-content {
    align-self: center;
    padding: clamp(24px, 3vw, 32px);
}

.project-content h3 {
    margin-top: 14px;
    font-size: clamp(2.2rem, 3vw, 3rem);
}

.project-description {
    max-width: 62ch;
    margin-top: 16px;
}

.project-tags {
    margin-top: 20px;
}

.projects-carousel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.projects-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    display: flex;
    align-items: flex-start;
    gap: 36px;
    padding: 8px 0 12px;
}

.projects-track::-webkit-scrollbar {
    display: none;
}

.projects-track > * {
    scroll-snap-align: center;
    flex: 0 0 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.project-preview--placeholder {
    min-height: min(48vh, 500px);
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
    background:
        radial-gradient(circle at top, rgba(255, 215, 110, 0.4), transparent 34%),
        linear-gradient(135deg, rgba(255, 143, 91, 0.18), rgba(52, 119, 245, 0.2)),
        #eef4ff;
}

.placeholder-badge {
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(41, 60, 112, 0.12);
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.placeholder-grid {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 380px;
}

.placeholder-grid span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(41, 60, 112, 0.1);
    color: var(--muted);
    font-weight: 700;
}

.carousel-arrow {
    width: 56px;
    height: 56px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 1.45rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(28, 44, 84, 0.08);
    transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
    transform: translateY(-2px);
    background: #ffffff;
}

.carousel-arrow:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 18px;
    padding: 18px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(255, 252, 245, 0.92), rgba(241, 246, 255, 0.92));
}

.about-grid p {
    min-height: 100%;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(41, 60, 112, 0.08);
}

.about-grid p:first-child {
    transform: rotate(-1.1deg);
}

.about-grid p:nth-child(2) {
    transform: rotate(0.8deg);
}

.about-grid p:nth-child(3) {
    transform: rotate(-0.6deg);
}

.contact-card {
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 4vw, 50px);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(243, 248, 255, 0.88));
}

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

    .hero-section {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-top: 46px;
    }

    .hero-copy h1 {
        max-width: 100%;
    }

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

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

    .carousel-arrow {
        display: none;
    }

    .projects-track {
        padding: 0;
    }

    .project-card {
        display: block;
        width: 100%;
    }

    .about-grid p,
    .about-grid p:first-child,
    .about-grid p:nth-child(2),
    .about-grid p:nth-child(3) {
        transform: none;
    }
}

@media (max-width: 640px) {
    main,
    .site-header {
        width: min(calc(100% - 24px), var(--container));
    }

    .site-header {
        margin-top: 12px;
        padding: 14px;
        top: 10px;
    }

    .topnav {
        width: 100%;
    }

    .topnav a {
        font-size: 0.9rem;
    }

    .hero-section,
    .projects-section,
    .about-section,
    .contact-section {
        padding-top: 54px;
    }

    .hero-copy,
    .hero-panel,
    .project-content,
    .contact-card {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-copy::before {
        content: none;
    }

    .project-preview-shell {
        padding: 12px;
        border-bottom: 1px solid var(--line);
    }

    .project-preview {
        max-height: none;
        aspect-ratio: 4 / 3;
    }
}
