/* Anthony C. Perry — Research Portfolio
   Neural Enso: Organic Tech Lab Theme */

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

:root {
    --alabaster: #FAF9F6;
    --deep-slate: #39464E;
    --slate-light: #4b5a63;
    --muted-sage: #8BA88E;
    --sage-dim: rgba(139, 168, 142, 0.1);
    --sage-border: rgba(139, 168, 142, 0.2);
    --max-width: 980px;
    --nav-height: 60px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    line-height: 1.7;
    color: var(--deep-slate);
    background: var(--alabaster);
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.font-technical,
h1, h2, h3,
nav, .nav-brand, .nav-links {
    font-family: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }

em { font-style: italic; }

a {
    color: var(--muted-sage);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--deep-slate);
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--muted-sage);
    outline-offset: 2px;
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(250, 249, 246, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--deep-slate);
    text-decoration: none;
    letter-spacing: 0.08em;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 12px;
    font-weight: 500;
    color: var(--slate-light);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--muted-sage);
}

/* ========================================
   HERO
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
}

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

/* Neural Enso Logo */
.enso-logo {
    display: block;
    margin: 0 auto 40px;
    width: 320px;
    height: auto;
    opacity: 0;
    transform: scale(0.92);
    animation: revealEnso 1.2s ease-out 0.2s forwards;
}

@keyframes revealEnso {
    to { opacity: 1; transform: scale(1); }
}

.hero h1 {
    margin-bottom: 16px;
    color: var(--deep-slate);
}

.hero h1 em {
    font-style: italic;
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
}

.hero-tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted-sage);
    margin-bottom: 24px;
}

.hero-subtext {
    font-size: 1.1rem;
    color: var(--slate-light);
    line-height: 1.8;
    max-width: 520px;
    margin: 0 auto;
}

.scroll-hint {
    margin-top: 48px;
    opacity: 0.3;
    animation: gentleBounce 2.5s ease-in-out infinite;
    color: var(--slate-light);
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ========================================
   RESEARCH PILLARS
   ======================================== */

.pillars-section {
    padding: 100px 0 80px;
}

.pillars-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 48px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(57, 70, 78, 0.1);
}

.pillars-header h2 {
    color: var(--deep-slate);
}

.pillars-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate-light);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ========================================
   PROJECT CARDS
   ======================================== */

.project-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--sage-border);
    border-radius: 10px;
    padding: 36px 28px;
    transition: border-color 0.4s ease-in-out, transform 0.4s ease-in-out, background 0.4s ease-in-out;
}

.project-card:hover {
    border-color: var(--muted-sage);
    transform: translateY(-4px);
    background: #ffffff;
}

.pillar-label {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-sage);
    margin-bottom: 16px;
}

.pillar-icon {
    margin-bottom: 20px;
}

.project-card h3 {
    color: var(--deep-slate);
    margin-bottom: 4px;
}

.project-type {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: var(--muted-sage);
    font-weight: 500;
    margin-bottom: 16px;
}

.project-desc {
    font-size: 15px;
    color: var(--slate-light);
    line-height: 1.7;
    margin-bottom: 24px;
}

.project-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.project-cta {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-sage);
    text-decoration: none;
    transition: color 0.3s;
}

.project-cta:hover {
    color: var(--deep-slate);
}

.project-cta-secondary {
    color: var(--slate-light);
    font-size: 13px;
}

.project-cta-secondary:hover {
    color: var(--muted-sage);
}

/* ========================================
   ORIGINS SECTION
   ======================================== */

.origins-section {
    padding: 80px 0 100px;
    border-top: 1px solid rgba(57, 70, 78, 0.08);
}

.section-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted-sage);
    margin-bottom: 8px;
}

.origins-section h2 {
    color: var(--deep-slate);
    margin-bottom: 40px;
}

.origins-narrative {
    max-width: 720px;
}

.origins-narrative > p {
    font-size: 1.05rem;
    color: var(--slate-light);
    margin-bottom: 32px;
}

.pull-quote {
    border-left: 3px solid var(--muted-sage);
    padding: 0 0 0 24px;
    margin: 0 0 40px 0;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--deep-slate);
    line-height: 1.8;
}

.origins-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.origins-column h3 {
    color: var(--deep-slate);
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.origins-column ul {
    list-style: none;
    padding: 0;
}

.origins-column li {
    font-size: 15px;
    color: var(--slate-light);
    padding: 6px 0;
    border-bottom: 1px solid rgba(57, 70, 78, 0.06);
}

.origins-column li:last-child {
    border-bottom: none;
}

.text-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-sage);
}

.text-link:hover {
    color: var(--deep-slate);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    padding: 80px 0 40px;
    text-align: center;
    border-top: 1px solid rgba(57, 70, 78, 0.08);
}

.footer-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted-sage);
    margin-bottom: 8px;
}

.footer-heading {
    color: var(--deep-slate);
    margin-bottom: 28px;
}

.btn-primary {
    display: inline-block;
    padding: 14px 36px;
    background: var(--muted-sage);
    color: #ffffff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
}

.btn-primary:hover {
    background: var(--deep-slate);
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 32px 0 40px;
}

.footer-links a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--slate-light);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--muted-sage);
}

.footer-copy {
    font-size: 13px;
    color: var(--slate-light);
}

/* ========================================
   ABOUT PAGE
   ======================================== */

.about-hero {
    padding: 140px 0 60px;
    text-align: center;
}

.about-identity {
    max-width: 640px;
    margin: 0 auto;
}

.about-headshot {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--sage-border);
    object-fit: cover;
    margin-bottom: 24px;
}

.about-hero h1 {
    margin-bottom: 8px;
}

.about-hero h1 em {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
}

.about-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-sage);
    margin-bottom: 24px;
}

.credential-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.credential-pill {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--sage-dim);
    color: var(--deep-slate);
    white-space: nowrap;
}

/* Bio Content */
.bio-section {
    padding: 40px 0 80px;
}

.bio-content {
    max-width: 680px;
    margin: 0 auto;
}

.bio-block {
    margin-bottom: 40px;
}

.bio-block h2 {
    font-size: 1.2rem;
    color: var(--deep-slate);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(57, 70, 78, 0.08);
}

.bio-lead {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--deep-slate);
}

.bio-block p {
    font-size: 1rem;
    color: var(--slate-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.bio-block p:last-child {
    margin-bottom: 0;
}

.bio-block a {
    color: var(--muted-sage);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bio-block a:hover {
    color: var(--deep-slate);
}

/* ========================================
   ANIMATIONS — FADE IN ON SCROLL
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Stagger cards */
.pillars-grid .fade-in:nth-child(2) { transition-delay: 0.1s; }
.pillars-grid .fade-in:nth-child(3) { transition-delay: 0.2s; }

/* ========================================
   SCROLLBAR
   ======================================== */

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

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

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

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

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .enso-logo {
        opacity: 1;
        transform: none;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }

    .scroll-hint {
        animation: none;
        opacity: 0.3;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .pillars-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pillars-header {
        flex-direction: column;
        gap: 8px;
    }

    .origins-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero {
        padding: 100px 24px 60px;
        min-height: auto;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 11px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .nav-inner {
        padding: 0 16px;
    }

    .nav-brand {
        font-size: 16px;
    }

    .nav-links {
        gap: 14px;
    }

    .nav-links a {
        font-size: 10px;
    }

    h1 { font-size: 2rem; }

    .hero-tagline {
        font-size: 11px;
        letter-spacing: 0.15em;
    }

    .container {
        padding: 0 16px;
    }

    .project-card {
        padding: 28px 20px;
    }

    .enso-logo {
        width: 220px;
    }
}
