/* ============================================================
   rickyapps landing — editorial portfolio
   ============================================================ */

:root {
    --paper:        #fbfdfe;    /* near-white with a faint cool tint */
    --paper-2:      #eef6f9;    /* section wash — soft aqua */
    --ink:          #0a1822;    /* deep slate, near-black */
    --ink-soft:     #2a3846;
    --ink-dim:      #5f7384;
    --rule:         #d7e5ee;    /* pale aqua-gray rule */
    --rule-2:       #b3c8d6;
    --brand:        #075a6d;    /* deep teal — links, brand mark */
    --brand-soft:   #e0f4f8;
    --accent-red:   #bc3a1a;    /* used sparingly for editorial em emphasis */

    --ff-display:   "Fraunces", "Times New Roman", Georgia, serif;
    --ff-body:      "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --ff-mono:      "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    color: var(--ink);
    font-family: var(--ff-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #fafdfe;
    min-height: 100vh;
}

body::before {
    /* No-op overlay kept so layered z-index assumptions elsewhere still hold. */
    content: "";
    position: fixed; inset: 0;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

/* Grain overlay disabled — we want a flat solid-color background. */
.grain { display: none; }

a { color: inherit; text-decoration: none; }

/* ---------- top nav ---------- */
.topnav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    background: #dceff5;
    border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: var(--brand);
    color: var(--paper);
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
    border-radius: 2px;
}
.brand-name {
    font-family: var(--ff-display);
    font-weight: 500;
    font-style: italic;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.topnav-links {
    display: flex;
    gap: 28px;
    font-family: var(--ff-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.topnav-links a {
    position: relative;
    padding: 4px 0;
    transition: color 180ms ease;
}
.topnav-links a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms cubic-bezier(0.19, 1, 0.22, 1);
}
.topnav-links a:hover { color: var(--brand); }
.topnav-links a:hover::after { transform: scaleX(1); }

@media (max-width: 640px) {
    .topnav { padding: 14px 20px; }
    .brand-name { display: none; }
    .topnav-links { gap: 20px; }
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px 120px 40px;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 80px;
    align-items: start;
    z-index: 2;
}
.hero-inner {
    animation: rise 900ms cubic-bezier(0.19, 1, 0.22, 1) both;
    animation-delay: 100ms;
}
.eyebrow {
    font-family: var(--ff-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin: 0 0 24px 0;
}
.eyebrow::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 1px;
    background: var(--rule-2);
    vertical-align: middle;
    margin-right: 14px;
    transform: translateY(-2px);
}
.hero h1 {
    font-family: var(--ff-display);
    font-weight: 400;
    font-size: clamp(40px, 6.5vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0 0 32px 0;
    color: var(--ink);
}
.hero h1 em {
    font-style: italic;
    color: var(--brand);
    font-weight: 500;
}
.hero .lead {
    max-width: 520px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 40px 0;
}
.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--ff-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    padding: 10px 0;
    border-bottom: 1px solid var(--ink);
    transition: all 300ms cubic-bezier(0.19, 1, 0.22, 1);
}
.arrow-link:hover {
    color: var(--brand);
    border-color: var(--brand);
    letter-spacing: 0.14em;
}

.hero-aside {
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: rise 900ms cubic-bezier(0.19, 1, 0.22, 1) both;
    animation-delay: 300ms;
}
.aside-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 16px;
    border-left: 1px solid var(--rule);
}
.aside-k {
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
}
.aside-v {
    font-family: var(--ff-display);
    font-style: italic;
    font-size: 15px;
    line-height: 1.4;
    color: var(--ink-soft);
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 48px;
        padding: 60px 24px 80px 24px;
    }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- section headings ---------- */
.section-heading {
    max-width: 700px;
    margin: 0 auto 60px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: baseline;
}
.section-num {
    font-family: var(--ff-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--ink-dim);
}
.section-heading h2 {
    font-family: var(--ff-display);
    font-weight: 400;
    font-size: 40px;
    line-height: 1;
    margin: 0;
    letter-spacing: -0.02em;
}
.section-heading .section-lead {
    grid-column: 2;
    font-size: 15px;
    color: var(--ink-soft);
    margin: 12px 0 0 0;
    max-width: 520px;
}

/* ---------- work / app cards ---------- */
.work {
    position: relative;
    padding: 80px 0 100px 0;
    z-index: 2;
}
.app-card {
    max-width: 1200px;
    margin: 0 auto 32px auto;
    padding: 0 40px;
}
.app-card-link {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
    padding: 48px 52px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: all 500ms cubic-bezier(0.19, 1, 0.22, 1);
}
.app-card-link::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--card-accent, var(--brand));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 500ms cubic-bezier(0.19, 1, 0.22, 1);
}
.app-card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 48px -12px rgba(18, 26, 34, 0.12);
    border-color: var(--card-accent, var(--brand));
}
.app-card-link:hover::before { transform: scaleY(1); }

.app-visual {
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--paper-2) 0%, var(--paper) 100%);
    aspect-ratio: 2 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-visual svg { width: 92%; height: auto; }
.app-visual--compact { aspect-ratio: 2.5 / 1; }

.app-kicker {
    font-family: var(--ff-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--card-accent, var(--brand));
    margin: 0 0 8px 0;
}
.app-body h3 {
    font-family: var(--ff-display);
    font-weight: 500;
    font-size: 38px;
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0 0 18px 0;
}
.app-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 20px 0;
}
.app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
}
.meta-chip {
    display: inline-block;
    padding: 4px 9px;
    border: 1px solid var(--rule);
    border-radius: 2px;
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.05em;
    color: var(--ink-dim);
    background: var(--paper);
}
.app-cta {
    display: inline-block;
    font-family: var(--ff-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    padding: 2px 0;
    border-bottom: 1px solid var(--ink);
    transition: all 300ms cubic-bezier(0.19, 1, 0.22, 1);
}
.app-card-link:hover .app-cta {
    color: var(--card-accent);
    border-color: var(--card-accent);
    letter-spacing: 0.16em;
}

/* Row of smaller app cards side-by-side (Cliopanion + My Finances) */
.app-row {
    max-width: 1200px;
    margin: 0 auto 32px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.app-card--small { margin: 0; padding: 0; height: 100%; }
.app-card--small .app-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 36px 36px 32px 36px;
}
.app-card--small .app-visual {
    margin-bottom: 24px;
}
.app-card--small .app-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}
/* push the CTA arrow to the bottom of the body so cards align nicely */
.app-card--small .app-cta {
    margin-top: auto;
    padding-top: 16px;
}
.app-card--small .app-body h3 { font-size: 28px; }
.app-card--small .app-desc { font-size: 14px; }

@media (max-width: 900px) {
    .app-card-link {
        grid-template-columns: 1fr;
        padding: 32px;
        gap: 28px;
    }
    .app-row {
        grid-template-columns: 1fr;
        padding: 0 24px;
    }
    .app-card { padding: 0 24px; }
    .app-body h3 { font-size: 32px; }
    .section-heading { padding: 0 24px; }
}

/* ---------- about ---------- */
.about {
    position: relative;
    padding: 100px 0;
    background: #dceff5;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    z-index: 2;
}
.about-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: start;
}
.about-bio p {
    font-family: var(--ff-display);
    font-weight: 400;
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 20px 0;
}
.about-bio p:first-child { font-size: 21px; }
.about-bio em {
    font-style: italic;
    color: var(--accent-red);
}
.about-bio strong {
    font-weight: 600;
    color: var(--ink);
    font-style: normal;
}

.about-facts { padding-top: 8px; }
.about-facts dl { margin: 0; }
.about-facts dl > div {
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
}
.about-facts dl > div:first-child { padding-top: 0; }
.about-facts dl > div:last-child { border-bottom: none; }
.about-facts dt {
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 6px;
}
.about-facts dd {
    font-family: var(--ff-display);
    font-size: 15px;
    font-style: italic;
    line-height: 1.4;
    color: var(--ink);
    margin: 0;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        padding: 0 24px;
    }
    .about-bio p { font-size: 17px; }
    .about-bio p:first-child { font-size: 18px; }
    .about { padding: 64px 0; }
}

/* ---------- contact ---------- */
.contact {
    position: relative;
    padding: 100px 40px 80px 40px;
    z-index: 2;
    text-align: center;
}
.contact .section-heading {
    text-align: left;
}
.contact-lead {
    max-width: 520px;
    margin: 0 auto 48px auto;
    font-family: var(--ff-display);
    font-size: 19px;
    font-style: italic;
    color: var(--ink-soft);
    line-height: 1.5;
}
.contact-links {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 28px 32px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: all 400ms cubic-bezier(0.19, 1, 0.22, 1);
}
.contact-card::after {
    content: '→';
    position: absolute;
    top: 24px; right: 28px;
    font-family: var(--ff-display);
    font-size: 20px;
    color: var(--ink-dim);
    transition: all 400ms cubic-bezier(0.19, 1, 0.22, 1);
}
.contact-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -8px rgba(18, 26, 34, 0.1);
}
.contact-card:hover::after {
    color: var(--brand);
    transform: translateX(4px);
}
.contact-icon {
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: var(--paper);
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: 13px;
    border-radius: 50%;
    margin-bottom: 4px;
}
.contact-label {
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-dim);
}
.contact-v {
    font-family: var(--ff-display);
    font-size: 18px;
    font-style: italic;
    color: var(--ink);
}

@media (max-width: 700px) {
    .contact-links { grid-template-columns: 1fr; }
    .contact { padding: 64px 24px; }
    .hero h1 { letter-spacing: -0.01em; }
}

/* ---------- footer ---------- */
.sitefoot {
    position: relative;
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--rule);
    font-family: var(--ff-mono);
    font-size: 11px;
    color: var(--ink-dim);
    letter-spacing: 0.04em;
    z-index: 2;
}
.sitefoot p { margin: 0; }

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