/* Profile picture next to the name in the header. The picture is positioned
   outside the name's box so the name itself stays centered on the page. */
header .title-block {
    display: inline-block;
    position: relative;
    margin: 30px 0 10px;  /* room for the picture, which is taller than the text */
}

/* Circular, like a GitHub avatar (the source image is square) */
header .title-image {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 1.2em;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    object-fit: cover;
}

header .subtitle {
    margin: 0.5em 0 0;
    font-size: 18px;
    color: #777777;
    letter-spacing: 0.02em;
}

/* Project tiles (layouts/_default/projects.html): 3 columns, fewer on narrow screens */
.tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2em;
    margin-top: 1.5em;
}

.tile {
    display: block;
    padding: 1.1em 1.2em;
    border: 1px solid #e3e0da;
    border-top: 4px solid #c8102e;  /* matches link_color in hugo.toml */
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

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

.tile h3 {
    margin: 0 0 0.4em;
    color: #c8102e;
}

.tile p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.45;
}

@media only screen and (max-width: 800px) {
    .tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 600px) {
    .tiles {
        grid-template-columns: 1fr;
    }

    header .title-block {
        margin: 0;
    }

    header .title-image {
        position: static;
        transform: none;
        display: block;
        margin: 0 auto 0.6em;
    }

    header .subtitle {
        font-size: 16px;
    }
}
