/* ==========================================================
   ekremturanfirat.com - shared stylesheet ("paper" edition)
   Every page is a white sheet styled like an IEEE paper.
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=STIX+Two+Text:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap");

:root {
    --desk: #ecebe7;
    --paper: #ffffff;
    --text: #111111;
    --muted: #555555;
    --rule: #111111;
    --hairline: #d6d6d6;
    --accent: #1a4d8f;
    --width: 860px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --desk: #26282a;
    }
}

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

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

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

body {
    margin: 0;
    background: var(--desk);
    color: var(--text);
    font-family: "STIX Two Text", "Times New Roman", Times, serif;
    font-size: 18px;
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    font-weight: 400;
    line-height: 1.25;
    margin: 0 0 0.5em;
}

/* Paper title */
h1 {
    font-size: 2.1rem;
    text-align: center;
}

/* Section headings: I. EDUCATION, II. EXPERIENCE ... */
main {
    counter-reset: section;
}

h2 {
    font-size: 1rem;
    font-variant: small-caps;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    text-align: center;
    margin: 2.2em 0 1em;
}

h2::first-letter {
    text-transform: uppercase;
}

h2::before {
    counter-increment: section;
    content: counter(section, upper-roman) ". ";
    text-transform: none;
}

/* Subsections are italic, as in IEEE */
h3, h4 {
    font-size: 1rem;
    font-style: italic;
}

h4 {
    margin-top: 1.4em;
}

p, ul, ol {
    margin: 0 0 0.9em;
}

main p,
main li {
    text-align: justify;
    hyphens: auto;
}

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

hr {
    border: 0;
    border-top: 1px solid var(--hairline);
    width: 30%;
    margin: 2em auto;
}

.muted {
    color: var(--muted);
}

/* ---------- The sheet of paper ---------- */

.container {
    width: 100%;
    max-width: var(--width);
    margin: 0 auto;
    padding: 0 20px;
}

main.container {
    flex: 1;
    background: var(--paper);
    padding: 56px 80px 64px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* ---------- Header / navigation (sits on the desk, above the sheet) ---------- */

.site-header .container {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 24px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.brand {
    color: var(--text);
    font-variant: small-caps;
    letter-spacing: 0.04em;
    font-size: 1.05rem;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 22px;
}

.site-header nav a {
    color: var(--muted);
    font-variant: small-caps;
    letter-spacing: 0.04em;
}

.site-header nav a[aria-current="page"] {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (prefers-color-scheme: dark) {
    .brand,
    .site-header nav a[aria-current="page"] { color: #f0f0f0; }
    .site-header nav a { color: #b5b5b5; }
}

/* ---------- Title block ---------- */

.hero,
.page-title {
    text-align: center;
    padding-bottom: 8px;
}

.avatar {
    display: block;
    width: 108px;
    height: 144px;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 1px solid var(--hairline);
}

/* Author line under the title */
.hero .role {
    font-style: italic;
    margin-bottom: 0.1em;
}

.hero .muted {
    font-size: 0.95rem;
}

.hero p {
    text-align: center;
}

/* Short intro line under a page title */
.page-title p {
    max-width: 640px;
    margin: 1em auto 0;
    color: var(--muted);
    font-style: italic;
    text-align: center;
}

/* ---------- Home: links as a reference list ---------- */

.cards {
    counter-reset: ref;
}

.card {
    display: block;
    position: relative;
    padding: 2px 0 2px 2.4em;
    color: var(--text);
}

.card::before {
    counter-increment: ref;
    content: "[" counter(ref) "]";
    position: absolute;
    left: 0;
}

.card strong {
    font-weight: 400;
    color: var(--accent);
}

.card strong::after {
    content: ", ";
    color: var(--text);
}

.card span {
    font-style: italic;
}

/* ---------- Buttons become plain links ---------- */

.buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 0;
    padding: 0;
    list-style: none;
}

.buttons li + li::before {
    content: "·";
    margin: 0 0.6em;
    color: var(--muted);
}

/* ---------- Entries (CV, projects, repositories) ---------- */

.entry {
    padding: 10px 0;
}

.entry-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0 16px;
}

.entry-head h3 {
    margin: 0;
}

.date {
    color: var(--muted);
    font-size: 0.92rem;
    white-space: nowrap;
}

.entry-meta {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0 0 4px;
}

.entry p:last-child {
    margin-bottom: 0;
}

.badge {
    font-size: 0.85rem;
    font-style: normal;
    font-variant: small-caps;
    color: var(--muted);
}

.badge::before { content: "("; }
.badge::after { content: ")"; }

.repo-card img {
    display: block;
    height: 100px;
    width: auto;
    margin-top: 8px;
}

/* ---------- Tables (booktabs style) ---------- */

.table-wrap {
    overflow-x: auto;
    margin: 0 0 1.5em;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border-top: 1.5px solid var(--rule);
    border-bottom: 1.5px solid var(--rule);
}

th,
td {
    padding: 4px 10px;
    text-align: left;
}

th {
    font-weight: 400;
    font-variant: small-caps;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--rule);
}

/* ---------- Blog list ---------- */

.post-item {
    padding: 14px 0;
}

.post-item h2 {
    font-size: 1.15rem;
    font-variant: normal;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
    margin: 0 0 2px;
}

.post-item h2::before {
    content: none;
}

.post-item p {
    margin: 0;
    font-style: italic;
}

/* ---------- Blog post ---------- */

.post {
    max-width: none;
}

.post-header {
    text-align: center;
    padding-bottom: 12px;
}

.post-header .back {
    display: block;
    text-align: left;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.post-meta {
    font-style: italic;
    color: var(--muted);
    text-align: center !important;
}

/* IEEE-style drop cap on the first paragraph */
.post-header + p::first-letter {
    float: left;
    font-size: 3.1em;
    line-height: 0.85;
    padding: 4px 6px 0 0;
}

.post img {
    display: block;
    margin: 1.4em auto 0.4em;
}

.caption {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center !important;
}

.media {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.media.reverse {
    flex-direction: row-reverse;
}

.media > div {
    flex: 1;
}

.media img {
    width: 220px;
    flex-shrink: 0;
    margin: 0.3em 0 0;
}

.comments {
    margin-top: 3em;
}

/* ---------- Footer (on the desk, below the sheet) ---------- */

.site-footer {
    padding: 20px 0 28px;
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 24px;
}

.site-footer a {
    color: var(--muted);
}

.site-footer p {
    margin: 0;
}

@media (prefers-color-scheme: dark) {
    .site-footer,
    .site-footer a { color: #a8a8a8; }
}

/* ---------- Phones ---------- */

@media (max-width: 600px) {
    body { font-size: 17px; }
    h1 { font-size: 1.7rem; }

    main.container {
        padding: 32px 20px 40px;
        box-shadow: none;
    }

    main p,
    main li {
        text-align: left;
    }

    .media,
    .media.reverse {
        flex-direction: column;
    }

    .media img {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
}
