
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: var(--theme-bg, #f5f5f7);
    --white: var(--theme-surface, #ffffff);
    --text: var(--theme-text, #1d1d1f);
    --muted: var(--theme-muted, #6e6e73);
    --blue: #06c;
    --border: var(--theme-border, #e5e5e7);
    --soft: #86868b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter",
        "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #06c;
    outline-offset: 4px;
}

.navbar {
    height: 54px;
    padding: 0 max(5%, calc((100% - 1050px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 245, 247, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid #00000008;
}

.logo {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
}

.nav-links a,
.nav-contact {
    font-size: 12px;
    transition: color 0.2s;
}

.nav-links a {
    color: #424245;
}

.nav-links a:hover,
.nav-contact:hover,
.text-link:hover,
.footer-link:hover {
    color: var(--blue);
}

.nav-contact {
    color: var(--blue);
}

.nav-contact span {
    margin-left: 3px;
}

.hero {
    min-height: 760px;
    padding: 100px 24px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.eyebrow {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.8px;
}

h1 {
    margin-top: 28px;
    font-size: clamp(48px, 7.3vw, 88px);
    line-height: 1.04;
    letter-spacing: -6px;
    font-weight: 700;
}

.soft-text {
    color: var(--soft);
}

.hero-description {
    max-width: 470px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.hero-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    margin-top: 30px;
}

.pill-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    background: var(--blue);
    color: white;
    border: 0;
    border-radius: 100px;
    padding: 13px 21px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.pill-button:hover {
    background: #0077ed;
    transform: translateY(-2px);
}

.text-link {
    color: var(--blue);
    font-size: 13px;
    transition: color 0.2s;
}

.text-link span {
    margin-left: 4px;
    transition: margin 0.2s;
}

.text-link:hover span {
    margin-left: 9px;
}


.hero-art {
    position: relative;
    width: min(850px, 100%);
    height: 340px;
    margin-top: 72px;
    border-radius: 24px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(
            ellipse at 50% 115%,
            #f0c9b2 0%,
            transparent 48%
        ),
        radial-gradient(
            ellipse at 15% 85%,
            #d5d2f0 0%,
            transparent 45%
        ),
        radial-gradient(
            ellipse at 85% 15%,
            #c4dce9 0%,
            transparent 42%
        ),
        linear-gradient(
            135deg,
            #e8e8ef,
            #f3e8e1 55%,
            #dce9e3
        );
}

html[data-theme="dark"] .hero-art {
    background:
        radial-gradient(
            ellipse at 50% 110%,
            #59463f 0%,
            transparent 48%
        ),
        radial-gradient(
            ellipse at 15% 85%,
            #343247 0%,
            transparent 45%
        ),
        radial-gradient(
            ellipse at 85% 15%,
            #293c49 0%,
            transparent 42%
        ),
        linear-gradient(
            135deg,
            #25252b,
            #292323 55%,
            #202925
        );
}

.art-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    animation: float 8s ease-in-out infinite;
}

.orb-a {
    width: 250px;
    height: 250px;
    top: 35px;
    left: 20%;
    background: linear-gradient(135deg, #ffffffb0, #c4b8ffcc 45%, #9cb5ff);
    box-shadow: inset -20px -20px 60px #7776c933,
        20px 30px 80px #7977ba22;
}

.orb-b {
    width: 180px;
    height: 180px;
    top: 85px;
    left: 50%;
    background: linear-gradient(135deg, #ffffffcc, #ffcfb4 60%, #f6bfa9);
    animation-delay: -3s;
    box-shadow: 10px 20px 60px #c78c7b30;
}

.orb-c {
    width: 110px;
    height: 110px;
    top: 25px;
    right: 14%;
    background: linear-gradient(135deg, #ffffff, #a9e7dd);
    animation-delay: -5s;
}

.art-ring {
    position: absolute;
    width: 430px;
    height: 150px;
    top: 85px;
    left: 50%;
    transform: translateX(-50%) rotate(-18deg);
    border: 1px solid #ffffffa8;
    border-radius: 50%;
}

.art-caption {
    position: absolute;
    bottom: 18px;
    left: 22px;
    right: 22px;
    display: flex;
    justify-content: space-between;
    color: #53505d;
    font-size: 9px;
    letter-spacing: 1.3px;
    font-weight: 600;
}

.scroll-hint {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #86868b;
    font-size: 9px;
    letter-spacing: 1.4px;
    margin-top: 25px;
}

.scroll-dot {
    height: 6px;
    width: 6px;
    border-radius: 50%;
    background: #a4a4a9;
}

.section {
    width: min(1050px, 90%);
    margin: auto;
    padding: 105px 0;
}

.intro-section {
    text-align: center;
    max-width: 820px;
}

.section h2,
.contact-section h2 {
    font-size: clamp(37px, 5.3vw, 58px);
    letter-spacing: -3px;
    line-height: 1.12;
    margin-top: 18px;
    font-weight: 700;
}

.body-copy {
    max-width: 620px;
    margin: 28px auto 24px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.85;
}

.interests-section {
    padding-top: 60px;
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 35px;
}

.interest-card {
    background: var(--white);
    border-radius: 17px;
    padding: 24px 20px;
    transition: transform 0.25s;
}

.interest-card:hover {
    transform: translateY(-4px);
}

.interest-icon {
    display: inline-block;
    font-size: 25px;
    color: var(--blue);
    margin-bottom: 24px;
}

.interest-card h3 {
    font-size: 15px;
    margin-bottom: 9px;
}

.interest-card p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
}

.contact-section {
    text-align: center;
    padding: 115px 20px 125px;
    background: var(--white);
}

.contact-section h2 {
    font-size: clamp(43px, 6vw, 70px);
}

.contact-section > p:not(.eyebrow) {
    color: var(--muted);
    margin: 22px 0 28px;
    font-size: 14px;
}

footer {
    width: min(1050px, 90%);
    margin: auto;
    padding: 25px 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

footer .logo {
    font-size: 22px;
}

footer p,
.footer-link,
.copyright {
    font-size: 11px;
    color: var(--muted);
}

.footer-link {
    transition: color 0.2s;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 25px;
    transform: translate(-50%, 20px);
    padding: 13px 20px;
    border-radius: 100px;
    background: #1d1d1f;
    color: white;
    font-size: 12px;
    box-shadow: 0 8px 30px #0002;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 200;
    text-align: center;
    width: max-content;
    max-width: calc(100% - 32px);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: reveal-in 0.8s ease forwards;
}

.hero .reveal:nth-child(2) {
    animation-delay: 0.1s;
}

.hero .reveal:nth-child(3) {
    animation-delay: 0.2s;
}

.hero .reveal:nth-child(4) {
    animation-delay: 0.3s;
}

.hero .reveal:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes reveal-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -12px;
    }
}

@media (max-width: 760px) {
    .navbar {
        padding: 0 5%;
    }

    .nav-links {
        gap: 17px;
    }

    .hero {
        padding-top: 80px;
        min-height: auto;
    }

    h1 {
        letter-spacing: -3px;
    }

    .hero-art {
        height: 250px;
        margin-top: 50px;
    }

    .orb-a {
        width: 190px;
        height: 190px;
        left: 10%;
    }

    .orb-b {
        width: 140px;
        height: 140px;
        left: 48%;
    }

    .orb-c {
        width: 85px;
        height: 85px;
        right: 7%;
    }

    .section {
        padding: 75px 0;
    }

    .interest-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .navbar {
        height: 50px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a,
    .nav-contact {
        font-size: 11px;
    }

    .hero {
        padding: 70px 18px 25px;
    }

    .eyebrow {
        font-size: 9px;
        letter-spacing: 1.3px;
    }

    h1 {
        font-size: 47px;
        letter-spacing: -2.8px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-links {
        gap: 18px;
    }

    .pill-button {
        padding: 12px 16px;
        font-size: 12px;
    }

    .hero-art {
        height: 205px;
        border-radius: 20px;
    }

    .orb-a {
        width: 150px;
        height: 150px;
        top: 30px;
    }

    .orb-b {
        width: 110px;
        height: 110px;
        top: 60px;
    }

    .orb-c {
        width: 60px;
        height: 60px;
        top: 20px;
    }

    .section h2 {
        font-size: 39px;
        letter-spacing: -2px;
    }

    .body-copy {
        font-size: 15px;
    }

    .interest-card {
        padding: 18px 15px;
    }

    footer {
        justify-content: center;
        text-align: center;
    }

    footer p {
        width: 100%;
        order: 3;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}


.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ===== THEME SYSTEM ===== */

:root {
    color-scheme: light;
    --theme-bg: #f5f5f7;
    --theme-surface: #ffffff;
    --theme-text: #1d1d1f;
    --theme-muted: #6e6e73;
    --theme-border: rgba(0, 0, 0, 0.1);
    --theme-button: #1d1d1f;
    --theme-button-text: #ffffff;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --theme-bg: #101010;
    --theme-surface: #1c1c1e;
    --theme-text: #f5f5f7;
    --theme-muted: #a1a1a6;
    --theme-border: rgba(255, 255, 255, 0.14);
    --theme-button: #f5f5f7;
    --theme-button-text: #1d1d1f;
}

body {
    background-color: var(--theme-bg);
    color: var(--theme-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar,
footer {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

html[data-theme="dark"] .soft-text {
    color: #a1a1a6;
}

html[data-theme="dark"] .interest-card {
    color: var(--theme-text);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 42px;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    background: var(--theme-surface);
    color: var(--theme-text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.25s ease,
                color 0.25s ease,
                transform 0.25s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
}

.theme-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    body,
    .navbar,
    footer,
    .theme-toggle {
        transition: none;
    }
}


/* ===== HOMEPAGE DARK MODE FIXES ===== */

/* Navbar: retain the translucent Apple-style effect */
html[data-theme="dark"] .navbar {
    background: rgba(16, 16, 16, 0.82);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .nav-links a {
    color: #d1d1d6;
}

html[data-theme="dark"] .nav-links a:hover {
    color: #2997ff;
}

/* Main cards and contact section */
html[data-theme="dark"] .interest-card,
html[data-theme="dark"] .contact-section {
    background: var(--theme-surface);
    color: var(--theme-text);
}

html[data-theme="dark"] .interest-card {
    border: 1px solid var(--theme-border);
}

/* Text and muted labels */
html[data-theme="dark"] .hero-description,
html[data-theme="dark"] .body-copy,
html[data-theme="dark"] .interest-card p,
html[data-theme="dark"] .contact-section > p:not(.eyebrow),
html[data-theme="dark"] footer p,
html[data-theme="dark"] .footer-link,
html[data-theme="dark"] .copyright {
    color: var(--theme-muted);
}

html[data-theme="dark"] .soft-text {
    color: #a1a1a6;
}

/* Footer */
html[data-theme="dark"] footer {
    color: var(--theme-text);
}

/* Theme toggle */
html[data-theme="dark"] .theme-toggle {
    background: #252527;
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, 0.16);
}

/* Keep the decorative artwork vibrant in both themes */
html[data-theme="dark"] .hero-art {
    border-color: transparent;
}

/* Smooth transitions for the main surfaces */
.navbar,
.interest-card,
.contact-section,
footer {
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

/* =====================================
   ASHERVERAH — CINEMATIC INTRO
===================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&family=Playfair+Display:ital,wght@0,700;1,400&display=swap');

.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    background: #f5f5f7;
    color: #111111;

    overflow: hidden;
}

html[data-theme="dark"] .intro-overlay {
    background: #101010;
    color: #f5f5f7;
}

html.play-intro .intro-overlay {
    display: flex;
    animation: introExit 0.85s cubic-bezier(.76, 0, .24, 1) 2.75s forwards;
}

.intro-content {
    width: 100%;
    padding: 0 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.intro-name {
    display: flex;
    justify-content: center;
    align-items: baseline;

    min-height: 1.3em;

    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(46px, 9vw, 105px);
    line-height: 1.15;
    letter-spacing: -0.065em;

    white-space: nowrap;
    color: inherit;
}

.intro-first {
    font-weight: 700;
    font-style: normal;
}

.intro-last {
    font-weight: 400;
    font-style: italic;
}

.intro-tagline {
    margin-top: 22px;

    font-family: "DM Sans", sans-serif;
    font-size: clamp(10px, 1.5vw, 12px);
    font-weight: 400;

    letter-spacing: 0.13em;
    color: #77777c;

    opacity: 0;
    transform: translateY(10px);

    transition:
        opacity 0.65s ease,
        transform 0.65s ease;
}

html[data-theme="dark"] .intro-tagline {
    color: #a1a1a6;
}

.intro-tagline.show {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth upward reveal */

@keyframes introExit {
    to {
        transform: translateY(-100%);
        visibility: hidden;
        pointer-events: none;
    }
}

/* Mobile adjustments */

@media (max-width: 480px) {
    .intro-name {
        font-size: clamp(36px, 10vw, 54px);
        letter-spacing: -0.07em;
    }

    .intro-tagline {
        margin-top: 16px;
        letter-spacing: 0.08em;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    html.play-intro .intro-overlay {
        animation: none;
        display: none;
    }
}

/* =====================================
   SCROLL REVEALS
===================================== */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.75s cubic-bezier(.2,.8,.2,1),
        transform 0.75s cubic-bezier(.2,.8,.2,1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth hover effects for cards */

.interest-card,
.project-card,
.contact-card {
    transition:
        transform 0.35s cubic-bezier(.2,.8,.2,1),
        box-shadow 0.35s ease;
}

.interest-card:hover,
.project-card:hover,
.contact-card:hover {
    transform: translateY(-5px);
}

/* Respect accessibility settings */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* =====================================
   ASHERVERAH — PERSONAL IDENTITY
===================================== */

/* Personal wordmark in the navigation */
.navbar .logo,
footer .logo {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.8px;
    white-space: nowrap;
}

/* Oversized editorial hero typography */
.hero h1.hero-wordmark {
    font-size: clamp(76px, 13vw, 156px);
    line-height: 0.84;
    letter-spacing: -0.085em;
    font-weight: 700;
    margin-top: 34px;
}

.hero-wordmark .soft-text {
    display: inline-block;
    margin-top: 12px;
}

/* More breathing room around the introduction */
.hero {
    padding-top: 115px;
}

.hero-description {
    max-width: 440px;
}

/* Cleaner editorial section headings */
.section h2,
.contact-section h2 {
    letter-spacing: -0.045em;
    line-height: 1.08;
}

/* Refined surfaces */
.interest-card {
    border: 1px solid var(--theme-border);
    box-shadow: none;
}

.interest-card:hover {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
}

/* Softer, more deliberate hero artwork */
.hero-art {
    border-radius: 24px;
}


/* Smooth theme changes */
body {
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar,
.interest-card,
.contact-section,
footer {
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}


/* Dark-mode surfaces */
html[data-theme="dark"] .interest-card {
    background: var(--theme-surface);
    border-color: var(--theme-border);
}

html[data-theme="dark"] .contact-section {
    background: var(--theme-surface);
}

html[data-theme="dark"] .navbar .logo,
html[data-theme="dark"] footer .logo {
    color: var(--theme-text);
}

/* Keep the oversized wordmark responsive */
@media (max-width: 760px) {
    .hero {
        padding-top: 85px;
    }

    .hero h1.hero-wordmark {
        font-size: clamp(68px, 14vw, 108px);
        letter-spacing: -0.075em;
    }
}

@media (max-width: 480px) {
    .hero h1.hero-wordmark {
        font-size: clamp(56px, 14vw, 76px);
        letter-spacing: -0.07em;
    }

    .hero-wordmark .soft-text {
        margin-top: 9px;
    }

    .navbar .logo {
        font-size: 16px;
        letter-spacing: -0.6px;
    }
}


/* =========================================
   UNIVERSAL NAVBAR COMPATIBILITY
   Prevent legacy styles from breaking mobile
========================================= */

@media (max-width: 760px) {
    .navbar {
        height: 64px;
        min-height: 64px;
        padding: 0 20px;
    }

    .navbar > .nav-links {
        gap: 0;
    }

    .navbar > .nav-links a {
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .navbar {
        padding-inline: 14px;
    }
}


/* ===== CINEMATIC PAGE TRANSITION SUPPORT ===== */

html {
    background-color: var(--theme-bg, #f5f5f7);
}

html.page-leaving {
    overflow: hidden;
}

html.page-leaving body {
    opacity: 0;
    filter: blur(5px);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    html.page-leaving {
        overflow: auto;
    }

    html.page-leaving body {
        opacity: 1;
        filter: none;
    }
}


/* ===== UNIVERSAL PAGE ENTRANCE ===== */

@keyframes asherPageEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

html:not(.play-intro):not(.page-leaving) body {
    animation: asherPageEnter 0.65s
        cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@media (prefers-reduced-motion: reduce) {
    html:not(.play-intro):not(.page-leaving) body {
        animation: none;
    }
}
