/* =============================================
   ABYSS TATTOO – Hugo Theme Stylesheet
   Dark, elegant, minimalistic tattoo portfolio
   ============================================= */

/* ----- CSS Variables / Design Tokens ----- */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --accent: #c9a96e;
    --accent-dim: rgba(201, 169, 110, 0.15);
    --accent-glow: rgba(201, 169, 110, 0.25);
    --text: #e0e0e0;
    --text-muted: #777;
    --text-heading: #f5f5f5;
    --border: rgba(255, 255, 255, 0.06);
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius: 4px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: #dfc089;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 400;
    line-height: 1.2;
}

/* ----- Utility: Container ----- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ----- Utility: Section ----- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-header .divider {
    width: 60px;
    height: 1px;
    background: var(--accent);
    margin: 0 auto 20px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ----- Scroll Animations ----- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   NAVIGATION
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: background-color 0.4s ease, padding 0.4s ease,
        backdrop-filter 0.4s ease;
}

.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-heading);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 36px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-links a:hover {
    color: var(--text-heading);
}

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

/* Hamburger (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/images/hero.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.35);
    transform: scale(1.05);
    transition: transform 8s ease;
}

.hero:hover .hero-bg {
    transform: scale(1.0);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(10, 10, 10, 0.3) 0%,
            rgba(10, 10, 10, 0.6) 60%,
            var(--bg-primary) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 16px;
    animation: heroFadeIn 1.2s ease forwards;
    opacity: 0;
}

.hero-content h1 span {
    color: var(--accent);
}

.hero-content .tagline {
    font-size: clamp(0.9rem, 2vw, 1.15rem);
    color: var(--text-muted);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 40px;
    animation: heroFadeIn 1.2s ease 0.3s forwards;
    opacity: 0;
}

.btn-cta {
    display: inline-block;
    padding: 16px 48px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition);
    animation: heroFadeIn 1.2s ease 0.6s forwards;
    opacity: 0;
}

.btn-cta:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about {
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.about-image {
    position: relative;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter var(--transition);
}

.about-image:hover img {
    filter: grayscale(0%);
}

.about-image::after {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid var(--accent);
    pointer-events: none;
    opacity: 0.3;
}

.about-text h3 {
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.about-text h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 24px;
}

.about-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.stat h4 {
    font-size: 2rem;
    color: var(--accent);
    font-family: var(--font-heading);
}

.stat p {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* =============================================
   GALLERY SECTION
   ============================================= */
.gallery {
    background: var(--bg-primary);
}

/* Home page: standard grid for featured items */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: var(--radius);
    animation: galleryFadeIn 0.5s ease both;
}

/* Home page masonry feel */
.gallery-item:nth-child(1) {
    grid-row: span 2;
}

.gallery-item:nth-child(4) {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

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

.overlay-content {
    text-align: center;
}

.overlay-icon {
    width: 48px;
    height: 48px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transform: scale(0.8);
    transition: transform var(--transition);
}

.gallery-item:hover .overlay-icon {
    transform: scale(1);
}

.overlay-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
}

/* Gallery CTA (home page) */
.gallery-cta {
    text-align: center;
    margin-top: 48px;
}

/* Gallery item entrance animation */
@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   PAGE HERO (Gallery, inner pages)
   ============================================= */
.page-hero {
    padding: 140px 0 40px;
    text-align: center;
    background: var(--bg-secondary);
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto;
}

.divider {
    width: 60px;
    height: 1px;
    background: var(--accent);
}

/* =============================================
   GALLERY PAGE – Mosaic / Masonry Layout
   ============================================= */
.gallery-page .gallery-grid {
    display: block;
    column-count: 2;
    column-gap: 12px;
}

/* Override home page masonry spans */
.gallery-page .gallery-item:nth-child(1),
.gallery-page .gallery-item:nth-child(4) {
    grid-row: span 1;
}

.gallery-page .gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    display: inline-block;
    width: 100%;
}

.gallery-page .gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* =============================================
   PIECE DETAIL PAGE
   ============================================= */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 40px;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--accent);
}

.piece-detail {
    padding-top: 120px;
}

.piece-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: start;
}

.piece-image img {
    width: 100%;
    border-radius: var(--radius);
}

.piece-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 16px;
}

.accent-line {
    width: 40px;
    height: 1px;
    background: var(--accent);
    margin-bottom: 20px;
}

.piece-summary {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.piece-content {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.piece-content p {
    margin-bottom: 12px;
}



.piece-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
}

.piece-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.piece-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color var(--transition);
}

.piece-nav-link:hover {
    color: var(--accent);
}

.piece-nav-link.next {
    margin-left: auto;
}

/* =============================================
   LIGHTBOX MODAL
   ============================================= */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

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

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition);
}

.lightbox-close:hover {
    border-color: var(--accent);
}

.lightbox-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--text);
    fill: none;
    stroke-width: 2;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), background var(--transition);
}

.lightbox-nav:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.lightbox-nav svg {
    width: 20px;
    height: 20px;
    stroke: var(--text);
    fill: none;
    stroke-width: 2;
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

/* =============================================
   STYLES / SPECIALTIES SECTION
   ============================================= */
.styles {
    background: var(--bg-secondary);
}

.styles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.style-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px 32px;
    border-radius: var(--radius);
    transition: border-color var(--transition), transform var(--transition);
}

.style-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.style-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    color: var(--text-heading);
}

.style-card .accent-line {
    width: 30px;
    height: 1px;
    background: var(--accent);
    margin-bottom: 16px;
}

.style-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact {
    background: var(--bg-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

.contact-info h3 {
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.contact-info h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 24px;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 0.95rem;
    transition: color var(--transition);
}

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

.contact-link svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    display: inline-block;
    padding: 16px 48px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition);
    align-self: flex-start;
}

.btn-submit:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-heading);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-logo span {
    color: var(--accent);
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), background var(--transition);
}

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

.social-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    transition: fill var(--transition);
}

.social-icon:hover svg {
    fill: var(--accent);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* =============================================
   RESPONSIVE – TABLET (≥ 768px)
   ============================================= */
@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .gallery-page .gallery-grid {
        column-count: 3;
        column-gap: 14px;
    }

    .styles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .piece-grid {
        grid-template-columns: 3fr 2fr;
    }

    .footer .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* =============================================
   RESPONSIVE – DESKTOP (≥ 1024px)
   ============================================= */
@media (min-width: 1024px) {
    .section {
        padding: 120px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .gallery-page .gallery-grid {
        column-count: 4;
        column-gap: 16px;
    }

    .styles-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =============================================
   RESPONSIVE – MOBILE NAV (< 768px)
   ============================================= */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(14, 14, 14, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 40px 40px;
        gap: 28px;
        transition: right 0.4s ease;
        border-left: 1px solid var(--border);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 0.9rem;
    }
}