/* ============================================================
   DENIS GLINCHEVSKIY — Shared Stylesheet
   Tone: archival editorial meets clean modern
   Fonts: Playfair Display (headings) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* --- Variables --- */
:root {
    --cream:      #f5f0e8;
    --cream-dark: #ede7d9;
    --ink:        #1a1a18;
    --ink-mid:    #3d3d38;
    --ink-light:  #7a7a6e;
    --rule:       #c8c0ac;
    --accent:     #1a3a5c;   /* deep navy */
    --accent-warm:#8b3a1a;   /* archive rust */
    --max-w:      780px;
    --nav-h:      52px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--cream);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
}

/* --- Texture overlay (subtle grain) --- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* --- Site Header --- */
.site-header {
    background-color: var(--ink);
    color: var(--cream);
    padding: 22px 20px 0;
    position: relative;
    z-index: 10;
}

.site-header__inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

.site-header__eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rule);
    margin-bottom: 6px;
    font-weight: 300;
}

.site-header__name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--cream);
}

.site-header__sub {
    font-size: 0.8rem;
    color: var(--ink-light);
    margin-top: 4px;
    font-weight: 300;
    letter-spacing: 0.04em;
}

/* --- Navigation bar --- */
.site-nav {
    background-color: var(--ink);
    border-top: 1px solid #333330;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    height: var(--nav-h);
    gap: 0;
    padding: 0 20px;
}

.site-nav a {
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: #a8a89a;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--cream);
    border-bottom-color: var(--rule);
}

.site-nav a.active {
    color: var(--cream);
    border-bottom-color: var(--accent-warm);
}

/* --- Page wrapper --- */
.page-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 40px 20px 60px;
    position: relative;
    z-index: 1;
}

/* --- Page title block --- */
.page-title {
    border-bottom: 2px solid var(--ink);
    padding-bottom: 14px;
    margin-bottom: 30px;
}

.page-title h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
}

.page-title .dateline {
    font-size: 0.78rem;
    color: var(--ink-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 6px;
}

/* --- Section headings --- */
h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ink);
    margin: 36px 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--rule);
}

h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink-mid);
    margin: 24px 0 10px;
}

p { margin-bottom: 14px; }

/* --- Intro box (lead paragraph) --- */
.intro-row {
    display: flex;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 30px;
}

.intro-box {
    flex: 1;
    background-color: var(--cream-dark);
    border-left: 4px solid var(--accent);
    padding: 18px 20px;
    font-size: 1.05rem;
}

/* --- Image blocks --- */
.img-infobox {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 210px;
    background: var(--cream-dark);
    border: 1px solid var(--rule);
    font-size: 0.75rem;
    color: var(--ink-light);
}

.img-infobox img {
    flex: 1;
    min-height: 0;
    height: 0;
    width: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.img-infobox .img-caption,
.img-inline .img-caption,
.img-fullwidth .img-caption {
    padding: 6px 8px;
    text-align: center;
    line-height: 1.35;
    flex-shrink: 0;
}

.img-inline {
    float: right;
    margin: 4px 0 16px 22px;
    width: 270px;
    background: var(--cream-dark);
    border: 1px solid var(--rule);
    font-size: 0.75rem;
    color: var(--ink-light);
}

.img-inline img { width: 100%; display: block; }

.img-fullwidth {
    width: 100%;
    margin: 22px 0;
    background: var(--cream-dark);
    border: 1px solid var(--rule);
    font-size: 0.75rem;
    color: var(--ink-light);
}

.img-fullwidth img { width: 100%; display: block; }

/* Section heading with club logo */
.section-heading-with-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 36px 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--rule);
}

.section-heading-with-logo h2 { margin: 0; border: none; padding: 0; }

.img-club-logo { width: 34px; height: 34px; flex-shrink: 0; }
.img-club-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Clearfix */
.clearfix::after { content: ''; display: table; clear: both; }

/* --- Pull quote / blockquote --- */
.blockquote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    border-left: 3px solid var(--accent-warm);
    padding: 10px 18px;
    margin: 22px 0;
    color: var(--ink-mid);
    background: rgba(139,58,26,0.04);
}

/* --- Stats table --- */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 0.9rem;
}

.stats-table th,
.stats-table td {
    border: 1px solid var(--rule);
    text-align: left;
    padding: 10px 12px;
}

.stats-table thead th {
    background-color: var(--ink);
    color: var(--cream);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.stats-table tbody tr:nth-child(even) { background-color: var(--cream-dark); }
.stats-table tbody tr:hover { background-color: rgba(26,58,92,0.06); }

/* --- Divider rule --- */
.rule {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 30px 0;
}

/* --- Contact grid --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.contact-card {
    background: var(--cream-dark);
    border: 1px solid var(--rule);
    padding: 20px;
}

.contact-card h3 {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-light);
    margin-bottom: 8px;
    font-family: 'DM Sans', sans-serif;
    border: none;
    padding: 0;
}

.contact-card a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    word-break: break-all;
}

.contact-card a:hover { text-decoration: underline; }

/* --- Social icons --- */
.social-links {
    display: flex;
    gap: 14px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--ink);
    color: var(--cream);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
    transition: background 0.2s;
}

.social-links a:hover { background: var(--accent); }

.social-links svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* --- Gallery grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--cream-dark);
    border: 1px solid var(--rule);
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-item .gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26,26,24,0.72);
    color: var(--cream);
    font-size: 0.7rem;
    padding: 5px 8px;
    transform: translateY(100%);
    transition: transform 0.25s ease;
}

.gallery-item:hover .gallery-label { transform: translateY(0); }

/* --- Achievement badges --- */
.achievement-list {
    list-style: none;
    margin: 16px 0;
}

.achievement-list li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cream-dark);
    font-size: 0.95rem;
}

.achievement-list li::before {
    content: '—';
    color: var(--accent-warm);
    font-weight: 700;
    flex-shrink: 0;
}

.achievement-year {
    font-family: 'Playfair Display', serif;
    font-size: 0.78rem;
    color: var(--ink-light);
    white-space: nowrap;
    min-width: 60px;
    letter-spacing: 0.04em;
}

/* --- Site Footer --- */
.site-footer {
    background-color: var(--ink);
    color: var(--ink-light);
    padding: 30px 20px;
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

.site-footer__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.site-footer__copy { line-height: 1.6; }

.site-footer__links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer__links a {
    color: var(--ink-light);
    text-decoration: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.72rem;
    transition: color 0.2s;
}

.site-footer__links a:hover { color: var(--cream); }

/* --- Mobile --- */
@media (max-width: 620px) {
    .site-nav__inner { gap: 0; padding: 0 8px; overflow-x: auto; }
    .site-nav a { padding: 0 10px; font-size: 0.72rem; }
    .intro-row { flex-direction: column; }
    .img-infobox { width: 100%; }
    .img-infobox img { height: 260px; }
    .img-inline { float: none; width: 100%; margin: 0 0 16px; }
    .contact-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
