
@import url("https://cdn.jsdelivr.net/gh/mshaugh/nerdfont-webfonts@v3.3.0/build/firacode-nerd-font.css");
@import url("https://fonts.googleapis.com/css2?family=Huninn&display=swap");

/* Catppuccin Mocha */
:root {
    --rosewater: #f5e0dc;
    --flamingo: #f2cdcd;
    --pink: #f5c2e7;
    --mauve: #cba6f7;
    --red: #f38ba8;
    --maroon: #eba0ac;
    --peach: #fab387;
    --yellow: #f9e2af;
    --green: #a6e3a1;
    --teal: #94e2d5;
    --sky: #89dceb;
    --sapphire: #74c7ec;
    --blue: #89b4fa;
    --lavender: #b4befe;

    --text: #cdd6f4;
    --subtext1: #bac2de;
    --subtext0: #a6adc8;

    --overlay0: #6c7086;
    --surface0: #313244;
    --surface1: #45475a;
    --surface2: #585b70;

    --base: #1e1e2e;
    --mantle: #181825;
    --crust: #11111b;

    --secondary: var(--blue);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--base);
    color: var(--text);
    font-family: "Huninn", sans-serif;
    font-style: normal;
}

h1, h2, h3, p, span {
    font-family: "Huninn", sans-serif;
    font-style: normal;
}

header, footer {
    text-align: center;
    margin-top: 2rem;
}

main {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--mantle);
    padding: 1rem;
    border-radius: 40px;
}

h2 {
    text-align: center;
    font-size: 1.5rem;
    color: var(--secondary);
}

img {
    max-width: 200px;
    height: auto;
    border-radius: 50%;
}

.logo {
    text-align: center;
    font-family: " Nerd Font", monospace;
    font-size: 2rem;
    margin-right: 0.5rem;
    color: var(--secondary);
}

/* Social Links */

.social-links {
    display: grid;
    grid-template-columns: repeat(2, 40%);
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem auto 0;
    padding: 0;
    list-style: none;
    max-width: 800px;
}

.social-links li {
    display: flex;
    min-height: 4rem;
}

.social-links li a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;

    /* 能改成由上到下排列嗎 */
    align-items: center;
    flex-direction: column;

    width: 100%;
    padding: 1rem;

    color: var(--text);
    background-color: var(--surface0);
    text-decoration: none;
    border: 1px solid var(--surface1);
    border-radius: 0.5rem;

    transition: 0.2s ease;
}

.social-links li a:hover {
    background-color: var(--surface1);
    border-color: var(--secondary);
    color: var(--secondary);
}

@media (max-width: 768px) {
    .social-links {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin-top: 3rem;
        padding: 0 1rem;
    }
}

/* Projects */

.projects {
    margin: 5rem auto;
    padding: 0 1rem;
}

.projects h2 {
    margin-bottom: 2rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;

    width: 100%;
    max-width: 800px;
    margin: auto;
}

.project-card {
    background-color: var(--surface0);
    border: 1px solid var(--surface1);
    border-radius: 12px;
    padding: 1.5rem;

    display: flex;
    flex-direction: column;
    gap: 1rem;

    transition: 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--secondary);
    background-color: var(--surface1);
}

.project-card h3 {
    margin: 0;
    color: var(--text);
}

.project-card p {
    margin: 0;
    color: var(--subtext1);
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    background: var(--surface2);
    color: var(--text);
    font-size: 0.8rem;
}

.project-tags span.slop-warning {
    background: #49202d;
    color: var(--red);
}

.project-card a {
    margin-top: auto;
    color: var(--secondary);
    text-decoration: none;
}

.project-card a:hover {
    color: var(--lavender);
    text-decoration: underline;
}

/* License */

.license {
    color: var(--secondary);
    font-size: 0.85rem;
}

.license::before {
    content: " ";
    font-family: "FiraCode Nerd Font";
    margin-right: 0.4rem;
}

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

footer a {
    color: var(--secondary);
    text-decoration: none;
}
