:root {
    --bg-color: #E9E9E6; 
    --text-color: #0D0D0D; 
    --line-color: #0D0D0D;
    
    --font-main: 'Inter', Helvetica, Arial, sans-serif;
    
    --spacing-outer: 24px;
    --border-width: 1.5px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.2;
    overflow-x: hidden;
    cursor: none; 
}

a {
    color: inherit;
    text-decoration: none;
    cursor: none;
}

h1, h2, h3 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.04em; 
}

p {
    font-weight: 400;
    line-height: 1.5;
}

.cursor {
    position: fixed;
    width: 30px; 
    height: 30px;
    background: #ffffff; 

    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;

    mix-blend-mode: difference; 
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 16px var(--spacing-outer);
    border-bottom: var(--border-width) solid var(--text-color);
    background: var(--bg-color);
    z-index: 100;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav-section {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 33%;
}

.nav-center {
    justify-content: center;
}

.nav-right {
    justify-content: flex-end;
    text-align: right;
}

.separator {
    color: #888;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: var(--text-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100dvh; 
    width: 100vw;
    background-color: var(--bg-color);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    overscroll-behavior: none;
    touch-action: none; 
    transition: transform 1s cubic-bezier(0.87, 0, 0.13, 1);
}

.loader-content {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.count-wrapper {
    position: absolute;
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-main);
    color: var(--text-color);
    z-index: 2;
}

.text-ring {
    width: 100%;
    height: 100%;
    position: absolute;
    animation: spin 10s linear infinite;
    transform-origin: center;
}

.ring-text {
    font-family: var(--font-main);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 16px; 
    letter-spacing: 2px;
    fill: var(--text-color);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loader.finished {
    transform: translateY(-100%);
}

.loader.finished .loader-content {
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.8s ease;
}

body.loading {
    overflow: hidden;
}

.hero {
    min-height: 100vh;
    padding: 120px var(--spacing-outer) 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: var(--border-width) solid var(--text-color);
}

.hero-title {
    font-size: clamp(3.5rem, 13vw, 11rem);
    line-height: 0.85;
    margin-top: 40px;
}

.hero-title .indent {
    margin-left: 10vw;
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 500;
}

.hero-desc {
    max-width: 320px;
    line-height: 1.4;
    text-transform: none;
}

.manifesto {
    padding: 10vw var(--spacing-outer);
    border-bottom: var(--border-width) solid var(--text-color);
}

.manifesto-text {
    font-size: clamp(1.5rem, 4vw, 3.5rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 90%;
}

.highlight-block {
    background: var(--text-color);
    color: var(--bg-color);
    padding: 0 6px;
    display: inline-block;
    transition: transform 0.3s;
}

.highlight-block:hover {
    transform: scale(0.98);
}

.section-header {
    padding: 16px var(--spacing-outer);
    border-bottom: var(--border-width) solid var(--text-color);
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}


.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: var(--border-width) solid var(--text-color);
}

.project-card {
    border-right: var(--border-width) solid var(--text-color);
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: background 0.3s, color 0.3s;
    position: relative;

    z-index: 1;
}

.project-card:last-child {
    border-right: none;
}

.project-card:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.project-card:hover .view-btn {
    border-color: var(--bg-color);
    color: var(--bg-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.project-image-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    width: 100%;
    position: relative;     
    min-height: 250px; 
}

.img-block {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.project-card:nth-child(1) .img-block {
    background-image: url('./img/peaktide.png');
}

.project-card:nth-child(2) .img-block {
    background-image: url('./img/portfolio.png');
}

.project-card:nth-child(3) .img-block {
    background-image: url('./img/habify.jpg');
}

.project-card:hover .img-block {
    transform: scale(0.98);
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    line-height: 1;
}

.project-desc {
    font-size: 0.95rem;
    margin-bottom: 24px;
    opacity: 0.8;
}

.view-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--text-color);
    border-radius: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: auto;
    align-self: flex-start;
}

.skills-list {
    border-bottom: var(--border-width) solid var(--text-color);
}

.skill-item {
    display: flex;
    justify-content: space-between;
    padding: 32px var(--spacing-outer);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-size: clamp(1.2rem, 2vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: padding 0.3s;
}

.skill-item:hover {
    padding-left: 48px;
    padding-right: 48px;
    background: #fff;
}

.skill-detail {
    font-weight: 400;
    color: #555;
    font-size: 1rem;
    align-self: center;
    text-align: right;
}

.contact {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.contact-wrapper {
    padding: var(--spacing-outer);
}

.contact-header {
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 24px;
}

.big-link {
    font-size: clamp(2.5rem, 9vw, 7rem);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 0.9;
    letter-spacing: -0.04em;
    border-bottom: 4px solid var(--text-color);
    display: inline-block;
    margin-bottom: 80px;
    transition: all 0.3s;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.big-link:hover {
    color: var(--bg-color);
    background: var(--text-color);
    border-color: var(--text-color);
    padding: 0 10px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 500;
    padding-top: 24px;
    border-top: var(--border-width) solid var(--text-color);
}

.footer-bottom .col {
    width: 33%;
}

.footer-bottom .center {
    text-align: center;
    color: #666;
}

.footer-bottom .right {
    text-align: right;
}

.social-link:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .work-grid {
        grid-template-columns: 1fr 1fr;
    }
    .project-card:nth-child(2) {
        border-right: none;
    }
    .project-card {
        border-bottom: var(--border-width) solid var(--text-color);
    }
}

@media (max-width: 768px) {
    body,
    a {
        cursor: auto;
    }

    .cursor {
        display: none;
    }

    .nav-center { display: none; }
    .nav-section { width: auto; }
    
    .work-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        border-right: none;
        min-height: auto;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
    }
    
    .footer-bottom .col { width: 100%; text-align: left; }
    
    .skill-item {
        flex-direction: column;
        gap: 8px;
    }
    .skill-detail {
        text-align: left;
    }

    .loader-content {
        width: 200px;
        height: 200px;
    }

    .count-wrapper {
        font-size: 2rem;
    }

    .ring-text {
        font-size: 16px;
        letter-spacing: 1px;
    }
}