/* ============================================
   JONATHAN THOMSON — PORTFOLIO SITE
   Dark editorial with warm amber accents
   ============================================ */

:root {
    --bg: #0E0D0C;
    --bg-elevated: #171615;
    --bg-card: #1C1B19;
    --surface: #232220;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    --text: #EDE8E0;
    --text-muted: #8A847A;
    --text-dim: #5A5650;
    
    --accent: #C9933A;
    --accent-light: #E0B266;
    --accent-glow: rgba(201, 147, 58, 0.15);
    --accent-subtle: rgba(201, 147, 58, 0.08);
    
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
}

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

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
}

/* Grain overlay */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

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

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

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(24px, 5vw, 80px);
    transition: background 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
    background: rgba(14, 13, 12, 0.85);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    padding-top: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

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

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

.nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    padding: 10px 24px !important;
    border: 1px solid var(--border-hover) !important;
    border-radius: 100px;
    color: var(--text) !important;
    transition: all 0.3s ease !important;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--bg) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s ease;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

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

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px clamp(24px, 5vw, 80px) 60px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse at 80% 40%, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 80px;
    align-items: center;
}

.hero-label {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text);
}

.hero-sub {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 520px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 36px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 100px;
    transition: all 0.4s var(--ease);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(201, 147, 58, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-hover);
}

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

/* Hero Image */
.hero-image {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: contrast(1.03) saturate(1.05);
}

.hero-image-border {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.hero-image-tag {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: var(--accent);
    color: var(--bg);
    padding: 16px 22px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.tag-years {
    font-family: var(--font-display);
    font-size: 2.2rem;
    line-height: 1;
    letter-spacing: -0.02em;
}

.tag-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Hero Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

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

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
}

/* ============================================
   TICKER
   ============================================ */
.ticker {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    overflow: hidden;
    background: var(--bg-elevated);
}

.ticker-track {
    display: flex;
    gap: 48px;
    white-space: nowrap;
    animation: tickerScroll 30s linear infinite;
}

.ticker-item {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
}

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

/* ============================================
   SECTION LABELS
   ============================================ */
.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-label::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--accent);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 60px;
}

.section-title em {
    color: var(--accent);
    font-style: italic;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
    padding: 140px 0;
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    height: 60%;
    background: radial-gradient(ellipse at 0% 50%, var(--accent-subtle), transparent 50%);
    pointer-events: none;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 80px;
    align-items: start;
}

.about-headline {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    position: sticky;
    top: 120px;
}

.about-right p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 24px;
}

.about-right p:first-child {
    font-size: 1.2rem;
    color: var(--text);
    line-height: 1.7;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
    padding: 120px 0 140px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.service-card {
    background: var(--bg);
    padding: 48px 40px;
    transition: all 0.5s var(--ease);
    position: relative;
    overflow: hidden;
    transition-delay: var(--delay, 0s);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease);
}

.service-card:hover {
    background: var(--bg-card);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-num {
    display: block;
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--surface);
    line-height: 1;
    margin-bottom: 28px;
    transition: color 0.5s var(--ease);
}

.service-card:hover .service-num {
    color: var(--accent-glow);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   PORTFOLIO
   ============================================ */
.work {
    padding: 140px 0;
}

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

.work-card {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.5s var(--ease);
    transition-delay: var(--delay, 0s);
}

.work-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.work-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.work-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.work-card:hover .work-card-image img {
    transform: scale(1.04);
}

.work-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 13, 12, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.work-card-view {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 12px 24px;
    border: 1px solid var(--accent);
    border-radius: 100px;
}

.work-card-info {
    padding: 28px 32px;
}

.work-card-cat {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
    display: block;
}

.work-card-info h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.work-card-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    padding: 140px 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    height: 80%;
    background: radial-gradient(ellipse at 100% 100%, var(--accent-subtle), transparent 50%);
    pointer-events: none;
}

.contact-inner {
    max-width: 700px;
}

.contact-headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 48px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 40px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

a.contact-link:hover { padding-left: 12px; }
a.contact-link:hover .contact-link-value { color: var(--accent); }

.contact-link-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    width: 80px;
    flex-shrink: 0;
}

.contact-link-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.contact-social {
    display: flex;
    gap: 24px;
}

.contact-social a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
    position: relative;
}

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

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

.footer-inner {
    display: flex;
    justify-content: center;
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 340px;
        gap: 48px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-headline {
        position: static;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    
    .hero {
        padding-top: 100px;
        padding-bottom: 40px;
        min-height: auto;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .hero-image {
        order: -1;
        max-width: 260px;
        margin: 0 auto;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-sub {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-image-tag {
        bottom: -12px;
        left: auto;
        right: -12px;
        padding: 10px 14px;
    }
    
    .tag-years { font-size: 1.5rem; }
    
    .hero-scroll { display: none; }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 36px 28px;
    }
    
    .service-num {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
    }
    
    .about,
    .services,
    .work,
    .contact {
        padding: 80px 0;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .contact-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        text-align: center;
        justify-content: center;
    }
}

/* ============================================
   SELECTION & SCROLLBAR
   ============================================ */
::selection {
    background: var(--accent);
    color: var(--bg);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 3px;
}

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