@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Inter:wght@400;500&display=swap');

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

:root {
    --bg: #ffffff;
    --surface: #f5f5f5;
    --surface-hover: #eaeaea;
    --text: #0a0a0a;
    --text-dim: rgba(0, 0, 0, 0.65);
    --text-muted: rgba(0, 0, 0, 0.45);
    --border: rgba(0, 0, 0, 0.08);
    --gap: 5px;
    --radius: 9px;
}

html,
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

#main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 160px 40px;
    min-height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 44px;
    width: 680px;
}

/* ─── Intro block ─── */
.intro-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.intro-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.intro-role {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.intro-link {
    color: var(--text-muted);
    text-decoration: underline;
    text-decoration-color: var(--text-muted);
    text-underline-offset: 2px;
    font-weight: 600;
}

.intro-bio {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dim);
    line-height: 1.65;
}

.back-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 8px;
    display: inline-block;
    transition: color 0.15s;
}

.back-link:hover {
    color: var(--text);
}

/* ─── Section ─── */
.section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ─── Experience cards ─── */
.exp-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.exp-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.exp-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.exp-card-icons {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--gap);
}

.exp-card-icons.text-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.exp-icon {
    color: var(--text);
    opacity: 0.55;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.15s, background 0.2s;
    background: var(--surface);
    border-radius: var(--radius);
    width: 36px;
    height: 36px;
}

.exp-icon:hover {
    opacity: 1;
    background: var(--surface-hover);
}

.exp-icon-dark iconify-icon {
    filter: brightness(0.4);
}

.exp-icon-text {
    color: var(--text);
    opacity: 0.55;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s, background 0.2s;
    background: var(--surface);
    border-radius: var(--radius);
    width: 100%;
    height: 36px;
    font-size: 12px;
    font-weight: 500;
    padding: 0 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exp-icon-text:hover {
    opacity: 1;
    background: var(--surface-hover);
}

/* ─── Games grid ─── */
.games-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    width: 100%;
}

.game-item {
    color: var(--text);
    opacity: 0.55;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s, background 0.2s;
    background: var(--surface);
    border-radius: var(--radius);
    height: 36px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 0 12px;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.game-item:hover {
    opacity: 1;
    background: var(--surface-hover);
}

.game-item:hover {
    opacity: 1;
    background: var(--surface-hover);
}

/* ─── Work grid ─── */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
    width: 100%;
}

.work-card {
    background: var(--surface);
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    padding: 4px;
}

.work-card:hover {
    background: var(--surface-hover);
}

.work-thumbnail {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--surface-hover);
    border-radius: var(--radius);
}

.work-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card:hover .work-thumbnail img {
    transform: scale(1.03);
}

.work-title {
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* Title-only Work Cards */
.work-card.work-card-title-only {
    background: var(--surface);
    justify-content: center;
    padding: 4px;
}

.work-card.work-card-title-only:hover {
    background: var(--surface-hover);
}

.work-card.work-card-title-only .work-title {
    padding: 12px;
}

/* Full-width Work Card */
.work-card.work-card-full-width {
    grid-column: 1 / -1;
    background: var(--surface);
    justify-content: center;
    padding: 0;
}

/* 2-column Wide Work Card */
.work-card.work-card-wide {
    grid-column: span 2;
}

.work-card.work-card-wide .work-thumbnail {
    aspect-ratio: 1989 / 450;
}

.work-card.work-card-full-width:hover {
    background: var(--surface-hover);
}

.work-card.work-card-full-width .work-title {
    padding: 14px 16px;
}

/* ─── Blog feed ─── */
.blog-feed {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    width: 100%;
}

.blog-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    background: var(--surface-hover);
}

.blog-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface-hover);
}

.blog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.blog-card:hover .blog-thumbnail img {
    transform: scale(1.03);
}

.blog-info {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.blog-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
}

.blog-date {
    font-size: 13px;
    color: var(--text-muted);
}

/* ─── Contact ─── */
.contact-grid {
    display: flex;
    flex-direction: row;
    gap: var(--gap);
    width: 100%;
    align-items: stretch;
}

.contact-item-x {
    flex: 1;
    height: 46px;
    background: var(--surface);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-item-x:hover {
    background: var(--surface-hover);
}

.contact-item-email {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background: var(--surface);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-item-email:hover {
    background: var(--surface-hover);
}

.contact-svg {
    color: var(--text);
    opacity: 0.45;
    transition: opacity 0.2s;
}

.contact-item-x:hover .contact-svg,
.contact-item-email:hover .contact-svg {
    opacity: 0.85;
}

/* ─── Responsive ─── */
@media (max-width: 620px) {
    #main {
        padding: 60px 20px;
    }

    .container {
        width: 100%;
    }

    .exp-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
