/* =============================================
   SHAHGUL PORTFOLIO - THE HIDDEN TERMINAL
   Premium Dual-Persona Portfolio Design
   ============================================= */

/* CSS CUSTOM PROPERTIES */
:root {
    /* "The Golden Hour" Palette (Premium & Versatile) */
    --photo-bg: #0A0A0A;
    /* Near Black */
    --photo-bg-secondary: #1F1F1F;
    /* Dark Charcoal */
    --photo-text: #FFFFFF;
    /* Pure White */
    --photo-text-muted: #B3B3B3;
    /* Light Gray */
    --photo-accent: #D4AF37;
    /* Metallic Gold */


    --term-bg: #0d1117;
    --term-bg-secondary: #161b22;
    --term-bg-tertiary: #1c2128;
    --term-text: #c9d1d9;
    --term-text-muted: #8b949e;
    --term-accent: #00d9ff;
    --term-accent-secondary: #00ff41;
    --term-accent-warning: #f0b429;
    --term-border: #30363d;



    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 8rem;

    --transition-fast: 100ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: auto !important;
    /* Managed by JS for custom smoothness */
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* WORLD CONTAINERS */
.world {
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
    overflow-y: auto;
}

.world.active {
    opacity: 1;
    visibility: visible;
}

/* PHOTO HEADER - Dark Glass (Universally Readable) */
.photo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-xl);

    /* Dark Glass Background */
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    transition: all var(--transition-medium);
}

.logo-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: transform var(--transition-fast);
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-container:active {
    transform: scale(0.98);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--photo-text);
}

.logo-tagline {
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    font-weight: 600;
    color: var(--photo-text-muted);
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.main-nav {
    display: flex;
    gap: var(--space-xl);
    /* Increased spacing for airy feel */
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--transition-medium);
    position: relative;
    padding: 4px 0;
    font-weight: 600;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: var(--photo-accent);
    transition: width var(--transition-medium);
    box-shadow: 0 0 8px var(--photo-accent);
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:active {
    transform: scale(0.95);
    color: var(--photo-accent);
}



.nav-link:hover::after {
    width: 100%;
}

/* HERO */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: var(--space-2xl);
}

.hero-image-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 10, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    /* Tight tracking for modern display */
    line-height: 1;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--photo-text);
    font-style: italic;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    right: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    animation: float 2s ease-in-out infinite;
}

.scroll-text {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--photo-text-muted);
    writing-mode: vertical-rl;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, var(--photo-text-muted) 0%, transparent 100%);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* IMAGE PLACEHOLDERS */
.image-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.image-placeholder.landscape {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 40%, #0f0f0f 100%);
}

.mountain-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(135deg, transparent 40%, #0a0a0a 40%) 0 0,
        linear-gradient(-135deg, transparent 40%, #0a0a0a 40%) 100% 0;
    background-size: 50% 100%;
    background-repeat: no-repeat;
}

.light-rays {
    position: absolute;
    top: 20%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translateX(-50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

.image-placeholder.landscape-2 {
    background: linear-gradient(180deg, #2d2d44 0%, #1a1a2e 100%);
}

.image-placeholder.architecture {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.building-lines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent, transparent 30px, rgba(255, 255, 255, 0.03) 30px, rgba(255, 255, 255, 0.03) 31px);
}

.image-placeholder.abstract {
    background: radial-gradient(circle at 30% 70%, #2a2a4a 0%, #1a1a2e 50%, #0f0f1a 100%);
}

.abstract-circles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.image-placeholder.street {
    background: linear-gradient(180deg, #1f1f1f 0%, #151515 100%);
}

.image-placeholder.landscape-3 {
    background: linear-gradient(180deg, #1a2030 0%, #151520 100%);
}

.image-placeholder.architecture-2 {
    background: repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 10px, #222 10px, #222 20px);
}

/* GALLERY */
.gallery {
    padding: var(--space-2xl) var(--space-xl);
    min-height: 100vh;
    background: var(--photo-bg);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.section-subtitle {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--photo-text);
    font-style: italic;
    opacity: 0.8;
}

/* GALLERY - Masonry Column Layout */
.gallery {
    padding: var(--space-2xl) var(--space-xl);
    background: var(--photo-bg);
}

.gallery-grid {
    columns: 3 300px;
    /* Multi-column masonry */
    column-gap: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    break-inside: avoid;
    /* Essential for masonry columns */
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    border-radius: 4px;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

/* ANTI-EYE STRAIN / DARK MODE PROTECTION */
.gallery-item img,
.gallery-item .image-placeholder {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    /* Respect natural aspect ratio */

    /* Default: Subdued for Dark Mode comfort */
    filter: brightness(0.8) contrast(1.1) saturate(0.85);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(1.01);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.gallery-item:hover img,
.gallery-item:hover .image-placeholder {
    /* Hover: Full artistic intent */
    filter: brightness(1) contrast(1) saturate(1);
    transform: scale(1);
}

.gallery-item.large,
.gallery-item.wide {
    /* Column layout doesn't use span - these are now just hints if needed, 
       but masonry handle size automatically by image height */
    grid-column: auto;
}


.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    transform: translateY(100%);
    transition: transform var(--transition-medium);
}

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

.item-overlay h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 0.3rem;
    color: #fff;
}

.item-overlay .category {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--photo-accent);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    opacity: 0.9;
}

/* ABOUT */
.about {
    padding: var(--space-2xl);
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--photo-bg-secondary);
}

.about-content {
    max-width: 600px;
    text-align: center;
}

.about-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-lg);
}

.about-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--photo-text-muted);
    margin-bottom: var(--space-lg);
    font-style: normal;
    /* Removed italic from body text for readability */
}

.contact-link {
    font-size: 0.9rem;
    color: var(--photo-accent);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-medium);
}

.contact-link:hover {
    border-bottom-color: var(--photo-accent);
}

/* FOOTER */
.photo-footer {
    padding: var(--space-xl);
    background: var(--photo-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.copyright {
    font-size: 0.75rem;
    color: var(--photo-text-muted);
}

/* SCROLL PROGRESS BAR - Premium Glow */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    /* Thinner */
    background: #ffffff;
    width: 0%;
    z-index: 10000;
    box-shadow:
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.4);
    transition: width 0.1s ease-out, background 0.6s ease;
    pointer-events: none;
}

/* Terminal Mode: Reset to Cyan-Orange Gradient */
#scroll-progress.terminal-mode {
    background: linear-gradient(to right, #00d9ff, #ff8c00);
    box-shadow:
        0 0 10px rgba(0, 217, 255, 0.7),
        0 0 20px rgba(255, 140, 0, 0.5);
}

/* RESPONSIVE MASONRY */
@media (max-width: 1024px) {
    .gallery-grid {
        columns: 2 250px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        columns: 1 100%;
    }

    .gallery {
        padding: var(--space-xl) var(--space-md);
    }
}

/* LIGHTBOX EYE PROTECTION */
.lightbox-content img {
    filter: brightness(0.9) contrast(1.05);
    /* Subdue highlights slightly in modal */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    transition: filter 0.3s ease;
}

.lightbox-content img:hover {
    filter: brightness(1) contrast(1);
    /* Reveal full detail on hover */
}