/* ========================================
   Christophe Annys — Site Styles
   Font: Tofino (self-hosted)
   ======================================== */

@font-face {
    font-family: 'Tofino';
    src: url('../fonts/Tofino-RegularPersonal.otf') format('opentype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Tofino';
    src: url('../fonts/Tofino-MediumPersonal.otf') format('opentype');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Tofino';
    src: url('../fonts/Tofino-BoldPersonal.otf') format('opentype');
    font-weight: 700; font-style: normal; font-display: swap;
}

:root {
    --bg: #ffffff;
    --text: #000000;
    --muted: #888888;
    --accent: #ff510a;
    --surface: #f3f6f7;
    --line: #000000;
    --font: 'Tofino', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-weight: 200;
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ========================================
   Header
   ======================================== */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 200px;
    border-bottom: 1px solid var(--line);
}

.logo {
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.socials {
    display: flex;
    gap: 18px;
    align-items: center;
}

.socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text);
    transition: color 0.2s;
}
.socials a:hover { color: var(--accent); }
.site-header .socials svg { width: 24px; height: 24px; transform: translateY(2px); }

/* ========================================
   Nav
   ======================================== */
.site-nav {
    display: flex;
    justify-content: flex-end;
    gap: 32px;
    padding: 16px 200px;
}

.site-nav a {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 1px;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}
.site-nav a:hover { border-bottom-color: var(--text); }
.site-nav a.active { border-bottom-color: var(--text); }

/* ========================================
   Main
   ======================================== */
main {
    max-width: 1800px;
    margin: 0 auto;
    padding: 24px 200px 60px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

/* ========================================
   Gallery — masonry, 8 cols desktop, horizontal order
   ======================================== */
.gallery-status {
    text-align: center;
    color: var(--muted);
    padding: 60px 0;
}
.gallery-status.err { color: var(--accent); }

.masonry {
    display: none; /* shown as flex by JS */
    gap: 12px;
    align-items: flex-start;
}
.m-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.g-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
    animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.g-item img {
    width: 100%;
    transition: transform 0.4s ease, filter 0.3s;
}
.g-item:hover img { transform: scale(1.04); filter: brightness(0.92); }

/* caption — bottom-right corner */
.g-cap {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 28px 10px 8px 18px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 80%);
    opacity: 0;
    transition: opacity 0.3s;
    text-align: right;
}
.g-item:hover .g-cap { opacity: 1; }
.g-cap .t { display: block; font-size: 0.68rem; font-weight: 400; color: #fff; line-height: 1.25; }
.g-cap .d { display: block; font-size: 0.6rem; font-weight: 400; color: #ddd; line-height: 1.2; margin-top: 8px; }

@media (max-width: 768px)  {
    .masonry { gap: 8px; }
    .m-col { gap: 8px; }
    .site-header, .site-nav { padding-left: 20px; padding-right: 20px; }
    main { padding: 16px 20px 40px; }
}
@media (max-width: 520px)  { .site-nav { gap: 20px; } }

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(255,255,255,0.97);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1000;
    padding: 40px;
}
.lightbox.on { display: flex; }
.lightbox img {
    max-width: 100vw; max-height: calc(100vh - 110px);
    object-fit: contain; border-radius: 4px;
}
.lb-wrap { display: flex; flex-direction: column; align-items: center; }
.lb-title {
    margin-top: 24px;
    color: var(--text);
    font-weight: 500; font-size: 1rem;
    text-align: center;
}
.lb-cnt { display: none; }
.lb-x, .lb-p, .lb-n {
    position: absolute;
    width: 44px; height: 44px;
    border: 2px solid var(--text); border-radius: 50%;
    background: transparent; color: var(--text);
    font-size: 24px; cursor: pointer;
    font-family: var(--font); line-height: 1;
    transition: background 0.2s, color 0.2s;
}
.lb-x:hover, .lb-p:hover, .lb-n:hover { background: var(--text); color: var(--bg); }
.lb-x { top: 20px; right: 30px; }
.lb-p { left: 20px; top: 50%; transform: translateY(-50%); font-size: 20px; }
.lb-n { right: 20px; top: 50%; transform: translateY(-50%); font-size: 20px; }

@media (max-width: 768px) {
    .lightbox { padding: 20px; }
    .lb-p, .lb-n { width: 38px; height: 38px; font-size: 17px; }
    .lb-p { left: 10px; } .lb-n { right: 10px; }
}

/* ========================================
   Content pages (biography, contact)
   ======================================== */
.content { max-width: 720px; }
.content p { margin-bottom: 1.2em; font-size: 1rem; }
.content h2 { font-size: 1.8rem; font-weight: 400; margin: 3em 0 0.8em; }

.contact-list { list-style: none; margin-top: 1em; }
.contact-list li { margin-bottom: 0.8em; font-size: 1rem; }
.contact-list a { border-bottom: 1px solid var(--text); }
.contact-list a:hover { color: var(--accent); border-color: var(--accent); }

.statement { font-size: 1rem; line-height: 1.7; }
.statement p { margin-bottom: 1.2em; }

.exhibitions { list-style: none; margin-top: 1em; }
.exhibitions li { margin-bottom: 0.5em; font-size: 1rem; display: flex; gap: 1em; }
.exhibitions .ex-year { font-weight: 700; min-width: 3.2em; }

/* ========================================
   Footer
   ======================================== */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 20px 200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: var(--muted);
}
.site-footer .socials a { width: 26px; height: 26px; }
.site-footer .socials svg { width: 18px; height: 18px; }

@media (max-width: 768px) {
    .site-footer { flex-direction: column; gap: 12px; padding: 20px; }
}

/* ========================================
   Contact form
   ======================================== */
.contact-form { display: flex; flex-direction: column; gap: 1.8em; max-width: 560px; margin: 2em 0 2.5em; }
.contact-form label {
    display: flex; flex-direction: column; gap: 0.5em;
    font-size: 1rem; font-weight: 500; letter-spacing: 1.4px;
}
.contact-form input, .contact-form textarea {
    font-family: var(--font); font-size: 1rem;
    padding: 0.4em 0; border: none; border-bottom: 1px solid var(--text);
    border-radius: 0; background: transparent; color: var(--text);
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-bottom: 2px solid var(--text); }
.contact-form button {
    align-self: flex-start; font-family: var(--font); font-size: 1rem; font-weight: 500;
    padding: 0.55em 1.8em; background: transparent; color: var(--text);
    border: 2px solid var(--text); border-radius: 0; cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.contact-form button:hover { background: var(--text); color: var(--bg); }
.contact-form .hp { display: none; }
.form-ok { color: #1a7f37; font-weight: 500; }
.form-err { color: var(--accent); font-weight: 500; }
