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

:root { --bg: #fcfcfc; --fg: #171717; --muted: #6b6b6b; --line: #d4d4d4; color-scheme: light; }
:root.dark { --bg: #1b1b1b; --fg: #ededed; --muted: #a0a0a0; --line: #3a3a3a; color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.75 Inter, -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: 0 24px;
}

main { max-width: 880px; margin: 0 auto; padding: 100px 0 64px; }
header { max-width: 640px; }
h1, h2 { font-size: 15px; font-weight: 500; }
h2 { color: var(--muted); font-weight: 400; font-size: 14px; }
h2.strong { color: var(--fg); font-weight: 500; font-size: 15px; }
p { margin-top: 26px; }
em { font-family: Newsreader, Georgia, serif; font-size: 1.12em; }
a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--fg); }
.muted { color: var(--muted); }

.columns { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) max-content; gap: 48px; margin-top: 72px; align-items: start; }
.item { margin-top: 26px; }
/* Expanding lists (roles and grouped certificates): slide open, then rows fade in one by one */
.drop-toggle { display: block; border: 0; border-radius: 0; padding: 0; text-align: left; color: var(--fg); line-height: inherit; }
.drop-toggle:hover { color: var(--fg); }
.drop-toggle .muted { display: block; }
.drop-toggle .name { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.drop-toggle:hover .name { text-decoration-color: var(--fg); }
.drop-toggle .name::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 9px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.drop.open .name::after { transform: translateY(1px) rotate(225deg); }
.drop-body { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 0.6s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.6s; }
.drop-body > div { overflow: hidden; min-height: 0; }
.drop.open .drop-body { grid-template-rows: 1fr; visibility: visible; }
.drop-row { opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.25s; }
.drop.open .drop-row { opacity: 1; transform: none; transition: opacity 0.45s, transform 0.45s; transition-delay: calc(var(--i) * 55ms + 80ms); }
.cert-list .item { margin-top: 0; padding: 12px 0 0 14px; border-left: 1px solid var(--line); }
.bullets { color: var(--muted); padding: 8px 0 0 16px; font-size: 13.5px; line-height: 1.65; }
.bullets li { margin-bottom: 8px; }

.block { margin-top: 80px; }
.certs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; row-gap: 20px; }

footer { display: flex; justify-content: space-between; align-items: center; margin-top: 96px; border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); font-size: 13px; }
button { background: none; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font: inherit; padding: 2px 12px; cursor: pointer; }
button:hover { color: var(--fg); }

@media (max-width: 760px) {
  main { padding-top: 56px; }
  .columns, .certs { grid-template-columns: 1fr; }
  .columns { gap: 48px; margin-top: 56px; }
  .block { margin-top: 56px; }
}

/* Name on the left, Connect on the right, both inside the content width */
.top { display: flex; justify-content: space-between; align-items: center; height: 26px; }
.connect { position: relative; z-index: 10; }
.connect > button { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.75; color: var(--fg); padding: 2px 14px; }
.connect > button::after { content: ""; width: 5px; height: 5px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-1px) rotate(45deg); transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.connect > button[aria-expanded="true"]::after { transform: translateY(1px) rotate(225deg); }

/* Dropdown: expands downward, right edge lined up with the button.
   Two rows of equal height: the logos, then the email with its copy button. */
.connect-box {
  position: absolute; top: calc(100% + 8px); right: 0; width: max-content;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
  clip-path: inset(0 0 100% 0 round 12px); opacity: 0; visibility: hidden;
  transition: clip-path 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s, visibility 0.6s;
}
.connect-box.open { clip-path: inset(0 0 0 0 round 12px); opacity: 1; visibility: visible; }
.logos, .email { display: flex; justify-content: center; align-items: center; height: 44px; padding: 0 14px; }
.logos { gap: 28px; border-bottom: 1px solid var(--line); }
.logos a { display: flex; padding: 4px; color: var(--muted); }
.logos a:hover { color: var(--fg); }
.email { gap: 10px; font-size: 13px; }
.email a { position: relative; text-decoration: none; }
.email button { display: flex; border: 0; padding: 4px; }
.email.copied a { color: transparent; }
.email.copied a::after { content: "Copied"; position: absolute; inset: 0; text-align: center; color: var(--fg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.connect-box > * { opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.25s; }
.connect-box.open > * { opacity: 1; transform: none; transition: opacity 0.45s, transform 0.45s; transition-delay: 80ms; }
.connect-box.open > .email { transition-delay: 135ms; }

@media (prefers-reduced-motion: reduce) {
  .drop-body, .drop-row, .drop.open .drop-row, .drop-toggle .name::after,
  .connect > button::after, .connect-box, .connect-box > *, .connect-box.open > * { transition: none; }
}
