/* ==========================================================================
   Custom Styles - Add your customizations here
   ========================================================================== */

/* ==========================================================================
   3D Printer Nozzle Scroll Animation - Prints Company Name
   ========================================================================== */

/* Container for the entire print effect */
.print-container {
    position: fixed;
    left: 0;
    top: 0;
    width: 100px;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
    overflow: visible;
}

/* The printed text - vertical orientation */
.printed-text {
    position: absolute;
    left: 15px;
    top: 80px; /* Text starts where nozzle tip begins */
    font-family: var(--font-brand);
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--color-accent);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
    z-index: 997;
    /* Subtle text shadow for depth */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    /* Smooth clip-path transition */
    transition: clip-path 0.05s linear;
}

/* Layer lines effect - simulates FDM printing layers */
.printed-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(255, 255, 255, 0.1) 2px,
        rgba(255, 255, 255, 0.1) 3px
    );
    pointer-events: none;
}

/* Nozzle positioning */
.print-nozzle {
    position: absolute;
    left: 20px;
    top: 80px;
    z-index: 1000;
    pointer-events: none;
    transition: top 0.05s linear;
}

.print-nozzle svg {
    width: 45px;
    height: auto;
    filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.05s ease;
}

/* Nozzle printing animation - vibrates when actively printing */
.print-nozzle.printing svg {
    animation: nozzle-vibrate 0.08s infinite;
}

@keyframes nozzle-vibrate {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-1px, 0.5px); }
    50% { transform: translate(1px, -0.5px); }
    75% { transform: translate(-0.5px, -0.5px); }
}

/* Heat shimmer effect when printing */
.print-nozzle.printing::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    background: linear-gradient(
        to top,
        rgba(233, 69, 96, 0.3) 0%,
        rgba(255, 150, 100, 0.2) 50%,
        transparent 100%
    );
    filter: blur(3px);
    animation: heat-shimmer 0.3s infinite alternate;
    pointer-events: none;
}

@keyframes heat-shimmer {
    0% { opacity: 0.5; transform: translateX(-50%) scaleX(1); }
    100% { opacity: 0.8; transform: translateX(-50%) scaleX(1.1); }
}

/* Nozzle parts */
.nozzle-heatsink {
    fill: #4a4a4a;
}

.nozzle-heatblock {
    fill: #3d3d3d;
}

.nozzle-tip {
    fill: #c9a227;
}

/* Filament drip at nozzle tip */
.filament-drip {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.8;
    transition: all 0.15s ease;
}

.filament-drip.active {
    height: 15px;
    border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
    opacity: 1;
    box-shadow:
        0 0 10px var(--color-accent),
        0 0 20px rgba(233, 69, 96, 0.6);
}

/* Glow pulse animation */
@keyframes glow-pulse {
    0%, 100% { opacity: 0.8; box-shadow: 0 0 10px var(--color-accent); }
    50% { opacity: 1; box-shadow: 0 0 20px var(--color-accent), 0 0 30px var(--color-accent); }
}

/* Layer line texture on printed text */
.printed-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.05) 2px,
        rgba(255, 255, 255, 0.05) 3px
    );
    pointer-events: none;
}

/* Hide on mobile */
@media (max-width: 768px) {
    .print-container {
        display: none;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    padding: 150px 0 80px;
    text-align: center;
    color: var(--color-white);
}

.page-header h1 {
    color: var(--color-white);
    margin-bottom: 15px;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Project Hero */
.project-hero,
.post-hero {
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
    position: relative;
}

.project-hero::before,
.post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(26, 26, 46, 0.8) 100%);
}

.project-hero .container,
.post-hero .container {
    position: relative;
    z-index: 1;
}

.project-hero h1,
.post-hero h1 {
    color: var(--color-white);
    font-size: 3rem;
}

/* Project/Post Header (no image) */
.project-header,
.post-header {
    background: var(--color-primary);
    padding: 150px 0 60px;
}

.project-header h1,
.post-header h1 {
    color: var(--color-white);
}

/* Project Content */
.project-content,
.post-content,
.page-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.project-content p,
.post-content p,
.page-content p {
    margin-bottom: 1.5rem;
}

.project-content img,
.post-content img,
.page-content img {
    border-radius: 10px;
    margin: 2rem 0;
}

/* Project Navigation */
.project-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--color-light);
}

.project-navigation a {
    color: var(--color-primary);
    font-weight: 500;
}

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

/* Project Categories */
.project-categories {
    margin-top: 40px;
}

.project-categories h4 {
    margin-bottom: 15px;
}

/* Project Filters */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    justify-content: center;
}

.filter-btn {
    background: var(--color-light);
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-accent);
    color: var(--color-white);
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

/* Section CTA */
.section-cta {
    text-align: center;
    margin-top: 50px;
}

/* About Section */
.about-section {
    background: var(--color-light);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    margin-bottom: 20px;
}

.about-content p {
    margin-bottom: 30px;
    color: var(--color-text-light);
}

/* 404 Page */
.error-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.error-content h1 {
    font-size: 8rem;
    color: var(--color-accent);
    line-height: 1;
}

.error-content h2 {
    color: var(--color-white);
    margin-bottom: 20px;
}

.error-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

/* Placeholder Image */
.placeholder-image {
    width: 100%;
    height: 100%;
    min-height: 250px;
    background: linear-gradient(135deg, var(--color-light) 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-white);
    transition: all var(--transition);
}

/* No Projects Message */
.no-projects {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
}

/* Post Meta */
.post-meta {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-light);
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.post-meta span {
    margin-right: 20px;
}

/* Read More Link */
.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--color-accent);
    font-weight: 500;
}

.read-more:hover {
    color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-primary);
        padding: 20px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .project-hero h1,
    .post-hero h1 {
        font-size: 2rem;
    }

    .error-content h1 {
        font-size: 5rem;
    }
}
