/* ================================================
   demonic.corvid — about
   flip-card concept adapted from a reference snippet
   the user liked; reskinned to site brand
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Delius&display=swap');
@font-face {
    font-family: 'Fantaisie Artistique';
    src: url('../assets/fonts/FantaisieArtistique.otf') format('opentype'),
         url('../assets/fonts/FantaisieArtistique.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink:            #142338;
    --ink-deep:       #0B1626;
    --parchment:      #F7E9C9;
    --parchment-deep: #EFD9A6;
    --blood:          #C41E2A;
    --blood-deep:     #6E1420;
    --wisp:           #86A9BE;
    --wisp-bright:    #B9D3E2;
    --gold:           #D8B25C;
    --ink-soft:       #3B4A5E;
    --radius: .6em;
    --radius-lg: 1.2em;
}

* { box-sizing: border-box; font-family: 'Delius', Verdana, Geneva, Tahoma, sans-serif; }

body {
    margin: 0;
    padding: 2.5em 1em;
    background: var(--ink-deep);
    color: var(--ink);
    display: flex;
    justify-content: center;
}

p { line-height: 1.6em; }
p:first-child { margin-top: 0; }

h1 {
    font-family: 'Fantaisie Artistique', 'Delius', cursive;
    font-weight: 400;
    font-synthesis: none;
    letter-spacing: .5px;
    font-size: 2em;
    color: var(--parchment);
    margin: 0 0 .2em;
}
h2 {
    font-family: 'Fantaisie Artistique', 'Delius', cursive;
    font-weight: 400;
    font-synthesis: none;
    font-size: 1.35em;
    color: var(--ink);
    letter-spacing: .5px;
    margin: 0 0 .7em;
}
h2 .hint { font-family: 'Delius', sans-serif; font-size: .55em; color: var(--ink-soft); font-weight: 500; letter-spacing: 0; margin-left: .4em; }

a { color: var(--wisp); font-weight: 700; text-decoration: none; transition: color .2s ease; }
a:visited { color: var(--wisp); }
a:hover, a:visited:hover { color: var(--blood); text-decoration: underline; }

.page-frame {
    width: 100%;
    max-width: 1100px;
    background-color: var(--parchment);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.55);
    position: relative;
}

/* ============ SITE HEAD + MENU (shared chrome) ============ */
.site-head {
    position: relative;
    background: linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 75%);
    text-align: center;
    padding: 2.2em 1em 1.6em;
    overflow: hidden;
}
.starfield { position: absolute; inset: 0; opacity: .8; }
.starfield circle { fill: var(--wisp-bright); }
.constellation-line { stroke: var(--gold); stroke-width: 1; opacity: .35; }
.brand { position: relative; display: inline-flex; align-items: center; gap: .8em; text-decoration: none; z-index: 2; }
.brand-mark { width: 66px; height: 66px; object-fit: cover; border-radius: 50%; border: 3px solid var(--gold); }
.brand-title { font-family: 'Fantaisie Artistique', 'Delius', cursive; font-weight: 400; font-synthesis: none; font-size: 2.1em; color: var(--parchment); letter-spacing: 1px; }
.brand-title .dot { color: var(--blood); }
.brand-sub { position: relative; z-index: 2; color: var(--wisp); font-size: .85em; letter-spacing: 2px; margin-top: .3em; }
.phase-divider { display: flex; align-items: center; justify-content: center; gap: .5em; padding: .4em 0 .9em; position: relative; z-index: 2; }
.phase-divider .rule { height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.phase-divider .moon { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: inset 4px -1px 0 0 var(--ink); }
.phase-divider.footer-phase { padding: .1em 0 .7em; }

.menu-strip { background-color: var(--ink); border-bottom: 3px double var(--gold); display: flex; justify-content: center; padding: .3em 1em .8em; }
.menu-list { display: flex; align-items: center; justify-content: center; list-style: none; margin: 0; padding: 0; gap: .1em; flex-wrap: wrap; }
.menu-list > li { position: relative; }
.menu-list > li > a { display: block; padding: .6em 1.05em; color: var(--parchment); font-weight: 700; text-decoration: none; border-radius: var(--radius); letter-spacing: .3px; }
.menu-list > li > a:hover { color: var(--ink); background-color: var(--gold); }
.menu-list a:visited { color: var(--parchment); }
.menu-list > li.current > a { background-color: var(--blood-deep); }
.has-dropdown .dropdown { display: none; position: absolute; top: 100%; left: 0; flex-direction: column; background-color: var(--parchment); border: 2px solid var(--blood-deep); border-radius: var(--radius); min-width: 210px; padding: .3em 0; z-index: 10; list-style: none; margin: 0; }
.has-dropdown:hover .dropdown { display: flex; }
.dropdown li a { display: block; padding: .5em 1em; color: var(--ink); text-decoration: none; font-weight: 500; }
.dropdown li a:visited { color: var(--ink); }
.dropdown li a:hover { color: var(--blood); background-color: var(--parchment-deep); text-decoration: none; }

/* ============ SPARKLE + RAVEN DIVIDERS (shared) ============ */
.sparkle-divider, .raven-divider { display: flex; align-items: center; justify-content: center; gap: .6em; margin: 1.6em 0; }
.sparkle-divider .rule, .raven-divider .rule { height: 1px; width: 60px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.sparkle-icon { width: 16px; height: 16px; fill: var(--blood); }

/* ============ MAIN ============ */
main { padding: 1.8em 2em 2.4em; }

/* ---- intro ---- */
.about-intro {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.8em;
    align-items: start;
    background-color: var(--ink);
    border: 1px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 1.6em 1.8em;
    color: var(--parchment);
}
.about-portrait img { width: 100%; border-radius: var(--radius); border: 2px solid var(--gold); display: block; }
.about-copy .eyebrow { font-size: .75em; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin: 0 0 .3em; }
.about-copy h1 { margin-bottom: .1em; }
.about-copy .lede { color: var(--wisp-bright); font-style: italic; margin-top: 0; }
.about-copy p { color: var(--parchment); }
.about-copy a { color: var(--wisp-bright); }
.about-copy a:hover { color: var(--gold); }

/* ---- flip cards (shared base for facts + projects) ---- */
.facts-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1em;
}

.factcard { perspective: 1200px; cursor: pointer; height: 150px; display: block; color: inherit; text-decoration: none; }
.factcard:hover { color: inherit; text-decoration: none; }
.factcard-inner {
    position: relative;
    width: 100%; height: 100%;
    transition: transform .6s ease;
    transform-style: preserve-3d;
}
.factcard:hover .factcard-inner,
.factcard:focus-visible .factcard-inner,
.factcard:focus-within .factcard-inner { transform: rotateY(180deg); }
.factcard:focus-visible { outline: 2px solid var(--blood); outline-offset: 3px; border-radius: var(--radius); }

.factcard-front, .factcard-back {
    position: absolute; inset: 0;
    backface-visibility: hidden;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1em;
}
.factcard-front {
    background: var(--parchment-deep);
    border: 1px solid var(--gold);
    box-shadow: 3px 4px 0 rgba(20,35,56,.2);
}
.factcard-back {
    background: var(--ink);
    color: var(--parchment);
    border: 1px solid var(--gold);
    transform: rotateY(180deg);
}
.fact-label { font-weight: 700; color: var(--ink-soft); font-size: .95em; }
.factcard-back span { font-size: .9em; }

/* ---- project cards: taller, left-aligned back content ---- */
.project-card { height: 190px; }
.project-card .factcard-front { gap: .5em; }
.project-title { font-family: 'Fantaisie Artistique', 'Delius', cursive; font-size: 1.15em; color: var(--blood-deep); line-height: 1.2; }
.status-badge {
    font-size: .65em; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
    padding: .25em .7em; border-radius: 1em; color: var(--parchment);
}
.status-dev { background: var(--ink-soft); }
.status-live { background: var(--blood-deep); }
.status-progress { background: #7a6420; }
.status-early { background: var(--wisp); color: var(--ink); }

.project-card .factcard-back { align-items: flex-start; text-align: left; justify-content: space-between; padding: 1.1em; }
.project-card .factcard-back p { margin: 0; font-size: .82em; line-height: 1.45; }
.project-card .card-link { align-self: flex-end; color: var(--gold); font-size: .82em; }
.project-card .card-link:hover { color: var(--wisp-bright); }

.facts-section, .projects-section { margin-top: .4em; }

.about-footnote { margin-top: 1.8em; }
.small-text { font-size: .75rem; color: var(--wisp); }
.small-text a { color: var(--wisp); }

footer {
    text-align: center; font-size: .85rem; font-weight: 700;
    padding: 1em; background: var(--ink); color: var(--parchment);
    letter-spacing: .5px;
}
footer a { color: var(--wisp-bright); }
footer a:hover { color: var(--gold); }

@media (max-width: 640px) {
    .about-intro { grid-template-columns: 1fr; }
    .about-portrait { max-width: 220px; margin: 0 auto; }
}
