:root {
    --accent: #ffffff;
    --ink: #f5f5f5;
    --muted: #a3a3a3;
    --bg: #000;
    --card: #0d0d0d;
    --line: #262626
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto
    }
}

body {
    margin: 0;
    background-color: var(--bg);
    background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 72px 72px;
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.5;
    padding: 48px 16px 64px
}

a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px
}

.page {
    max-width: 1040px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px
}

/* Hero */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px 40px;
    padding: 40px;
    border-radius: 28px;
    background: var(--card);
    border: 1px solid var(--line)
}

.avatar {
    flex: 0 0 136px;
    width: 136px;
    height: 136px;
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    /* border: 1px solid var(--accent); */
    font-family: 'Fraunces', Georgia, serif;
    font-size: 48px;
    font-weight: 600;
    color: var(--accent)
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.intro {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px
}

h1 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: clamp(28px, 4.5vw, 42px);
    line-height: 1.02;
    letter-spacing: -.02em
}

.role {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--accent)
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-size: 13px;
    color: var(--muted)
}

.meta a {
    color: inherit;
    text-decoration: none
}

.meta a:hover {
    color: var(--accent)
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--accent);
    color: #000;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none
}

.btn:hover {
    background: #d4d4d4
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid #3a3a3a;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none
}

.pill:hover {
    border-color: var(--accent);
    color: var(--accent)
}

/* Sections */
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px
}

.card {
    padding: 32px;
    border-radius: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0
}

.wide {
    grid-column: 1 / -1
}

h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent)
}

h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line)
}

.about {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #e5e5e5
}

.entry {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.when {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--accent)
}

h3 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: 17px;
    line-height: 1.25
}

.org {
    font-size: 13px;
    font-weight: 500;
    color: #d4d4d4
}

.entry p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.65;
    color: #cfcfcf
}

.certs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px
}

.cert {
    padding: 20px;
    border-radius: 18px;
    background: #111;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px
}

.cert h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600
}

.cert div {
    font-size: 14px;
    color: var(--muted)
}

.section-note {
    margin: -8px 0 0;
    font-size: 13px;
    color: var(--muted)
}

.projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px
}

.project {
    padding: 22px;
    border-radius: 18px;
    background: #111;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0
}

.p-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.p-num {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--muted)
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #3a3a3a;
    font-size: 12px;
    font-weight: 500;
    color: #d4d4d4;
    white-space: nowrap
}

.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent)
}

.status.local::before {
    background: #737373
}

.project h3 {
    font-size: 16px
}

.project p {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: #cfcfcf
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px
}

.tags span {
    padding: 4px 10px;
    border-radius: 8px;
    background: #1a1a1a;
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 500;
    color: #d4d4d4
}

.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.skill-group h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted)
}

.skill-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.skill-group li {
    font-size: 13px;
    color: #e5e5e5;
    padding-left: 14px;
    position: relative
}

.skill-group li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .6em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent)
}

/* Certificate images */
.cert-media {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    border: 1px solid var(--line);
    margin-bottom: 10px
}

.cert-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .3s ease
}

.cert-media:hover img {
    transform: scale(1.04)
}

.verify {
    margin-top: 8px;
    width: fit-content;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid #4a4a4a;
    padding-bottom: 2px;
    transition: border-color .2s ease
}

.verify:hover {
    border-color: var(--accent)
}

.cert-media:focus-visible,
.verify:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px
}

/* Compact certificate cards: small thumbnail on the left, details on the right */
.cert:has(.cert-media) {
    display: grid;
    grid-template-columns: 88px 1fr;
    column-gap: 14px;
    row-gap: 2px;
    align-items: start;
    padding: 14px
}

.cert:has(.cert-media)>:not(.cert-media) {
    grid-column: 2
}

.cert-media {
    grid-row: 1 / span 4;
    width: 88px;
    aspect-ratio: 4 / 3;
    margin: 0;
    border-radius: 8px
}

.cert:has(.cert-media) h3 {
    font-size: 14px
}

.cert:has(.cert-media) div {
    font-size: 12px
}

.verify {
    margin-top: 4px;
    font-size: 12px
}

/* Click-to-view hint and certificate dialog */
button.cert-media {
    position: relative;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: zoom-in;
    -webkit-appearance: none;
    appearance: none
}

.cert-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
    background: rgba(0, 0, 0, .65);
    opacity: 0;
    transition: opacity .2s ease
}

.cert-media:hover .cert-hint,
.cert-media:focus-visible .cert-hint {
    opacity: 1
}

body:has(dialog[open]) {
    overflow: hidden
}

.lightbox {
    width: calc(100% - 32px);
    max-width: 920px;
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 1px solid #333;
    border-radius: 20px;
    background: var(--card);
    color: var(--ink);
    overflow: hidden
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(4px)
}

.lightbox[open] {
    animation: lbIn .25s ease
}

@keyframes lbIn {
    from {
        opacity: 0;
        transform: scale(.97)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.lightbox figure {
    margin: 0
}

.lightbox img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 220px);
    object-fit: contain;
    background: #111
}

.lightbox figcaption {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.lb-title {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 20px;
    font-weight: 500
}

.lb-meta {
    font-size: 13px;
    color: var(--muted)
}

.lb-verify {
    margin-top: 10px;
    width: fit-content;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid #4a4a4a;
    padding-bottom: 2px
}

.lb-verify:hover {
    border-color: var(--accent)
}

.lb-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #3a3a3a;
    background: rgba(0, 0, 0, .7);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease
}

.lb-close:hover {
    background: #1a1a1a;
    border-color: #fff
}

.lb-close:focus-visible,
.lb-verify:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px
}

/* ===== Design refresh ===== */
::selection {
    background: #fff;
    color: #000
}

html {
    scrollbar-color: #333 #000
}

/* Grid that fades out toward the edges, plus a soft glow at the top */
body {
    background-image: none;
    padding-top: 96px
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, #000 0%, transparent 80%);
    mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, #000 0%, transparent 80%)
}

body::after {
    content: "";
    position: fixed;
    top: -180px;
    left: 50%;
    width: 900px;
    height: 420px;
    transform: translateX(-50%);
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(closest-side, rgba(255, 255, 255, .09), transparent)
}

/* Scroll progress */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 30;
    background: #fff;
    transform: scaleX(0);
    transform-origin: 0 50%
}

/* Floating section nav */
.topnav {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 2px;
    padding: 5px;
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    scrollbar-width: none;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(13, 13, 13, .75);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px)
}

.topnav::-webkit-scrollbar {
    display: none
}

.topnav a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease, background .2s ease
}

.topnav a:hover {
    color: #fff
}

.topnav a.active {
    background: #fff;
    color: #000
}

.topnav a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px
}

section[id] {
    scroll-margin-top: 88px
}

/* Hero */
.hero {
    background: linear-gradient(180deg, #131313, #0a0a0a)
}

.avatar {
    box-shadow: 0 0 0 5px #0d0d0d, 0 0 0 6px #2a2a2a
}

.chip {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #2f2f2f;
    background: #111;
    font-size: 12px;
    font-weight: 500;
    color: #d4d4d4
}

.chip i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 2s infinite
}

.intro> :nth-child(5) {
    animation-delay: .6s
}

/* Numbered section headings */
.grid {
    counter-reset: sec
}

.card h2 {
    counter-increment: sec
}

.card h2::before {
    content: "0" counter(sec);
    color: #6b6b6b;
    font-variant-numeric: tabular-nums
}

/* Cursor spotlight on cards */
.card,
.project {
    position: relative
}

.card::before,
.project::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .06), transparent 60%)
}

.card:hover::before,
.project:hover::before {
    opacity: 1
}

/* Skills as chips */
.skill-group ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px
}

.skill-group li {
    padding: 6px 12px;
    border-radius: 999px;
    background: #151515;
    border: 1px solid #2a2a2a;
    font-size: 12px;
    font-weight: 500;
    color: #e5e5e5;
    transition: border-color .2s ease, transform .2s ease
}

.skill-group li::before {
    content: none
}

.skill-group li:hover {
    border-color: #6b6b6b;
    transform: translateY(-2px)
}

@media (max-width: 720px) {
    body {
        padding-top: 84px
    }

    .topnav {
        justify-content: flex-start
    }
}

/* ===== Extra background layers ===== */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none
}

/* Slow drifting light orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: transform
}

.orb.o1 {
    width: 520px;
    height: 520px;
    top: 30%;
    left: -180px;
    background: rgba(255, 255, 255, .07);
    animation: drift1 26s ease-in-out infinite alternate
}

.orb.o2 {
    width: 460px;
    height: 460px;
    bottom: -140px;
    right: -140px;
    background: rgba(255, 255, 255, .06);
    animation: drift2 32s ease-in-out infinite alternate
}

@keyframes drift1 {
    to {
        transform: translate(180px, -140px)
    }
}

@keyframes drift2 {
    to {
        transform: translate(-200px, -160px)
    }
}

/* Dot matrix that fades in toward the bottom, balancing the grid at the top */
.dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1.3px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 100%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 60% at 50% 100%, #000 0%, transparent 75%)
}

/* Fine film grain */
.grain {
    position: absolute;
    inset: 0;
    opacity: .06;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")
}

/* ===== Mobile burger menu ===== */
.nav-links {
    display: flex;
    gap: 2px
}

.burger {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none
}

.burger span {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform .25s ease, opacity .2s ease
}

.burger span:nth-child(1) {
    top: 15px
}

.burger span:nth-child(2) {
    top: 21px
}

.burger span:nth-child(3) {
    top: 27px
}

.topnav.open .burger span:nth-child(1) {
    transform: translateY(6px) rotate(45deg)
}

.topnav.open .burger span:nth-child(2) {
    opacity: 0
}

.topnav.open .burger span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg)
}

.burger:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px
}

@media (max-width: 720px) {
    body {
        padding-top: 80px
    }

    .topnav {
        top: 12px;
        left: auto;
        right: 12px;
        transform: none;
        max-width: none;
        overflow: visible;
        padding: 4px
    }

    .burger {
        display: block
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        min-width: 220px;
        flex-direction: column;
        gap: 2px;
        padding: 8px;
        border-radius: 20px;
        border: 1px solid var(--line);
        background: rgba(13, 13, 13, .96);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px) scale(.98);
        transform-origin: top right;
        transition: opacity .2s ease, transform .2s ease, visibility .2s
    }

    .topnav.open .nav-links {
        opacity: 1;
        visibility: visible;
        transform: none
    }

    .topnav .nav-links a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0 16px;
        font-size: 14px;
        border-radius: 14px
    }
}

/* Footer */
.footer {
    margin-top: 8px;
    padding: 28px 8px 0;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    font-size: 13px;
    color: var(--muted)
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px
}

.footer a {
    color: var(--muted);
    text-decoration: none;
    transition: color .2s ease
}

.footer a:hover {
    color: var(--accent)
}

.footer a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, .5)
    }

    70%,
    100% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0)
    }
}

.hero {
    animation: fadeUp .8s cubic-bezier(.2, .7, .2, 1) both
}

.avatar {
    animation: fadeUp .8s .15s cubic-bezier(.2, .7, .2, 1) both
}

.intro>* {
    animation: fadeUp .7s cubic-bezier(.2, .7, .2, 1) both
}

.intro> :nth-child(1) {
    animation-delay: .2s
}

.intro> :nth-child(2) {
    animation-delay: .3s
}

.intro> :nth-child(3) {
    animation-delay: .4s
}

.intro> :nth-child(4) {
    animation-delay: .5s
}

.status:not(.local)::before {
    animation: pulse 2s infinite
}

.btn,
.pill {
    transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease
}

.btn:hover,
.pill:hover {
    transform: translateY(-2px)
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1), border-color .25s ease
}

.reveal.in {
    opacity: 1;
    transform: none
}

.reveal.in.settled {
    transition: transform .25s ease, border-color .25s ease
}

.card.reveal.in:hover {
    border-color: #3a3a3a
}

.project.reveal.in:hover,
.cert.reveal.in:hover {
    transform: translateY(-4px);
    border-color: #4a4a4a
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important
    }

    .reveal {
        opacity: 1;
        transform: none
    }
}

@media (max-width: 720px) {

    .grid,
    .projects {
        grid-template-columns: 1fr
    }

    .hero,
    .card {
        padding: 24px;
        border-radius: 22px
    }

    .avatar {
        flex-basis: 104px;
        width: 104px;
        height: 104px;
        border-radius: 22px;
        font-size: 38px
    }
}

/* ===== Mobile improvements ===== */
body {
    overflow-x: clip
}

/* grids never force a sideways scroll on very narrow phones */
.certs {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr))
}

.skills {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr))
}

@media (max-width: 720px) {
    body {
        padding: 80px 12px 48px
    }

    .page,
    .grid {
        gap: 16px
    }

    /* header stacks: photo on top, details underneath */
    .hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px
    }

    .intro {
        flex: none;
        width: 100%
    }

    h1 {
        font-size: clamp(26px, 8vw, 34px)
    }

    .meta {
        flex-direction: column;
        gap: 6px;
        overflow-wrap: anywhere
    }

    /* big CV button, links in two tidy columns */
    .actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px
    }

    .actions .btn {
        grid-column: 1 / -1
    }

    .actions .pill {
        justify-content: center;
        padding: 0 10px
    }

    .card {
        padding: 20px;
        gap: 16px;
        border-radius: 20px
    }

    h2 {
        font-size: 12px;
        letter-spacing: .12em
    }

    .about {
        font-size: 14px;
        line-height: 1.7
    }

    .project {
        padding: 18px
    }

    .cert:has(.cert-media) {
        padding: 12px;
        grid-template-columns: 80px 1fr
    }

    .cert-media {
        width: 80px
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 20px
    }

    .footer-links {
        gap: 8px 18px
    }

    /* certificate dialog fits the phone screen */
    .lightbox {
        width: calc(100% - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 16px
    }

    .lightbox img {
        max-height: calc(100dvh - 190px)
    }

    .lightbox figcaption {
        padding: 16px
    }

    .lb-title {
        font-size: 17px
    }

    .lb-close {
        width: 44px;
        height: 44px;
        top: 8px;
        right: 8px
    }

    /* lighter background effects for phones */
    .orb {
        filter: blur(60px)
    }

    .orb.o1 {
        width: 320px;
        height: 320px
    }

    .orb.o2 {
        width: 300px;
        height: 300px
    }

    .progress {
        height: 3px
    }
}

@media (max-width: 380px) {
    .actions {
        grid-template-columns: 1fr
    }

    .topnav .nav-links {
        min-width: 200px
    }
}

/* touch screens: no hover, so show the cues and skip hover-only effects */
@media (hover: none) {

    .btn:hover,
    .pill:hover {
        transform: none
    }

    .project.reveal.in:hover,
    .cert.reveal.in:hover {
        transform: none
    }

    .card::before,
    .project::before {
        display: none
    }

    .cert-media:hover img {
        transform: none
    }

    .cert-hint {
        opacity: 1;
        align-items: flex-end;
        padding: 0 2px 4px;
        font-size: 10px;
        background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent 55%)
    }
}