@font-face {
    font-family: 'fy';
    src: url('font.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-weight: 100 900;
}

* {
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --light-color: #f0f8ff;
    --dark-color: #000000;
}

body {
    margin: 0;
    font-family: fy, Arial, sans-serif;
    color: #222;
    background: #fafafa;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease-out forwards;
}

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

.container {
    flex-direction: row;
    min-height: 100vh;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: all 0.4s ease;
}

nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 55px;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.8rem;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 5px 0;
}

nav.scrolled .nav-links a {
    color: var(--dark-color);
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
}

.mobile-menu-btn .bar {
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

nav.scrolled .mobile-menu-btn .bar {
    background-color: var(--dark-color);
}

.content {
    margin-left: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.hero {
    position: relative;
    flex-direction: column;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    animation: fadeIn 1.5s ease-out forwards;
    overflow: hidden;
    z-index: 1;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("./images/banner.webp") center center / cover no-repeat;
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 60px);
    margin: 0;
}

.hero p {
    font-size: clamp(15px, 3vw, 20px);
    margin: 0;
}

.main, .contact {
    padding: 50px;
}

.main {
    text-align: center;
}

.main h2, .contact h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.main h3, .contact h3 {
    color: #999;
    font-weight: normal;
    margin-bottom: 30px;
}


.projects, .contact {
    padding: 40px;
}

.projects h2, .contact h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 10px;
}

.projects h3, .contact h3 {
    text-align: center;
    color: #999;
    font-weight: normal;
    margin-bottom: 30px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    border-radius: 15px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card h4 {
    margin: 0 0 5px;
    font-size: 18px;
}

.card small {
    display: block;
    margin-bottom: 10px;
    color: #777;
}

.card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 10px;
}

.card .tags span {
    background: #eee;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #555;
}

.card .date, .card .codename {
    color: #999;
    font-size: 13px;
    margin-bottom: 6px;
}

.card .codename {
    margin-top: 10px;
    margin-bottom: 10px;
}

.card .buttons button,
.card .buttons .text-button {
    margin-right: 10px;
    margin-top: 5px;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
}

.card .buttons button {
    background: #000000;
    color: white;
    border: none;
}

.card .buttons .text-button {
    background: none;
    border: none;
    color: #000000;
}

.contact-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s;
}

.contact-item:hover {
    background: #f5f5f5;
}

.contact-item-icon {
    font-size: 24px;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.contact-item-text h4 {
    margin: 0;
    font-size: 16px;
}

.contact-item-text small {
    color: #777;
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: #aaa;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .topbar-links {
        flex-direction: column;
        gap: 10px;
    }

    .content {
        margin-left: 0;
    }

    .main, .contact {
        padding: 40px;
    }

    .main h2, .contact h2 {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .main h3, .contact h3 {
        color: #999;
        font-weight: normal;
        margin-bottom: 30px;
    }

    .main .right {
        padding-left: 0;
        padding-top: 20px;
    }

    .hero {
        height: calc(100vh);
        text-align: center;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .nav-links a {
        color: var(--dark-color);
        font-size: 1.1rem;
    }

    .mobile-menu-btn {
        display: flex;
    }
}