/*
Theme Name: Minimal Portfolio
Description: Clean white design with strategic orange accents - professional and modern
Version: 2.1
Author: Lucas Deichl
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #E7754A;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #E7754A;
    outline-offset: 2px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed nav height */
}

body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #fff;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Adjust navigation position when WordPress admin bar is present */
.admin-bar .main-nav {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .main-nav {
        top: 46px;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #E7754A;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #E7754A;
    transition: width 0.3s ease;
}

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

.nav-link.active {
    color: #E7754A;
}

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

/* Hero Section - Full viewport with proper centering */
.hero {
    min-height: 80vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem 6rem 1rem;
    padding-top: 80px;
}

/* Subtle background pattern */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 25% 25%, rgba(232, 116, 74, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, rgba(232, 116, 74, 0.02) 0%, transparent 50%);
    z-index: 1;
}

/* Main content container */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

/* Name styling */
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #2c3e50;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

/* Orange line under name - properly centered */
.hero-content h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #e8744a, #d4652f);
    border-radius: 2px;
}

/* Subtitle */
.hero-content .subtitle {
    font-size: 1.6rem;
    color: #64748b;
    font-weight: 400;
    margin: 2rem 0 1.5rem 0;
    letter-spacing: 0.3px;
}

/* Description */
.hero-content .description {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Buttons Container */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Styles */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    min-width: 160px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

/* Primary button (Try BuddyBar) */
.cta-button.primary {
    background: linear-gradient(135deg, #e8744a, #d4652f);
    color: white;
    box-shadow: 0 4px 15px rgba(232, 116, 74, 0.3);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 116, 74, 0.4);
}

/* Secondary button (View My Work) */
.cta-button.secondary {
    background: #ffffff;
    color: #e8744a;
    border: 2px solid #e8744a;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.cta-button.secondary:hover {
    background: #e8744a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 116, 74, 0.3);
}

/* Scroll Indicator - Fixed to viewport, not content */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 1;
}

.scroll-indicator.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.scroll-indicator:hover {
    transform: translateX(-50%) translateY(-3px);
}

.scroll-indicator.hidden:hover {
    transform: translateX(-50%) translateY(20px);
}

.scroll-indicator span {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 8px;
}

.scroll-indicator:hover span {
    color: #e8744a;
}

/* Scroll Arrow */
.scroll-arrow {
    width: 32px;
    height: 32px;
    border: 2px solid #e8744a;
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    background: rgba(232, 116, 74, 0.05);
    animation: bounce 2.5s infinite;
    transition: all 0.3s ease;
}

.scroll-indicator:hover .scroll-arrow {
    background: rgba(232, 116, 74, 0.1);
    border-color: #d4652f;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 6px;
    height: 6px;
    border-right: 2px solid #e8744a;
    border-bottom: 2px solid #e8744a;
}

/* Sections */
.section {
    padding: 5rem 0;
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Portfolio Section */
.portfolio {
    background: #fff;
}

/* Portfolio Filters */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid #e1e5e9;
    background: #fff;
    color: #64748b;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    border-color: #E7754A;
    color: #E7754A;
}

.filter-btn.active {
    background: #E7754A;
    color: #fff;
    border-color: #E7754A;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.portfolio-item {
    background: #fff;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
}

/* Animation states - only apply when JS adds the class */
.portfolio-item.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

.portfolio-item.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(231, 117, 74, 0.3);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-thumbnail {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

.portfolio-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.portfolio-client {
    font-size: 0.9rem;
    color: #E7754A;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.portfolio-description {
    margin-bottom: 1rem;
}

.portfolio-text {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.portfolio-text.collapsed {
    max-height: 4.8em; /* About 3 lines of text */
    position: relative;
}

.portfolio-text.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.5em;
    background: linear-gradient(to bottom, transparent, #fff);
}

.portfolio-text.expanded {
    max-height: none;
}

.portfolio-text.expanded::after {
    display: none;
}

.read-more-btn {
    background: none;
    border: none;
    color: #E7754A;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.read-more-btn:hover {
    color: #d4652f;
}

.read-more-btn.hidden {
    display: none;
}

.portfolio-link {
    display: inline-block;
    color: #E7754A;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.portfolio-link:hover {
    color: #d4652f;
}

.no-portfolio {
    text-align: center;
    color: #64748b;
    font-size: 1.1rem;
    padding: 3rem 0;
}

/* About Section */
.about {
    background: #f8f9fa;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-intro {
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 500;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.about-details {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 3rem;
    text-align: center;
}

.skills-section {
    margin: 3rem 0;
}

.skills-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.skill-item {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
}

.skill-item:hover {
    border-color: rgba(231, 117, 74, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.skill-item h4 {
    font-size: 1.2rem;
    color: #E7754A;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.skill-item p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.social-link {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    background: #fff;
    color: #E7754A;
    border: 2px solid #E7754A;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #E7754A;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(232, 116, 74, 0.3);
}

/* Contact Section */
.contact {
    background: #fff;
}

.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 3rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #e8744a;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.submit-btn {
    background: #e8744a;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

.submit-btn:hover {
    background: #d4652f;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(232, 116, 74, 0.3);
}

/* Portfolio Modal/Lightbox */
.portfolio-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: #fff;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    border-radius: 16px;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.portfolio-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    padding: 0;
}

.modal-close:hover {
    background: #E7754A;
}

/* Modal Gallery */
.modal-gallery {
    position: relative;
    width: 100%;
    height: 500px;
    background: #1a1a1a;
    overflow: hidden;
}

.modal-gallery-slider {
    display: flex;
    transition: transform 0.4s ease;
    height: 100%;
}

.modal-gallery-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}

.modal-gallery-item img,
.modal-gallery-item video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Gallery Navigation */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2c3e50;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: #E7754A;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 1.5rem;
}

.gallery-nav.next {
    right: 1.5rem;
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-nav:disabled:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    transform: translateY(-50%) scale(1);
}

/* Gallery Counter */
.gallery-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Modal Body */
.modal-body {
    padding: 2.5rem;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.modal-client {
    font-size: 1rem;
    color: #E7754A;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Modal Meta Grid */
.modal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.meta-value {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Modal Description */
.modal-description {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #E7754A;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.modal-link:hover {
    background: #d4652f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(232, 116, 74, 0.3);
}

/* Clients/Worked With Section */
.clients {
    background: #f8f9fa;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
    /* Center orphan logos on the last row */
    justify-items: center;
}

/* If there's only 1 logo on the last row, center it across the grid */
.clients-grid .client-logo:last-child:nth-child(4n+1) {
    grid-column: 2 / 4;
}

/* If there are 2 logos on the last row, center them */
.clients-grid .client-logo:nth-last-child(2):nth-child(4n+2),
.clients-grid .client-logo:last-child:nth-child(4n+3) {
    grid-column: span 1;
}

/* If there are 3 logos on the last row, center them */
.clients-grid .client-logo:nth-last-child(3):nth-child(4n+1) {
    grid-column: 1 / 2;
}

.client-logo {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: all 0.3s ease;
    filter: grayscale(100%) opacity(0.7);
}

.client-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0.85) contrast(1.1);
}

/* Make square/compact logos 30% larger for visual balance */
.client-logo.square-logo img {
    max-width: 130%;
    max-height: 130%;
}

/* Blog/Articles Section */
.blog {
    background: #fff;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.article-card {
    background: #fff;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(231, 117, 74, 0.3);
}

.article-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

/* Logo fallback styling */
.article-thumbnail.is-logo {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.article-thumbnail.is-logo img {
    width: auto;
    height: auto;
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
}

.article-card:hover .article-thumbnail.is-logo img {
    transform: scale(1.1);
}

.article-content {
    padding: 1.5rem;
}

.article-category {
    display: inline-block;
    background: rgba(231, 117, 74, 0.1);
    color: #E7754A;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}

.article-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.article-date,
.article-read-time {
    display: flex;
    align-items: center;
}

.article-excerpt {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-read-more {
    background: none;
    border: none;
    color: #E7754A;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.article-read-more:hover {
    color: #d4652f;
}

.no-articles {
    text-align: center;
    color: #64748b;
    font-size: 1.1rem;
    padding: 3rem 0;
    grid-column: 1 / -1;
}

/* Article Modal */
.article-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.article-modal.active {
    display: block;
    opacity: 1;
}

.article-modal-content {
    background: #fff;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 16px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.article-modal.active .article-modal-content {
    transform: scale(1);
}

.article-modal-header {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #1a1a1a;
}

.article-modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal header logo fallback */
.article-modal-header.is-logo-header {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.article-modal-header.is-logo-header img,
.article-modal-header img.is-logo-modal {
    width: auto;
    height: auto;
    max-width: 50%;
    max-height: 60%;
    object-fit: contain;
}

/* Remove any borders or outlines from SVG logos */
.article-thumbnail.is-logo img,
.article-modal-header.is-logo-header img,
.article-modal-header img.is-logo-modal {
    border: none;
    outline: none;
    box-shadow: none;
}

.article-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 0.9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.3s ease;
    padding: 0;
    padding-bottom: 2px;
}

.article-modal-close:hover {
    background: #E7754A;
}

.article-modal-body {
    padding: 3rem;
}

.article-modal-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f1f5f9;
}

.article-modal-category {
    background: rgba(231, 117, 74, 0.1);
    color: #E7754A;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-modal-date,
.article-modal-read-time {
    color: #64748b;
    font-size: 0.9rem;
}

.article-modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.article-modal-content-text {
    font-size: 1.05rem;
    color: #2c3e50;
    line-height: 1.8;
    overflow: auto;
}

.article-modal-content-text h1,
.article-modal-content-text h2,
.article-modal-content-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.article-modal-content-text h2 {
    font-size: 1.8rem;
}

.article-modal-content-text h3 {
    font-size: 1.4rem;
}

.article-modal-content-text p {
    margin-bottom: 1.5rem;
}

.article-modal-content-text ul,
.article-modal-content-text ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-modal-content-text li {
    margin-bottom: 0.5rem;
}

.article-modal-content-text a {
    color: #E7754A;
    text-decoration: underline;
}

.article-modal-content-text a:hover {
    color: #d4652f;
}

.article-modal-content-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* WordPress alignment classes support */
.article-modal-content-text img:not(.alignleft):not(.alignright):not(.aligncenter) {
    margin: 2rem 0;
}

/* Center alignment - comprehensive coverage for all WordPress formats */
.article-modal-content-text .aligncenter,
.article-modal-content-text figure.aligncenter,
.article-modal-content-text .wp-block-image.aligncenter,
.article-modal-content-text div.aligncenter,
.article-modal-content-text .wp-block-image {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
    max-width: 100%;
    text-align: center;
}

.article-modal-content-text .aligncenter img,
.article-modal-content-text figure.aligncenter img,
.article-modal-content-text .wp-block-image.aligncenter img,
.article-modal-content-text div.aligncenter img,
.article-modal-content-text .wp-block-image img,
.article-modal-content-text .wp-block-image figure img {
    margin: 0 auto !important;
    display: block !important;
}

.article-modal-content-text .alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.article-modal-content-text .alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.article-modal-content-text blockquote {
    border-left: 4px solid #E7754A;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #64748b;
}

.article-modal-content-text code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-modal-content-text pre {
    background: #2c3e50;
    color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article-modal-content-text pre code {
    background: none;
    padding: 0;
    color: #fff;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e8744a, #d4652f, #e8744a);
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Mobile Menu Button - Hidden on desktop */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background: #2c3e50;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn:hover span {
    background: #E7754A;
}

/* Tablet breakpoint for clients grid */
@media (max-width: 1024px) {
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem 3rem;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.8rem 1rem;
    }

    .logo-img {
        height: 35px;
    }

    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }

    /* Hide menu by default on mobile, show as overlay when active */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 80px 2rem 2rem;
        gap: 0;
        margin: 0;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        width: 100%;
    }

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

    .hero {
        padding: 1.5rem 1rem;
        padding-top: 80px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content .subtitle {
        font-size: 1.3rem;
    }

    .hero-content .description {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .cta-button {
        min-width: 200px;
        padding: 0.9rem 1.8rem;
        font-size: 0.9rem;
    }

    .scroll-indicator {
        bottom: 20px;
    }

    .scroll-indicator span {
        font-size: 0.75rem;
    }

    .scroll-arrow {
        width: 28px;
        height: 28px;
    }

    .scroll-arrow::after {
        top: 7px;
        width: 5px;
        height: 5px;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-filters {
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .contact-form {
        padding: 0 1rem;
    }

    .about-intro {
        font-size: 1.15rem;
    }

    .about-details {
        font-size: 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }

    .social-link {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    /* Modal responsive */
    .modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .modal-gallery {
        height: 300px;
        border-radius: 12px 12px 0 0;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-meta {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    /* Make gallery nav buttons more touch-friendly on mobile */
    .gallery-nav {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
        opacity: 0.9;
    }

    .gallery-nav.prev {
        left: 0.5rem;
    }

    .gallery-nav.next {
        right: 0.5rem;
    }

    /* Larger touch target for close button */
    .modal-close {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
        top: 0.5rem;
        right: 0.5rem;
    }

    /* Touch-friendly gallery slider */
    .modal-gallery-slider {
        touch-action: pan-x;
        user-select: none;
    }

    /* Improve counter visibility on mobile */
    .gallery-counter {
        bottom: 1rem;
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    /* Make modal actions stack better on mobile */
    .modal-actions {
        flex-direction: column;
    }

    .modal-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Clients section responsive */
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 2rem;
        padding: 2rem 1rem;
    }

    .client-logo {
        height: 75px;
    }

    /* Blog/Articles responsive */
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Article Modal responsive */
    .article-modal-content {
        width: 95%;
        margin: 1rem auto;
    }

    .article-modal-header {
        height: 250px;
    }

    /* Adjust logo size on mobile modal */
    .article-modal-header.is-logo-header {
        padding: 2rem;
    }

    .article-modal-header.is-logo-header img,
    .article-modal-header img.is-logo-modal {
        max-width: 60%;
        max-height: 50%;
    }

    .article-modal-body {
        padding: 2rem 1.5rem;
    }

    .article-modal-title {
        font-size: 1.8rem;
    }

    .article-modal-meta {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .article-modal-content-text {
        font-size: 1rem;
    }

    .article-modal-content-text h2 {
        font-size: 1.5rem;
    }

    .article-modal-content-text h3 {
        font-size: 1.2rem;
    }

    .article-modal-close {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
        top: 0.5rem;
        right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 32px;
    }

    .nav-menu {
        gap: 0.8rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content .subtitle {
        font-size: 1.1rem;
    }
    
    .hero-content .description {
        font-size: 0.95rem;
    }

    .cta-button {
        min-width: 180px;
        padding: 0.8rem 1.5rem;
    }
    
    .scroll-indicator span {
        font-size: 0.7rem;
    }
    
    .scroll-arrow {
        width: 26px;
        height: 26px;
    }
}

/* Loading States & Skeleton Loaders */
.portfolio-item.loading .portfolio-thumbnail {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.portfolio-item.loading .portfolio-content {
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Image lazy loading states */
.portfolio-thumbnail img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-thumbnail img.loaded {
    opacity: 1;
}

/* Modal gallery loading */
.modal-gallery-item {
    position: relative;
}

.modal-gallery-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #E7754A;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    pointer-events: none;
}

.modal-gallery-item.loading::before {
    opacity: 1;
}

.modal-gallery-item img,
.modal-gallery-item video {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-gallery-item img.loaded,
.modal-gallery-item video.loaded {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}