html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; }

/* Layout: the photo is fixed full-height on the left as the page background; the CV scrolls in the empty grey space to its right. On phones the photo becomes a cropped header. Single light theme, matched to the photo's grey studio backdrop. */
:root {
  color-scheme: light;
  --bg: #d9dadc;
  --surface: rgba(255, 255, 255, .72);
  --ink: #121822;
  --muted: #444d5b;
  --line: rgba(18, 24, 34, .14);
  --brand: #00bfff; /* T.A.G. logo cyan */
  --accent: #0079a8; /* same hue, darkened so small text stays readable on grey */
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  padding: 0 clamp(16px, 4vw, 56px);
}
.photo {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 0;
  width: 75vh; /* the photo is 3:4, so this fits its full height */
  background: url("foto.jpg") left bottom / auto 100% no-repeat;
  -webkit-mask-image: linear-gradient(to right, #000 70%, transparent);
          mask-image: linear-gradient(to right, #000 70%, transparent);
  pointer-events: none;
}
.page {
  position: relative; z-index: 1;
  margin-left: max(29vh, 280px); max-width: 780px;
  padding-block: clamp(40px, 8vh, 96px);
  display: grid; gap: 64px;
}
header { display: grid; gap: 18px; }
.mono { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
h1 {
  font: 800 clamp(3rem, 7vw, 5.6rem)/.9 var(--display); letter-spacing: -.04em; margin: 0;
  text-wrap: balance;
}
h1 span { color: var(--brand); }
.role { font: 500 1.25rem/1.4 var(--body); margin: 0; max-width: 40ch; text-wrap: balance; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
nav a { color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
nav a:hover { color: var(--accent); border-color: var(--brand); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h2 { font: 700 1.6rem/1.2 var(--display); letter-spacing: -.02em; margin: 0 0 20px; }
section p { margin: 0 0 14px; max-width: 62ch; }
.lead { font-size: 1.3rem; line-height: 1.45; font-weight: 500; }
.company { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; max-width: 62ch; margin-top: 8px; padding: 16px; color: inherit; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s; }
.company:hover { border-color: var(--brand); }
.company img { width: 200px; height: auto; border-radius: 4px; }
.company span { flex: 1 1 220px; min-width: 0; }
.company-logo { display: grid; gap: 8px; justify-items: start; }
.company-logo em { justify-self: end; }
.company em { font-style: normal; font-weight: 600; font-size: .95rem; color: var(--accent); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 24px; }
.figures div { border-top: 2px solid var(--brand); padding-top: 10px; }
.figures strong { display: block; font: 800 2rem/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.figures span { color: var(--muted); font-size: .92rem; }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px;
  display: grid; gap: 8px; align-content: start;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card h3 { font: 700 1.15rem/1.25 var(--display); margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }
.timeline { display: grid; border-top: 1px solid var(--brand); }
.item { display: grid; grid-template-columns: 9rem 1fr; gap: 20px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.item > div { min-width: 0; }
.item .when { font-family: var(--mono); font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 3px; }
.item h3 { font: 600 1.1rem/1.3 var(--body); margin: 0 0 2px; }
.item .where { color: var(--accent); font-weight: 500; margin-bottom: 6px; }
.item p { margin: 0; color: var(--muted); }
.firms { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: .95rem; }
.firms li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.firms b { font-weight: 600; color: var(--accent); }
.firms span { margin-left: auto; font-family: var(--mono); font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; }
.certs li { padding-block: 12px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.certs b { font-weight: 600; }
.certs span { color: var(--muted); font-size: .93rem; }
h3.sub { font: 600 .8rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 28px 0 8px; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.skills li { border: 1px solid var(--line); background: var(--surface); padding: 6px 14px; border-radius: 999px; font-size: .95rem; }
.contact { display: grid; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row .val { font-family: var(--mono); font-size: .95rem; user-select: all; overflow-wrap: anywhere; }
.row a.val { color: var(--accent); }
button {
  font: 500 .85rem var(--body); color: var(--accent); background: transparent;
  border: 1px solid var(--accent); border-radius: 6px; padding: 4px 12px; cursor: pointer;
}
button:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }
footer { color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); padding-top: 20px; }

/* Desktop opening screen: the name sits at face height and the figures line up with the feet,
   so text and photo read as one composition (the face is ~30% down the photo, which fills the window height) */
@media (min-width: 821px) {
  .page { padding-top: 0; }
  header {
    min-height: 100vh; min-height: 100svh;
    padding-block: max(27vh, 150px) 5vh;
    display: flex; flex-direction: column; gap: 18px;
  }
  header .figures { margin-top: auto; padding-top: 32px; }
}
@keyframes photo-in { from { opacity: .4; transform: translateX(-18px); } }
@keyframes text-in { from { opacity: .3; transform: translateY(12px); } }
.photo { animation: photo-in .9s ease-out both; }
header > * { animation: text-in .7s ease-out both; }
header > :nth-child(2) { animation-delay: .08s; }
header > :nth-child(3) { animation-delay: .14s; }
header > :nth-child(4) { animation-delay: .2s; }
header > :nth-child(5) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .photo, header > * { animation: none; } }

/* Phones and narrow windows: photo becomes a cropped header above the name */
@media (max-width: 820px) {
  .photo {
    position: relative; inset: auto; width: auto; z-index: 0;
    margin: 0 calc(-1 * clamp(16px, 4vw, 56px));
    aspect-ratio: 4 / 5; max-width: none;
    background-size: 140% auto; background-position: 2% 100%;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  }
  .page { margin-left: 0; padding-block: 8px 48px; }
  .item { grid-template-columns: 1fr; gap: 4px; }
}
