:root {
    --bg: #121212;
    --surface: #1a1a1a;
    --border: #262626;
    --text: #eaeaea;
    --muted: #a0a0a0;
    --accent: #4f8cff;

    --font-main: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
}

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

html,
body {
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background:
        radial-gradient(circle at 15% 18%, rgba(79, 140, 255, 0.05), transparent 20%),
        radial-gradient(circle at 86% 12%, rgba(79, 140, 255, 0.05), transparent 24%),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::selection {
    background: var(--accent);
    color: #fff;
}

/* Base */
section {
    padding: 144px 0;
}

section.hero {
    padding: 118px 0 108px;
}

section + section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.2;
    color: var(--text);
}

h2 {
    font-size: 34px;
    letter-spacing: -0.02em;
}

p {
    color: #9a9a9a;
    line-height: 1.7;
}

a {
    color: var(--muted);
    text-decoration: none;
    transition: 0.2s ease;
}

a:hover {
    color: var(--accent);
}

.container {
    width: min(92%, 1140px);
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 12px 28px rgba(79, 140, 255, 0.18);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(79, 140, 255, 0.25);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.01);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 12, 12, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
}

.header-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

.logo {
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 600;
    letter-spacing: 1.2px;
    color: var(--text);
}

.logo:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.main-menu a {
    position: relative;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: var(--muted);
}

.main-menu a:hover {
    color: var(--accent);
}

.main-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: 0.2s ease;
}

.main-menu a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    width: 30px;
    height: 22px;
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 10px;
}

.menu-toggle span:nth-child(3) {
    top: 20px;
}

.menu-toggle.active span:nth-child(1) {
    top: 10px;
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-45deg);
}

/* Micro UI System */
.hero-badge,
.contact-status,
.project-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid rgba(79, 140, 255, 0.15);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(79, 140, 255, 0.11), rgba(79, 140, 255, 0.06));
    color: #79a7ff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 8px 24px rgba(79, 140, 255, 0.06);
}

.contact-status {
    margin-bottom: 20px;
}

.project-label {
    margin-bottom: 18px;
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    left: -120px;
    bottom: 10%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.16), transparent 70%);
    filter: blur(12px);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: 70px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.10), transparent 72%);
    filter: blur(18px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    max-width: 720px;
}

.hero h1 {
    max-width: 10.5ch;
    font-size: clamp(44px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    font-weight: 700;
}

.hero h1 span {
    color: var(--accent);
    white-space: nowrap;
}

.hero-text {
    max-width: 540px;
    margin-bottom: 10px;
    font-size: 19px;
    line-height: 1.82;
    color: #b8b8b8;
}

.hero-action {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-proof {
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(234, 234, 234, 0.52);
}

/* Section Header */
.section-header {
    max-width: 720px;
    margin-bottom: 46px;
}

.section-header h2 {
    margin-bottom: 14px;
    font-size: clamp(36px, 4.2vw, 46px);
    letter-spacing: -0.04em;
}

.section-header p {
    max-width: 54ch;
    font-size: 17px;
    line-height: 1.72;
    color: #8d8d8d;
    opacity: 1;
}

/* Work */
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.work-item {
    position: relative;
    display: block;
    overflow: hidden;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.015));
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.work-item:hover {
    transform: translateY(-10px);
    border-color: rgba(79, 140, 255, 0.14);
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(79, 140, 255, 0.04);
}

.work-image {
    height: 236px;
    background: #1d1d1f;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.work-item:hover .work-image img {
    transform: scale(1.05);
}

.work-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
}

.work-content h3 {
    margin-bottom: 8px;
    font-size: 21px;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.work-content p {
    font-size: 14.5px;
    line-height: 1.7;
    color: #b1b1b1;
    opacity: 1;
}

.work-stack {
    display: inline-block;
    margin-top: 8px;
    color: rgba(79, 140, 255, 0.96);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.work-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: linear-gradient(to top, rgba(7, 7, 7, 0.78), rgba(7, 7, 7, 0.16));
    transition: 0.25s ease;
}

.work-item:hover .work-overlay {
    opacity: 1;
}

.work-overlay span {
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 26px rgba(79, 140, 255, 0.22);
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 84px;
    align-items: start;
}

.about-text h2 {
    margin-bottom: 22px;
    font-size: clamp(36px, 4vw, 46px);
    letter-spacing: -0.04em;
}

.about-text p {
    max-width: 56ch;
    margin-bottom: 16px;
    font-size: 17px;
    line-height: 1.86;
    color: #b7b7b7;
    opacity: 1;
}

.about-text .highlight {
    color: var(--accent);
}

.about-skills {
    padding: 30px 30px 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.015));
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.about-skills h3 {
    margin-bottom: 20px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.about-skills ul {
    list-style: none;
}

.about-skills li {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    color: #b9b9b9;
    opacity: 1;
}

.about-skills li:last-child {
    border-bottom: none;
}

/* Contact */
.contact {
    position: relative;
}

.contact-inner {
    max-width: 640px;
    padding: 12px 0 8px;
}

.contact-inner h2 {
    max-width: 10.5ch;
    margin-bottom: 18px;
    font-size: clamp(40px, 4.8vw, 56px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.contact-inner p {
    max-width: 50ch;
    margin-bottom: 32px;
    font-size: 17px;
    line-height: 1.82;
    color: #b6b6b6;
    opacity: 1;
}

.contact-inner .btn {
    min-width: 180px;
    min-height: 52px;
}

.contact-inner .email {
    display: block;
    margin-top: 24px;
    font-size: 14px;
    color: rgba(234, 234, 234, 0.62);
    opacity: 1;
}

/* Default Project Page */
.project-page {
    padding: 128px 0 110px;
    overflow: hidden;
}

.project-article {
    max-width: 860px;
}

.project-header {
    max-width: 760px;
    margin-bottom: 36px;
}

.project-title {
    margin-bottom: 18px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.project-intro {
    max-width: 680px;
    font-size: 18px;
    line-height: 1.8;
    color: #b7b7b7;
}

.project-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.project-meta-item {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-meta-item:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 140, 255, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.project-meta-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.project-meta-value {
    display: block;
    font-size: 15px;
    line-height: 1.45;
    color: var(--text);
}

.page-content {
    max-width: 760px;
}

.page-content h2 {
    margin-top: 44px;
    margin-bottom: 14px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.page-content p,
.page-content li {
    font-size: 16px;
}

.page-content p {
    margin-bottom: 16px;
    line-height: 1.82;
    color: #b5b5b5;
}

.page-content ul {
    margin: 0 0 24px 20px;
    color: var(--muted);
}

.page-content li {
    margin-bottom: 10px;
}

.page-content strong {
    color: var(--text);
    font-weight: 600;
}

.project-back {
    margin-top: 44px;
}

.project-back .btn {
    min-width: 160px;
}

.project-back .btn:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.project-image {
    min-width: 0;
}

.project-image + .project-image {
    margin-top: 28px;
}

/* Premium Project Layout */
.project-hero {
    position: relative;
    padding: 84px 0 120px;
    overflow: hidden;
}

.project-hero::before {
    content: "";
    position: absolute;
    top: 40px;
    right: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.08), transparent 72%);
    filter: blur(18px);
    pointer-events: none;
}

.project-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 72px;
    align-items: start;
    min-width: 0;
}

.project-hero-content {
    max-width: 640px;
}

.project-hero-content h1 {
    margin-bottom: 18px;
    font-size: clamp(46px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    font-weight: 700;
}

.project-tagline {
    max-width: 560px;
    font-size: 20px;
    line-height: 1.75;
    color: #b7b7b7;
}

.project-hero .hero-badge {
    margin-bottom: 18px;
}

.project-hero-image {
    min-width: 0;
    margin-top: 10px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012));
    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.project-hero-image img {
    width: 100%;
    border-radius: 14px;
    transition: transform 0.6s ease;
}

.project-hero-image:hover img {
    transform: scale(1.04);
}

/* Project Top Meta */
.project-overview-meta,
.project-hero-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 30px;
}

.project-overview-meta {
    min-width: 0;
}

.project-overview-meta ul {
    list-style: none;
    padding: 0;
}

.project-overview-meta li,
.project-hero-meta-item {
    list-style: none;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.014));
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    margin-bottom: 14px;
}

.project-overview-meta span,
.project-hero-meta-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(79, 140, 255, 0.82);
}

.project-overview-meta strong,
.project-hero-meta-value {
    display: block;
    font-size: 15px;
    line-height: 1.45;
    color: var(--text);
}

/* Overview */
.project-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 88px;
    align-items: start;
    min-width: 0;
}

.project-overview-grid > * {
    min-width: 0;
}

.project-overview-text {
    min-width: 0;
}

.project-overview-text h2,
.project-split h2,
.project-results h2,
.project-cta h2 {
    margin-bottom: 18px;
    font-size: clamp(30px, 3vw, 40px);
    letter-spacing: -0.035em;
}

.project-overview-text p,
.project-split p,
.project-results-text,
.project-cta p {
    font-size: 18px;
    line-height: 1.82;
    color: #b6b6b6;
}

.project-overview h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

/* Image Gallery Blocks */
.project-image {
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.012));
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

.project-image img {
    width: 100%;
}

/* Split Section */
.project-split {
    padding: 110px 0;
}

.project-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 96px;
    min-width: 0;
}

.project-split p {
    max-width: 58ch;
}

/* Results */
.project-results {
    padding: 120px 0;
    background:
        radial-gradient(circle at 50% 20%, rgba(79, 140, 255, 0.05), transparent 45%),
        #111;
    text-align: center;
    overflow: hidden;
}

.project-results h2 {
    margin-bottom: 18px;
}

.project-results-text {
    max-width: 760px;
    margin: 0 auto;
}

/* CTA */
.project-cta {
    padding: 130px 0 120px;
    text-align: center;
    overflow: hidden;
}

.project-cta h2 {
    max-width: 14ch;
    margin: 0 auto 18px;
    font-size: 36px;
    line-height: 1.04;
}

.project-cta p {
    max-width: 58ch;
    margin: 0 auto 34px;
}

.project-cta .btn {
    min-width: 180px;
    min-height: 52px;
    border-radius: 12px;
}

/* Footer */
.footer {
    padding: 38px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 32px;
}

.footer-copy {
    color: rgba(234, 234, 234, 0.54);
    font-size: 13px;
    line-height: 1.4;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-links a {
    color: rgba(234, 234, 234, 0.58);
    font-size: 16px;
    opacity: 0.62;
    transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.footer-links a:hover {
    transform: translateY(-1px);
    opacity: 1;
    color: var(--text);
}

/* Responsive */
@media (max-width: 992px) {
    section {
        padding: 126px 0;
    }

    section.hero {
        padding: 102px 0 92px;
    }

    .hero-content {
        max-width: 600px;
    }

    .hero h1 {
        font-size: clamp(40px, 6vw, 66px);
    }

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

    .work-image {
        height: 220px;
    }

    .about-grid {
        gap: 58px;
    }

    .project-hero {
        padding: 72px 0 104px;
    }

    .project-hero-grid,
    .project-overview-grid,
    .project-split-grid {
        gap: 56px;
    }

    .project-hero-content h1 {
        font-size: clamp(40px, 6vw, 62px);
    }

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

@media (max-width: 768px) {
    section {
        padding: 98px 0;
    }

    section.hero {
        padding: 88px 0 80px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 72px);
        padding: 32px 20px;
        background: var(--surface);
        border-left: 1px solid var(--border);
        flex-direction: column;
        gap: 20px;
        transition: 0.3s ease;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 18px;
        color: var(--text);
    }

    .hero::before,
    .hero::after {
        opacity: 0.55;
    }

    .hero h1 {
        max-width: 11.5ch;
        margin-bottom: 20px;
        font-size: 50px;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
    }

    .hero-text,
    .project-intro {
        font-size: 16px;
    }

    .hero-action {
        gap: 12px;
        width: auto;
    }

    .hero-action .btn {
        min-width: 140px;
        width: auto;
    }

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

    .work-image {
        height: 224px;
    }

    .work-content {
        padding: 20px;
    }

    .about-grid {
        gap: 60px;
    }

    .about-text h2,
    .contact-inner h2 {
        font-size: 32px;
    }

    .project-page {
        padding: 96px 0 90px;
    }

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

    .project-hero {
        padding: 60px 0 88px;
    }

    .project-hero-grid,
    .project-overview-grid,
    .project-split-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .project-hero-content h1 {
        font-size: 42px;
    }

    .project-tagline,
    .project-overview-text p,
    .project-split p,
    .project-results-text,
    .project-cta p {
        font-size: 16px;
    }

    .project-overview-meta,
    .project-hero-meta {
        grid-template-columns: 1fr;
    }

    .project-cta h2 {
        max-width: none;
    }

    .contact-inner {
        padding-top: 12px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 560px) {
    .hero h1 {
        max-width: 11ch;
        font-size: 38px;
    }

    .hero-text {
        font-size: 16px;
    }

    .hero-action {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .hero-action .btn {
        width: 100%;
    }

    .hero-proof {
        font-size: 11px;
    }

    .project-overview-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-overview-text {
        order: 1;
    }

    .project-overview-meta {
        order: 2;
    }

    .work-image {
        height: 210px;
    }

    .contact-inner h2 {
        max-width: none;
    }
}

@media (max-width: 480px) {
    section {
        padding: 70px 0;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero-text {
        font-size: 15px;
    }

    .project-meta {
        grid-template-columns: 1fr;
    }

    .project-title {
        font-size: 34px;
    }
}
