/* =============================================================================
   Kaeley Hahn – Art Portfolio
   style.css  |  Main stylesheet
   =============================================================================
   Fonts loaded externally in <head>:
     • Cormorant Garamond (serif headings)
     • Raleway (UI / body text)
   Icons loaded externally in <head>:
     • Font Awesome 6 (social icons, project accordion)
   ============================================================================= */

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

/* ── Design tokens ─────────────────────────────────────────── */
:root {
    --bg:          #f5f1ec;   /* warm off-white */
    --surface:     #ffffff;   /* white */
    --surface-2:   #ebe5dd;   /* light warm grey */
    --border:      #d4cbc0;   /* warm grey border */
    --accent:      #8a6035;   /* deep warm gold, readable on white */
    --accent-dim:  #6b4a27;   /* darker gold for hover */
    --text:        #1c1714;   /* near-black warm */
    --text-muted:  #7a7068;   /* medium warm grey */
    --overlay:     rgba(0, 0, 0, 0.88);
    --radius:      3px;
    --transition:  0.28s ease;
}

/* ── Base ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 300;
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────── */
header {
    padding: 3.5rem 2rem 2rem;
    text-align: center;
}

.site-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--text);
    text-transform: uppercase;
}

.site-name span {
    color: var(--accent);
}

.site-tagline {
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

/* ── Nav ────────────────────────────────────────────────────── */
nav {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    padding: 1.4rem 2rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-top: 2rem;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    transition: color var(--transition);
}

nav a:hover,
nav a.active {
    color: var(--accent);
}

/* ── Gallery ────────────────────────────────────────────────── */
.gallery-section {
    padding: 3rem 1.5rem 5rem;
    max-width: 1440px;
    margin: 0 auto;
}

.gallery-meta {
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Masonry-style columns */
.gallery-grid {
    columns: 3 300px;
    column-gap: 1rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    display: block;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.45s ease;
}

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

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.80) 0%,
        rgba(0, 0, 0, 0.10) 55%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2rem;
    pointer-events: none;
}

.gallery-item:hover .gallery-item-overlay,
.gallery-item:focus-visible .gallery-item-overlay {
    opacity: 1;
}

.gallery-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.gallery-item-title {
    color: #fff;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.04em;
}

.gallery-item-hint {
    color: rgba(255,255,255,0.55);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 7rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3.5rem;
    opacity: 0.25;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 0.9rem;
    line-height: 1.8;
    max-width: 480px;
    margin: 0 auto;
}

.empty-state code {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 0.15em 0.5em;
    border-radius: 2px;
    font-size: 0.88em;
    color: var(--accent);
    font-family: 'Courier New', monospace;
}

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-card {
    display: flex;
    width: 100%;
    max-width: 1180px;
    max-height: 92vh;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    transform: translateY(10px) scale(0.97);
    transition: transform 0.3s ease;
}

.lightbox.is-open .lightbox-card {
    transform: translateY(0) scale(1);
}

/* Image pane */
.lb-img-pane {
    flex: 1 1 60%;
    min-width: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lb-img-pane img {
    display: block;
    max-width: 100%;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Info pane */
.lb-info-pane {
    flex: 0 0 300px;
    padding: 2.5rem 2rem 2rem;
    border-left: 1px solid var(--border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lb-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 300;
    color: var(--text);
    line-height: 1.2;
}

.lb-rule {
    width: 2.5rem;
    height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

.lb-description {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.85;
    flex-grow: 1;
}

/* Rendered markdown elements inside the description */
.lb-description p            { margin-bottom: 0.85em; }
.lb-description p:last-child { margin-bottom: 0; }
.lb-description strong       { font-weight: 600; color: var(--text); }
.lb-description em           { font-style: italic; }

.lb-description h2,
.lb-description h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    color: var(--text);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    margin: 1em 0 0.3em;
}

.lb-description hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

.lb-description.lb-no-desc {
    color: var(--text-muted);
    font-style: italic;
}

.lb-counter {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* Close button */
.lb-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 2.2rem;
    height: 2.2rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #ccc;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background var(--transition), color var(--transition);
    line-height: 1;
}

.lb-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Prev / Next arrows */
.lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ccc;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, background var(--transition);
}

.lightbox.is-open .lb-arrow {
    opacity: 1;
    pointer-events: all;
}

.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

.lb-arrow:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.lb-arrow:disabled {
    opacity: 0.2 !important;
    cursor: default;
}

/* Loading shimmer on image swap */
.lb-img-pane img.is-loading { opacity: 0; transition: opacity 0.2s ease; }
.lb-img-pane img.is-loaded  { opacity: 1; transition: opacity 0.25s ease; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

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

footer a:hover { color: var(--accent); }

/* =============================================================================
   RESUME / PROFILE SECTIONS
   ============================================================================= */

/* ── Shared section layout ──────────────────────────────────── */
.site-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem 4.5rem;
    border-top: 1px solid var(--border);
}

.section-heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 300;
    color: var(--text);
    text-align: center;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
}

.section-sub {
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* ── About ──────────────────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3.5rem;
    align-items: center;
}

.about-photo img {
    width: 100%;
    border-radius: 3px;
    display: block;
    filter: grayscale(15%);
}

.about-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.1rem;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 0.6rem;
    letter-spacing: 0.04em;
}

.about-role {
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    line-height: 1.7;
}

/* ── Skills ─────────────────────────────────────────────────── */
.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
}

.skill-tag {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    padding: 0.35em 0.9em;
    border-radius: 2rem;
    transition: border-color var(--transition), color var(--transition);
}

.skill-tag:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}

/* ── My Work ────────────────────────────────────────────────── */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.1rem;
}

.work-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    transition: border-color var(--transition);
}

.work-card:hover { border-color: var(--accent-dim); }

.work-card-img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    object-position: center;
    background: var(--surface-2);
    padding: 1rem;
    display: block;
}

.work-card-body { padding: 0.9rem 1.1rem 1.1rem; }

.work-card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.work-card-company {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

/* ── Projects accordion ─────────────────────────────────────── */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-width: 820px;
    margin: 0 auto;
}

.project-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.project-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    user-select: none;
    font-size: 0.92rem;
    color: var(--text);
    transition: color var(--transition), background var(--transition);
}

.project-item summary::-webkit-details-marker { display: none; }

.project-item summary:hover {
    color: var(--text);
    background: rgba(0,0,0,0.04);
}

.project-item[open] > summary {
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.project-icon {
    color: var(--accent-dim);
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: transform var(--transition), color var(--transition);
}

.project-item[open] > summary .project-icon {
    transform: rotate(45deg);
    color: var(--accent);
}

.project-body {
    padding: 1.1rem 1.4rem 1.25rem;
    color: var(--text);
    font-size: 0.875rem;
    line-height: 1.85;
}

/* ── Let's Connect ──────────────────────────────────────────── */
.social-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.1rem;
}

.social-link {
    width: 3.1rem;
    height: 3.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    text-decoration: none;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.social-link:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
    background: var(--surface-2);
}

/* ── Wolftree footer credit ─────────────────────────────────── */
.wolftree-credit {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0.55;
    transition: opacity var(--transition);
}

.wolftree-credit:hover { opacity: 0.85; }

.wolftree-credit a {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.wolftree-credit img {
    height: 1.1rem;
    width: auto;
    filter: brightness(0) opacity(0.45);
    transition: filter var(--transition);
}

.wolftree-credit:hover img { filter: brightness(0) opacity(0.65); }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 720px) {
    .lightbox-card {
        flex-direction: column;
        max-height: 96vh;
    }

    .lb-img-pane {
        flex: 0 0 auto;
        max-height: 52vh;
    }

    .lb-info-pane {
        flex: 1;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 1.25rem;
    }

    .lb-prev { left: 0.4rem; }
    .lb-next { right: 0.4rem; }

    nav { gap: 1.2rem; flex-wrap: wrap; padding: 1rem 1.5rem; }
}

@media (max-width: 640px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .about-photo {
        max-width: 200px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .site-name      { letter-spacing: 0.06em; }
    .gallery-grid   { columns: 1; }
    nav             { gap: 0.9rem 1.4rem; }
    nav a           { font-size: 0.68rem; letter-spacing: 0.16em; }
}
