/* Styles for codyparham.com (one-page portfolio): light, Apple-style materials over a faint satellite map.
   Palette from the map: river navy #14174F, river teal #2E8A99, parcel blue #2F4FB5,
   parcel cream #F1E4A0, vegetation green #2E9A48. */

:root {
    color-scheme: light;

    /* Parcel-cream neutrals with river-navy ink */
    --bg: #FAF6E6;
    --card: #FFFDF5;
    --card-raised: #F2EBD2;
    --border: #E5DCBC;
    --border-strong: #CFC293;
    --text: #070920;            /* 19:1 on --bg */
    --muted: #1E2140;           /* 15:1 on --bg */
    --faint: #3A3D58;           /* 10:1 on --bg */

    /* River-teal accent, deepened for text (5.4:1 on --bg); parcel-blue fills take white text (7.2:1) */
    --accent: #1D6E7A;
    --accent-hover: #2E8A99;
    --accent-fill: #2F4FB5;
    --accent-fill-hover: #253F94;
    --accent-soft: rgba(57, 255, 106, 0.28);
    --accent-line: rgba(46, 138, 153, 0.4);
    --accent-ink: #FFFFFF;
    --navy: #14174F;
    --green: #39FF6A;           /* neon vegetation green, for dots and glows */

    /* Materials: translucent layers over the map backdrop */
    --material: rgba(255, 253, 245, 0.67);
    --material-thick: rgba(250, 246, 230, 0.77);
    --shadow-sm: 0 1px 2px rgba(74, 46, 52, 0.06), 0 2px 8px rgba(74, 46, 52, 0.05);
    --shadow: 0 1px 2px rgba(74, 46, 52, 0.06), 0 8px 28px rgba(74, 46, 52, 0.08);
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

    --font: "Inter", "Segoe UI", system-ui, sans-serif;
    --text-xs: 0.75rem;   /* 12 */
    --text-sm: 0.875rem;  /* 14 */
    --text-md: 1rem;      /* 16 */
    --text-lg: 1.25rem;   /* 20 */
    --text-xl: 1.5rem;    /* 24 */
    --text-2xl: 2rem;     /* 32 */

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-pill: 999px;
    --bar: 60px;
    --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-hover);
}

*, *::before, *::after {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    height: 100%;
}
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url("map-background.webp") center / cover no-repeat;
    opacity: 0.16;
    pointer-events: none;
}
a {
    color: var(--accent);
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
svg.icon {
    flex: none;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* One-page layout: sticky frosted nav over a scrolling page */
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--bar) + var(--space-4));
}
html, body {
    height: auto;
}
.page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--space-5) var(--space-6);
}

/* Nav: translucent material, content scrolls under it */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--material);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--border);
}
.site-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    max-width: 1180px;
    height: var(--bar);
    margin: 0 auto;
    padding: 0 var(--space-5);
}
.brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}
.brand-mark {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--bg);
    background: var(--navy);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 800;
}
.brand:focus-visible,
.nav-links a:focus-visible {
    outline: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--ring);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-links a {
    display: block;
    padding: 6px var(--space-3);
    color: var(--muted);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
@media (hover: hover) {
    .nav-links a:hover {
        color: var(--text);
        background: var(--card-raised);
    }
}
.nav-links a[aria-current="true"] {
    color: var(--text);
    background: var(--accent-soft);
}

/* Sections */
.section {
    padding-top: var(--space-6);
}
.section-head {
    margin: 0 0 var(--space-5);
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0 0 var(--space-2);
    color: var(--accent);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.section-head h2 {
    margin: 0;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
}
.section-head p {
    max-width: 60ch;
    margin: var(--space-2) 0 0;
    color: var(--muted);
    font-size: var(--text-md);
    line-height: 1.6;
}

/* Project windows */
.projects {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}
.project-window {
    overflow: hidden;
}
.project-window .card-head {
    align-items: flex-end;
}
.project-title {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}
.project-window .card-head .eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: var(--text-xs);
}
.project-title h3 {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.015em;
}
.project-logo {
    display: block;
    align-self: flex-start;
    width: auto;
    height: 30px;
    max-width: 100%;
    margin-bottom: var(--space-1);
}
.project-window iframe {
    display: block;
    width: 100%;
    height: clamp(460px, 76vh, 860px);
    border: 0;
    background: var(--card-raised);
}
.live-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px var(--accent-soft), 0 0 10px 1px rgba(57, 255, 106, 0.8);
}
.soon-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}
.soon-list li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--muted);
    background: var(--material);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: 500;
}
.soon-badge {
    flex: none;
    padding: 1px var(--space-2);
    color: var(--muted);
    background: var(--card-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.6875rem;
    font-weight: 600;
}
.site-footer {
    padding: var(--space-6) 0 var(--space-2);
    color: var(--faint);
    font-size: var(--text-sm);
    text-align: center;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
}
.card-head h2 {
    margin: 0;
    font-size: var(--text-md);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.card-head p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: var(--text-sm);
}

/* Buttons */
.button {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-4);
    color: var(--accent-ink);
    background: var(--accent-fill);
    border: 1px solid var(--accent-fill);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.1s ease-out;
}
@media (hover: hover) {
    .button:hover {
        background: var(--accent-fill-hover);
        border-color: var(--accent-fill-hover);
    }
}
.button:active {
    transform: scale(0.97);
}
.button:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}
.button .icon {
    width: 16px;
    height: 16px;
}
.button-ghost {
    color: var(--text);
    background: var(--card);
    border-color: var(--border-strong);
}
@media (hover: hover) {
    .button-ghost:hover {
        background: var(--card-raised);
        border-color: var(--border-strong);
    }
}
/* Green halo for the one action to draw the eye to */
.button-glow {
    --glow: 0 0 0 1px var(--accent-line), 0 0 18px 2px rgba(47, 79, 181, 0.3);
    border-color: var(--accent-fill);
    box-shadow: var(--glow);
}
.button-glow:hover {
    border-color: var(--accent-fill-hover);
    box-shadow: 0 0 0 1px var(--accent-line), 0 0 26px 4px rgba(47, 79, 181, 0.4);
}
.button-glow:focus-visible {
    box-shadow: var(--ring), var(--glow);
}

@media (max-width: 760px) {
    .page,
    .site-nav-inner {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
    .nav-links .nav-optional {
        display: none;
    }
    .projects {
        gap: var(--space-5);
    }
    .card-head {
        padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
    }
    .project-window .card-head p {
        display: none;
    }
    .project-window .button {
        padding: 0;
    }
    .project-window .button .label-long {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .nav-links a,
    .button {
        transition: none;
    }
    .button:active {
        transform: none;
    }
}
@media (prefers-reduced-transparency: reduce) {
    .site-nav,
    .soon-list li {
        background: var(--bg);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}
