@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
    --primary-color: #ffffff;
    --secondary-color: #000000;
    --accent-color: #ff5c00;
    --grid-color: rgba(0, 0, 0, 0.05);
    --line-width: 1px;
    --spacing-unit: 8px;
    --grid-size: 40px;
    --text-color: var(--secondary-color);
    --text-color-light: var(--accent-color);
    --mono-font: 'Space Mono', monospace;
}

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

body {
    font-family: 'Space Mono', monospace;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, var(--grid-color) var(--line-width), transparent var(--line-width)),
        linear-gradient(to bottom, var(--grid-color) var(--line-width), transparent var(--line-width));
    background-size: var(--grid-size) var(--grid-size);
    pointer-events: none;
    z-index: 1000;
    opacity: 0.5;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.cursor-circle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--secondary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.cursor-dot.link-hover,
.cursor-circle.link-hover {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cursor-dot.link-hover {
    transform: translate3d(0, 0, 0) scale(1.5);
    background: var(--accent-color);
}

.cursor-circle.link-hover {
    transform: translate3d(0, 0, 0) scale(1.5);
    border-color: var(--accent-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(var(--spacing-unit) * 4);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--primary-color);
}

.menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.menu a {
    text-decoration: none;
    color: var(--secondary-color);
    position: relative;
}

.language-toggle {
    background: none;
    border: var(--line-width) solid var(--secondary-color);
    color: var(--secondary-color);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.language-toggle:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.logo {
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--text-color);
}

@media (max-width: 768px) {
    nav {
        padding: calc(var(--spacing-unit) * 2);
    }

    .menu {
        gap: 1.5rem;
    }

    .language-toggle {
        margin-right: 1.5rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .menu a {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 0.9rem;
    }

    .menu {
        gap: 1rem;
    }

    .language-toggle {
        margin-right: 1rem;
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }

    .menu a {
        font-size: 0.8rem;
    }
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

.dotted-rectangle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 300px;
    border: 1px dashed rgba(34, 34, 34, 0.2);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    width: 90%;
    margin: 0 auto;
}

.hero-message {
    margin-bottom: 2rem;
}

.main-message {
    font-size: 3.5rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-color);
    line-height: 1.2;
}

.sub-message {
    font-size: 2rem;
    font-weight: 400;
    margin: 1rem 0 0;
    color: var(--text-color-light);
}

.author-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.mono-text {
    font-family: var(--mono-font);
    font-size: 0.9rem;
    color: var(--text-color);
}

.author-tag .line {
    width: 2px;
    height: 24px;
    background-color: var(--text-color-light);
    opacity: 0.3;
}

.role-text {
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin: 0;
}

.role-text {
    margin-top: 4rem;
    text-align: center;
}

.role-text p {
    font-size: 1rem;
    color: var(--text-color-light);
    margin: 0;
    opacity: 0.8;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
}

.scroll-indicator .line {
    width: 1px;
    height: 40px;
    background-color: var(--text-color);
}

.scroll-indicator .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--text-color);
}

.split-text {
    font-size: 4rem;
    font-weight: bold;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 0.5s;
}

.line {
    width: 40px;
    height: var(--line-width);
    background-color: var(--primary-color);
    margin: calc(var(--spacing-unit) * 2) auto;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.section-number {
    font-size: 0.8rem;
    margin-right: calc(var(--spacing-unit) * 2);
    opacity: 0.5;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
    padding: calc(var(--spacing-unit) * 4);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    cursor: pointer;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.4s;
}

.project-frame {
    aspect-ratio: 4/3;
    border: var(--line-width) solid var(--secondary-color);
    position: relative;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.02);
    transition: background-color 0.3s ease;
}

.project-frame:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.project-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
}

.project-image {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    background-color: transparent;
    transform: scale(1);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-info {
    margin-top: calc(var(--spacing-unit) * 2);
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-unit);
    font-weight: 500;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-color-light);
    opacity: 0.8;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: normal;
}

.work-section,
.about-section,
.contact-section {
    padding: calc(var(--spacing-unit) * 16) calc(var(--spacing-unit) * 4);
}

.about-content,
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.large-text {
    font-size: 2rem;
    line-height: 1.4;
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.email-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: var(--line-width);
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-in-out;
}

.email-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

footer {
    padding: calc(var(--spacing-unit) * 4);
    text-align: center;
    border-top: var(--line-width) solid var(--secondary-color);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 8);
}

.philosophy-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
}

.philosophy-content {
    flex: 1;
}

.philosophy-animation {
    flex: 1;
    height: 150px;
    position: relative;
}

.philosophy-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.philosophy-item h3,
.philosophy-item p {
    margin: 0;
}

.philosophy-item h3 {
    margin-bottom: 1rem;
}

.philosophy-item h3,
.philosophy-item p {
    position: relative;
    z-index: 1;
}

.philosophy-item h3 {
    font-size: 0.9rem;
    color: var(--accent-color);
}

.philosophy-item p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.8;
}

.connect-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
    text-align: center;
}

.animation-container {
    width: 100%;
    height: 300px;
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#comprehensionCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.connect-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 1;
    margin-top: 2rem;
}

.connect-text .large-text {
    margin-bottom: 1rem;
}

.email-link {
    font-family: var(--font-mono);
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: var(--color-accent);
}

.contact-content .large-text {
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.project-page {
    padding: calc(var(--spacing-unit) * 8);
    max-width: 1200px;
    margin: 0 auto;
}

.construction-notice {
    text-align: center;
    padding: calc(var(--spacing-unit) * 8) 0;
}

.construction-notice h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-unit);
    font-weight: 500;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-color-light);
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.preview-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.coming-soon {
    text-align: center;
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: calc(var(--spacing-unit) * 8);
    padding: calc(var(--spacing-unit) * 2);
    border: 1px dashed var(--accent-color);
    display: inline-block;
}

.preview-section {
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.preview-section h2 {
    font-size: 1.8rem;
    margin-bottom: calc(var(--spacing-unit) * 4);
    font-weight: 500;
}

.preview-section > p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.preview-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 6);
}

.detail-item {
    padding: calc(var(--spacing-unit) * 3);
    border: var(--line-width) solid var(--secondary-color);
    background-color: rgba(0, 0, 0, 0.02);
}

.detail-item h3 {
    font-size: 1.2rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
    font-weight: 500;
}

.detail-item p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
}

.back-link {
    display: inline-block;
    margin-top: calc(var(--spacing-unit) * 8);
    font-size: 1.1rem;
    color: var(--secondary-color);
    text-decoration: none;
    position: relative;
}

.back-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: var(--line-width);
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-in-out;
}

.back-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

@media (max-width: 768px) {
    :root {
        --grid-size: 20px;
    }

    nav {
        padding: calc(var(--spacing-unit) * 2);
    }

    .menu {
        display: flex;
        gap: 1rem;
        align-items: center;
    }

    .language-toggle {
        margin-right: 1rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .menu a {
        font-size: 0.9rem;
    }

    .split-text {
        font-size: 2.5rem;
    }

    .menu a {
        margin-left: calc(var(--spacing-unit) * 2);
    }

    .large-text {
        font-size: 1.5rem;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
    }
    
    .philosophy-item {
        padding: calc(var(--spacing-unit) * 2);
    }
    
    .main-message {
        font-size: 2.5rem;
    }
    
    .sub-message {
        font-size: 1.5rem;
    }
    
    .author-tag .mono-text {
        font-size: 0.9rem;
    }
    
    .role-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit));
    }

    .menu {
        width: 100%;
        justify-content: center;
    }

    .language-toggle {
        margin-right: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    .menu a {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .language-toggle {
        margin-right: 0.6rem;
        order: -1; /* Ensures language toggle stays at the start */
    }
}

@media (max-width: 768px) {
    :root {
        --grid-size: 20px;
    }

    nav {
        padding: calc(var(--spacing-unit) * 2);
    }

    .menu {
        display: flex;
        gap: 1rem;
        align-items: center;
    }

    .language-toggle {
        margin-right: 1rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .menu a {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit));
    }

    .menu {
        width: 100%;
        justify-content: center;
    }

    .language-toggle {
        margin-right: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    .menu a {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .language-toggle {
        margin-right: 0.6rem;
        order: -1; /* Ensures language toggle stays at the start */
    }
}

@keyframes scrollDot {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.hero-animation {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2rem;
    overflow: hidden;
}

.hero-canvas {
    display: block;
    width: 100%;
    height: 300px;
}

/* Imprint Styles */
.imprint-section {
    padding: calc(var(--spacing-unit) * 8) var(--spacing-unit);
    max-width: 1200px;
    margin: 0 auto;
}

.imprint-content {
    margin-top: calc(var(--spacing-unit) * 4);
}

.imprint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
}

.imprint-item {
    background: rgba(255, 255, 255, 0.02);
    padding: calc(var(--spacing-unit) * 3);
    border: var(--line-width) solid var(--grid-color);
    transition: all 0.3s ease;
}

.imprint-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.imprint-item h2 {
    font-size: 1rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--accent-color);
}

.imprint-item p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-unit);
}

.imprint-item a.text-link {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.imprint-item a.text-link:hover {
    border-color: var(--accent-color);
}

@media (max-width: 768px) {
    .imprint-grid {
        grid-template-columns: 1fr;
    }
    
    .imprint-item {
        padding: calc(var(--spacing-unit) * 2);
    }
}
