* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --base-size: 10.368px;
    --mobile-scale: 1.4;
    --red: #FF0000;
    --blue: #1200FF;
    --black: #000000;
}

html {
    font-size: var(--base-size);
}

body {
    font-family: "Karl S T", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fff;
    color: var(--black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--red);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue);
}

/* Firefox scrollbar */
* {
    scrollbar-width: none;
    scrollbar-color: var(--red) transparent;
}

*:hover {
    scrollbar-color: var(--blue) transparent;
}

::selection {
    color: white;
    background: var(--red);
}

/* Header Navigation */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    padding: 3rem;
}

.nav-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    max-width: 100%;
}

.nav-item {
    position: relative;
}

.nav-item:nth-child(1) {
    text-align: left;
}

.nav-item:nth-child(2) {
    text-align: center;
}

.nav-item:nth-child(3) {
    text-align: right;
}

.nav-link {
    position: relative;
    display: inline-block;
    color: var(--red);
    text-decoration: none;
    font-size: 7rem;
    line-height: 1;
    letter-spacing: -0.022em;
    font-weight: 700;
    -webkit-text-stroke: 2px var(--red);
    transition: all 0.3s ease;
}

.nav-link.active,
.nav-link:hover {
    color: var(--blue);
    -webkit-text-stroke: 3px var(--blue);
}

/* Circle hover effect */
.circle-hover {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -30%);
    width: 100%;
    height: 160%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.circle-hover ellipse {
    fill: none;
    stroke: var(--blue);
    stroke-width: 2;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.2s ease;
}

.nav-link:hover .circle-hover {
    opacity: 1;
}

.nav-link:hover .circle-hover ellipse {
    stroke-dashoffset: 0;
}

.nav-link.clicking .circle-hover {
    opacity: 1;
}

.nav-link.clicking .circle-hover ellipse {
    stroke-dashoffset: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 15rem 3rem 3rem;
    margin-bottom: 15rem;
}

/* Page Info & Contact */
.page-info,
.page-contact {
    max-width: 100%;
    padding: 0 3rem 20rem 3rem;
}

.content-text {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.content-text h2 {
    font-family: "Karl S T", sans-serif;
    font-size: 3.8rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: -0.020em;
    text-transform: uppercase;
}

.content-text a {
    color: var(--blue);
    text-decoration: underline;
    transition: opacity 0.2s;
}

.content-text a:hover {
    opacity: 0.7;
}

/* Imprint Toggle Section */
.imprint-section {
    margin-top: 5rem;
    padding-top: 3rem;
}

.imprint-toggle {
    font-family: "Karl S T", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--blue);
    background: none;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: color 0.2s;
}

.imprint-toggle:hover {
    color: var(--red);
}

.imprint-toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.imprint-toggle.open .imprint-toggle-icon {
    transform: rotate(180deg);
}

.imprint-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.imprint-content.open {
    max-height: 2000px;
    margin-top: 2rem;
}

.imprint-content p {
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--black);
    margin-bottom: 1rem;
}

/* Page Work */
.page-work {
    min-height: 60vh;
    padding-bottom: 20rem;
    position: relative;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--red);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease;
}

.projects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    padding-bottom: 5rem;
}

.project-item {
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-family: "Karl S T", sans-serif;
    font-size: 3.8rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: -0.020em;
    transition: color 0.3s ease;
}

.project-item:hover .project-title {
    color: var(--red);
}

.project-description {
    font-size: 2rem;
    line-height: 1.4;
    margin-top: 0.5rem;
    color: var(--black);
}

.no-projects {
    text-align: center;
    padding: 4rem 0;
    grid-column: 1 / -1;
}

/* Cursor Image Follower */
.cursor-image {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 400px;
    transform: translate(-50%, -50%);
}

.cursor-image.active {
    opacity: 1;
}

.cursor-image img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Logo Footer */
.logo-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: transparent;
    padding-bottom: 2rem;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    pointer-events: none;
}

.logo-container {
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.logo-link {
    display: inline-block;
    pointer-events: auto;
}

.logo-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    transition: transform 0.1s ease;
}

/* Shaking logo on hover */
.logo-link:hover .logo-image {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0% { transform: translate(0); }
    10% { transform: translate(-2px, 2px); }
    20% { transform: translate(-2px, -2px); }
    30% { transform: translate(2px, 2px); }
    40% { transform: translate(2px, -2px); }
    50% { transform: translate(-2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    70% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    90% { transform: translate(-2px, 2px); }
    100% { transform: translate(0); }
}

/* Mobile Styles */
@media (max-width: 768px) {
    html {
        font-size: calc(var(--base-size) * 1.1);
    }
    
    .header-nav {
        padding: 1.5rem 1rem;
    }
    
    .nav-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .nav-item {
        text-align: center !important;
    }
    
    .nav-link {
        font-size: 2rem;
        -webkit-text-stroke: 0.5px var(--red);
    }
    
    .nav-link.active,
    .nav-link:hover {
        -webkit-text-stroke: 1px var(--blue);
    }
    
    .main-content {
        padding: 16rem 1rem 3rem;
        margin-bottom: 12rem;
    }
    
    .page-info,
    .page-contact {
        padding: 0 1rem 10rem 1rem;
    }
    
    .page-work {
        padding-bottom: 10rem;
    }
    
    .projects-list {
        padding-bottom: 2rem;
    }
    
    .content-text h2 {
        font-size: 1.6rem;
        word-break: break-word;
    }
    
    .content-text p,
    .contact-field {
        font-size: 1.3rem;
    }
    
    .projects-list {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-title {
        font-size: 1.6rem;
    }
    
    .project-description {
        font-size: 1.3rem;
    }
    
    .logo-footer {
        padding-bottom: 2rem;
    }
    
    .logo-image {
        width: 100%;
        max-width: none;
    }
    
    /* Mobile cursor image - show on tap */
    .cursor-image {
        max-width: 80vw;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    .imprint-toggle {
        font-size: 1rem;
        gap: 0.6rem;
    }

    .imprint-toggle-icon {
        font-size: 1rem;
        line-height: 1;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-link {
        font-size: 5rem;
    }
    
    .projects-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    .content-text h2,
    .project-title {
        font-size: 3rem;
    }
    
    .project-description {
        font-size: 1.6rem;
    }
}
