@font-face {
    font-family: "riglom";
    src: url("fonts/Riglom.woff");
}

@font-face {
    font-family: "kayo";
    src: url("fonts/Kayonest.woff");
}

@font-face {
    font-family: "groove";
    src: url("fonts/Groove.woff");
}

:root {
    /* Colors */
    --color-bg: #D9D9D9;
    --color-text: #1a1a1a;
    --color-text-light: rgba(30, 28, 27, 0.6);
    --color-white: #ffffff;
    --color-border: rgba(30, 28, 27, 0.1);

    /* Fonts */
    --font-sans: 'auto', sans-serif;
    --font-serif: 'kayo', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-bold: 'groove';

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Layout */
    --container-width: 1200px;
    --gutter: 2rem;
}

html {
    scroll-behavior: smooth;
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mono);
    font-weight: 400;
    line-height: 1.2;
}

section {
    position: relative;
}

.italic {
    font-style: italic;
}

.font-serif {
    font-family: var(--font-serif);
    letter-spacing: 0;
    font-weight: 300;
}

.sans-serif {
    font-family: var(--font-sans);
    letter-spacing: -3px;
    font-weight: bold;
}

.groove {
    font-family: var(--font-bold);
}

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

.text-center {
    text-align: center;
}

.brand img {
    width: 50px;
}

.page-wrapper {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: var(--spacing-xl) 0;
}

/* Typography Utility Classes */
.display-heading {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: -0.02em;
}

.hero-content {
    position: fixed;
    margin: 0 auto;
    top: 38%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

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

.about-section {
    width: 100%;
    padding: 80px 40px;
    background-color: var(--color-text);
    color: var(--color-bg);
    border-radius: 18px;
    margin: 0 auto;
    margin-top: 95vh;
}

.section-label {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
}

.section-label img {
    width: 100%;
}

/* Header */
.header-section {
    width: 100%;
    padding-top: var(--spacing-md);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 1;
}

.main-content {
    position: relative;
    z-index: 1;
    background-color: transparent;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    padding: 0 10px;
}

.nav-links {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.technology-section {
    background-color: var(--color-bg);
}

.technology-section h2,
.work-section h2 {
    font-size: 70px;
    margin-bottom: 40px;
}

.work-section h2 {
    font-size: 70px;
    margin-bottom: -100px;
}

.work-section {
    background-color: var(--color-bg);
    color: var(--color-text);
}

.button {
    border: 1px solid var(--color-text);
    padding: 0.5em 1em;
    border-radius: 2px;
    transition: all 0.2s ease;
}

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

/* Grid Layouts */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.grid-3-col {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: var(--spacing-md);
    align-items: center;
}

.grid-4-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    align-items: end
}

.work-item {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 5/3;
    filter: grayscale(100%);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.work-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
    cursor: pointer;
}

.work-item-side {
    aspect-ratio: 3/4;
}

/* Dark Section */
.dark-section {
    background-color: var(--color-text);
    color: var(--color-bg);
    border-radius: 18px;
    padding: 80px 40px
}

.dark-section .section-label {
    color: rgba(239, 237, 231, 0.6);
}

/* GRAB Animation */
.animation-section {
    padding: var(--spacing-sm) 0;
}

.grab-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    min-height: 200px;
}

.letter {
    width: 80px;
    height: auto;
    opacity: 0;
    transform: scale(0.5);
    animation: letterAppear 4s ease-in-out infinite;
}

.letter-g {
    animation-delay: 0s;
}

.letter-r {
    animation-delay: 0.3s;
}

.letter-a {
    animation-delay: 0.6s;
}

.letter-b {
    animation-delay: 0.9s;
}

@keyframes letterAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }

    15% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    85% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    100% {
        opacity: 0;
        transform: scale(0.5) translateY(-20px);
    }
}

/* Logo Rotation */
.rotation-section {
    background-color: var(--color-bg);
    padding: var(--spacing-md) 0;
}

.grab-rotation {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grab-rotation img {
    width: 120px;
    height: auto;
    animation: rotate 5s linear infinite;
}

.grab-rotation img:hover {
    animation: rotate 1s linear infinite;
}

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

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .grid-4-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .work-item-side,
    .work-item {
        aspect-ratio: 3/4;
    }

    .work-section h2 {
        margin-bottom: 40px;
    }

    .letter {
        width: 40px;
    }
}

@media (max-width: 768px) {
    .hero-content {
        top: 45%;
    }

    .grid-2-col {
        grid-template-columns: 1fr;
    }

    .display-heading {
        font-size: 3rem;
    }

    .technology-section h2,
    .work-section h2 {
        font-size: 50px;
    }

    .dark-section,
    .about-section {
        padding: 80px 0;
    }
}

/* Footer */
.footer-section {
    border-top: 1px solid var(--color-border);
    margin-top: 100vh;
    padding: var(--spacing-sm) 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Utilities */
.mt-md {
    margin-top: var(--spacing-md);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-overlay.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-overlay img {
    width: 80px;
    height: auto;
    animation: breath 1s infinite;
}

@keyframes breath {
    from {
        animation-timing-function: ease-in;
    }

    50% {
        transform: scale(1.05);
        animation-timing-function: ease-in-out;
    }

    to {
        transform: scale(1);
        animation-timing-function: ease-out;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--color-bg);
    margin: auto;
    padding: var(--spacing-lg);
    border-radius: 18px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-close {
    color: var(--color-text);
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--color-text-light);
}

.modal-content h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    padding-right: var(--spacing-lg);
}

.modal-content h3 {
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-body p {
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: var(--spacing-md);
        max-height: 90vh;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }
}