/* ========================================
   Alec Wild — Personal Site v3
   Editorial · Animated · Refined
   ======================================== */

:root {
    --black: #1a1a1a;
    --dark: #2c2c2c;
    --mid: #6b6b6b;
    --light: #a8a8a8;
    --pale: #e8e5e0;
    --cream: #f5f3ef;
    --white: #fafaf8;
    --accent: #8b4513;
    --accent-light: #a0522d;
    --accent-faint: rgba(139, 69, 19, 0.08);
    --serif: 'Cormorant Garamond', 'Georgia', serif;
    --sans: 'Karla', 'Helvetica Neue', sans-serif;
    --transition: 0.3s ease;
    --max-width: 1100px;
    --max-wide: 1300px;
}

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

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

body {
    font-family: var(--sans);
    font-weight: 400;
    color: var(--black);
    background: var(--white);
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); font-weight: 300; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em; margin-bottom: 1.5rem; }
h3 { font-size: 1.3rem; font-weight: 500; margin-bottom: 0.5rem; }
p { font-size: 1rem; line-height: 1.75; color: var(--dark); }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }

.text-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--accent);
    position: relative;
    padding-bottom: 2px;
}
.text-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width var(--transition);
}
.text-link:hover::after { width: 100%; }

/* ---- Navigation ---- */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3rem;
    background: rgba(250, 250, 248, 0);
    backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    transition: all 0.5s ease;
}
.nav.scrolled {
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
.nav-name {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--black);
    letter-spacing: 0.08em;
}
.nav-name:hover { color: var(--accent); }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--mid);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width var(--transition);
}
.nav-links a:hover { color: var(--black); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--black); }
.nav-links a.active::after { width: 100%; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 6px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--black);
    transition: all var(--transition);
}
.nav-toggle.active span:first-child { transform: rotate(45deg) translate(3px, 3px); }
.nav-toggle.active span:last-child { transform: rotate(-45deg) translate(3px, -3px); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu a { font-family: var(--serif); font-size: 1.8rem; color: var(--black); }

/* ---- Hero ---- */
.hero-full {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--black);
    overflow: hidden;
}
.hero-full::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(139,69,19,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.hero-name-reveal { text-align: center; }
.hero-name-line { display: flex; justify-content: center; gap: 0.08em; }
.letter {
    display: inline-block;
    font-family: var(--serif);
    font-size: clamp(5rem, 14vw, 12rem);
    font-weight: 300;
    color: var(--white);
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateY(40px);
    animation: letterReveal 0.8s ease forwards;
    animation-delay: calc(var(--i) * 0.1s + 0.3s);
}
@keyframes letterReveal { to { opacity: 1; transform: translateY(0); } }

.hero-subtitle-reveal { margin-top: 2rem; opacity: 0; animation: fadeInUp 0.8s ease 1.4s forwards; }
.hero-roles { display: flex; align-items: center; gap: 1.25rem; }
.role-link {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--light);
    transition: color 0.3s ease;
}
.role-link:hover { color: var(--white); }
.role-dot { color: var(--accent); font-size: 1.2rem; }

.scroll-prompt {
    position: absolute;
    bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 2s forwards;
}
.scroll-prompt span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--light); }
.scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%, 100% { opacity: 0.3; transform: scaleY(0.6); } 50% { opacity: 1; transform: scaleY(1); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Intro ---- */
.intro-section { padding: 8rem 3rem; max-width: var(--max-width); margin: 0 auto; }
.intro-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 4rem; align-items: start; }
.parallax-container { overflow: hidden; position: relative; }
.parallax-img { width: 100%; transition: transform 0.1s linear; filter: grayscale(10%); }
.parallax-container::after { content: ''; position: absolute; inset: 0; border: 1px solid rgba(0,0,0,0.06); pointer-events: none; }
.intro-lead { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; line-height: 1.6; color: var(--black); margin-bottom: 1.5rem; }
.intro-text p { margin-bottom: 1rem; }
.intro-text .text-link { margin-top: 0.75rem; }

/* ---- Pillars ---- */
.pillars-section { display: grid; grid-template-columns: repeat(3, 1fr); max-width: var(--max-wide); margin: 0 auto; border-top: 1px solid var(--pale); }
.pillar { padding: 4rem 3rem; border-right: 1px solid var(--pale); transition: background 0.4s ease; }
.pillar:last-child { border-right: none; }
.pillar:hover { background: var(--accent-faint); }
.pillar-number { font-family: var(--sans); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 1rem; }
.pillar-title { font-size: 1.8rem; margin-bottom: 1rem; }
.pillar-title a { color: var(--black); }
.pillar-title a:hover { color: var(--accent); }
.pillar p { font-size: 0.95rem; color: var(--mid); margin-bottom: 1.5rem; }

/* ---- Numbers ---- */
.numbers-section { padding: 6rem 3rem; background: var(--black); }
.numbers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: var(--max-wide); margin: 0 auto; text-align: center; }
.number-value { display: block; font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 300; color: var(--white); line-height: 1; margin-bottom: 0.75rem; }
.number-value::after { content: '+'; font-size: 0.6em; color: var(--accent); }
.number-value.no-plus::after { content: ''; }
.number-label { font-size: 0.82rem; color: var(--light); line-height: 1.5; }

/* ---- Featured ---- */
.featured-section { padding: 6rem 3rem; border-top: 1px solid var(--pale); }
.featured-inner { max-width: var(--max-wide); margin: 0 auto; }
.section-heading { font-size: 0.8rem; font-family: var(--sans); font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--light); margin-bottom: 2.5rem; }
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.featured-card { display: block; padding: 2rem; border: 1px solid var(--pale); transition: all 0.4s ease; color: var(--black); position: relative; overflow: hidden; }
.featured-card::before { content: ''; position: absolute; top: 0; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.4s ease; }
.featured-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.06); color: var(--black); }
.featured-card:hover::before { width: 100%; }
.featured-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.featured-year { font-size: 0.75rem; color: var(--light); letter-spacing: 0.06em; }
.featured-tag { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); border: 1px solid var(--accent); padding: 0.2rem 0.6rem; border-radius: 2px; }
.featured-card h3 { font-family: var(--serif); font-size: 1.4rem; font-style: italic; font-weight: 400; margin-bottom: 0.75rem; }
.featured-card p { font-size: 0.9rem; color: var(--mid); margin-bottom: 1rem; }
.featured-venue { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--light); }

/* ---- Quote ---- */
.quote-section { padding: 6rem 3rem; background: var(--cream); }
.quote-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.quote-inner blockquote { font-family: var(--serif); font-size: clamp(1.25rem, 2.5vw, 1.7rem); font-style: italic; font-weight: 300; color: var(--dark); line-height: 1.7; position: relative; }
.quote-inner blockquote::before { content: '\201C'; font-family: var(--serif); font-size: 5rem; color: var(--accent); opacity: 0.3; position: absolute; top: -2rem; left: -1rem; line-height: 1; }
.quote-inner blockquote::after { content: '\201D'; font-family: var(--serif); font-size: 5rem; color: var(--accent); opacity: 0.3; position: absolute; bottom: -3rem; right: -1rem; line-height: 1; }
.quote-inner cite { display: block; margin-top: 1.5rem; font-family: var(--sans); font-size: 0.8rem; font-style: normal; text-transform: uppercase; letter-spacing: 0.12em; color: var(--light); }

/* ---- Page Header ---- */
.page-header { padding: 10rem 3rem 3rem; max-width: var(--max-width); margin: 0 auto; }
.page-header h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); opacity: 0; transform: translateY(20px); animation: fadeInUp 0.7s ease 0.2s forwards; }
.page-header .subtitle { font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--mid); margin-top: 0.75rem; opacity: 0; animation: fadeInUp 0.7s ease 0.4s forwards; }

/* ---- About ---- */
.about-content { max-width: var(--max-width); margin: 0 auto; padding: 3rem 3rem 5rem; display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; }
.about-sidebar { position: sticky; top: 8rem; align-self: start; }
.about-sidebar img { filter: grayscale(10%); }
.about-details { margin-top: 1.5rem; }
.about-details dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--light); margin-top: 1rem; }
.about-details dd { font-size: 0.9rem; color: var(--dark); }
.about-main p { margin-bottom: 1.25rem; }
.about-main p:first-of-type::first-letter { font-family: var(--serif); font-size: 3.5rem; float: left; line-height: 0.8; margin-right: 0.5rem; margin-top: 0.15rem; color: var(--accent); }

/* ---- Story Content ---- */
.story-content { max-width: var(--max-width); margin: 0 auto; padding: 2rem 3rem 5rem; }
.story-narrative { max-width: 680px; margin-bottom: 4rem; }
.story-narrative p { margin-bottom: 1.25rem; font-size: 1.05rem; }

/* ---- Work Lists (no year column) ---- */
.work-category { margin-bottom: 4rem; }
.work-category h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--sans); font-weight: 500; margin-bottom: 1.5rem; color: var(--light); border-bottom: 1px solid var(--pale); padding-bottom: 0.75rem; }
.work-list { display: flex; flex-direction: column; }
.work-entry {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    align-items: baseline;
    transition: all var(--transition);
}
.work-entry:hover { background: var(--cream); padding-left: 0.75rem; padding-right: 0.75rem; }
.work-entry-year { display: none; }
.work-entry-title { font-family: var(--serif); font-size: 1.1rem; font-style: italic; font-weight: 500; color: var(--black); }
.work-entry-role { font-size: 0.85rem; color: var(--mid); margin-top: 0.1rem; }
.work-entry-venue { font-size: 0.85rem; color: var(--light); text-align: right; white-space: nowrap; }

/* ---- Contact ---- */
.contact-content { max-width: 600px; margin: 0 auto; padding: 2rem 3rem 5rem; }
.contact-content > p { margin-bottom: 1.25rem; font-size: 1.05rem; }
.contact-info { margin-top: 2.5rem; padding: 2rem; background: var(--cream); border-left: 2px solid var(--accent); }
.contact-info-item { margin-bottom: 1rem; }
.contact-info-item:last-child { margin-bottom: 0; }
.contact-info-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--light); margin-bottom: 0.2rem; }
.contact-info-value { font-size: 1rem; color: var(--dark); }
.contact-info-value a { color: var(--dark); border-bottom: 1px solid var(--pale); }
.contact-info-value a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--pale); padding: 2.5rem 3rem; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end; }
.footer-left { display: flex; flex-direction: column; gap: 0.25rem; }
.footer-name { font-family: var(--serif); font-size: 1.1rem; color: var(--black); }
.footer-title { font-size: 0.8rem; color: var(--light); }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.footer-right a { font-size: 0.85rem; color: var(--mid); }
.footer-right a:hover { color: var(--accent); }
.footer-right span { font-size: 0.75rem; color: var(--light); }

/* ---- Animations ---- */
/* JS adds .js-ready to <html>, which enables fade-up hiding. No JS = everything visible. */
.js-ready .fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js-ready .fade-up.visible { opacity: 1; transform: translateY(0); }
.js-ready .fade-up[data-delay="150"] { transition-delay: 0.15s; }
.js-ready .fade-up[data-delay="300"] { transition-delay: 0.3s; }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
    .pillars-section { grid-template-columns: 1fr; }
    .pillar { border-right: none; border-bottom: 1px solid var(--pale); }
    .pillar:last-child { border-bottom: none; }
    .featured-grid { grid-template-columns: 1fr; }
    .numbers-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .mobile-menu { display: flex; }
    .intro-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .intro-image { max-width: 400px; }
    .about-content { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 2rem 4rem; }
    .about-sidebar { position: static; max-width: 300px; }
    .nav { padding: 1rem 2rem; }
    .intro-section { padding: 5rem 2rem; }
    .pillar { padding: 3rem 2rem; }
    .numbers-section { padding: 4rem 2rem; }
    .featured-section { padding: 4rem 2rem; }
    .quote-section { padding: 4rem 2rem; }
    .page-header { padding: 7rem 2rem 2rem; }
    .story-content, .contact-content { padding: 1.5rem 2rem 4rem; }
    .footer { padding: 1.5rem 2rem; }
}

@media (max-width: 550px) {
    .numbers-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .hero-roles { flex-direction: column; gap: 0.75rem; }
    .role-dot { display: none; }
    .footer-inner { flex-direction: column; gap: 1rem; }
    .footer-right { align-items: flex-start; }
}
