/* vCard ttduy: one-page business-card theme with light and dark mode. Typeface: Century Gothic (supplied font files). */

@font-face{
  font-family:"Century Gothic";
  src:url("../fonts/century-gothic.woff") format("woff"),url("../fonts/century-gothic.ttf") format("truetype");
  font-weight:400;font-style:normal;font-display:swap;
}

/* colour modes: light is the default, dark follows the system unless the visitor picked one with the toggle */
:root{
  --bg:#e9edec;--wash:rgba(233,237,236,.1);--card:#fff;--glass:rgba(255,255,255,.8);--shadow:0 8px 22px rgba(20,38,43,.22);--ink:#16252b;--muted:#4b5f66;--line:#d5dedd;
  --btn:#16252b;--btn-ink:#fff;--track:#dde6e5;--focus:#16252b;--bar-tint:0%;
  --c-skills:#24509f;--c-projects:#b8501a;--c-certs:#69701a;--c-edu:#1b3a73;
  --font:"Century Gothic",CenturyGothic,"Apple Gothic","URW Gothic","Avant Garde",Futura,"Trebuchet MS",sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0d1417;--wash:rgba(8,14,17,.93);--card:#16222a;--glass:rgba(22,34,42,.86);--shadow:0 8px 22px rgba(0,0,0,.5);--ink:#e8eeec;--muted:#a3b5b7;--line:#2a3d44;
    --btn:#e8eeec;--btn-ink:#0d1417;--track:#26373e;--focus:#e8eeec;--bar-tint:45%;color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0d1417;--wash:rgba(8,14,17,.93);--card:#16222a;--glass:rgba(22,34,42,.86);--shadow:0 8px 22px rgba(0,0,0,.5);--ink:#e8eeec;--muted:#a3b5b7;--line:#2a3d44;
  --btn:#e8eeec;--btn-ink:#0d1417;--track:#26373e;--focus:#e8eeec;--bar-tint:45%;color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font:400 1rem/1.65 var(--font)}
/* the ttd 3D render stays put while the page scrolls */
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(var(--wash),var(--wash)),url("../img/background.jpg") center/cover no-repeat}
h1,h2,h3,p,ul{margin:0}
a{color:inherit}
img{max-width:100%;height:auto}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted{color:var(--muted)}
.skip{position:absolute;left:1rem;top:-4rem;background:var(--card);color:var(--ink);padding:.7rem 1rem;border-radius:4px;z-index:60}
.skip:focus{top:1rem}

/* frame: left side menu + content column */
.site{width:100%;max-width:83rem;margin:0 auto;min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:16.5rem minmax(0,1fr)}
.col{min-width:0;display:flex;flex-direction:column}
main{flex:1}

/* floating menu: no panel, just buttons hovering over the page */
.side{position:sticky;top:0;align-self:start;z-index:40;max-height:100vh;max-height:100dvh;overflow-y:auto;scrollbar-width:none;
  display:flex;flex-direction:column;gap:1rem;padding:1.25rem 1.5rem 2.5rem max(1.25rem,env(safe-area-inset-left))}
.side::-webkit-scrollbar{display:none}
.brandmark{display:grid;place-items:center;line-height:0;align-self:flex-start;border-radius:50%;background:#fff;width:8.5rem;height:8.5rem;box-shadow:var(--shadow)}
.brandmark img{display:block;width:6.4rem;height:6.4rem;object-fit:contain}
/* white circle in both modes, so the coloured logo is always used */
.logo-dark{display:none!important}

.sections{display:flex;flex-direction:column;gap:.6rem}
.navbtn{display:flex;align-items:center;gap:.8rem;min-height:3rem;padding:.55rem .9rem;border-radius:6px;background:var(--card);color:var(--ink);border:1px solid var(--line);
  text-decoration:none;font-weight:700;font-size:.95rem;line-height:1.25;box-shadow:var(--shadow);transition:transform .15s ease,background-color .15s ease}
.navbtn:hover{transform:translateX(3px);background:var(--track)}
.navbtn[aria-current="true"],.navbtn[aria-current="true"]:hover{background:var(--ink);color:var(--card);border-color:var(--ink)}
.navbtn svg{flex:none;width:1.4rem;height:1.4rem;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.lbl-short{display:none}

.tools{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.4rem;border-radius:8px;background:var(--card);box-shadow:var(--shadow)}
/* language switch: a pill with a sliding-style selected segment; theme switch: a track with a thumb. Both look unlike the section buttons. */
.lang ul{display:flex;gap:.15rem;list-style:none;padding:.2rem;margin:0;border-radius:999px;background:var(--track)}
.lang a{display:grid;place-items:center;min-width:2.6rem;min-height:2.35rem;padding:0 .7rem;border-radius:999px;text-decoration:none;font-size:.82rem;letter-spacing:.08em;color:var(--muted)}
.lang a:hover{color:var(--ink)}
.lang a[aria-current]{background:var(--ink);color:var(--card);font-weight:700}
.theme-toggle{position:relative;flex:none;width:4.6rem;height:2.75rem;padding:0;border:0;border-radius:999px;background:var(--track);color:var(--muted);cursor:pointer}
.theme-toggle::after{content:"";position:absolute;top:.3rem;left:.3rem;width:2.15rem;height:2.15rem;border-radius:50%;background:var(--ink);box-shadow:0 1px 4px rgba(0,0,0,.35);transition:transform .22s ease}
.theme-toggle svg{position:absolute;top:50%;width:1.2rem;height:1.2rem;margin-top:-.6rem;z-index:1;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .i-sun{left:.77rem;color:var(--card)}
.theme-toggle .i-moon{right:.77rem;color:var(--muted)}
:root[data-theme="dark"] .theme-toggle::after{transform:translateX(1.85rem)}
:root[data-theme="dark"] .theme-toggle .i-sun{color:var(--muted)}
:root[data-theme="dark"] .theme-toggle .i-moon{color:var(--card)}
@media (prefers-color-scheme:dark){
  :root:not([data-theme]) .theme-toggle::after{transform:translateX(1.85rem)}
  :root:not([data-theme]) .theme-toggle .i-sun{color:var(--muted)}
  :root:not([data-theme]) .theme-toggle .i-moon{color:var(--card)}
}
.theme-toggle:focus-visible{outline-offset:2px}

/* hero */
.hero{display:flex;justify-content:center;padding:2rem 2rem 1.5rem;scroll-margin-top:1rem}
.profile{width:min(100%,1000px);background:var(--glass);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:6px;padding:2.5rem 2.5rem;
  display:grid;grid-template-columns:auto minmax(0,1fr);gap:1.5rem 3rem;align-items:center}
.portrait{width:11rem;height:11rem;border-radius:50%;padding:6px;
  background:conic-gradient(var(--c-skills) 0 33.3%,var(--c-projects) 0 66.6%,var(--c-certs) 0)}
.portrait img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;border:5px solid var(--card)}
.name{font-size:clamp(1.9rem,4vw,2.6rem);font-weight:400;line-height:1.1;letter-spacing:-.01em;color:color-mix(in srgb,var(--c-skills),#fff var(--bar-tint))}
.sc{font-variant:small-caps;letter-spacing:.02em}
.subtitle{margin-top:.6rem;font-weight:700}
.about{margin-top:1rem;color:var(--muted);max-width:44ch}
.facts{list-style:none;padding:0;margin-top:1.4rem;max-width:30rem;font-size:.95rem}
.facts li{display:grid;grid-template-columns:5.5rem 1fr;gap:.5rem;padding:.6rem 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.facts li:last-child{border-bottom:1px solid var(--line)}
.facts span{color:var(--muted)}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1.75rem;margin-top:1.25rem}
.social{display:flex;flex-wrap:wrap;gap:.25rem 1.25rem;font-size:.95rem}
.social a{padding:.4rem 0}
.btn{display:inline-block;padding:.85rem 1.5rem;min-height:2.75rem;border:0;border-radius:4px;background:var(--btn);color:var(--btn-ink);font:inherit;font-weight:700;text-decoration:none;cursor:pointer}
.btn:hover{opacity:.88}

/* one-pager sections */
.print-head{display:none}
.block{padding:0 2rem 1.5rem;scroll-margin-top:1rem}
.block-inner{width:min(100%,1000px);margin:0 auto;background:var(--glass);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-top:.5rem solid var(--tile);border-radius:6px;padding:2rem 2.25rem 2.5rem}
.block{--acc:color-mix(in srgb,var(--tile),#fff var(--bar-tint))}
.block h2{font-size:clamp(1.4rem,3.2vw,1.9rem);font-weight:700;line-height:1.2;margin-bottom:1.75rem;color:var(--acc)}
.proj h3,.item h3{color:var(--acc)}

.skills{list-style:none;padding:0;display:grid;gap:1.4rem;max-width:46rem}
.skill-row{display:flex;justify-content:space-between;gap:1rem;margin-bottom:.45rem}
.skill-row .muted{white-space:nowrap}
.bar{height:.7rem;background:var(--track);border-radius:3px;overflow:hidden}
.bar i{display:block;height:100%;width:var(--v);background:color-mix(in srgb,var(--tile),#fff var(--bar-tint));transform-origin:left;animation:grow .9s cubic-bezier(.2,.7,.2,1) both;animation-timeline:view();animation-range:entry 0% entry 90%}
@keyframes grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@supports not (animation-timeline:view()){.bar i{animation:none}}

.proj{display:grid;grid-template-columns:7.5rem minmax(0,1fr);gap:0 1.75rem;padding:1.6rem 0;border-top:1px solid var(--line)}
.proj:first-of-type{border-top:0;padding-top:0}
.proj-logo img{display:block;width:100%;max-width:6.5rem;padding:.35rem;background:#fff;border:1px solid var(--line);border-radius:6px}
.proj h3{font-size:1.1rem;font-weight:700;line-height:1.3}
.loc{font-size:.9rem}
.role{margin-top:.7rem;font-weight:700}
.period{font-size:.9rem;color:var(--muted)}
.proj ul{margin-top:.75rem;padding-left:1.1rem;font-size:.92rem;max-width:68ch}
.proj li{margin-top:.3rem;text-wrap:pretty}

.item{display:flex;justify-content:space-between;align-items:flex-start;gap:1.5rem;padding:1.4rem 0;border-top:1px solid var(--line)}
.item:first-of-type{border-top:0;padding-top:0}
.item h3{font-size:1.1rem;font-weight:700;line-height:1.3}
.item p{margin-top:.35rem;max-width:62ch}
.item-img img{display:block;width:6.5rem;padding:.35rem;background:#fff;border:1px solid var(--line);border-radius:6px}

.foot{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem 1.5rem;padding:1rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom));font-size:.875rem;color:var(--muted)}
.foot .legal{display:flex;flex-wrap:wrap;gap:.25rem 1.25rem;list-style:none;padding:0;margin:0}
.foot a{text-decoration:none;display:inline-block;padding:.35rem 0}
.foot a:hover{text-decoration:underline}
.foot nav{display:block}

/* simple pages (imprint, privacy, 404) */
.stage{display:flex;align-items:flex-start;justify-content:center;padding:2rem 1.25rem}
.doc{width:min(100%,760px);background:var(--glass);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:6px;padding:2rem 2rem 2.25rem}
.entry h1{font-size:1.7rem;font-weight:700;line-height:1.2;margin-bottom:1.25rem}
.entry-content>*+*{margin-top:1rem}
.entry-content h2,.entry-content h3{font-weight:700;line-height:1.3;margin-top:1.75rem}
.entry-content ul,.entry-content ol{padding-left:1.25rem}
.doc .btn{margin-top:1.75rem}

@media (max-width:820px){
  .site{max-width:none;grid-template-columns:minmax(0,1fr)}
  .side{max-height:none;overflow:visible;flex-direction:row;align-items:center;gap:.75rem;padding:.6rem 1rem;padding-top:max(.6rem,env(safe-area-inset-top))}
  .side{background:var(--card);box-shadow:var(--shadow)}
  .brandmark{width:3.5rem;height:3.5rem;box-shadow:none}
  .brandmark img{width:2.7rem;height:2.7rem}
  .tools{margin-left:auto;padding:0;background:none;box-shadow:none}
  /* section buttons move to a bar at the bottom of the screen */
  .sections{position:fixed;left:.75rem;right:.75rem;bottom:calc(.75rem + env(safe-area-inset-bottom));z-index:45;flex-direction:row;gap:.35rem;
    padding:.4rem;border-radius:10px;background:var(--card);box-shadow:var(--shadow)}
  .navbtn{box-shadow:none;border-color:transparent;background:transparent;flex:1 1 0;min-width:0;flex-direction:column;justify-content:center;gap:.2rem;min-height:3.4rem;padding:.35rem .2rem;font-size:.68rem;text-align:center}
  .navbtn:hover{transform:none}
  .navbtn[aria-current="true"]{border-color:var(--ink)}
  .navbtn--home{display:none}
  .lbl-long{display:none}
  .lbl-short{display:inline}
  .col{padding-bottom:6rem}
  .hero{padding:1.25rem 1.25rem 1rem}
  .profile{grid-template-columns:minmax(0,1fr);justify-items:center;text-align:center;padding:1.75rem 1.25rem}
  .about{margin-left:auto;margin-right:auto}
  .facts{text-align:left;width:100%}
  .actions{justify-content:center}
  .block{padding:0 1.25rem 1.25rem;scroll-margin-top:4.5rem}
  .hero{scroll-margin-top:4.5rem}
}
@media (max-width:520px){
  .proj{grid-template-columns:1fr;gap:.9rem 0}
  .proj-logo img{max-width:5.5rem}
  .item{flex-direction:column;gap:.9rem}
  .item-img{order:-1}
  .block-inner{padding:1.5rem 1.15rem 1.9rem}
  .facts li{grid-template-columns:4.5rem 1fr}
  .portrait{width:9.5rem;height:9.5rem}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .navbtn,.theme-toggle::after{transition:none}.navbtn:hover{transform:none}
  .bar i{animation:none}
}

/* print: the whole resume on paper */
@media print{
  body{background:#fff;color:#000}
  :root,:root[data-theme="dark"],:root[data-theme="light"]{--card:#fff;--ink:#000;--muted:#333;--line:#bbb;--track:#ddd;--bar-tint:0%;--wash:#fff;color-scheme:light}
  body::before{display:none}
  .side,.hero,.foot,.skip,.btn{display:none!important}
  .site{display:block}
  .col{padding:0}
  .print-head{display:block;margin-bottom:1.25rem;padding-bottom:.75rem;border-bottom:1px solid #999}
  .print-name{font-size:1.6rem}
  .print-head p{margin:0}
  .block{padding:0 0 1rem}
  .block-inner{width:100%;border-radius:0;padding:1rem 0 0}
  .proj,.item{break-inside:avoid}
  .bar i{animation:none;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
