/* Intro, work & play, experience, tools, contact, footer */

/* ---------- hero ---------- */
h1 {
  font-family: var(--head); font-size: 40px; font-weight: 400; line-height: 1.2;
  letter-spacing: -0.02em; margin-top: -12px;
}
.greet {
  position: relative; display: inline-block; vertical-align: top;
  height: 1.3em; margin-bottom: -.1em; overflow: hidden;
  font-family: "Geist Pixel", "Geist", "Helvetica Neue", Arial, "Hiragino Sans", "Noto Sans JP", "Apple SD Gothic Neo", "Noto Sans KR", "PingFang SC", "Noto Sans SC", "Noto Sans Devanagari", sans-serif;
  transition: width .55s cubic-bezier(.2, .8, .2, 1);
}
.greet .w {
  position: absolute; left: 0; top: .05em; white-space: nowrap; line-height: 1.2;
  opacity: 0; transform: translateY(100%);
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .35s;
}
.greet .w { font-weight: 400; color: var(--c, var(--hi-1)); }
.greet .w.on { opacity: 1; transform: none; }
.greet .w.out { opacity: 0; transform: translateY(-100%); }

.lede { color: var(--muted); margin-top: 44px; }
.lede + .lede { margin-top: 22px; }
/* "Say hello!" email link, waves on hover */
.hello {
  display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap;
  color: var(--ink); text-decoration: none;
}
.hello:hover { text-decoration: underline; text-underline-offset: 4px; }
.hello { position: relative; }
.wave {
  position: absolute; left: calc(100% + 8px); top: 50%;
  font-size: 20px; line-height: 1; pointer-events: none;
  opacity: 0; transform: translateY(-50%) scale(.4); transform-origin: 70% 80%;
  transition: opacity .2s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.hello:hover .wave, .hello:focus-visible .wave {
  opacity: 1; transform: translateY(-50%) scale(1);
  animation: wave 1.2s ease-in-out .15s infinite;
}
@keyframes wave {
  0%, 60%, 100% { transform: translateY(-50%) rotate(0); }
  10%, 30% { transform: translateY(-50%) rotate(16deg); }
  20%, 40% { transform: translateY(-50%) rotate(-10deg); }
}
.dark { color: var(--ink); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.sec-head h2 { margin-bottom: 0; }
.cv { font-size: 14px; color: var(--faint); text-decoration: none; transition: color .2s; }
.cv:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- sections ---------- */
section {
  margin-top: 68px; padding-top: 64px;
}

#work { --sec: var(--hi-1); } #experience { --sec: var(--hi-2); }
#tools { --sec: var(--hi-5); } #contact { --sec: var(--hi-3); }

.wrap { position: relative; --gap: 32px; }
section { margin-left: calc(-1 * var(--gap)); margin-right: calc(-1 * var(--gap)); padding-left: var(--gap); padding-right: var(--gap); }
/* each section heading takes its section colour (set on #experience, #tools, #contact…) */
section h2 { color: var(--sec); }
h2 { font-family: var(--head); font-size: 23px; font-weight: 400; letter-spacing: -0.01em; margin-bottom: 14px; }
section p { color: var(--muted); }
section p + p { margin-top: 18px; }

/* upcoming case studies, greyed out; "Soon" turns into "WIP 👀" on hover */
.soon { list-style: none; margin-top: 24px; }
.soon li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 18px 0; border-top: 1px solid var(--line);
  color: var(--ghost); cursor: default; transition: color .2s;
}
.soon li:last-child { border-bottom: 1px solid var(--line); }
.soon li:hover { color: var(--faint); }
.tag { display: inline-grid; font-size: 14px; }
.tag > span { grid-area: 1 / 1; justify-self: end; transition: opacity .2s, transform .25s; }
.tag .b { opacity: 0; transform: translateY(8px); color: var(--muted); }
.soon li:hover .tag .a { opacity: 0; transform: translateY(-8px); }
.soon li:hover .tag .b { opacity: 1; transform: none; }

/* intro: hover pop-up on Lokal (logo) */
.pop {
  position: relative; color: var(--ink); cursor: default; outline: none;
  text-decoration: underline dotted var(--faint); text-underline-offset: 4px;
  white-space: nowrap; /* keeps the pop-up anchored to one line */
}
.pin {
  position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 6;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  height: 36px; padding: 0 12px 0 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 6px 20px var(--shadow);
  color: var(--ink); font-size: 14px; text-decoration: none;
  opacity: 0; visibility: hidden; transform: translate(-50%, -14px);
  transition: opacity .2s, transform .45s cubic-bezier(.3, 1.7, .5, 1), visibility 0s .45s;
}
.pin::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
/* one pop-up open at a time (js/popovers.js adds .open); plain hover if JS is off */
.pop.open .pin, html:not(.js) .pop:hover .pin {
  opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s;
}
.pin:hover { border-color: var(--faint); }
/* Lokal: just the logo, no card */
/* Lokal: just the logo, no card, shown to the right of the word so it never covers other text */
.pin-logo {
  left: calc(100% + 16px); top: 50%; bottom: auto; height: auto;
  padding: 0; background: none; border: 0; box-shadow: none;
  transform: translate(-8px, -50%);
}
.pop.open .pin-logo, html:not(.js) .pop:hover .pin-logo { transform: translate(0, -50%); }
.pin-logo::after { top: 0; bottom: 0; left: -16px; right: auto; width: 16px; height: auto; }
.pin-logo img { display: block; width: 28px; height: 28px; }

/* experience: company + role left, date far right */
.jobs { list-style: none; margin-top: 28px; }
.jobs li {
  display: flex; flex-direction: row-reverse; justify-content: space-between;
  align-items: baseline; gap: 20px;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.jobs li:last-child { border-bottom: 1px solid var(--line); }
.when {
  color: var(--faint); font-size: 14px;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.co { font-weight: 500; color: var(--ink); }
.role { color: var(--muted); font-size: 16px; margin-top: 1px; }
.tools {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-top: 18px; color: var(--muted); font-size: 16px;
}

/* contact */
.contact { list-style: none; margin-top: 28px; }
.contact li { padding: 14px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
.contact li:last-child { border-bottom: 1px solid var(--line); }
.contact li > span { color: var(--faint); font-size: 15px; }
.contact a { text-decoration: none; }
.contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ext { display: inline-flex; align-items: center; gap: 8px; }
.contact a.ext:hover { text-decoration: none; }
.ext:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.ibox {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; margin: -4px -2px -4px 0; border-radius: 8px;
  color: var(--faint); transition: color .15s, background .15s;
}
.ibox svg { width: 18px; height: 18px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.ext:hover .ibox { color: var(--ink); background: var(--hover); }
.ext:hover .ibox svg { transform: translate(1.5px, -1.5px); }
.val { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.val a { overflow: hidden; text-overflow: ellipsis; }
.copy {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; align-self: center;
  width: 28px; height: 28px; margin: -4px -2px -4px 0; border-radius: 8px;
  color: var(--faint); background: none; border: 0; cursor: pointer;
  transition: color .15s, background .15s;
}
.copy svg { width: 18px; height: 18px; }
.copy:hover { color: var(--ink); background: var(--hover); }
.copy.done { color: var(--ink); }
.copy.done svg { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.toast {
  position: absolute; right: 0; bottom: calc(100% + 6px);
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--ink); color: var(--bg); font-size: 13px;
  pointer-events: none; opacity: 0;
}
.copy.done .toast { animation: rise 1.6s ease forwards; }
@keyframes pop { 0% { transform: scale(.5); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes rise {
  0% { opacity: 0; transform: translateY(6px); }
  15% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}

footer { margin-top: 96px; color: var(--faint); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; }
