@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Serif:wght@500;600&display=swap");

:root{
  --bg:#f4f1ec;
  --fg:#1f2328;
  --muted:#5b616a;
  --card:#ffffff;
  --border:rgba(31,35,40,.12);
  --accent:#2f6f7e;
  --accent2:#b86b3c;
  /* Golden ratio split: image ≈ 38.2% and text ≈ 61.8% */
  --portrait-width: clamp(280px, 38.2vw, 620px);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--fg);
  line-height: 1.6;
  margin: 0;
  padding-left: var(--portrait-width);
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(216, 232, 225, 0.80), transparent 60%),
    radial-gradient(900px 600px at 85% 20%, rgba(245, 220, 199, 0.75), transparent 65%),
    radial-gradient(700px 700px at 50% 95%, rgba(233, 214, 238, 0.35), transparent 70%),
    var(--bg);
}


.wrap{
  width: 100%;
  margin: 0;
  padding: 56px 48px 80px;
}

.hero{
  display: block;
}

.portrait{
  margin: 0;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--portrait-width);
  height: 100vh;
}

.portrait img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  box-shadow:
    0 20px 44px rgba(31,35,40,.18),
    inset 0 0 0 1px rgba(31,35,40,.08);
}

.portrait-shields{
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  max-width: calc(var(--portrait-width) - 24px);
}

.shield-row{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.shield-row--links{
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 2px;
}

.shield{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  padding: 8px 16px;
  border-radius: 999px;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.shield .icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: inherit;
}

.shield .icon svg{
  display: block;
}

/* Tighter alignment for text+icon pills */
.shield.pill{
  line-height: 1.2;
  align-items: center;
}

.shield.pill .icon{
  width: 18px;
  height: 18px;
}

.shield.pill .label{
  line-height: 1.2;
}

.shield.icon-only{
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}

.shield:hover{
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-2px);
}

.shield .label{white-space: nowrap;}

h1{
  margin:0;
  font-size: 40px;
  letter-spacing:-0.02em;
  font-family: "IBM Plex Serif", "Georgia", serif;
}
.subtitle{margin:.35rem 0 1rem; color:var(--muted)}
.lead{margin:0 0 16px; max-width: 70ch}

.links{display:flex; flex-wrap:wrap; gap:10px; margin-top: 14px}
.pill{
  display:inline-block;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.7);
  color: var(--fg);
  text-decoration:none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.pill:hover{
  transform: translateY(-1px);
  border-color: rgba(47,111,126,.45);
  background: rgba(47,111,126,.10);
}

.section{
  padding-top: 26px;
}
.section h2{
  font-size: 22px;
  margin: 0 0 12px;
  letter-spacing:-0.01em;
  font-family: "IBM Plex Serif", "Georgia", serif;
}
.muted{color:var(--muted)}
.small{font-size: 13px}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card{
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(31,35,40,.08);
  background: var(--card);
  box-shadow: 0 12px 26px rgba(31,35,40,.08);
}
.card h3{
  margin:0 0 6px;
  font-size: 15px;
  font-family: "IBM Plex Serif", "Georgia", serif;
}
.card p{margin:0; color:var(--muted)}

.cv-rows{
  --cv-date-col: 180px;
  --cv-line: rgba(31,35,40,.14);
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.cv-row{
  position: relative;
  display: grid;
  grid-template-columns: var(--cv-date-col) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(31,35,40,.10);
  background: var(--card);
  box-shadow: 0 12px 26px rgba(31,35,40,.06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.cv-row:hover{
  transform: translateY(-1px);
  border-color: rgba(31,35,40,.16);
  box-shadow: 0 16px 34px rgba(31,35,40,.08);
}

.cv-row::before{
  content: "";
  position: absolute;
  left: calc(16px + var(--cv-date-col) + 8px);
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--cv-line);
  opacity: .75;
  pointer-events: none;
}

.cv-row::after{
  content: "";
  position: absolute;
  left: calc(16px + var(--cv-date-col) + 3px);
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(31,35,40,.26);
  box-shadow: 0 0 0 4px rgba(31,35,40,.06);
  pointer-events: none;
}

.cv-dates{
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cv-tag{
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  background: rgba(47,111,126,.12);
  border: 1px solid rgba(47,111,126,.22);
  vertical-align: middle;
}

.cv-title{
  font-weight: 600;
}

.cv-meta{
  color: var(--muted);
}

.cv-meta a{
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.list{
  margin: 10px 0 0;
  padding-left: 18px;
}
.list li{margin: 8px 0}

/* Repo list where the logo acts as the "dot" */
.list--repo{
  list-style: none;
  padding-left: 0;
}

.list--repo .repo-item{
  position: relative;
  padding-left: 38px;
  margin: 10px 0;
}

.list--repo .repo-item::before{
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.7);
  background-image: var(--repo-logo);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.list--repo .repo-stars{
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  text-decoration: none;
  vertical-align: middle;
}

.list--repo .repo-stars img{
  height: 20px;
  width: auto;
  display: block;
}
a{color: var(--accent)}
a:hover{color: var(--accent2)}

.backtotop{margin-top: 16px}
.footer{
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

@media (max-width: 900px){
  body{
    padding-left: 0;
  }

  .wrap{
    padding: 48px 20px 70px;
  }

  .portrait{
    position: relative;
    width: 100%;
    height: auto;
  }

  .portrait img{
    height: 360px;
    border-radius: 22px;
  }

  .portrait-shields{
    position: static;
    transform: none;
    margin-top: 14px;
    max-width: 100%;
  }

  .cv-row{
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cv-dates{white-space: normal;}
}

@keyframes bgShift {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}
