:root {
    --color-paper: #F2F0EB;
    --color-ink: #111111;
    --color-accent: #B08D55;
    /* Antique Gold */
    --color-muted: #666666;

    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;

    --grid-gutter: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-paper);
    color: var(--color-ink);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1000;
}

/* The Golden Thread */
.thread-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#thread-path {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 3px;
    opacity: 0.7;
    filter: drop-shadow(0 0 8px rgba(176, 141, 85, 0.6));
    transition: all 0.3s ease;
    animation: threadPulse 3s ease-in-out infinite, threadShimmer 4s linear infinite;
}

@keyframes threadPulse {

    0%,
    100% {
        opacity: 0.7;
        filter: drop-shadow(0 0 8px rgba(176, 141, 85, 0.6));
    }

    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 15px rgba(176, 141, 85, 0.9));
    }
}

@keyframes threadShimmer {
    0% {
        stroke: #b08d55;
    }

    50% {
        stroke: #d4af77;
    }

    100% {
        stroke: #b08d55;
    }
}

/* Navigation */
.pro-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 900;
    background: rgba(242, 240, 235, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-brand {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    z-index: 901;
    text-decoration: none;
    color: var(--color-ink);
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: var(--color-accent);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 901;
    width: 40px;
    height: 40px;
    position: relative;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--color-ink);
    transition: all 0.3s ease;
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.hamburger span:nth-child(1) {
    top: 10px;
}

.hamburger span:nth-child(2) {
    top: 50%;
    transform: translate(-50%, -50%);
}

.hamburger span:nth-child(3) {
    bottom: 10px;
}

.hamburger.active span:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    bottom: 50%;
    transform: translate(-50%, 50%) rotate(-45deg);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 901px) {
    .nav-menu {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        transform: none !important;
    }
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-ink);
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    opacity: 1;
    font-weight: 700;
    border-bottom: 1px solid var(--color-accent);
}

.btn-contact {
    border: 1px solid var(--color-ink);
    padding: 0.5rem 1.5rem;
    opacity: 1 !important;
}

/* Typography Defaults */
h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
}

p {
    color: #333;
    margin-bottom: 1.5rem;
}

/* Wrapper */
.editorial-wrapper {
    position: relative;
    z-index: 1;
}

/* Section: Intro */
.intro {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.intro-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.chapter-label {
    display: block;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.headline-hero {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 2rem;
}

.lead-paragraph {
    font-size: 1.25rem;
    color: #444;
}

.scroll-indicator {
    margin-top: 4rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.line-drop {
    width: 1px;
    height: 60px;
    background: var(--color-accent);
}

/* Section: Split Layouts */
.chapter {
    padding: 6rem 10%;
    overflow: hidden;
}

.split-layout {
    display: flex;
    align-items: center;
    gap: 4rem;
    min-height: 90vh;
    /* Relaxed height */
}

.content-col,
.visual-col {
    flex: 1;
    position: relative;
}

.chapter-num {
    font-family: var(--font-serif);
    font-size: 6rem;
    color: rgba(0, 0, 0, 0.05);
    position: absolute;
    top: -3rem;
    left: -1rem;
    z-index: -1;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.text-body p {
    font-size: 1.1rem;
    text-align: justify;
}

.stat-row {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat .val {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--color-accent);
    line-height: 1;
}

.stat .lbl {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

/* Visuals */
.img-frame {
    position: relative;
    overflow: hidden;
    box-shadow: 20px 20px 0 rgba(0, 0, 0, 0.05);
}

.img-frame img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 1.5s ease;
}

.img-frame:hover img {
    transform: scale(1.05);
}

.caption {
    display: block;
    font-size: 0.75rem;
    font-style: italic;
    color: #888;
    margin-top: 0.5rem;
    text-align: right;
}

.secondary-img {
    width: 60%;
    position: absolute;
    bottom: -10%;
    left: -10%;
    border: 10px solid var(--color-paper);
    z-index: 2;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader.slide-up {
    transform: translateY(-100%);
}

.loader-content {
    text-align: center;
    color: var(--color-accent);
}

.loader-brand {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUpBrand 0.8s ease forwards 0.2s;
}

.loader-line-wrapper {
    width: 200px;
    height: 2px;
    background: rgba(176, 141, 85, 0.2);
    margin: 0 auto;
    border-radius: 2px;
    overflow: hidden;
}

.loader-line {
    width: 0%;
    height: 100%;
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
    animation: loadLine 1.5s ease-in-out forwards 0.5s;
}

@keyframes fadeUpBrand {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loadLine {
    to {
        width: 100%;
    }
}

/* Capabilities List */
.capability-list {
    list-style: none;
    margin-top: 2rem;
}

.capability-list li {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--color-accent);
}

.capability-list strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.2rem;
}

.capability-list span {
    font-size: 0.95rem;
    color: #666;
}

/* Section: Projects Gallery */
.gallery-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-header {
    text-align: center;
    max-width: 600px;
    margin-bottom: 4rem;
    position: relative;
}

.gallery-header .chapter-num {
    left: 50%;
    transform: translateX(-50%);
}

.project-grid {
    display: flex;
    gap: 2rem;
    width: 100%;
}

.project-card {
    flex: 1;
    background: white;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-img {
    height: 300px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-meta {
    padding: 0 1rem 1rem 1rem;
}

.project-meta .cat {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--color-accent);
    letter-spacing: 0.1em;
}

.project-meta h3 {
    font-size: 1.5rem;
    font-family: var(--font-serif);
    margin: 0.5rem 0;
}

.read-link {
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--color-ink);
    border-bottom: 1px solid;
    padding-bottom: 2px;
}

/* Section: Outro */
.outro {
    background: #151515;
    /* Dark footer */
    color: #e5e5e5;
    padding: 6rem 0 0 0;
    min-height: auto;
}

.outro-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 6rem auto;
}

.outro h2,
.outro p {
    color: #fff;
}

.outro p {
    color: #888;
}

.contact-card {
    background: #1a1a1a;
    padding: 3rem;
    border: 1px solid #333;
    margin-top: 3rem;
    text-align: left;
}

.c-row {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.c-row strong {
    color: var(--color-accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.c-row a,
.c-row address {
    color: #fff;
    text-decoration: none;
    font-style: normal;
    font-family: var(--font-serif);
    font-size: 1.5rem;
}

.main-footer {
    border-top: 1px solid #333;
    padding: 2rem 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    color: #555;
    background: #111;
}

.footer-center {
    text-align: center;
}

.footer-center>div:first-child {
    font-size: 1rem;
    font-weight: 500;
}

.footer-credits {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

.footer-credits a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
    padding: 0.25rem 0.5rem;
    display: inline-block;
}

.footer-credits a:hover {
    color: var(--color-accent);
}

/* Responsive */
@media (max-width: 900px) {

    /* Navigation */
    .pro-nav {
        padding: 1.5rem;
    }

    .nav-brand {
        font-size: 1.1rem;
        max-width: 60%;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        flex-direction: column;
        background: rgba(242, 240, 235, 0.98);
        backdrop-filter: blur(10px);
        padding: 5rem 2rem 2rem 2rem;
        gap: 0.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        border-radius: 0 0 15px 15px;
        overflow: hidden;
        align-items: stretch;
        z-index: 899;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes slideUp {
        from {
            opacity: 1;
            transform: translateY(0);
        }

        to {
            opacity: 0;
            transform: translateY(-20px);
        }
    }

    .nav-menu.closing {
        animation: slideUp 0.3s ease forwards;
    }

    .nav-menu a {
        padding: 1rem;
        font-size: 0.95rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        text-align: left;
    }

    .btn-contact {
        margin-top: 1rem;
        text-align: center;
        border: 3px solid var(--color-ink) !important;
        padding: 1rem 1.5rem;
        border-radius: 5px;
        background: transparent;
    }

    /* Hero Section */
    .intro {
        padding: 0 1.5rem;
    }

    .headline-hero {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .lead-paragraph {
        font-size: 1rem;
    }

    .chapter-label {
        font-size: 0.7rem;
    }

    /* Sections */
    .chapter {
        padding: 4rem 5%;
    }

    .split-layout {
        flex-direction: column;
        gap: 2rem;
        min-height: auto;
    }

    .chapter-num {
        font-size: 4rem;
        top: -2rem;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .text-body p {
        font-size: 1rem;
        text-align: left;
    }

    /* Stats */
    .stat-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Images */
    .img-frame {
        box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.05);
    }

    .secondary-img {
        position: relative;
        bottom: 0;
        left: 0;
        width: 100%;
        margin-top: 1rem;
        border: none;
    }

    /* Capabilities */
    .capability-list li {
        margin-bottom: 1.25rem;
        padding-left: 1rem;
    }

    .capability-list strong {
        font-size: 1.1rem;
    }

    .capability-list span {
        font-size: 0.9rem;
    }

    /* Projects */
    .project-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .project-img {
        height: 250px;
    }

    .gallery-header {
        margin-bottom: 2rem;
    }

    /* Contact */
    .outro {
        padding: 4rem 0 0 0;
    }

    .outro-content {
        padding: 0 1.5rem;
        margin-bottom: 3rem;
    }

    .contact-card {
        padding: 2rem 1.5rem;
    }

    .c-row a,
    .c-row address {
        font-size: 1.2rem;
    }

    /* Footer */
    .main-footer {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }

    .footer-center {
        width: 100%;
    }

    /* Scroll indicator */
    .scroll-indicator {
        margin-top: 3rem;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {

    .pro-nav {
        padding: 1rem;
    }

    .nav-brand {
        font-size: 1rem;
    }

    .headline-hero {
        font-size: 1.75rem;
    }

    .chapter {
        padding: 3rem 5%;
    }

    h2 {
        font-size: 1.75rem;
    }

    .chapter-num {
        font-size: 3rem;
    }

    .contact-card {
        padding: 1.5rem 1rem;
    }

    .c-row a,
    .c-row address {
        font-size: 1rem;
    }

    .project-img {
        height: 200px;
    }
}