﻿

/* CSS Variables */
:root {
    --color-bg: black;
    --color-card: #ffffff;
    --color-text: #2c2c2c;
    --color-text-light: #6b6b6b;
    --color-accent: #c9a962;
    --color-accent-dark: #a88b4a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
.hist-header {
    text-align: center;
    padding: 4rem 2rem 3rem;
}

.title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* ============================================
   GALLERY GRID
   ============================================ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0;
    max-width: 1400px;
    margin: 40px auto;
}

.crest-profile {
    height: 70% !important;
    width: 70% !important;
    margin: auto !important;
    margin-top: 50px !important;
    display: block !important;
    object-fit: contain !important;
}

/* ============================================
   CARD
   ============================================ */
.hist-card {
    /*background: var(--color-card);*/
    background: none;
    border-radius: 16px;
    border: 1px solid white;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: 
        transform var(--transition-medium),
        box-shadow var(--transition-medium);
    will-change: transform, box-shadow;
    width: 250px;
    cursor: pointer;
}

/* Card Hover Effect - Lift & Shadow */
.hist-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   CARD IMAGE
   ============================================ */
.hist-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.hist-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 
        transform var(--transition-slow),
        filter var(--transition-medium);
    will-change: transform, filter;
}

.hist-card:focus {
   border: 10px solid #ffcc01 !important;
}
/* Image Zoom on Hover */
.hist-card:hover .hist-card-image img, .hist-card:focus .hist-card-image img {
    transform: scale(1.08);
}

/* ============================================
   CARD OVERLAY
   ============================================ */
.hist-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 2rem;
    opacity: 0;
    transition: opacity var(--transition-medium);
    cursor: pointer;
}

.hist-card:hover .hist-card-overlay {
    opacity: 1;
}

.view-bio {
    font-family: 'Cormorant Garamond', 'GI', serif;
    font-size: 1rem;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform var(--transition-medium), opacity var(--transition-medium), background-color var(--transition-fast), border-color var(--transition-fast);
}

.hist-card:hover .view-bio {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.1s;
}

.view-bio:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   CARD CONTENT
   ============================================ */
.hist-card-content {
    padding: 1.5rem 1.75rem;
    position: relative;
}

/* Decorative accent line */

.hist-card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0 !important;
    width: 100%;
    height: 3px;
    color: #ffcc01 !important;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}


.hist-card:hover .hist-card-content::before {
    transform: scaleX(1);
}

.hist-card-name {
    font-family: 'Cormorant Garamond', 'GI', serif; /*var(--font-display);*/
    font-size: 18px;
    font-weight: 600;
    color: #ffcc01; /*var(--color-text);*/
    margin-bottom: 0.25rem;
    transition: color var(--transition-fast);
}

.hist-card:hover .hist-card-name {
    color: #ffcc01;
}

.hist-card-role {
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

/* ============================================
   CARD LINK
   ============================================ */
.hist-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffcc01;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}

.hist-card-link span {
    position: relative;
    font-size: 14px;
}

/* Underline animation */
.hist-card-link span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ffcc01;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-medium);
}

.hist-card:hover .hist-card-link span::after {
    transform: scaleX(1);
}

.hist-card-link:hover {
    color: white;
}

/* Arrow icon */
.arrow {
    width: 16px;
    height: 16px;
    transform: translateX(-4px);
    opacity: 0;
    transition: 
        transform var(--transition-medium),
        opacity var(--transition-medium);
}

.hist-card:hover .arrow {
    transform: translateX(0);
    opacity: 1;
}

.hist-card-link:hover .arrow {
    transform: translateX(4px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 2rem;
}

.footer p {
    font-size: 0.875rem;
    color: var(--color-text-light);
    letter-spacing: 0.05em;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .hist-card {
        width: 100%; /*450px*/
    }

    .hist-header {
        padding: 3rem 1.5rem 2rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .hist-card-content {
        padding: 1.25rem;
    }
    
    
    .hist-card-content::before {
        left: 1.25rem;
    }
    
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hist-card:hover {
        transform: none;
    }
    
    .hist-card-image img {
        transform: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .hist-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .hist-card-overlay {
        display: none;
    }
}


/* ── Modal ── */

.modal-open {
    
    
    overflow: hidden;
    /*
    height: 100%;
    margin:0;
    */
    
       
}

#hist-modal {
    margin: auto;

}
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    top: -65px;
}

    .modal:target {
        opacity: 1;
        pointer-events: auto;
    }

.modal-backdrop {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: rgba(13, 13, 13, 0.88);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.5s ease 0.1s;
}

.modal:target .modal-backdrop {
    opacity: 0;
}

.modal-content {
    position: relative;
    z-index: 2;
    /*background: #FDFCF8; */
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    height: 100%;
    /*
    max-width: 900px;
    width: 92%;
    max-height: 88vh;
    */
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    border: 1px solid rgba(191, 167, 106, 0.45);
    box-shadow: 0 40px 100px rgba(0,0,0,0.35);
    /* Entrance animation */
    transform: scale(0.92) translateY(30px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s;
}

#modal-header {
    position: sticky;
    top: -1px;
    z-index: 1000;
    background-color: #FDFCF8;
    padding-bottom: 10px;
}

.modal:target .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-img-wrap {
    height: auto;
    position: sticky;
    overflow: hidden;
    min-height: 400px;
    /*box-shadow: 8px 0px 12px -2px rgba(0, 0, 0, 0.3); */
    border-right: 1px solid #FDFCF8;
}

    .modal-img-wrap img {
        /*width: 100%; */
        height: 100% !important;
        object-fit: cover;
        display: block;
        position: absolute;
        inset: 0;
        z-index: 2;
    }

    .modal-img-wrap::before {
        
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(255,255,255,0.2);
        backdrop-filter: blur(20px);
        z-index: 1;
        
        
    }

    .modal-img-wrap::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to right, transparent 60%, #FDFCF8 100%);
    }

.modal-body {
    overflow-y: auto;
    padding-top: 0; /*50px 45px 45px;*/
    position: relative;
    box-shadow: 0 0 34px 15px #FDFCF8; /*0 0 19px 6px white; */
    background: #FDFCF8;
    margin: 0px;
}

/*
    .modal-body::before {
        content: "";
        position: absolute;
        top: 45px;
        left: 45px;
        width: 45px;
        height: 2px;
        background: #BFA76A;
    }
    */

.modal-close {
    position: absolute;
    top: 22px;
    right: 45px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6B6560;
    font-size: 1.6rem;
    font-weight: 300;
    border: 1px solid rgba(191, 167, 106, 0.25);
    transition: all 0.3s ease;
    z-index: 1001;
    cursor: pointer;
}

    .modal-close:hover, .modal-close:focus {
        color: #BFA76A;
        border-color: #BFA76A;
        transform: rotate(90deg);
    }

.modal-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem; /*65px*/
    font-weight: 600;
    color: #0D0D0D;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    padding: 15px 0 15px 15px;
}

#modal-role {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: inherit;
    color: #8C7A42;
    margin-bottom: 25px;
    padding: 0 21px;

}

.modal-divider {
    width: 90%;
    height: 1px;
    background: #BFA76A;
    margin: 20px 0
}

#modal-bio {
    font-family: 'Cormorant Garamond', 'GI', 'Jost', sans-serif;
    font-size: 28px;
    line-height: 1.85;
    color: black; /*#4A4A4A; */
    margin-bottom: 30px;
    font-weight: 400;
    text-transform: none;
    overflow-y: auto;
    padding: 0 20px;
}

.modal-details {
    border-top: 1px solid rgba(191, 167, 106, 0.25);
    padding-top: 25px;
}

.detail-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 14px;
}

.detail-label {
    font-family: 'Jost', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8C7A42;
    min-width: 110px;
}

.detail-value {
    font-family: 'Jost', sans-serif;
    font-size: 0.9rem;
    color: #4A4A4A;
}

.detail-value a {
    color: #8C7A42;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.detail-value a:hover {
    border-bottom-color: #BFA76A;
}

#modal-bio blockquote {
    font-style: italic;
}


@media(max-width:1200px) {

    .modal-content {
        display: flex;
    }

    .modal-img-wrap {
        height: 1200px;
        min-height: 200px;
    }

    .modal-img-wrap img {
        width: 100%; 
        object-fit: contain;
    }

    .modal-name {
        font-size: 3rem;
    }

    #modal-role {
        font-size: 25px;
    }

    #modal-bio {
        font-size: 23px;
    }
}

@media(max-height: 800px) {
    .modal-img-wrap img {
        object-fit: contain;
        height: unset;
    }
}