@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&family=Noto+Sans+JP:wght@400;500&display=swap');

:root {
    color-scheme: dark;
    --bg: #111111;
    --header-bg: #0a0a0a;
    --surface: #1a1a1a;
    --text: #e4e1da;
    --link: #d9c4a0;
    --soft: #bab7b0;
    --muted: #8a8a8a;
    --brand: antiquewhite;
    --accent: antiquewhite;
    --line: #2a2a2a;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #fffbde;
    --header-bg: #f3ebc9;
    --surface: #ebddc5;
    --text: #22344a;
    --link: #3b6a8f;
    --soft: #34495e;
    --muted: #4d6478;
    --brand: #22344a;
    --accent: #4682a9;
    --line: #cfe3ee;
}

html {
    background-color: var(--bg);
    color: var(--text);
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 400;
    line-height: 1.6;
    scrollbar-width: none;
}

::-webkit-scrollbar {
    display: none;
}

body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* FONTS */

.eb-garamond {
    font-family: "EB Garamond", serif;
    font-optical-sizing: auto;
    font-style: normal;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.15s;
}

.text-link {
    color: var(--link);
    text-underline-offset: 3px;
}

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

/* HEADER */

.header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 20px 0;
    background: var(--header-bg);
    box-shadow: 0 0 0 100vmax var(--header-bg);
    clip-path: inset(0 -100vmax);
}

.header + hr {
    display: none;
}

.header-object {
    color: var(--brand);
    margin: 0;
}

.header-first {
    font-weight: 500;
    letter-spacing: 0.02em;
}

.header-centered {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
}

.header-centered .nav {
    justify-content: flex-end;
}

.header-title {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 700px) {
    .header-centered {
        grid-template-columns: 1fr auto;
    }

    .header-title {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.nav a,
.theme-toggle {
    color: var(--muted);
}

.nav a:hover,
.nav a[aria-current="page"],
.theme-toggle:hover {
    color: var(--accent);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    cursor: pointer;
    transition: color 0.15s;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
}

.theme-toggle .icon-moon,
:root[data-theme="light"] .theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

hr {
    height: 0;
    border: none;
    border-top: 1px solid var(--line);
    margin: 0;
}

/* BODY */

.body {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 48px;
    padding: 40px 0;
}

.body > div > h1,
.section-label {
    color: var(--muted);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.body-text {
    color: var(--text);
    font-weight: 400;
    font-size: 16px;
    margin: 0;
}

.body-text + .body-text {
    margin-top: 12px;
}

.paragraph-text {
    margin-left: 20%;
    margin-right: 20%;
    margin-bottom: 5%;
    tab-size: 3;
    line-height: 200%;
}

.about {
    text-align: left;
}

.experiences {
    text-align: right;
}

.contact-links {
    list-style: none;
    padding: 0;
}

.contact-links li {
    padding: 2px 0;
    overflow-wrap: anywhere;
}

.invisible {
    visibility: hidden;
}

@media (max-width: 700px) {
    .body {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .experiences {
        text-align: left;
    }
}

/* MAIN */

.main {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 48px;
}

.piece {
    flex-direction: column;
    cursor: pointer;
    gap: 1.3rem;
    display: inline-block;
    flex-grow: 1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 24px 16px;
    padding-bottom: 48px;
}

.projects-column {
    display: grid;
    gap: 24px;
}

@media (max-width: 700px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 280px;
    min-width: 0;
}

.title > h1,
.title > h2 {
    margin: 0;
}

.title > h1 {
    color: var(--text);
    font-weight: 500;
    font-size: 15px;
}

.title > h2 {
    color: var(--muted);
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 400;
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.image {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.2s;
}

.image:hover,
.project:hover .image,
.project:focus-visible .image {
    opacity: 0.8;
}

.project:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 4px;
}

.section {
    padding: 40px 0;
    border-top: 1px solid var(--line);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
}

.tag-list li {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 12px;
    font-size: 13px;
    color: var(--soft);
}

.tag-list + .section-label {
    margin-top: 40px;
}

.highlights-table {
    border-collapse: collapse;
}

.highlights-table th,
.highlights-table td {
    font-weight: 400;
    padding: 2px 0;
    text-align: left;
}

.highlights-table th {
    color: var(--text);
    padding-right: 16px;
}

.highlights-table td {
    color: var(--muted);
}

.project-meta {
    display: grid;
    align-content: start;
    gap: 24px;
}

.project-meta .tag-list {
    justify-content: flex-end;
}

@media (max-width: 700px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .project-meta .tag-list {
        justify-content: flex-start;
    }
}

.showcase {
    display: grid;
    gap: 16px;
    padding-bottom: 48px;
}

.showcase .image {
    max-height: 70vh;
    object-fit: contain;
    background: var(--surface);
}

/* FOOTER */

footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding: 20px 0 32px;
    border-top: 1px solid var(--line);
}

.footer-object {
    color: var(--muted);
    font-size: 12px;
}

.footer-object a:hover {
    color: var(--accent);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-light-green {
    background-color: lightgreen;
}

/* COLORS */

.sky-blue {
    background-color: #769fb0;
}

.light-grey {
    background-color: rgba(211, 211, 211, 0.674);
}

.light-green {
    background-color: lightgreen;
}

.pixelated {
    image-rendering: pixelated;
}

.size-alter {
    aspect-ratio: 1/1;
    width: 100%;
    object-fit: cover;
}

.reflection-spacing {
    padding-left: 10%;
    padding-right: 10%;
}
