:root {
    --bg: #ffffff;
    --fg: #111111;
    --secondary: #555555;
    --muted: rgba(17, 17, 17, 0.45);
    --accent: #111111; /* monochrome site: links, timeline dots, focus ring */
    --border: rgba(0, 0, 0, 0.08);
    --surface: #f3f3f3;
    --font: 'IBM Plex Sans', sans-serif;
    --mono: 'IBM Plex Mono', monospace;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
}

main {
    animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    main { animation: none; }
}

/* ── Header ── */
.site-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 4rem;
}

.site-name {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.site-nav {
    display: flex;
    gap: 1.5rem;
}

.site-nav a {
    font-size: 0.875rem;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.15s;
}

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

/* ── About ── */
.bio {
    font-size: 0.9375rem;
    color: var(--secondary);
    line-height: 1.8;
    margin-bottom: 3.5rem;
    text-align: justify;
}

.bio p + p {
    margin-top: 1rem;
}

.bio p:first-child {
    color: var(--fg);
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.contact-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.15s;
    width: fit-content;
}

.contact-list a:hover {
    color: var(--fg);
}

.contact-list img {
    width: 1rem;
    height: 1rem;
    opacity: 0.55;
}

/* ── Portfolio + CV (both use the same timeline) ── */
.section-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2rem;
    font-family: var(--mono);
}

/* Timeline: vertical axis on the left, one ring per project.
   The axis runs from the first ring to the last one and doesn't stick out past them. */
.project-list {
    list-style: none;
}

.project {
    position: relative;
    padding: 0 0 2.75rem 1.5rem;
}

.project:last-child {
    padding-bottom: 0;
}

/* Ring */
.project::before {
    content: '';
    position: absolute;
    z-index: 1;
    top: 0.25rem;
    left: -6px; /* centers the 13px ring (9px + 2 × 2px border) on the 1px axis at left: 0 */
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
}

/* Axis segment: from this ring's centre down to the next ring's centre */
.project::after {
    content: '';
    position: absolute;
    top: calc(0.25rem + 6.5px);
    bottom: calc(-0.25rem - 6.5px);
    left: 0;
    width: 1px;
    background: var(--border);
}

.project:last-child::after {
    display: none;
}

.project-date {
    display: block;
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.project-body {
    flex: 1;
    min-width: 0;
}

.project-title {
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--fg);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.project-desc {
    font-size: 0.9375rem;
    color: var(--secondary);
    line-height: 1.65;
    margin-bottom: 0.75rem;
    opacity: 0.85;
    text-align: justify;
}

/* CV only: company / degree line under the title */
.project-meta {
    font-size: 0.875rem;
    color: var(--secondary);
    margin-top: -0.25rem;
    margin-bottom: 0.75rem;
}

/* CV only: bullet points */
.cv-points {
    font-size: 0.9375rem;
    color: var(--secondary);
    line-height: 1.65;
    opacity: 0.85;
    list-style: disc;
    padding-left: 1rem;
    margin-bottom: 0.75rem;
}

.cv-points li + li {
    margin-top: 0.35rem;
}

/* Second section on one page (CV: Education after Experience) */
.project-list + .section-label {
    margin-top: 4rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
    list-style: none;
}

.tag {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--secondary);
    background: var(--surface);
    padding: 0.125rem 0.45rem;
    border-radius: 3px;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s;
}

.project-link:hover {
    opacity: 0.7;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .bio,
    .project-desc {
        text-align: left;
    }
}

/* ── Utilities ── */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
