/* ============================================================
   styles.css — Lens & Logic (all pages)
   ============================================================ */

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

:root {
    --bg: #0a0a08;
    --fg: #f8f4f9;
    --accent: #c8a96e;
    --muted: #babab2;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--fg);
    font-size: 20px;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}
/* Accessibility: visible only when keyboard-focused */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-120%);
    padding: 10px 14px;
    background: #ffffff;
    color: #111111;
    text-decoration: none;
    font: 500 14px/1.2 "JetBrains Mono", monospace;
    border-radius: 0 0 8px 0;
    z-index: 10000;
    transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
    outline: 2px solid #111111;
    outline-offset: 2px;
}

/* ---- Nav ---- */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 48px;
    background: linear-gradient(to bottom, rgba(10,10,8,0.95), transparent);
}
.nav-logo {
    font-family: var(--serif);
    font-size: 25px;
    font-weight: 300;
    font-style: italic;
    color: var(--accent);
    letter-spacing: 0.02em;
    text-decoration: none;
}
.nav-links { display: flex; gap: 10px; }
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.1em;
    font-size: 15px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 100%; }

/* ---- Footer ---- */
footer {
    padding: 32px 48px;
    border-top: 1px solid #1a1a16;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.15em;
}
footer span {
    letter-spacing: 0.2em;
}

/* ---- Animations ---- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scanLine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* ---- Reveal (IntersectionObserver) ---- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

/* ============================================================
   Portfolio page (index.html)
   ============================================================ */

/* Hero */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
    padding: 0;
}
.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 48px 80px 48px;
    position: relative;
    z-index: 2;
}
.hero-tag {
    font-size: 15px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.3s forwards;
}
.hero-name {
    font-family: var(--serif);
    font-size: clamp(52px, 7vw, 96px);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.5s forwards;
}
.hero-name em { font-style: italic; color: var(--accent); }
.hero-desc {
    max-width: 50%;
    color: var(--muted);
    line-height: 1.9;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.7s forwards;
}
.hero-desc span { color: var(--fg); }

.hero-right { position: relative; overflow: hidden; }
.hero-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,10,8,0.6) 0%, transparent 50%, rgba(200,169,110,0.05) 100%);
    z-index: 1;
}
.hero-photo-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
}
.photo-block { position: relative; overflow: hidden; }
.photo-img {
    width: 100%; height: 100%;
    display: block;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.05) brightness(0.9);
    transform: scale(1.02);
}


/* Sections */
section { padding: 120px 48px; }
.section-index {
    font-size: 15px;
    letter-spacing: 0.3em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 64px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.section-index::before {
    content: '';
    display: block;
    width: 48px; height: 1px;
    background: var(--muted);
}

/* Duality */
.duality {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    margin-bottom: 80px;
}
.duality-card {
    padding: 56px 48px;
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: transform 0.4s ease;
}
.duality-card:hover { transform: translateY(-4px); }
.duality-card:nth-child(1) { background: #0f0f0d; border-top: 1px solid var(--muted); }
.duality-card:nth-child(2) { background: #0c0c0a; border-top: 1px solid var(--accent); }
.duality-label { font-size: 15px; letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 20px; }
.duality-card:nth-child(1) .duality-label { color: var(--muted); }
.duality-card:nth-child(2) .duality-label { color: var(--accent); }
.duality-title {
    font-family: var(--serif);
    font-size: 42px;
    font-weight: 300;
    font-style: italic;
    margin-bottom: 24px;
    line-height: 1.1;
}
.duality-body { color: var(--muted); line-height: 1.9; max-width: 340px; }
.duality-body span { color: var(--fg); }

/* Work grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: 2px;
}
.work-item { position: relative; overflow: hidden; cursor: none;
    grid-row: 1 / 3; aspect-ratio: unset; min-height: 400px;
}
.work-item:nth-child(1) { grid-column: 1 / 8; grid-row: 1 / 3; aspect-ratio: unset; min-height: 400px; }
.work-item:nth-child(2) { grid-column: 8 / 13; grid-row: 1; }
.work-item:nth-child(3) { grid-column: 8 / 13; grid-row: 2; }
.work-item:nth-child(4) { grid-column: 1 / 5; grid-row: 3; }
.work-item:nth-child(5) { grid-column: 5 / 13; grid-row: 3; }
.work-inner { width: 100%; height: 100%; min-height: 200px; position: relative; overflow: hidden; }
.work-bg {
    grid-row: 4 / 3; aspect-ratio: unset; min-height: 400px;
    position: absolute; inset: 0;
    /*transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);*/
}
.work-img {
    width: 100%; height: 100%;
    display: block;
    object-fit: cover;
    filter: saturate(0.95) contrast(1.05) brightness(0.85);
    transform: scale(1.02);
}
/*.work-item:hover .work-bg { transform: scale(1.05); }*/
/*.work-item:nth-child(1) .work-bg { background: linear-gradient(135deg, #1a1a14, #0a0a08); }*/
/*.work-item:nth-child(2) .work-bg { background: linear-gradient(135deg, #141410, #0c0c09); }*/
/*.work-item:nth-child(3) .work-bg { background: linear-gradient(45deg, #10100e, #181812); }*/
/*.work-item:nth-child(4) .work-bg { background: linear-gradient(135deg, #121210, #0e0e0c); }*/
/*.work-item:nth-child(5) .work-bg { background: linear-gradient(135deg, #0f0f0d, #161614); }*/
/*.work-item:nth-child(1) .work-bg::after {*/
/*  content: ''; position: absolute; inset: 0;*/
/*  background:*/
/*    radial-gradient(ellipse at 40% 40%, rgba(200,169,110,0.15) 0%, transparent 60%),*/
/*    radial-gradient(circle at 80% 80%, rgba(100,80,50,0.1) 0%, transparent 40%);*/
/*}*/
/*.work-item:nth-child(2) .work-bg::after {*/
/*  content: ''; position: absolute; inset: 0;*/
/*  background: radial-gradient(ellipse at 50% 30%, rgba(150,120,70,0.12) 0%, transparent 70%);*/
/*}*/
/*.work-item:nth-child(3) .work-bg::after {*/
/*  content: ''; position: absolute; inset: 0;*/
/*  background: linear-gradient(135deg, transparent 40%, rgba(200,169,110,0.08) 100%);*/
/*}*/
/*.work-item:nth-child(4) .work-bg::after {*/
/*  content: ''; position: absolute; inset: 0;*/
/*  background: radial-gradient(circle at 30% 70%, rgba(80,70,40,0.2) 0%, transparent 60%);*/
/*}*/
/*.work-item:nth-child(5) .work-bg::after {*/
/*  content: ''; position: absolute; inset: 0;*/
/*  background:*/
/*    radial-gradient(ellipse at 70% 50%, rgba(200,169,110,0.1) 0%, transparent 50%),*/
/*    radial-gradient(circle at 20% 30%, rgba(60,50,30,0.15) 0%, transparent 40%);*/
/*}*/
.work-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 28px 32px;
    background: linear-gradient(to top, rgba(10,10,8,0.95), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}
.work-item:hover .work-info { transform: translateY(0); opacity: 1; }
.work-type { font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.work-title { font-family: var(--serif); font-size: 22px; font-weight: 300; font-style: italic; color: var(--fg); }
.work-label-static {
    position: absolute;
    top: 24px; left: 28px;
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.6;
}

/* Development */
.dev-section { border-top: 1px solid #1a1a16; }
.dev-intro {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.7;
    margin-top: 32px;
}
.dev-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #1a1a16;
    margin-top: 48px;
}
.dev-card {
    background: var(--bg);
    padding: 40px 36px;
    transition: background 0.3s ease;
}
.dev-card:hover { background: #0f0f0d; }
.dev-card-title {
    font-family: var(--serif);
    font-size: 28px;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 12px;
}
.dev-card-desc {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
}
.dev-card:hover .tag { border-color: var(--accent); color: var(--accent); }

/* Stack */
.stack-section { border-top: 1px solid #1a1a16; }
.stack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #1a1a16;
    margin-top: 48px;
}
.stack-item { background: var(--bg); padding: 40px 36px; transition: background 0.3s ease; }
.stack-item:hover { background: #0f0f0d; }
.stack-item p {
    color: var(--muted);
}
/*.stack-num { font-size: 10px; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 20px; opacity: 0.7; }*/
.stack-name { font-family: var(--serif); font-size: 42px; font-style: italic; margin-bottom: 12px; font-weight: 300; }
.stack-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
    font-size: 15px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid var(--muted);
    color: var(--muted);
    transition: all 0.3s ease;
}
.stack-item:hover .tag { border-color: var(--accent); color: var(--accent); }

/* Contact */
.contact-section {
    text-align: center;
    padding: 160px 48px;
    border-top: 1px solid #1a1a16;
    position: relative;
    overflow: hidden;
}
.contact-section::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(200,169,110,0.04) 0%, transparent 70%);
    pointer-events: none;
}
.contact-heading {
    font-family: var(--serif);
    font-size: clamp(40px, 7vw, 80px);
    font-weight: 300;
    font-style: italic;
    margin-bottom: 48px;
    line-height: 1.1;
}
.contact-phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: -8px auto 28px;
    padding: 8px 14px;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: 0.18em;
}
.contact-phone:hover, .contact-email:hover { color: var(--accent); border-color: var(--accent); }
.contact-phone:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.contact-email {
    display: inline-block;
    letter-spacing: 0.2em;
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 4px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

/* ============================================================
   Gallery page (gallery.html)
   ============================================================ */

/* Page header */
.page-header {
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 80px 48px 0px;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(200,169,110,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.page-title {
    font-family: var(--serif);
    font-size: clamp(64px, 8vw, 120px);
    font-weight: 300;
    font-style: italic;
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.3s forwards;
}
.page-subtitle {
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0;
    animation: fadeUp 0.8s ease 0.5s forwards;
}
.gallery-section { padding: 30px 48px 120px; }

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2px;
    margin-bottom: 80px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    background: #0f0f0d;
}

.gallery-img-wrapper { width: 100%; height: 100%; position: relative; overflow: hidden; }
.gallery-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: saturate(0.95) contrast(1.05) brightness(0.88);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.6s ease;
}
.gallery-item:hover .gallery-img {
    transform: scale(1.05);
    filter: saturate(1) contrast(1.08) brightness(0.95);
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,8,0.95) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-category {
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}
.gallery-title {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 300;
    font-style: italic;
    color: var(--fg);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10,10,8,0.98);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 48px;
    backdrop-filter: blur(8px);
}
.lightbox.active { display: flex; }
.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    filter: saturate(1) contrast(1.05) brightness(0.95);
}
.lightbox-close {
    position: absolute;
    top: 32px; right: 48px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent);
    padding: 10px 24px;
    /*cursor: none;*/
    transition: all 0.3s ease;
    z-index: 10001;
}
.lightbox-close:hover { background: rgba(200,169,110,0.1); }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(10,10,8,0.8);
    border: 1px solid var(--accent);
    padding: 16px 20px;
    /*cursor: none;*/
    transition: all 0.3s ease;
    z-index: 10001;
}
.lightbox-nav:hover { background: rgba(200,169,110,0.15); }
.lightbox-nav.disabled { opacity: 0.3; pointer-events: none; }
.lightbox-prev { left: 48px; }
.lightbox-next { right: 48px; }
.lightbox-info {
    position: absolute;
    bottom: 48px; left: 48px;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--muted);
    z-index: 10001;
}
.lightbox-counter {
    position: absolute;
    top: 32px; left: 48px;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--muted);
    z-index: 10001;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    nav { padding: 20px 24px; }
    footer { flex-direction: column; gap: 12px; text-align: center; }

    /* Portfolio */
    .hero { grid-template-columns: 1fr; }
    .hero-right { min-height: 40vh; }
    .hero-left { padding: 120px 24px 60px; }
    section { padding: 80px 24px; }
    .duality { grid-template-columns: 1fr; }
    .work-grid { grid-template-columns: 1fr 1fr; }
    .work-item:nth-child(1) { grid-column: 1 / 3; min-height: 280px; }
    .work-item:nth-child(2),
    .work-item:nth-child(3) { grid-column: span 1; }
    .work-item:nth-child(4) { grid-column: span 1; }
    .work-item:nth-child(5) { grid-column: span 1; }
    .stack-grid { grid-template-columns: 1fr; }
    .dev-grid { grid-template-columns: 1fr; }
    .contact-phone {  padding: 7px 12px; margin-bottom: 24px; }

    /* Gallery */
    .page-header { padding: 100px 24px 30px; min-height: 30vh; }
    .gallery-section { padding: 60px 24px 80px; }
    .gallery-grid { grid-template-columns: 1fr; gap: 1px; }
    .gallery-filters { flex-wrap: wrap; gap: 12px; }
    .lightbox { padding: 24px; }
    .lightbox-close { top: 20px; right: 24px; padding: 8px 16px; }
    .lightbox-info { bottom: 24px; left: 24px; }
    .lightbox-counter { top: 20px; left: 24px; }
    .lightbox-prev { left: 24px; padding: 12px 14px; }
    .lightbox-next { right: 24px; padding: 12px 14px; }

    .hero-desc {
        max-width: 100%;
    }
}
@media (max-width: 600px) {
    .nav-links { display: flex; gap: 5px; }

}
