:root {
    --bg: #0e0f0d;
    --text: #DDE1D3;
    --accent: #B2C73B;
    --divider: #dde1d33b;
    --page-padding: 2rem;
    --heading-offset: 8rem;
    --section-vertical-padding: calc(var(--page-padding) * 4);
} 


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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(178, 199, 59, 0.025),
        transparent 40%
    );
    z-index: -1;
    pointer-events: none;
}

/* Base material icon styles */
.material-symbols-rounded,
.material-symbols-outlined {
    font-size: 1.2em;
    vertical-align: middle;
    font-weight: 400;
    font-variation-settings: 'wght' 400;
}

/* Reusable inline icon utility: use on icons that sit inside lines of text */
.inline-icon {
    font-size: 0.9em;
    vertical-align: baseline;
    display: inline-block;
    font-variation-settings: 'wght' 400;
}

/* Hero-specific icon alignment - slightly below baseline to align with text bottom */
.hero h1 .material-symbols-outlined,
.hero h1 .material-symbols-rounded {
    margin-left: 0.15rem;
    font-size: 0.9em;
    vertical-align: -0.1em;
}

/* Fix alignment when wrapped by JS split-text animation */
.hero h1 .word.icon-word {
    vertical-align: -0.1em;
}

.hero h1 .word.icon-word .material-symbols-outlined,
.hero h1 .word.icon-word .material-symbols-rounded {
    vertical-align: baseline;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    position: relative;
}

.page-section {
    display: block;
    width: 100%;
    min-height: auto;
    padding: var(--section-vertical-padding) calc(var(--page-padding) * 1.25);
    box-sizing: border-box;
    position: relative;
} 

.page-section + .page-section {
    border-top: 1px solid var(--divider);
}

.fade-animate {
    opacity: 0;
    transform: translate3d(0, 1rem, 0);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.fade-animate.visible {
    opacity: 1;
    transform: translateY(0);
}





.hero {
    padding: calc(var(--page-padding) * 3) calc(var(--page-padding) * 1.25);
    min-height: 100vh;
    position: relative;
}  

.hero h1 {
    position: absolute;
    bottom: var(--page-padding);
    left: var(--page-padding);
    margin: 0;
    font-size: clamp(3.64rem, 15.6vw, 20.8vw);
    line-height: 0.85;
    text-transform: uppercase;
    max-width: calc(100% - (var(--page-padding) * 2));
    color: var(--text);
    z-index: 10;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.scroll-indicator {
    position: absolute;
    right: var(--page-padding);
    bottom: var(--page-padding);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.15rem 0.35rem;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    text-transform: lowercase;
    z-index: 11;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
    animation: float-y 1.6s ease-in-out infinite;
} 

.scroll-indicator .indicator-arrow {
    font-size: 1.15rem;
    vertical-align: -0.06em;
}

@keyframes float-y {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

.scroll-indicator.hidden {
    opacity: 0;
    transform: translateY(8px);
    visibility: hidden;
    pointer-events: none;
} 

@media (max-width: 640px) {
    .page-section { padding: 4rem 1rem; }
    .hero { padding: 4rem 1rem; min-height: 100vh; }
    .hero h1 { 
        font-size: clamp(7.5rem, 27vw, 12rem);
        line-height: 0.88;
        left: 1rem;
        bottom: 1rem;
        max-width: calc(100% - 2rem);
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    .section-heading { 
        font-size: clamp(9rem, 33.75vw, 15.75rem);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    h2 { 
        font-size: clamp(4.5rem, 15vw, 6.75rem);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
} 

h1:not(.hero h1) {
    font-size: 4rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0 0 1.5rem 0;
    text-transform: none;
    line-height: 1;
}

/* Use Instrument Serif for headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-style: normal;
    color: var(--text);
}

.highlight {
    font-family: 'Instrument Serif', serif;
    color: var(--accent);
}

.quote-section {
    min-height: auto;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    background: transparent;
    padding: var(--section-vertical-padding) calc(var(--page-padding) * 1.25);
    overflow-x: hidden;
    max-width: 100vw;
}

.quote-wrapper {
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}

.quote-text {
    font-size: clamp(2.6rem, 8vw, 5.5rem);
    font-weight: 300;
    line-height: 1.15;
    text-align: left;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    width: 100%;
}

.quote-text .quote-sentence {
    display: block;
    margin-bottom: 0.8rem;
}



.works-section .work-item:hover .work-item-more,
.contact-section .work-item:hover .work-item-more {
    opacity: 1 !important;
} 
.quote-text .highlight,
.about-text .highlight,
.about-quote .highlight {
    opacity: 1;
    font-weight: 400;
}

.quote-text .icon {
    font-size: 0.9em;
    vertical-align: baseline;
    margin-left: 0.5rem;
    font-variation-settings: 'wght' 400;
    display: inline-block;
    transform-origin: center;
    backface-visibility: hidden;
    animation: spin-smooth 4s cubic-bezier(0.8, 0, 0.2, 1) infinite;
} 

@keyframes spin-smooth {
    from { transform: translateZ(0) rotate(0deg); }
    to   { transform: translateZ(0) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .quote-text .icon { animation: none; transform: none; }
} 

@media (max-width: 640px) {
    .quote-text { 
        font-size: clamp(2rem, 7.5vw, 3rem);
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        max-width: 100%;
        width: 100%;
    }
    .quote-section { padding: 4rem 1rem; overflow-x: hidden; max-width: 100vw; }
    .quote-wrapper {
        max-width: 100%;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
        overflow: hidden;
    }
    .quote-text { 
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        max-width: 100%;
        width: 100%;
    }
    .quote-text .icon { font-size: 0.85em; margin-left: 0.4rem; }
    .quote-text .quote-sentence { 
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
        display: block;
    }
} 

.section-heading {
    font-size: clamp(3.5rem, 10vw, 9rem);
    text-transform: none;
    line-height: 0.95;
    margin-bottom: 4rem;
    display: block;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-shrink: 0;
}

.section-heading .heading-line {
    display: block;
    white-space: normal;
    word-wrap: break-word;
}

.section-heading .section-icon {
    font-variation-settings: 'wght' 400;
    font-size: 0.9em;
    vertical-align: baseline;
    display: inline-block;
    margin-left: 0.15rem;
} 

.section-container {
    display: flex;
    align-items: flex-start;
    gap: clamp(3rem, 8vw, 10rem);
}

.section-container .section-heading {
    margin-bottom: 0;
    width: clamp(16rem, 35vw, 32rem);
    min-width: 0;
    flex-shrink: 0;
}

.works-list {
    margin-top: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.works-section {
    min-height: auto;
}

.work-item {
    height: clamp(4rem, 10vw, 6rem);
    overflow: hidden;
    cursor: pointer;
}

.work-item-content {
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.work-item:hover .work-item-content {
    transform: translateY(calc(-1 * clamp(4rem, 10vw, 6rem)));
}

.work-item-text,
.work-item-more {
    height: clamp(4rem, 10vw, 6rem);
    display: flex;
    align-items: center;
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    text-transform: none;
    white-space: nowrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
} 

.work-item-more {
    gap: 1rem;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
    transition: color 180ms ease, opacity 180ms ease;
    text-decoration: none;
    outline: none;
}

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

.work-item-more .work-item-icon {
    font-size: 0.95em;
    vertical-align: baseline;
    display: inline-block;
    margin-left: 0.5rem;
    color: inherit;
    font-variation-settings: 'wght' 400;
    transition: transform 120ms ease;
}

.work-item-more:hover .work-item-icon {
    transform: translateX(3px);
} 

@media (max-width: 640px) {
    .works-list { margin-top: 0; }
    .section-container { flex-direction: column; gap: 2rem; }
    .section-container .section-heading { width: 100%; min-width: auto; margin-bottom: 0; }
}

.about-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 85ch;
}

.about-text {
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    line-height: 1.5;
    max-width: 85ch;
    opacity: 0.95;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.about-section {
    min-height: auto;
}

.about-quote {
    margin-top: 0.75rem;
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    line-height: 1.5;
    opacity: 0.95;
    margin-bottom: 0;
}

.page-section:not(.hero) {
    min-height: auto;
}

.works-list .work-item,
.contact-list .work-item {
    margin-bottom: 1.25rem;
}
.works-list .work-item:last-child,
.contact-list .work-item:last-child {
    margin-bottom: 0;
}

.contact-list .work-item {
    position: relative;
}

.contact-list .work-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(-1 * (1.25rem / 2));
    width: 70%;
    height: 1px;
    background: var(--divider);
    transform: translateX(-50%);
}

.page-section.contact-section {
    min-height: auto !important;
} 

.contact-section .section-heading {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .page-section:not(.hero) {
        min-height: auto;
    }
    .works-list .work-item,
    .contact-list .work-item { margin-bottom: 0.75rem; }

    .page-section.contact-section { min-height: auto !important; padding: 4rem 1rem !important; }

    .contact-list .work-item:not(:last-child)::after {
        bottom: calc(-1 * (0.75rem / 2));
        width: 78%;
    }
}

.hero-line,
.quote-sentence,
.heading-line {
    display: inline-block;
    will-change: opacity, transform;
}

.about-text span {
    will-change: opacity;
}

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

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--divider);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}



.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.2s, height 0.2s, background-color 0.2s;
}

body.cursor-visible .cursor-dot,
body.cursor-visible .cursor-outline {
    opacity: 1;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    background-color: var(--accent);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body.hovering .cursor-outline {
    width: 50px;
    height: 50px;
    background-color: rgba(178, 199, 59, 0.1);
    border-color: var(--accent);
}

@media (pointer: fine) {
    body {
        cursor: none;
    }
    
    a, button, .work-item {
        cursor: none;
    }

    .cursor-dot,
    .cursor-outline {
        display: block;
    }
}

.split-animate .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.2, 0, 0.2, 1);
    transition-delay: calc(var(--char-index) * 0.03s);
    will-change: transform, opacity;
}

.split-animate.visible .char {
    opacity: 1;
    transform: translateY(0);
}

.char {
    white-space: pre;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.76, 0, 0.24, 1), visibility 0.6s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-text {
    font-family: 'Instrument Serif', serif;
    font-size: 3rem;
    color: var(--accent);
    opacity: 0;
    animation: loader-fade 1.2s ease-in-out infinite alternate;
}

@keyframes loader-fade {
    from { opacity: 0.3; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

.noise-overlay {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.035;
    background: 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.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    animation: noise-animation 0.2s infinite;
}

@keyframes noise-animation {
    0% { transform: translate(0,0); }
    10% { transform: translate(-5%,-5%); }
    20% { transform: translate(-10%,5%); }
    30% { transform: translate(5%,-10%); }
    40% { transform: translate(-5%,15%); }
    50% { transform: translate(-10%,5%); }
    60% { transform: translate(15%,0); }
    70% { transform: translate(0,10%); }
    80% { transform: translate(-15%,0); }
    90% { transform: translate(10%,5%); }
    100% { transform: translate(5%,0); }
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-text {
    font-family: 'Instrument Serif', serif;
    font-size: 2rem;
    color: var(--accent);
}

.preloader-icon {
    font-size: 1.5rem;
    color: var(--accent);
    animation: spin-smooth 4s cubic-bezier(0.8, 0, 0.2, 1) infinite;
}

.word {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, 2rem, 0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
    white-space: nowrap;
}

.word.visible {
    opacity: 1;
    transform: translateY(0);
}

.word .material-symbols-outlined,
.word .material-symbols-rounded,
.word.icon-word {
    display: inline-block;
    vertical-align: middle;
}

.fade-animate {
    opacity: 1;
    transform: none;
    transition: none;
}

body.loading main {
    opacity: 0;
    visibility: hidden;
}

body:not(.loading) main {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease;
}
