:root {
    --background: #10151d;
    --surface: #19212d;
    --text: #edf2f7;
    --muted: #b0bdcc;
    --accent: #72dfc0;
    --border: #303c4c;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.7;
}

a {
    color: var(--accent);
    text-underline-offset: 4px;
}

a:hover {
    text-decoration-thickness: 2px;
}

a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 5px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3 {
    line-height: 1.2;
    text-wrap: balance;
}

h1 {
    margin: 0 0 24px;
    font-size: clamp(2.5rem, 7vw, 4.8rem);
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
}

h3 {
    font-size: 1.3rem;
}

.container {
    width: min(1100px, calc(100% - 40px));
    margin-inline: auto;
}

/* Navigaatio */

.site-header {
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-block: 22px;
}

.brand {
    color: var(--text);
    font-weight: 750;
    text-decoration: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
}

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

/* Sivun sisältö */

.hero {
    padding-block: 88px 64px;
}

.eyebrow {
    margin-bottom: 16px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lead {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.2rem;
}

.section {
    padding-block: 32px 64px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.card {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card h3 {
    margin-top: 0;
}

.card p {
    color: var(--muted);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    background: var(--accent);
    color: var(--background);
    border: 1px solid var(--accent);
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}

.button:hover {
    background: #a0ecd6;
    text-decoration: none;
}

.button-secondary {
    background: transparent;
    color: var(--accent);
}

.button-secondary:hover {
    background: var(--surface);
}

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

.tags li {
    padding: 4px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.85rem;
}

.prose {
    max-width: 760px;
}

.prose p,
.prose li {
    color: var(--muted);
}

.project {
    margin-bottom: 28px;
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 24px;
    border-radius: 10px;
}

.project-meta {
    color: var(--accent);
    font-size: 0.9rem;
}

.site-footer {
    margin-top: 32px;
    padding-block: 28px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* Näppäimistökäyttäjän oikopolku */

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    padding: 10px 16px;
    background: var(--accent);
    color: var(--background);
    z-index: 10;
}

.skip-link:focus {
    top: 12px;
}

/* Mobiili */

@media (max-width: 760px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .hero {
        padding-block: 56px 36px;
    }

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

    .card {
        padding: 22px;
    }
}

figure.project-image {
    display: block;
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin: 1.25rem 0;
    padding: 0;
    aspect-ratio: auto;
}

.project-image > a {
    display: block;
    max-width: 100%;
    min-width: 0;
}

.project-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.project-image figcaption {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.card,
.project,
.project-image {
  min-width: 0;
  overflow-wrap: anywhere;
}


.tags,
.actions,
.site-nav {
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .container {
    width: 100%;
    max-width: 100%;
    padding-inline: 16px;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card,
  .project {
    padding: 20px;
  }

  .site-header .container {
    flex-wrap: wrap;
    gap: 12px;
  }

  body {
    font-size: 16px;
    line-height: 1.6;
  }
}

.profile-photo {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;
    margin: 28px 0;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.hobby-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 28px;
}

.hobby-gallery figure {
    min-width: 0;
    margin: 0;
}

.hobby-gallery a {
    display: block;
}

.hobby-gallery img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.hobby-gallery figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .hobby-gallery {
        grid-template-columns: minmax(0, 1fr);
    }
}