/* ashleycorbion.com — personal site styles.
   Deliberately neutral (system font, quiet surfaces, hairline borders) so each app card can
   carry its own brand: The Dude's warm orange → yellow, Valance's indigo → violet.
   Light by default, dark via prefers-color-scheme. Gradients only ever sit on surfaces
   (glows, card edges), never behind text, so body text keeps full contrast. */

:root {
    --bg: #fbfbfd;
    --bg-raised: #ffffff;
    --line: rgb(0 0 0 / 0.08);
    --ink: #1d1d1f;
    --ink-soft: rgb(29 29 31 / 0.72);
    --ink-faint: rgb(29 29 31 / 0.56);
    --link: #0a5cc2;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 10px 30px -14px rgb(20 20 40 / 0.18);
    --shadow-lifted: 0 1px 2px rgb(0 0 0 / 0.04), 0 22px 44px -18px rgb(20 20 40 / 0.26);

    --dude-gradient: linear-gradient(135deg, #ff9300, #ffd200);
    --dude-glow: rgb(255 147 0 / 0.20);
    --valance-gradient: linear-gradient(135deg, #5856d6, #9b4ddb);
    --valance-glow: rgb(88 86 214 / 0.20);

    --radius: 24px;
    --max: 960px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e0e10;
        --bg-raised: #18181b;
        --line: rgb(255 255 255 / 0.09);
        --ink: #ececee;
        --ink-soft: rgb(236 236 238 / 0.72);
        --ink-faint: rgb(236 236 238 / 0.55);
        --link: #6cb2ff;
        --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px -14px rgb(0 0 0 / 0.6);
        --shadow-lifted: 0 1px 2px rgb(0 0 0 / 0.3), 0 22px 44px -18px rgb(0 0 0 / 0.75);
        --dude-glow: rgb(255 147 0 / 0.16);
        --valance-glow: rgb(155 77 219 / 0.20);
    }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; }
p { text-wrap: pretty; hyphens: manual; hanging-punctuation: first; }
.lead { text-wrap: balance; }

::selection { background: color-mix(in srgb, #9b4ddb 24%, transparent); }

.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
    position: absolute; left: 1rem; top: -3rem; z-index: 10;
    background: var(--bg-raised); padding: 0.5rem 1rem; border-radius: 10px; box-shadow: var(--shadow);
}
.skip:focus { top: 1rem; }

/* Navigation */

.nav {
    position: sticky; top: 0; z-index: 5;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.mark { width: 2rem; height: 2rem; flex: none; filter: drop-shadow(0 2px 4px rgb(155 77 219 / 0.25)); transition: rotate 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.brand:hover .mark { rotate: -6deg; }
.nav nav { display: flex; gap: 1.25rem; }
.nav nav a {
    color: var(--ink-soft); text-decoration: none; font-size: 0.95rem;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: color 0.2s ease, background-size 0.25s ease;
}
.nav nav a:hover { color: var(--ink); background-size: 100% 1px; }

@media (max-width: 30rem) {
    .brand span:last-child { display: none; }
}

/* Hero */

.hero { padding-top: clamp(3.5rem, 10vw, 7rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.eyebrow { margin: 0 0 0.75rem; color: var(--ink-faint); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); max-width: 14ch; }
.lead { margin: 1.25rem 0 0; max-width: 36rem; font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--ink-soft); }

/* App cards */

.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1.5rem; }

.app {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; gap: 1.25rem;
    padding: 2rem; border-radius: var(--radius);
    background: var(--bg-raised); border: 1px solid var(--line); box-shadow: var(--shadow);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.app:hover { transform: translateY(-3px); box-shadow: var(--shadow-lifted); border-color: color-mix(in srgb, var(--ink) 14%, transparent); }
.app:active { transform: translateY(-1px) scale(0.995); transition-duration: 0.1s; }
.app:has(.app-link:focus-visible) { outline: 2px solid var(--link); outline-offset: 4px; }
/* A soft brand glow in the corner, and a thin gradient rule along the top edge. */
.app::before {
    content: ""; position: absolute; inset: -40% -40% auto auto; width: 70%; aspect-ratio: 1;
    border-radius: 50%; filter: blur(40px); pointer-events: none; z-index: -1;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease; opacity: 0.85;
}
.app:hover::before { transform: scale(1.25); opacity: 1; }
.app::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; }
.app-dude::before { background: var(--dude-glow); }
.app-dude::after { background: var(--dude-gradient); }
.app-valance::before { background: var(--valance-glow); }
.app-valance::after { background: var(--valance-gradient); }

.app-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.app-icon { flex: none; width: 64px; height: 64px; filter: drop-shadow(0 4px 8px rgb(0 0 0 / 0.22)); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.app:hover .app-icon { transform: scale(1.05) rotate(-3deg); }

/* Screenshot stages. Each app gets a backdrop in its own brand, and the shots bleed off the
   edges so the stage reads as a window onto the app rather than a framed picture. On hover the
   phones fan out and the Mac windows shift apart. Everything moves with the individual
   `translate`/`rotate`/`scale` properties so the transitions compose. */
.app-stage {
    position: relative; overflow: hidden; aspect-ratio: 16 / 11;
    margin: -1.25rem -1.25rem 0.25rem; border-radius: calc(var(--radius) - 0.75rem);
    box-shadow: inset 0 0 0 1px var(--line);
}
.app-dude .app-stage {
    background:
        radial-gradient(90% 70% at 50% 105%, rgb(255 147 0 / 0.55), transparent 70%),
        radial-gradient(60% 50% at 15% 0%, rgb(255 210 0 / 0.14), transparent 70%),
        #160f08;
}
.app-valance .app-stage {
    background:
        radial-gradient(80% 70% at 90% 100%, rgb(155 77 219 / 0.30), transparent 70%),
        radial-gradient(70% 60% at 0% 0%, rgb(88 86 214 / 0.20), transparent 70%),
        #efeefb;
}
@media (prefers-color-scheme: dark) {
    .app-valance .app-stage {
        background:
            radial-gradient(80% 70% at 90% 100%, rgb(155 77 219 / 0.40), transparent 70%),
            radial-gradient(70% 60% at 0% 0%, rgb(88 86 214 / 0.30), transparent 70%),
            #15132a;
    }
}
.app-stage img { position: absolute; height: auto; transition: translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), rotate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), scale 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* iPhone 17 Pro Max proportions: the screen's corner radius is about 13.7% of its width and
   6.3% of its height. A dark ring plus a hairline highlight stands in for the bezel. */
.phone {
    width: 30%; left: 50%; bottom: -24%; transform-origin: 50% 100%;
    border-radius: 13.7% / 6.3%;
    box-shadow: 0 0 0 3px #1b1b1d, 0 0 0 4px rgb(255 255 255 / 0.14), 0 24px 40px -12px rgb(0 0 0 / 0.7);
}
.phone-centre { translate: -50% 0; z-index: 2; }
.phone-left { translate: -135% 7%; rotate: -9deg; scale: 0.92; }
.phone-right { translate: 35% 7%; rotate: 9deg; scale: 0.92; }
.app-dude:hover .phone-centre { translate: -50% -5%; }
.app-dude:hover .phone-left { translate: -148% 4%; rotate: -12deg; }
.app-dude:hover .phone-right { translate: 48% 4%; rotate: 12deg; }

/* The Mac shots are whole windows with transparent corners, so the shadow is a drop-shadow. */
.window { filter: drop-shadow(0 16px 24px rgb(30 20 80 / 0.30)); }
.window-back { width: 86%; left: 5%; top: 8%; }
.window-front { width: 66%; right: -9%; bottom: -16%; }
.app-valance:hover .window-back { translate: -2% -2%; }
.app-valance:hover .window-front { translate: -4% -5%; scale: 1.02; }
.app-body { display: flex; flex-direction: column; flex: 1; }
.app-platform { margin: 0 0 0.25rem; color: var(--ink-faint); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.app h3 { font-size: 1.75rem; }
.app-tagline { margin: 0.25rem 0 0.75rem; font-weight: 600; color: var(--ink); }
.app-body p:not(.app-platform):not(.app-tagline) { margin: 0 0 1.25rem; color: var(--ink-soft); }
.app-link { margin-top: auto; align-self: flex-start; font-weight: 600; text-decoration: none; }
.app-link:focus-visible { outline: none; }
.app-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.app-link span { display: inline-block; transition: transform 0.25s ease; }
.app:hover .app-link span { transform: translateX(4px); }

/* About, earlier work, contact */

.about, .consulting, .earlier, .contact { padding-top: clamp(3rem, 8vw, 5rem); }
.prose { max-width: 38rem; color: var(--ink-soft); }
.prose p { margin: 0 0 1rem; }

.earlier-note { margin: -0.25rem 0 1.25rem; color: var(--ink-faint); max-width: 38rem; }
.earlier-list {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 0.75rem 1.5rem;
}
.earlier-list li { display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem 0; }
.earlier-list img { flex: none; width: 40px; height: 40px; border-radius: 9px; filter: grayscale(0.35); opacity: 0.9; }
.earlier-list strong { display: block; font-size: 0.98rem; }
.earlier-list span { display: block; color: var(--ink-faint); font-size: 0.92rem; line-height: 1.4; }

.contact p { margin: 0 0 1rem; color: var(--ink-soft); max-width: 38rem; }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.contact-list a {
    display: inline-block; padding: 0.55rem 1.1rem; border-radius: 999px;
    border: 1px solid var(--line); background: var(--bg-raised);
    color: var(--ink); text-decoration: none; font-weight: 500;
}
.contact-list a { transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease; }
.contact-list a:hover { border-color: var(--ink-faint); transform: translateY(-1px); }
.contact-list a:active { transform: none; }

/* Sections ease in as they scroll into view. Scroll-driven, so no JavaScript, and skipped
   entirely when the browser can't do it or the visitor prefers reduced motion. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .app, .about, .consulting, .earlier, .contact {
            animation: rise linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 40%;
        }
    }
    .hero > * { animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
    .hero h1 { animation-delay: 0.06s; }
    .hero .lead { animation-delay: 0.14s; }
}
/* Animates `translate`, not `transform`: a filled animation would otherwise pin `transform`
   and cancel the cards' hover lift. */
@keyframes rise {
    from { opacity: 0; translate: 0 16px; }
    to { opacity: 1; translate: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

/* Footer */

.footer { margin-top: clamp(4rem, 10vw, 6rem); border-top: 1px solid var(--line); padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom)); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
.footer p { margin: 0; color: var(--ink-faint); font-size: 0.9rem; }
