/* ===========================================
   FOUNDATION
=========================================== */
:root {
    --black: #0b0b0b;
    --dark: #141414;
    --dark-2: #1a1a1a;
    --dark-3: #222222;
    --cream: #c8b88a;
    --cream-light: #d4c69a;
    --white: #f5f0e8;
    --white-dim: #a09a8e;
    --text: #e8e2d6;
    --text-muted: #807b72;
    --border: rgba(200, 184, 138, 0.12);
    --border-hover: rgba(200, 184, 138, 0.35);

    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'Space Mono', 'Courier New', monospace;

    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--black);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

::selection {
    background: var(--cream);
    color: var(--black);
}

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

button {
    cursor: none;
}

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

/* ===========================================
   CUSTOM CURSOR
=========================================== */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--cream);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s var(--ease);
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--cream);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.25s var(--ease-out), width 0.3s, height 0.3s, border-color 0.3s;
    opacity: 0.5;
}

.cursor-follower.hover {
    width: 60px;
    height: 60px;
    border-color: var(--cream-light);
    opacity: 0.8;
}

/* ===========================================
   LOADER
=========================================== */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--ease), visibility 0.6s;
}

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

.loader-inner {
    text-align: center;
}

.loader-text {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--cream);
    margin-top: 30px;
}

.loader-line {
    display: block;
    width: 60px;
    height: 1px;
    background: var(--cream);
    margin: 0 auto;
    animation: loaderPulse 1.2s ease infinite;
    transform-origin: left;
}

@keyframes loaderPulse {
    0% { transform: scaleX(0); opacity: 0; }
    50% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(0); opacity: 0; transform-origin: right; }
}

/* ===========================================
   HEADER / NAVIGATION
=========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 28px 50px;
    transition: all 0.5s var(--ease);
}

.header.scrolled {
    padding: 18px 50px;
    background: rgba(11, 11, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--white);
    transition: color 0.3s;
}

.logo span {
    color: var(--cream);
}

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

.nav-link {
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    position: relative;
    padding: 5px 0;
    transition: color 0.4s;
}

.nav-link::before {
    content: attr(data-index);
    position: absolute;
    top: -8px;
    left: 0;
    font-family: var(--mono);
    font-size: 0.55rem;
    color: var(--cream);
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s var(--ease);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
    transform: translateY(0);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cream);
    transition: width 0.4s var(--ease-out);
}

.nav-resume {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    background: var(--cream);
    padding: 10px 24px;
    border-radius: 50px;
    transition: all 0.3s var(--ease);
    text-decoration: none;
    margin-left: 10px;
}

.nav-resume:hover {
    background: var(--white);
    transform: translateY(-2px);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    padding: 10px;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 1px;
    background: var(--white);
    transition: all 0.4s var(--ease);
    transform-origin: center;
}

.menu-toggle.active span:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle.active span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* ===========================================
   HERO SECTION
=========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 140px 50px 80px;
}

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

.hero-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--cream);
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.hero-label::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--cream);
}

.hero-title {
    font-family: var(--serif);
    font-weight: 300;
    line-height: 1.05;
    margin-bottom: 40px;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    font-size: clamp(3.2rem, 8vw, 7.5rem);
    color: var(--white);
}

.hero-title .line-inner {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1s var(--ease-out);
}

.hero-title .line-inner.visible {
    transform: translateY(0);
}

.hero-title .accent {
    color: var(--cream);
    font-style: italic;
    font-weight: 400;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 500px;
    line-height: 1.8;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    right: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hero-scroll span {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    writing-mode: vertical-rl;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--cream), transparent);
    animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.4; transform: scaleY(0.6); }
}

/* ===========================================
   REVEAL ANIMATIONS
=========================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

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

/* ===========================================
   SECTION SHARED STYLES
=========================================== */
.section-number {
    display: block;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--cream);
    letter-spacing: 0.15em;
    margin-bottom: 20px;
}

.section-heading {
    font-family: var(--serif);
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 300;
    line-height: 1.1;
    color: var(--white);
}

.section-heading em {
    color: var(--cream);
    font-style: italic;
}

.section-grid {
    max-width: 1300px;
    margin: 0 auto;
    padding: 120px 50px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: start;
}

/* ===========================================
   ABOUT SECTION
=========================================== */
.about {
    border-top: 1px solid var(--border);
}

.about-left {
    position: sticky;
    top: 150px;
}

.about-right {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.about-portrait {
    max-width: 380px;
}

.portrait-frame {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.portrait-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--border-hover);
    border-radius: 4px;
    pointer-events: none;
}

.portrait-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;
    display: block;
    filter: grayscale(30%) contrast(1.05);
    transition: filter 0.6s var(--ease);
}

.portrait-frame:hover .portrait-img {
    filter: grayscale(0%) contrast(1);
}

.about-bio .lead {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--white);
    margin-bottom: 25px;
}

.about-bio p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

.stats {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stat-number {
    display: block;
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 300;
    color: var(--cream);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    line-height: 1.5;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border);
}

/* ===========================================
   WORK SECTION
=========================================== */
.work {
    border-top: 1px solid var(--border);
    padding: 120px 0 0;
}

.section-header {
    padding: 0 50px 80px;
    max-width: 1300px;
    margin: 0 auto;
}

.work-list {
    border-top: 1px solid var(--border);
}

.work-item {
    border-bottom: 1px solid var(--border);
    transition: background 0.5s var(--ease);
}

.work-item:hover {
    background: var(--dark);
}

.work-link {
    display: grid;
    grid-template-columns: 1fr 300px auto;
    align-items: center;
    gap: 40px;
    padding: 45px 50px;
    max-width: 1300px;
    margin: 0 auto;
    transition: all 0.4s var(--ease);
}

.work-category {
    display: block;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--cream);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.work-title {
    font-family: var(--serif);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 12px;
    transition: color 0.3s;
}

.work-item:hover .work-title {
    color: var(--cream);
}

.work-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 15px;
    max-width: 440px;
}

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

.work-tech span {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    letter-spacing: 0.05em;
    transition: all 0.3s;
}

.work-item:hover .work-tech span {
    border-color: var(--border-hover);
    color: var(--cream);
}

.work-image {
    width: 300px;
    height: 180px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.6s var(--ease-out);
}

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

.work-number {
    font-family: var(--serif);
    font-size: 4rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.15);
}

.bg-1 { background: linear-gradient(135deg, #1a1520, #2d1f3d); }
.bg-2 { background: linear-gradient(135deg, #0f1a20, #1a2d3d); }
.bg-3 { background: linear-gradient(135deg, #1a1a0f, #2d2d1a); }
.bg-4 { background: linear-gradient(135deg, #0f1a15, #1a3d2d); }
.bg-5 { background: linear-gradient(135deg, #1a1518, #3d1a2d); }
.bg-6 { background: linear-gradient(135deg, #15181a, #1a2d3d); }

.work-arrow {
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: all 0.4s var(--ease);
    opacity: 0;
    transform: translateX(-10px);
}

.work-item:hover .work-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--cream);
}

/* ===========================================
   EXPERTISE SECTION
=========================================== */
.expertise {
    border-top: 1px solid var(--border);
}

.expertise-left {
    position: sticky;
    top: 150px;
}

.expertise-item {
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.expertise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    cursor: pointer;
    transition: color 0.3s;
}

.expertise-header:hover {
    color: var(--cream);
}

.expertise-header h3 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
    transition: color 0.3s;
}

.expertise-header:hover h3 {
    color: var(--cream);
}

.expertise-toggle {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--cream);
    transition: transform 0.4s var(--ease);
    line-height: 1;
}

.expertise-item.open .expertise-toggle {
    transform: rotate(45deg);
}

.expertise-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease), padding 0.5s var(--ease);
    padding: 0 0;
}

.expertise-item.open .expertise-body {
    max-height: 300px;
    padding: 0 0 30px;
}

.expertise-body p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.8;
    margin-bottom: 20px;
    max-width: 520px;
}

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

.expertise-tags span {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--cream);
    padding: 6px 14px;
    border: 1px solid var(--border-hover);
    border-radius: 2px;
    letter-spacing: 0.08em;
}

/* ===========================================
   MARQUEE
=========================================== */
.marquee {
    padding: 35px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.marquee-inner {
    display: flex;
    gap: 60px;
    align-items: center;
    animation: marqueeScroll 20s linear infinite;
    width: max-content;
}

.marquee-inner span {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-muted);
    white-space: nowrap;
    font-style: italic;
}

.marquee-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--cream);
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===========================================
   CONTACT SECTION
=========================================== */
.contact {
    border-top: 1px solid var(--border);
}

.contact-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 120px 50px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
}

.contact-left {
    position: sticky;
    top: 150px;
}

.contact-heading {
    font-family: var(--serif);
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 300;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 25px;
}

.contact-heading em {
    color: var(--cream);
    font-style: italic;
}

.contact-sub {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 380px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-row {
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}

.form-row label {
    display: block;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cream);
    margin-bottom: 10px;
}

.form-row input,
.form-row textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--text);
    padding: 8px 0;
    transition: border-color 0.3s;
}

.form-row textarea {
    resize: none;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    padding: 18px 40px;
    background: transparent;
    border: 1px solid var(--cream);
    color: var(--cream);
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: all 0.4s var(--ease);
    align-self: flex-start;
}

.btn-submit:hover {
    background: var(--cream);
    color: var(--black);
}

.btn-submit svg {
    transition: transform 0.3s var(--ease);
}

.btn-submit:hover svg {
    transform: translateX(4px);
}

.form-feedback {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--cream);
    min-height: 24px;
}

/* ===========================================
   FOOTER
=========================================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 50px;
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.05em;
}

.footer-logo span {
    color: var(--cream);
}

.footer-left p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.social {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.4s var(--ease);
}

.social:hover {
    border-color: var(--cream);
    color: var(--cream);
    transform: translateY(-3px);
}

/* ===========================================
   RESPONSIVE — TABLET
=========================================== */
@media (max-width: 1024px) {
    .header { padding: 20px 30px; }
    .header.scrolled { padding: 16px 30px; }
    .hero { padding: 120px 30px 60px; }
    .section-grid { padding: 80px 30px; grid-template-columns: 1fr; gap: 50px; }
    .section-header { padding: 0 30px 60px; }
    .work-link { padding: 35px 30px; grid-template-columns: 1fr 200px auto; }
    .contact-inner { padding: 80px 30px; grid-template-columns: 1fr; gap: 50px; }
    .footer { padding: 30px 30px; }

    .about-left, .expertise-left, .contact-left {
        position: static;
    }

    .work-image {
        width: 200px;
        height: 130px;
    }
}

/* ===========================================
   RESPONSIVE — MOBILE
=========================================== */
@media (max-width: 768px) {
    /* Hide custom cursor on touch devices */
    .cursor, .cursor-follower { display: none; }
    body { cursor: auto; }
    a, button { cursor: pointer; }

    .header { padding: 18px 20px; }
    .header.scrolled { padding: 14px 20px; }

    .menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--black);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 28px;
        transition: right 0.5s var(--ease-out);
    }

    .nav.open {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        letter-spacing: 0.2em;
    }

    .nav-resume {
        margin-left: 0;
        margin-top: 15px;
    }

    .hero {
        padding: 120px 20px 60px;
        min-height: 85vh;
    }

    .hero-title .line {
        font-size: clamp(2.4rem, 10vw, 3.8rem);
    }

    .hero-scroll { display: none; }

    .section-grid {
        padding: 70px 20px;
        gap: 40px;
    }

    .section-header {
        padding: 70px 20px 40px;
    }

    .work-link {
        grid-template-columns: 1fr;
        padding: 30px 20px;
        gap: 20px;
    }

    .work-visual { display: none; }
    .work-arrow { display: none; }

    .stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .contact-inner {
        padding: 70px 20px;
        gap: 40px;
    }

    .footer {
        padding: 25px 20px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .marquee-inner span {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-title .line {
        font-size: 2.2rem;
    }

    .section-heading {
        font-size: 2.4rem;
    }

    .contact-heading {
        font-size: 2.4rem;
    }
}
