/*
 * emirogluorhan.com — public site styles.
 * Standalone: the public pages no longer load Bootstrap or css/app.css (the old "Roundy" template).
 * Plain CSS, not built by Laravel Mix: edit this file directly.
 */

/* ---------- Tokens ---------- */

:root {
    --paper: #fbf8f3;
    --paper-2: #f3ede4;
    --surface: #ffffff;
    --ink: #211a1b;
    --ink-soft: #4b4142;
    --muted: #7b706b;
    --rule: #e5dccf;
    --brand: #a51d35;      /* logo maroon */
    --brand-deep: #7d1428;
    --brand-tint: #f5e6e8;
    --leaf: #72bf44;       /* logo leaf */

    --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --text: 'Lora', Georgia, 'Times New Roman', serif;
    --ui: 'Source Sans 3', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

    --wrap: 1120px;
    --narrow: 680px;
    --gutter: clamp(20px, 4vw, 32px);
    --radius: 14px;
    --shadow: 0 1px 2px rgba(33, 26, 27, .05), 0 12px 32px -12px rgba(33, 26, 27, .18);
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--ui);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }

h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }

:focus-visible { outline: 3px solid rgba(165, 29, 53, .35); outline-offset: 3px; border-radius: 4px; }

.skip-link {
    position: absolute; left: -999px; top: 8px;
    background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icon { width: 1em; height: 1em; flex: none; }

/* ---------- Shared type ---------- */

.eyebrow {
    font-family: var(--ui);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand);
}

.lead {
    font-family: var(--text);
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--ink-soft);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    font-weight: 600;
    color: var(--brand);
}
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    font-family: var(--ui);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 999px;
    padding: .7em 1.35em;
    border: 1px solid transparent;
    transition: background-color .2s, color .2s, border-color .2s;
}
.btn--solid { background: var(--brand); color: #fff; }
.btn--solid:hover { background: var(--brand-deep); color: #fff; }
.btn--line { border-color: var(--rule); color: var(--ink); background: var(--surface); }
.btn--line:hover { border-color: var(--brand); color: var(--brand); }

/* Leaf ornament (echoes the leaf in the logo) */
.ornament { display: flex; justify-content: center; margin: 1.75rem auto; color: var(--rule); }
.ornament svg { width: 120px; height: 16px; }

/* ---------- Masthead ---------- */

.masthead { border-top: 4px solid var(--brand); }

.masthead__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

.masthead__logo img { width: 170px; }

.masthead__nav ul {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.masthead__nav a {
    position: relative;
    display: block;
    padding: .5rem .85rem;
    font-weight: 600;
    color: var(--ink-soft);
}
.masthead__nav a::after {
    content: '';
    position: absolute;
    left: .85rem; right: .85rem; bottom: .2rem;
    height: 2px;
    background: var(--brand);
    transform: scaleX(0);
    transition: transform .2s;
}
.masthead__nav a:hover { color: var(--ink); }
.masthead__nav a:hover::after { transform: scaleX(.6); }
.masthead__nav a[aria-current="page"] { color: var(--brand); }
.masthead__nav a[aria-current="page"]::after { transform: scaleX(1); }

.masthead__nav .masthead__admin {
    margin-left: .5rem;
    padding: .35rem .85rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-size: .9rem;
    color: var(--muted);
}
.masthead__nav .masthead__admin::after { display: none; }
.masthead__nav .masthead__admin:hover { border-color: var(--brand); color: var(--brand); }

.masthead__toggle {
    display: none;
    align-items: center;
    gap: .4rem;
    font: 600 1rem var(--ui);
    color: var(--ink);
    background: none;
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: .45rem .9rem;
    cursor: pointer;
}

@media (max-width: 820px) {
    .masthead__logo img { width: 140px; }
    .masthead__toggle { display: inline-flex; }
    .masthead__nav {
        display: none;
        position: absolute;
        left: var(--gutter); right: var(--gutter);
        top: 76px;
        z-index: 20;
        background: var(--surface);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: .5rem;
    }
    .masthead.is-open .masthead__nav { display: block; }
    .masthead__nav ul { flex-direction: column; align-items: stretch; }
    .masthead__nav a { padding: .8rem 1rem; border-radius: 10px; }
    .masthead__nav a::after { display: none; }
    .masthead__nav a[aria-current="page"] { background: var(--brand-tint); }
    .masthead__nav .masthead__admin { margin: .25rem 0 0; text-align: center; }
    .masthead { position: relative; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--band { background: var(--paper-2); }
.section--tight { padding-top: clamp(32px, 5vw, 56px); }

.section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(28px, 4vw, 44px);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule);
}
.section__head h2 {
    font-family: var(--display);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 500;
    letter-spacing: -.01em;
}

/* ---------- Home: introduction ---------- */

.intro {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
}
.intro__grid { position: relative; z-index: 1; }

/* Flying bird behind the introduction (from the original home page).
   Sprite: 10 wing frames side by side (public/img/bird-cells.svg). */
.bird-container {
    position: absolute;
    top: 18%;
    left: -10%;
    z-index: 0;
    transform: scale(0) translateX(-10vw);
    will-change: transform;
    animation: fly-right-one 15s linear infinite;
    pointer-events: none;
}
.bird {
    width: 88px;
    height: 125px;
    background: url('../img/bird-cells.svg') 0 0 / auto 100% no-repeat;
    will-change: background-position;
    animation: fly-cycle 1s steps(10) -0.5s infinite;
}

@keyframes fly-cycle {
    100% { background-position: -900px 0; }
}

@keyframes fly-right-one {
    0%   { transform: scale(0.3) translateX(-10vw); }
    10%  { transform: translateY(2vh) translateX(10vw) scale(0.4); }
    20%  { transform: translateY(0vh) translateX(30vw) scale(0.5); }
    30%  { transform: translateY(4vh) translateX(50vw) scale(0.6); }
    40%  { transform: translateY(2vh) translateX(70vw) scale(0.6); }
    50%  { transform: translateY(0vh) translateX(90vw) scale(0.6); }
    60%  { transform: translateY(0vh) translateX(110vw) scale(0.6); }
    100% { transform: translateY(0vh) translateX(110vw) scale(0.6); }
}

@media (prefers-reduced-motion: reduce) {
    .bird-container { display: none; }
}

.intro__grid {
    display: grid;
    grid-template-columns: minmax(220px, 360px) 1fr;
    gap: clamp(32px, 6vw, 88px);
    align-items: center;
}

.intro__portrait {
    margin: 0;
    position: relative;
}
.intro__portrait img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 999px 999px var(--radius) var(--radius);
    box-shadow: var(--shadow);
}
.intro__portrait::before {
    content: '';
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 1px solid var(--brand);
    border-radius: 999px 999px var(--radius) var(--radius);
    opacity: .35;
    z-index: -1;
}

.intro__title {
    font-family: var(--display);
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.02em;
    margin: .6rem 0 .35rem;
}
.intro__alias {
    font-family: var(--display);
    font-style: italic;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    color: var(--brand);
    margin-bottom: 1.5rem;
}
.intro .lead { max-width: 34rem; }

.intro__stats {
    display: flex;
    gap: 2rem;
    margin: 1.75rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    max-width: 34rem;
}
.intro__stats strong {
    display: block;
    font-family: var(--display);
    font-size: 1.9rem;
    font-weight: 500;
    line-height: 1.1;
    color: var(--ink);
}
.intro__stats span { color: var(--muted); font-size: .95rem; }

.intro__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

@media (max-width: 760px) {
    .intro__grid { grid-template-columns: 1fr; }
    .intro__portrait { max-width: 240px; }
}

/* ---------- Home: featured poem ---------- */

.featured { text-align: center; }
.featured__title {
    font-family: var(--display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 500;
    font-style: italic;
    line-height: 1.15;
    margin-top: .9rem;
}
.featured__title a { color: var(--ink); }
.featured__title a:hover { color: var(--brand); }
.featured__date { margin-top: .5rem; color: var(--muted); }
.featured .poem { margin-bottom: 2rem; }

/* ---------- Poem / reading text ---------- */

.poem {
    font-family: var(--text);
    font-size: clamp(1.1rem, 1.6vw, 1.22rem);
    line-height: 1.9;
    color: var(--ink);
}

/* Verse: the block is centred like a book page, lines stay left-aligned */
.poem--verse,
.poem--excerpt {
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}
.poem--excerpt span { display: block; }

.poem p { margin: 0 0 1.1em; }
.poem--verse p { margin: 0; }
.poem p.stanza-break { height: 1.1em; margin: 0; }
.poem--verse p.stanza-break { height: 1.5em; }
.poem p.signature {
    margin: 2.25rem 0 0;
    text-align: right;
    font-style: italic;
    font-size: .92em;
    color: var(--muted);
}
.poem img { border-radius: 10px; margin: 1.5rem auto; }
.poem figure { margin: 2rem 0; }
.poem figcaption { font: .9rem var(--ui); color: var(--muted); text-align: center; margin-top: .5rem; }
.poem strong { font-weight: 600; }

/* ---------- Entries (post list items) ---------- */

.entries {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(28px, 4vw, 56px);
    row-gap: clamp(36px, 5vw, 56px);
}

@media (max-width: 960px) { .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .entries { grid-template-columns: 1fr; } }

.entry { border-top: 1px solid var(--ink); padding-top: 1.1rem; }

.entry__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.entry__link:hover { color: inherit; }

.entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .6rem;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}
.entry__meta .entry__category { color: var(--brand); }

.entry__title {
    font-family: var(--display);
    font-size: 1.55rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.01em;
    margin: .55rem 0 .8rem;
    transition: color .2s;
}
.entry__link:hover .entry__title { color: var(--brand); }

.entry__image {
    aspect-ratio: 3 / 2;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--paper-2);
}
.entry__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.entry__link:hover .entry__image img { transform: scale(1.03); }

.entry__excerpt {
    font-family: var(--text);
    font-style: italic;
    line-height: 1.75;
    color: var(--ink-soft);
    margin-bottom: 1.1rem;
}
.entry__excerpt span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entry__more { margin-top: auto; }

/* ---------- Album tiles ---------- */

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: clamp(20px, 3vw, 32px);
}

.tile { color: inherit; display: block; }
.tile:hover { color: inherit; }

.tile__cover {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-2);
    box-shadow: var(--shadow);
}
.tile__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tile:hover .tile__cover img { transform: scale(1.04); }

.tile__count {
    position: absolute;
    right: 12px; bottom: 12px;
    background: rgba(251, 248, 243, .92);
    color: var(--ink);
    font-size: .82rem;
    font-weight: 600;
    border-radius: 999px;
    padding: .25rem .7rem;
}

.tile__title {
    font-family: var(--display);
    font-size: 1.35rem;
    font-weight: 500;
    margin-top: .9rem;
    transition: color .2s;
}
.tile:hover .tile__title { color: var(--brand); }
.tile__date { color: var(--muted); font-size: .92rem; }

/* ---------- Page heads ---------- */

.page-head { padding: clamp(32px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 {
    font-family: var(--display);
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: .5rem 0 .75rem;
}
.page-head .lead { max-width: 40rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--rule);
    background: var(--surface);
    color: var(--ink-soft);
    border-radius: 999px;
    padding: .4rem .95rem;
    font-weight: 600;
    font-size: .95rem;
}
.chip small { color: var(--muted); font-weight: 600; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-current="true"] small { color: rgba(255, 255, 255, .7); }

/* ---------- Reading page ---------- */

.reading__head { text-align: center; padding: clamp(36px, 6vw, 80px) 0 0; }
.reading__title {
    font-family: var(--display);
    font-size: clamp(2.3rem, 5.5vw, 3.7rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -.015em;
    margin: .8rem 0 .9rem;
}
.reading__meta { color: var(--muted); display: flex; justify-content: center; align-items: center; gap: .6rem; flex-wrap: wrap; }
.reading__meta img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

.reading__image { margin: 0 auto 2.5rem; max-width: 820px; padding: 0 var(--gutter); }
.reading__image img { border-radius: var(--radius); width: 100%; box-shadow: var(--shadow); }

.reading__body { padding-bottom: clamp(40px, 6vw, 64px); }

.reading__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid var(--rule);
}

.share { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-weight: 600; }
.share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--rule);
    color: var(--ink);
    transition: background-color .2s, color .2s, border-color .2s;
}
.share a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.share .icon { width: 17px; height: 17px; }

.pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}
.pager a {
    display: block;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
.pager a:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.pager small { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-weight: 600; font-size: .85rem; }
.pager strong { display: block; font-family: var(--display); font-weight: 500; font-size: 1.2rem; margin-top: .25rem; }
.pager .pager__next { text-align: right; grid-column: 2; }
.pager .pager__next small { justify-content: flex-end; }

@media (max-width: 560px) {
    .pager { grid-template-columns: 1fr; }
    .pager .pager__next { grid-column: auto; }
}

/* ---------- About ---------- */

.about__portrait {
    width: 180px;
    margin: 0 auto 1.25rem;
}
.about__portrait img {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow);
}
.about__sign {
    text-align: right;
    font-family: var(--display);
    font-style: italic;
    font-size: 1.35rem;
    color: var(--brand);
    margin-top: 2rem;
}

/* ---------- Gallery page ---------- */

.photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}
.photos a {
    display: block;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--paper-2);
}
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .2s; }
.photos a:hover img { transform: scale(1.04); }
.photos .pswp-caption-content { display: none; }

/* ---------- Pagination (vendor/pagination/bootstrap-4 markup) ---------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
    list-style: none;
    padding: 0;
    margin: clamp(40px, 6vw, 64px) 0 0;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .75rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
}
a.page-link:hover { border-color: var(--brand); color: var(--brand); }
.page-item.active .page-link { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-item.disabled .page-link { color: #c3b9b0; background: transparent; }

/* ---------- Colophon (footer) ---------- */

/* Cloud band from the original "Roundy" template, now a closing strip above the footer.
   Its bottom layer is the footer colour, so the two join without a seam. */
.clouds {
    height: clamp(90px, 13vw, 190px);
    margin-top: clamp(32px, 6vw, 72px);
    background: url('../img/clouds.svg') center bottom / 100% 100% no-repeat;
}
/* When the page ends with a tinted section, fill behind the cloud tops with the same tint */
main:has(> .section--band:last-child) + .clouds {
    margin-top: 0;
    background-color: var(--paper-2);
}

.colophon {
    background: var(--paper-2);
    margin-top: -1px;
    padding: clamp(40px, 6vw, 64px) 0 2rem;
    color: var(--muted);
}
.colophon__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}
.colophon__logo img { width: 150px; }
.colophon__about { margin-top: 1rem; max-width: 22rem; font-family: var(--text); font-style: italic; }
.colophon h2 {
    font: 700 .78rem var(--ui);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: .9rem;
}
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li + li { margin-top: .35rem; }
.colophon a { color: var(--ink-soft); }
.colophon a:hover { color: var(--brand); }
.colophon__bottom {
    margin-top: clamp(32px, 5vw, 48px);
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    font-size: .92rem;
}

@media (max-width: 760px) {
    .colophon__grid { grid-template-columns: 1fr 1fr; }
    .colophon__brand { grid-column: 1 / -1; }
}

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