/* Home page. Follows the system theme; a saved choice sets html[data-theme]. */
:root {
    color-scheme: light;
    --bg: #fafaf9;
    --bg-alt: #f3f1ee;
    --surface: #ffffff;
    --text: #1c1917;
    --muted: #625d58;
    --line: #e7e3de;
    --accent: #bd5d38;
    --accent-strong: #a24d2c;
    --accent-soft: #f7e9e2;
    --on-accent: #ffffff;
    --shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 8px 24px rgba(28, 25, 23, .06);
    --radius: 18px;
    --header-h: 68px;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #101010;
    --bg-alt: #151515;
    --surface: #1a1a1a;
    --text: #ececec;
    --muted: #a3a3a3;
    --line: #2c2c2c;
    --accent: #e27b52;
    --accent-strong: #ef9370;
    --accent-soft: #2b1d17;
    --on-accent: #120a06;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #101010;
        --bg-alt: #151515;
        --surface: #1a1a1a;
        --text: #ececec;
        --muted: #a3a3a3;
        --line: #2c2c2c;
        --accent: #e27b52;
        --accent-strong: #ef9370;
        --accent-soft: #2b1d17;
        --on-accent: #120a06;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.65 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.container { width: min(1120px, 100% - 2 * clamp(20px, 5vw, 40px)); margin-inline: auto; }
.muted { color: var(--muted); }
.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 50; padding: 10px 16px; background: var(--surface); color: var(--text); }

/* ---- Header ---------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--header-h);
    width: min(1180px, 100% - 2 * clamp(16px, 4vw, 32px));
    margin-inline: auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--text); background: var(--bg-alt); }
.header-tools { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-switch button {
    font: inherit;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 999px;
    padding: 4px 9px;
    cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.icon-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.icon-btn:hover { background: var(--bg-alt); }
.menu-btn { display: none; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { color: var(--text); border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.icon-link {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
}
.icon-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---- Hero --------------------------------------------------------------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 4.6rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; }
.hero h1 .accent { color: var(--accent); }
.focus-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0; }
.focus-tags li {
    font-size: .82rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    text-transform: capitalize;
}
.lead { color: var(--muted); font-size: 1.08rem; max-width: 60ch; white-space: pre-line; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; align-items: center; }
.hero-photo { position: relative; justify-self: center; width: min(400px, 100%); }
.hero-photo::before {
    content: '';
    position: absolute;
    inset: 18px -18px -18px 18px;
    border-radius: 28px;
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.hero-photo img { position: relative; border-radius: 28px; aspect-ratio: 640 / 668; object-fit: cover; box-shadow: var(--shadow); }

/* ---- Key numbers -------------------------------------------------------- */
.stats { border-block: 1px solid var(--line); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 22px; display: grid; gap: 4px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.03em; color: var(--accent); }
.stat span { color: var(--muted); font-size: .88rem; line-height: 1.45; }

/* ---- Sections ------------------------------------------------------------ */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; margin-bottom: 14px; }
.section-intro { color: var(--muted); max-width: 60ch; margin-bottom: 32px; }
.section-title + .expertise-grid, .section-title + .timeline { margin-top: 28px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.15rem;
    margin-bottom: 18px;
}
.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.expertise { padding: 26px; }
.expertise h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.expertise p { color: var(--muted); font-size: .93rem; }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.project { grid-column: span 2; display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.project:nth-child(1), .project:nth-child(2) { grid-column: span 3; }
.project:hover { transform: translateY(-3px); border-color: var(--accent); }
.project-media { aspect-ratio: 16 / 9; background: var(--bg-alt); border-bottom: 1px solid var(--line); overflow: hidden; }
.project-media.has-image { background: #fff; }
.project-media.has-image img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.project-media.is-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project:hover .project-media.is-photo img { transform: scale(1.03); }
.project-media.is-icon {
    display: grid;
    place-items: center;
    font-size: 2.6rem;
    color: var(--accent);
    background:
        radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
        linear-gradient(135deg, var(--accent-soft), var(--bg-alt));
}
.project-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-meta { font-size: .78rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.project h3 { font-size: 1.15rem; font-weight: 600; }
.project-body > p:not(.project-meta) { color: var(--muted); font-size: .93rem; flex: 1; }
.project-link { margin-top: 6px; color: var(--accent); font-weight: 600; font-size: .9rem; }
.project:hover .project-link i { transform: translateX(3px); }
.project-link i { transition: transform .2s ease; }

/* Experience timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline-item {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 28px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-date { color: var(--accent); font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; padding-top: 3px; }
.timeline-item h3 { font-size: 1.15rem; font-weight: 600; }
.timeline-company { color: var(--muted); margin: 2px 0 12px; font-size: .95rem; }
.timeline-desc { color: var(--text); font-size: .95rem; }
.timeline-desc ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.timeline-desc li::marker { color: var(--accent); }
.timeline-desc p + p { margin-top: 8px; }

/* Education and skills */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); }
.edu { padding: 22px 24px; margin-top: 16px; display: grid; gap: 4px; }
.edu h3 { font-size: 1.05rem; font-weight: 600; }
.edu p:empty { display: none; }
.skill-group { margin-top: 20px; }
.skill-group h3 { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; }

/* Photography teaser */
.photo-teaser { padding: clamp(40px, 6vw, 64px) 0; }
.teaser-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 28px 32px;
    border-radius: var(--radius);
    background: #101010;
    color: #ececec;
}
.teaser-inner p { font-size: 1.1rem; max-width: 52ch; }
.teaser-inner .btn-ghost { background: transparent; color: #ececec; border-color: #3a3a3a; }
.teaser-inner .btn-ghost:hover { border-color: #ececec; }
:root[data-theme="dark"] .teaser-inner { background: var(--surface); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .teaser-inner { background: var(--surface); border: 1px solid var(--line); } }

/* Contact */
.contact { padding-top: 16px; }
.contact-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    padding: 26px 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.contact-inner p { font-size: 1.15rem; font-weight: 500; }

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 34px; color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner nav { display: flex; gap: 18px; }
.credits { flex-basis: 100%; order: 3; font-size: .75rem; opacity: .8; }
.credits a { text-decoration: underline; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 960px) {
    .expertise-grid { grid-template-columns: repeat(2, 1fr); }
    .project-grid { grid-template-columns: repeat(2, 1fr); }
    .project, .project:nth-child(1), .project:nth-child(2) { grid-column: span 1; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(3) { border-left: 0; }
    .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
    .menu-btn { display: grid; }
    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 2px;
        padding: 10px clamp(16px, 4vw, 32px) 16px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 12px; font-size: 1rem; }
    .header-tools { margin-left: auto; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-photo { order: -1; width: min(220px, 60%); justify-self: start; }
    .hero-photo::before { inset: 10px -10px -10px 10px; border-radius: 22px; }
    .hero-photo img { border-radius: 22px; }
    .two-col { grid-template-columns: 1fr; }
    .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
    .brand span { display: none; }
    .expertise-grid, .project-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat { padding: 20px 14px; }
    .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
    .teaser-inner { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
