/*
Theme Name: Handcrafted Portfolio
Theme URI: https://handcraftedportfolio.bishaldev.com/
Author: A Real Designer
Author URI: https://example.com
Description: Human‑crafted one‑page portfolio with WIX‑style interactions, animations, and genuine warmth.
Version: 3.0
License: GPL v2 or later
Text Domain: handcrafted-portfolio
*/

/* ----- CSS Custom Properties ----- */
:root {
    --bg: #faf8f5;
    --surface: #fffdf9;
    --text: #2c2b28;
    --text-light: #5c5548;
    --accent: #b07d4b;
    --accent-dark: #8b5e3c;
    --border: #e6dfd3;
    --shadow: rgba(60, 45, 25, 0.08);
    --card-bg: #fffdf9;
    --cursor-color: #b07d4b;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --paper-texture: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(180, 170, 150, 0.008) 2px,
            rgba(180, 170, 150, 0.008) 4px);
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}
body {
    font-family: "Crimson Text", Georgia, "Times New Roman", serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
}
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: var(--paper-texture);
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted #c4a882;
    transition: color var(--transition), border-color var(--transition);
}
a:hover {
    color: var(--accent-dark);
    border-bottom-color: var(--accent-dark);
}
h1, h2, h3, h4 {
    font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: #1f1e1b;
}
h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    margin-bottom: 0.5rem;
}
h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
}
h2::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    transform: rotate(-0.5deg);
    transition: width 0.6s ease;
}
h2.in-view::after {
    width: 55%;
}
h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* ----- Layout ----- */
.site-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.8rem;
}
section {
    padding: 5rem 0;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
section.in-view {
    opacity: 1;
    transform: translateY(0);
}
section+section {
    border-top: 1px solid var(--border);
}

/* ----- Preloader ----- */
.preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s;
}
.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}
.preloader .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ----- Custom Cursor ----- */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10001;
}
.cursor-dot {
    width: 8px; height: 8px;
    background: var(--cursor-color);
}
.cursor-outline {
    width: 40px; height: 40px;
    border: 2px solid var(--cursor-color);
    background: transparent;
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}
.cursor-outline.hover {
    width: 56px; height: 56px;
    border-color: var(--accent-dark);
    background: rgba(176,125,75,0.05);
}

/* ----- Navigation (sticky, with hamburger) ----- */
.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 0;
    flex-wrap: wrap;
    gap: 0.8rem;
    position: sticky;
    top: 0;
    background: rgba(250,248,245,0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}
.site-nav.scrolled {
    border-bottom-color: var(--border);
}
.site-nav .logo {
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #1f1e1b;
    border-bottom: none;
    transition: transform 0.3s;
}
.site-nav .logo:hover {
    transform: rotate(-1deg) scale(1.03);
}
.site-nav .logo span {
    color: var(--accent);
}
.nav-links {
    display: flex;
    gap: 1.8rem;
    list-style: none;
    flex-wrap: wrap;
}
.nav-links a {
    font-family: "DM Sans", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.03em;
    color: var(--text-light);
    border-bottom: none;
    padding-bottom: 3px;
    position: relative;
}
.nav-links a::before {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.nav-links a:hover {
    color: var(--accent);
}
.nav-links a:hover::before {
    width: 100%;
}
/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 200;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ----- Full‑screen Hero (WIX‑style) ----- */
.hero-section {
    padding: 6rem 0 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.8rem;
    position: relative;
    min-height: 90vh;
}
.hero-section::after {
    content: "✺";
    position: absolute;
    right: 0;
    top: 15%;
    font-size: 5rem;
    color: rgba(176,125,75,0.1);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}
.hero-bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}
.hero-section .tagline {
    font-family: "DM Sans", sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9b7b5c;
    font-weight: 500;
}
.hero-section h1 {
    min-height: 2.8em;
}
.hero-section .intro-text {
    font-size: 1.25rem;
    max-width: 620px;
    color: #4a4640;
}
.hero-section .location-note {
    font-size: 0.9rem;
    color: #8a7e6e;
    font-style: italic;
}
.hero-section .cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.hero-section .btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent);
    color: #fff;
    border: 2px solid var(--accent-dark);
    border-radius: 4px;
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 3px 3px 0px var(--accent-dark);
    cursor: none;
}
.hero-section .btn:hover {
    background: var(--accent-dark);
    box-shadow: 5px 5px 0px #5c3d24;
    transform: translate(-2px, -2px);
    border-bottom: 2px solid var(--accent-dark);
}
.hero-section .btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    box-shadow: none;
}
.hero-section .btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* ----- Parallax Image (About) ----- */
.parallax-wrapper {
    overflow: hidden;
    border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
    box-shadow: 12px 12px 0px var(--accent);
}
.parallax-img {
    width: 100%;
    height: auto;
    transform: scale(1.1);
    transition: transform 0.1s linear;
    filter: grayscale(20%);
}

/* ----- Counter Section (WIX‑like stats) ----- */
.counter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    text-align: center;
}
.counter-item .count {
    font-family: "DM Sans", sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.counter-item p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* ----- Filterable Portfolio ----- */
.filter-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}
.filter-btn {
    padding: 0.5rem 1.2rem;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 30px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.25s;
}
.filter-btn.active,
.filter-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ===== Projects Grid (Side-by-Side Inside Card Layout) ===== */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column for wide, horizontal cards */
    gap: 2rem;
    margin-top: 0.8rem;
}

.project-card {
    width: 100%;
    background: var(--card-bg);
    border: 2px solid #1f1e1b;
    border-radius: 6px;
    overflow: hidden;
    transition: all var(--transition);
    box-shadow: 6px 6px 0px var(--accent);
    transform: translate(0,0);
    display: flex; /* Makes the card a flex container */
    flex-direction: row; /* Image and text side-by-side */
    align-items: stretch; /* Ensures equal height for both sides */
}
.project-card.hidden {
    display: none;
}
.project-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px var(--accent-dark);
}
.project-card .card-image {
    width: 50%; /* Half width for image */
    min-height: 300px;
    background: #eae3d5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a8987c;
    font-family: "DM Sans", sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    border-right: 2px solid #1f1e1b; /* Divider line */
}
.project-card .card-content {
    width: 50%; /* Half width for text */
    padding: 2.5rem 2rem; /* Increased padding for elegant spacing */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content vertically */
}
.project-card .project-type {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--accent);
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.project-card .card-content p {
    font-size: 0.95rem;
    color: #4a4640;
    flex-grow: 1;
}
.view-link {
    margin-top: 1.5rem;
    font-family: "DM Sans", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    align-self: flex-start;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
}

/* ----- Testimonial Carousel ----- */
.testimonial-carousel {
    max-width: 700px;
    margin: 2rem auto 0;
    position: relative;
}
.testimonial-slide {
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    box-shadow: 4px 4px 0px var(--accent);
    display: none;
}
.testimonial-slide.active {
    display: block;
    animation: fadeSlide 0.5s ease;
}
.testimonial-slide blockquote {
    font-size: 1.15rem;
    font-style: italic;
    margin-bottom: 1rem;
    color: #3d3a34;
}
.testimonial-slide .author {
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    color: var(--accent);
}
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.dot {
    width: 10px; height: 10px;
    background: var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}
.dot.active {
    background: var(--accent);
}
@keyframes fadeSlide {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ----- Contact Form ----- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
.contact-info p {
    margin-bottom: 1rem;
    color: #3d3a34;
}
.email-link {
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 2px dotted var(--accent);
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #d9cfbe;
    border-radius: 4px;
    background: var(--surface);
    font-family: "Crimson Text", Georgia, serif;
    font-size: 1rem;
    color: var(--text);
    transition: border-color 0.25s, box-shadow 0.25s;
    resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 4px 4px 0px var(--accent);
}
.contact-form button {
    padding: 0.8rem 2rem;
    background: var(--accent);
    color: #fff;
    border: 2px solid var(--accent-dark);
    border-radius: 4px;
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: none;
    transition: all 0.2s;
    box-shadow: 3px 3px 0px var(--accent-dark);
}
.contact-form button:hover {
    background: var(--accent-dark);
    box-shadow: 5px 5px 0px #5c3d24;
    transform: translate(-2px, -2px);
}

/* ----- Footer & Social Icons ----- */
.site-footer {
    text-align: center;
    padding: 2rem 0 2.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: #8a7e6e;
    font-family: "DM Sans", sans-serif;
}
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.social-icons a {
    font-size: 1.2rem;
    color: var(--text-light);
    border: none;
    transition: color 0.2s, transform 0.2s;
}
.social-icons a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}
.site-footer .heart {
    color: #c47a4a;
}

/* Scroll-to-top */
.scroll-top {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 48px; height: 48px;
    background: var(--accent);
    color: #fff;
    border: 2px solid var(--accent-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: none;
    box-shadow: 2px 2px 0px var(--accent-dark);
    opacity: 0; visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 90;
}
.scroll-top.visible {
    opacity: 1; visibility: visible;
    transform: translateY(0);
}
.scroll-top:hover {
    background: var(--accent-dark);
    box-shadow: 4px 4px 0px #5c3d24;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0; right: 0;
        width: 70%; height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.4s ease;
        z-index: 150;
    }
    .nav-links.open {
        transform: translateX(0);
    }
    .hamburger {
        display: flex;
        z-index: 200;
    }
    .hero-section {
        min-height: 80vh;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    .counter-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Revert projects to stacked layout on mobile/tablet */
    .project-card {
        flex-direction: column;
    }
    .project-card .card-image,
    .project-card .card-content {
        width: 100%;
        border-right: none;
    }
    .project-card .card-image {
        border-bottom: 2px solid #1f1e1b;
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .site-container {
        padding: 0 1.2rem;
    }
    .cursor-dot, .cursor-outline {
        display: none;
    }
    body {
        cursor: auto;
    }
}