/* Futura PT (Demi/600) is now loaded via the Adobe Fonts kit linked in index.html */

:root {
    --bg-color: #7a7776;
    --text-primary: #ffffff;
    --text-muted: #ffffff;
    --accent: #ffffff;
    --sidebar-bg: #7a7776;
    --border-color: #a09e9d;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    --font-body: 'futura-pt', 'Inter', sans-serif;
    --transition-fast: 0.3s ease;
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

img {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: auto;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Top Navigation Bar */
.topbar {
    width: 100%;
    padding: 1.5rem 3rem;
    background-color: var(--sidebar-bg);
    border-bottom: 2px solid #afc1c4;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-row {
    display: flex;
    align-items: baseline;
    gap: 3rem;
}

.logo-group {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-right: auto;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.04em;
}

.logo a {
    filter: blur(0.5px);
    color: #afc1c4;
    transition: filter var(--transition-slow), letter-spacing var(--transition-slow);
}

.logo a:hover {
    filter: blur(0.3px);
    letter-spacing: 0.08em;
    color: var(--accent);
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
}

.main-nav a {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 400;
    color: #afc1c4;
}

.main-nav a.active, .main-nav a:hover {
    color: var(--text-primary);
}

.main-nav {
    position: relative;
}

.main-nav::after {
    display: none;
}

.nav-star {
    display: inline-block;
    width: fit-content;
    line-height: 1;
    user-select: none;
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: #afc1c4;
    opacity: 0.7;
    cursor: pointer;
    filter: blur(0.5px);
    transform: translateY(0.28em);
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.nav-star:hover {
    opacity: 1;
    color: var(--accent);
}

/* Nested Sub Navigation */
.sidebar-sub-content {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    margin-top: 1rem;
}

.sidebar-sub-content ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
}

.sidebar-sub-content li {
    display: flex;
    flex-direction: column;
}

.sidebar-sub-content a {
    color: var(--text-muted);
    transition: all var(--transition-fast);
    display: inline-block;
}

.sidebar-sub-content a:hover {
    color: var(--text-primary);
}

.sidebar-sub-content a.active {
    font-style: italic;
    color: var(--accent);
}

.work-sub-date {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    opacity: 0.75;
    margin-top: 0.05rem;
}

.sidebar-sub-content a.active + .work-sub-date {
    font-style: italic;
}

/* Main Content Area */
.content-area {
    padding: 3rem 4rem;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
}

/* View Transitions */
.view-transition {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.view-transition.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

/* Works Index List View */
.works-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    animation: fadeIn var(--transition-slow);
}

.work-item a {
    display: block;
    font-size: 1.6rem;
    line-height: 1.1;
    color: var(--text-primary);
}

.work-item a:hover {
    font-style: italic;
    transform: scale(1.02);
    transition: all var(--transition-slow);
    color: var(--accent);
}

.work-meta {
    font-family: var(--font-body);
    font-size: 0.70rem;
    color: var(--text-muted);
    line-height: 1.1;
    margin-top: 0.15rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Gallery Viewer */
.gallery-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.image-container {
    max-width: 620px;
    width: 100%;
    height: 60vh;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 4px solid #ffffff;
    box-shadow: 0 6px 60px rgba(0,0,0,0.12);
}

.image-container img:hover {
    filter: none;
}

.gallery-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.gallery-controls button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast), opacity var(--transition-fast);
    opacity: 0.75;
}

.gallery-controls button svg {
    display: block;
}

.gallery-controls button:hover {
    color: var(--accent);
    opacity: 1;
}

.gallery-caption {
    text-align: center;
    margin-top: 1.5rem;
    font-style: italic;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Text Pages */
.text-page {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    padding: 0 1.5rem;
}

.text-page h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.text-page p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

.text-page.page-copy p {
    font-size: 0.95rem;
}

/* Resume List */
.resume-list {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.resume-item {
    display: flex;
    gap: 1.5rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.resume-item:last-child {
    border-bottom: none;
}

.resume-date {
    flex: 0 0 3rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

.resume-content {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    line-height: 1.6;
    color: var(--text-muted);
}

.resume-content em {
    font-style: italic;
}

/* Home Page */
.home-view {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-photo-wrap {
    max-width: 560px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.home-photo-wrap .photo-shield {
    position: relative;
    width: 100%;
    height: 65vh;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border: 4px solid #ffffff;
    box-shadow: 0 6px 60px rgba(0,0,0,0.12);
    opacity: 0;
    transition: opacity 1.4s ease;
}

.hero-slide.active {
    opacity: 1;
}

.home-caption {
    font-family: var(--font-body);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}

.site-copyright {
    position: fixed;
    left: 1.5rem;
    bottom: 1rem;
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.03em;
    color: #999694;
    z-index: 50;
    pointer-events: none;
}

/* Hard instant transitions — no fading */
.view-transition {
    opacity: 1;
}

.view-transition.fade-out {
    opacity: 1;
}

/* Responsiveness */
@media (max-width: 800px) {
    .topbar {
        padding: 1.25rem 1.5rem;
    }
    .topbar-row {
        flex-wrap: wrap;
        gap: 1rem 1.5rem;
    }
    .logo-group {
        margin-right: 0;
        width: 100%;
    }
    .main-nav ul {
        flex-wrap: wrap;
        gap: 0.6rem 1.25rem;
    }
    .sidebar-sub-content {
        font-size: 1rem;
    }
    .sidebar-sub-content ul {
        gap: 0.4rem 1.25rem;
    }
    .content-area {
        padding: 2rem 1.25rem;
        min-height: auto;
    }
    .home-photo-wrap {
        max-width: 100%;
    }
    .home-photo-wrap .photo-shield {
        height: 50vh;
    }
    .image-container {
        max-width: 100%;
        height: 50vh;
    }
    .gallery-controls {
        max-width: 100%;
    }
    .text-page {
        max-width: 100%;
    }
    .text-page h2 {
        font-size: 1.9rem;
    }
    .works-list {
        gap: 2rem;
    }
    .work-item a {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .topbar {
        padding: 1rem 1rem;
    }
    .site-copyright {
        left: 1rem;
        bottom: 0.75rem;
        font-size: 0.6rem;
    }
    .logo {
        font-size: 1.1rem;
    }
    .main-nav a {
        font-size: 0.95rem;
    }
    .content-area {
        padding: 1.5rem 1rem;
    }
    .hero-slide,
    .image-container img {
        border-width: 3px;
    }
    .home-photo-wrap .photo-shield {
        height: 42vh;
    }
    .image-container {
        height: 42vh;
    }
    .text-page h2 {
        font-size: 1.6rem;
    }
    .work-item a {
        font-size: 1.15rem;
    }
}
