@font-face {
    font-family: 'Editorial New';
    src: url('assets/fonts/EditorialNew-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Anybody';
    src: url('assets/fonts/Anybody-900.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

:root {
    --pink: #D67CCD;
    --yellow-green: #E5F163;
    --blue: #515FED;
    --green: #5ED15E;
    --orange: #D16A38;
    --dark: #001C1F;
    --bg-color: #FCFFF7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important; /* Hide native cursor for the JS cursor */
}

/* Custom Animated Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    background-color: var(--pink);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    animation: pulse-cursor 2s infinite ease-in-out;
    transition: background-color 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.custom-cursor.hovering {
    background-color: var(--green);
    width: 20px;
    height: 20px;
    animation: none;
}

@keyframes pulse-cursor {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(0.6); }
}

/* Restore native cursor on touch devices */
@media (pointer: coarse) {
    * {
        cursor: auto !important;
    }
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(rgba(0, 28, 31, 0.05) 1.5px, transparent 1.5px);
    background-size: 40px 40px;
    background-attachment: fixed;
    font-family: 'Editorial New', serif;
    color: var(--dark);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .tagline, .link-text, .back-link, .contact-link {
    font-family: 'Anybody', sans-serif;
    letter-spacing: -0.02em;
}

/* Landing Page Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tagline {
    color: var(--blue);
    text-align: center;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    margin-bottom: 3rem;
    max-width: 800px;
    line-height: 1.1;
    z-index: 10;
    min-height: 3.3em; /* Prevent layout shift while typing */
}

.tagline.typing-active::after {
    content: '|';
    animation: blink 1s step-start infinite;
    opacity: 1;
}

@keyframes blink {
    50% { opacity: 0; }
}

.collage {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.logo-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.logomark {
    max-width: 120px;
    height: auto;
}

.wordmark {
    max-width: 250px;
    height: auto;
    filter: brightness(0) invert(1);
}

.floating-link {
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: transform 0.3s ease;
    z-index: 5;
    user-select: none; /* Prevent text selection while dragging */
}

.floating-link:hover {
    transform: scale(1.05);
}

.floating-link.is-dragged {
    transform: translate(-50%, -50%) !important;
    transition: none !important;
}

.floating-link.is-dragged:hover {
    transform: translate(-50%, -50%) scale(1.05) !important;
    transition: none !important;
}

@keyframes float-img {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.floating-link img {
    max-width: 180px;
    height: auto;
    animation: float-img 4s ease-in-out infinite;
}

.link-contact img {
    animation-delay: 1.5s;
}

.link-text {
    font-size: 1.8rem;
    font-weight: 900;
}

.text-orange {
    color: var(--orange);
}

.text-green {
    color: var(--green);
}

/* Floating positions */
.link-about {
    left: calc(100% - 60px);
    top: 50%;
    transform: translateY(-50%);
}

.link-about:hover {
    transform: translateY(-50%) scale(1.05);
}

.link-contact {
    flex-direction: row-reverse;
    right: calc(100% - 60px);
    bottom: -15px;
}

/* Subpages */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.back-link {
    color: var(--blue);
    text-decoration: none;
    font-size: 1.25rem;
    display: inline-block;
    margin-bottom: 4rem;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.8;
}

.text-content {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.6;
}

.text-content h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 2rem;
    color: var(--blue);
    line-height: 1.1;
}

.text-content h2 {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--orange);
    line-height: 1.15;
}

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

.text-content p:last-child {
    margin-bottom: 0;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding-top: 2rem;
}

.contact-link {
    color: var(--dark);
    text-decoration: none;
    font-size: clamp(1.2rem, 6vw, 3rem);
    transition: color 0.3s;
    white-space: nowrap;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
        justify-content: flex-start;
    }
    
    .collage {
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2rem;
    }

    .center-square {
        flex: 1 1 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .floating-link {
        position: relative;
        flex-direction: column;
        flex: 1 1 auto;
        gap: 0.5rem;
        right: auto;
        left: auto;
        top: auto;
        bottom: auto;
        transform: none;
    }
    
    .floating-link:hover {
        transform: none;
    }
    
    .link-contact {
        flex-direction: column;
    }
    
    .floating-link img {
        max-width: 120px;
    }
    
    .link-text {
        font-size: 1.5rem;
    }
}

/* Interactive Elements */
.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.magnetic {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s;
}
