/* Variables & Reset */
:root {
    --bg-color: #F0EFE6;
    --text-color: #2A3B39;
    --accent-color: #000000;
    --card-bg: #FFFFFF;

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    /* Subtle dot pattern for texture */
    background-image: radial-gradient(#d0d0c0 1px, transparent 1px);
    background-size: 20px 20px;

    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* We will implement a custom cursor */
}

/* Typography */
h1,
h2,
h3,
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
}

h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
}

h2.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

/* Fun Wobbly Effect for Titles */
h2.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--text-color);
    clip-path: polygon(0% 50%, 10% 0%, 20% 100%, 30% 0%, 40% 100%, 50% 0%, 60% 100%, 70% 0%, 80% 100%, 90% 0%, 100% 50%, 100% 100%, 0% 100%);
}

p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Layout */
main {
    padding: 0 var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
}

section {
    padding: var(--spacing-lg) 0;
    min-height: 80vh;
    /* Make sections substantial */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header */
header {
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(240, 239, 230, 0.9);
    /* Semi-transparent bg */
    backdrop-filter: blur(5px);
}

.logo {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-links a {
    position: relative;
}

/* Hero */
#hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    align-items: center;
    padding-top: 15vh;
}

.hero-visual,
.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.art-img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(5px 5px 0px rgba(0, 0, 0, 0.1));
}

.floating-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}



/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    font-size: 2rem;
    font-weight: bold;
    opacity: 0.5;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -10px);
    }

    60% {
        transform: translate(-50%, -5px);
    }
}

/* Marquee */
.marquee-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: var(--text-color);
    color: var(--bg-color);
    padding: 1rem 0;
    overflow: hidden;
    white-space: nowrap;
    transform: rotate(-1deg) scale(1.02);
    /* Slight jaunty angle */
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-top: 2px solid var(--text-color);
    border-bottom: 2px solid var(--text-color);
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

.marquee-content span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    margin-right: 2rem;
    text-transform: uppercase;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--text-color);
    color: var(--bg-color);
    font-weight: 700;
    border-radius: 50px;
    /* Pill shape */
    border: 2px solid var(--text-color);
    margin-top: var(--spacing-sm);
    box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-color);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 0.2);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.project-card {
    background: var(--card-bg);
    border: 3px solid var(--text-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 8px 8px 0px var(--text-color);
}

.project-card:nth-child(3n+1):hover {
    transform: rotate(-2deg) scale(1.02);
}

.project-card:nth-child(3n+2):hover {
    transform: rotate(3deg) scale(1.02);
}

.project-card:nth-child(3n+3):hover {
    transform: rotate(-1.5deg) scale(1.02);
}

.card-image {
    height: 200px;
    background-color: #ddd;
    border-bottom: 3px solid var(--text-color);
}

.card-info {
    padding: var(--spacing-sm);
}


.project-link {
    font-weight: 700;
    display: inline-block;
    margin-top: 10px;
    text-decoration: underline;
}

.tags {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: var(--text-color);
    color: var(--bg-color);
    border-radius: 12px;
    font-weight: 600;
}

/* About */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

/* Fun Stats */
.fun-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.stat-item {
    background: var(--card-bg);
    border: 2px solid var(--text-color);
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Contact */
#contact {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    margin-top: var(--spacing-md);
    text-align: left;
}

.form-group {
    margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--text-color);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    transition: box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

.social-links {
    margin-top: var(--spacing-md);
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    font-size: 1.25rem;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing-md);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s, opacity 0.2s;
}

.custom-cursor.hidden {
    opacity: 0;
}

/* Hide default cursor only on devices with mouse */
@media (pointer: fine) {

    body,
    a,
    button,
    input[type="submit"],
    input[type="button"],
    .btn-primary,
    .project-card {
        cursor: none;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    #hero,
    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        order: 0;
        margin-bottom: var(--spacing-md);
    }

    /* Mobile Menu Styling */
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 200;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--text-color);
        margin: 5px 0;
        transition: 0.3s;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 150;
    }

    .mobile-menu.active {
        transform: translateX(0);
    }

    .mobile-menu a {
        font-size: 2rem;
        font-weight: 700;
        font-family: var(--font-heading);
    }

    /* Hamburger Animation */
    .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(7px, -6px);
    }

    .fun-stats {
        grid-template-columns: 1fr;
    }
}

/* Desktop Hide */
@media (min-width: 769px) {

    .hamburger,
    .mobile-menu {
        display: none;
    }
}

/* Project Details Page Styles */
.project-details-main {
    padding-top: 100px;
    /* Account for fixed header */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    /* Reset global section styles */
    min-height: auto;
    padding: var(--spacing-md) 0;
    display: block;
}

.back-link {
    display: inline-block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    opacity: 0.7;
}

.back-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.project-desc {
    font-size: 1.25rem;
    margin: var(--spacing-sm) 0 0 0;
    opacity: 0.9;
}

.project-actions {
    margin-top: var(--spacing-sm);
}

/* Browser Mockup */
.project-preview {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: var(--spacing-lg);
    /* Reset global section styles */
    min-height: auto;
    padding-top: 0;
    display: block;
}

.browser-mockup {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid #ddd;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.browser-bar {
    background: #f1f1f1;
    padding: 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ddd;
    gap: 1rem;
}

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
}

.dots span:nth-child(1) {
    background: #ff5f57;
}

.dots span:nth-child(2) {
    background: #febc2e;
}

.dots span:nth-child(3) {
    background: #28c840;
}

.url-bar {
    flex-grow: 1;
    background: #fff;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 0.9rem;
    color: #666;
    border: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-controls {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: transparent;
    border: none;
    cursor: none;
    padding: 6px;
    border-radius: 4px;
    opacity: 0.5;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    /* Invert to make white icons dark (dark grey/black) to fit light theme */
    filter: invert(1) brightness(0.2);
}

.view-btn:hover,
.view-btn.active {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.browser-mockup {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid #ddd;
    margin: 0 auto;
    /* Center when resized */
    transition: max-width 0.5s ease;
    width: 100%;
}

/* View Modes */
.browser-mockup.view-desktop {
    max-width: 100%;
}

.browser-mockup.view-tablet {
    max-width: 768px;
}

.browser-mockup.view-mobile {
    max-width: 375px;
}

.iframe-container {
    width: 100%;
    height: 70vh;
    /* Tall viewport */
    background: #fff;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive View Controls */
@media (max-width: 1024px) {

    /* Hide Desktop and Tablet buttons on Tablet size */
    .view-btn[data-view="desktop"],
    .view-btn[data-view="tablet"] {
        display: none;
    }
}

@media (max-width: 768px) {

    /* Hide all controls on Mobile */
    .view-controls {
        display: none;
    }
}