{% import "post_macros.html" as post_macros %}

<p><standout>I'm Luna! Nice to meet you.</standout>

<p>A better future is fundamentally possible and worth striving for.<br/>
<a href="https://www.givingwhatwecan.org/">Give some of your money to effective charities</a> <small>if you're well off!</small></p>

<style>
.featured-grid {
  display: grid;
  --max-cols: 2;
  --min-item: 300px;
  --gap: 1rem;
  --max-item: calc((100% - (var(--max-cols) - 1) * var(--gap)) / var(--max-cols));
  grid-template-columns: repeat(auto-fill, minmax(max(var(--min-item), var(--max-item)), 1fr));
  gap: var(--gap);
  margin: 1.5rem 0rem 1.5rem 0rem;
}
.featured-card {
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s;
	font-size: 120%;
	color: var(--white_pure);

	&:visited {
		color: var(--white_pure);
	}
}
.featured-card:hover {
  border-color: var(--blue_light, #aaa);
}
.featured-card .card-title {
  font-weight: bold;
  margin-bottom: 0.25rem;
}
.featured-card .card-desc {
  font-size: 0.9rem;
  opacity: 0.8;
}
.featured-card.rocm-card {
  --eva-serif: 'Times New Roman', 'Didot', 'Bodoni MT', 'GFS Didot', 'Noto Serif Display', 'Georgia', 'Palatino Linotype', serif;
  border-top: 4px solid #d32f2f;
  border-bottom: 4px solid #d32f2f;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rocm-card .rocm-hero {
  line-height: 1;
  margin-bottom: 0.5rem;
}
.rocm-card .rocm-title {
  font-family: var(--eva-serif);
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  transform: scaleX(0.75);
  transform-origin: left;
}
.rocm-card .rocm-title .emboss-m {
  text-shadow: 0.11em 0.07em 0 #d32f2f;
}
.rocm-card .rocm-ver {
  font-family: var(--eva-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: #d32f2f;
  letter-spacing: 0.1em;
  transform: scaleX(0.75);
  transform-origin: left;
}
.rocm-card .rocm-ver .dot { opacity: 0.3; }
.rocm-card .rocm-sub {
  font-family: var(--eva-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white_pure);
  transform: scaleX(0.70);
  transform-origin: right;
  text-align: right;
  white-space: nowrap;
}
.rocm-card .rocm-sub .sub-red { color: #d32f2f; }
.blade-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.blade-card .card-title {
  position: relative;
  z-index: 2;
}
.blade-card .card-subtitle {
  font-size: 0.8rem;
  opacity: 0.6;
  position: relative;
  z-index: 2;
}
.blade-card .card-desc {
  position: relative;
  z-index: 2;
}
.blade-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.blade-svg {
  height: 100%;
  width: auto;
  display: block;
  opacity: 0.85;
  position: absolute;
  right: 0;
  top: 0;
}
.blade-card:hover .blade-svg { opacity: 1; }
.blade-airflow {
  position: absolute;
  top: 0;
  left: 0;
  right: 30%;
  bottom: 0;
  opacity: 0.4;
}
.blade-card:hover .blade-airflow { opacity: 0.6; }
.oracle-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.oracle-card .card-title,
.oracle-card .card-desc {
  position: relative;
  z-index: 2;
}
.oracle-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.oracle-svg {
  height: 100%;
  width: auto;
  display: block;
  opacity: 0.75;
  position: absolute;
  right: -0.5rem;
  top: 0;
  transition: opacity 0.15s;
}
.oracle-card:hover .oracle-svg { opacity: 1; }
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.exp-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.exp-years {
  margin-left: auto;
  font-size: 0.85rem;
  opacity: 0.6;
  white-space: nowrap;
}
.exp-desc {
  font-size: 0.9rem;
  opacity: 0.8;
  padding-left: 0.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.exp-langs {
  margin-left: auto;
  font-size: 0.8rem;
  opacity: 0.5;
  font-style: italic;
  white-space: nowrap;
}
.contrib-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.contrib-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.contrib-text {
  flex: 1;
}
.contrib-date {
  margin-left: auto;
  font-size: 0.82rem;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
</style>

<h3>Featured</h3>
<div class="featured-grid">
  <a class="featured-card rocm-card" href="/articles/rocm-711-you-can-not-build/">
    <div class="rocm-hero">
      <div class="rocm-title">ROC<span class="emboss-m">m</span></div>
      <div class="rocm-ver">:7.1<span class="dot">.</span>1</div>
      <div class="rocm-sub"><span class="sub-red">You can </span>(not)<span class="sub-red"> build.</span></div>
    </div>
    <div class="card-desc">Issues encountered while building and maintaining ROCm packages</div>
  </a>
  <a class="featured-card blade-card" href="/articles/cve-2018-7118-bladesystem-root/">
    <div class="card-title">Rooting your HP BladeSystem</div>
    <div class="card-subtitle">CVE-2018-7118</div>
    <div class="card-desc">Too loud? Guess we have to hack it.</div>
    <div class="blade-visual">
      <img class="blade-svg" src="/articles/cve-2018-7118-bladesystem-root/bladesystem-rear.svg" alt="HP BladeSystem c7000 rear view with 10 large fans">
    </div>
  </a>
  <a class="featured-card oracle-card" href="/articles/steering-vector-activation-oracle/">
    <div class="card-title">Trained steering vectors may work as activation oracles</div>
    <div class="card-desc">≈1/600th the params, comparable accuracy, and some eval oddities in the AO paper.</div>
    <div class="oracle-visual">
      <svg class="oracle-svg" viewBox="0 0 200 240" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet">
        <defs>
          <clipPath id="oracle-ball-clip">
            <circle cx="100" cy="95" r="68"/>
          </clipPath>
          <radialGradient id="oracle-interior" cx="50%" cy="50%" r="55%">
            <stop offset="0%" stop-color="#7a4fc4" stop-opacity="0.28"/>
            <stop offset="100%" stop-color="#1a0a30" stop-opacity="0.4"/>
          </radialGradient>
          <radialGradient id="oracle-glow" cx="32%" cy="28%" r="80%">
            <stop offset="0%" stop-color="#e8d4ff" stop-opacity="0.32"/>
            <stop offset="55%" stop-color="#9a6fd4" stop-opacity="0.04"/>
            <stop offset="100%" stop-color="#4a1f80" stop-opacity="0"/>
          </radialGradient>
          <marker id="oracle-arr" viewBox="0 0 8 8" refX="4" refY="4" markerWidth="4.5" markerHeight="4.5" orient="auto">
            <path d="M0,1 L7,4 L0,7 Z" fill="#fff"/>
          </marker>
        </defs>
        <g>
          <path d="M 86,170 L 82,202 L 118,202 L 114,170 Z" fill="#3a2750" fill-opacity="0.75" stroke="#8870a8" stroke-width="1"/>
          <path d="M 86,170 L 82,202 L 86,202 L 90,170 Z" fill="#fff" fill-opacity="0.1"/>
          <path d="M 108,170 L 110,202 L 118,202 L 114,170 Z" fill="#000" fill-opacity="0.35"/>
          <ellipse cx="100" cy="166" rx="32" ry="3.5" fill="#3a2750" fill-opacity="0.75" stroke="#8870a8" stroke-width="1.2"/>
          <ellipse cx="100" cy="166" rx="26" ry="2.5" fill="#1a0d2a" fill-opacity="0.7"/>
          <!-- <ellipse cx="100" cy="206" rx="46" ry="8" fill="#3a2750" fill-opacity="0.75" stroke="#8870a8" stroke-width="1.2"/> -->
          <!-- <path d="M 54,206 Q 54,216 100,219 Q 146,216 146,206" fill="#1a0d2a" fill-opacity="0.7" stroke="#8870a8" stroke-width="0.8"/> -->
        </g>
        <circle cx="100" cy="95" r="68" fill="url(#oracle-interior)" stroke="#a888d8" stroke-width="1.4"/>
        <g clip-path="url(#oracle-ball-clip)" stroke="#c8a8ff" stroke-width="1.2" fill="none" opacity="0.9">
          <path d="M 28,55 Q 100,75 172,55"/>
          <path d="M 28,75 Q 100,85 172,75"/>
          <path d="M 28,95 L 172,95"/>
          <path d="M 28,115 Q 100,105 172,115"/>
          <path d="M 28,135 Q 100,115 172,135"/>
        </g>
        <g clip-path="url(#oracle-ball-clip)" stroke="#fff" stroke-width="1.6" opacity="0.95">
          <line x1="65" y1="75" x2="65" y2="58" marker-end="url(#oracle-arr)"/>
          <line x1="105" y1="95" x2="105" y2="78" marker-end="url(#oracle-arr)"/>
          <line x1="138" y1="115" x2="138" y2="98" marker-end="url(#oracle-arr)"/>
          <line x1="75" y1="135" x2="75" y2="118" marker-end="url(#oracle-arr)"/>
        </g>
        <!-- <circle cx="100" cy="95" r="68" fill="url(#oracle-glow)" pointer-events="none"/> -->
        <!-- <ellipse cx="72" cy="62" rx="15" ry="7" fill="#fff" opacity="0.28" pointer-events="none" transform="rotate(-28 72 62)"/> -->
      </svg>
    </div>
  </a>
  <a class="featured-card" href="/articles/ryzen-slow-short-rep-mov/">
    <div class="card-title">Zen 3's Amazing Slow Short Rep Mov</div>
    <div class="card-desc">Zen 3 signals Fast Short Rep Mov support. It's disastrously slow for unaligned data.</div>
  </a>
</div>

<h3>Recent <a href=/articles>articles</a></h3>
<div class="page-list">
{% for p in all_pages | get(key="articles/") | get(key="children") | slice(end=5) %}
    {{ post_macros::page_in_list(page=p) }}
{% endfor %}
</div>

<h3>Recent collaboration</h3>
<div class="contrib-list">
<Tera>
{% for c in load_data(path="recent-contributions.json") %}
  <div class="contrib-item">
    <span class="contrib-text">{% if c.role == "author" %}{% if c.state == "OPEN" %}Proposed{% else %}Authored{% endif %} <a href="{{ c.url }}">{{ c.repo }}#{{ c.number }}</a> — {{ c.title }}{% if c.merged_by and c.merged_by != c.author %}, merged by <a href="https://github.com/{{ c.merged_by }}">@{{ c.merged_by }}</a>{% endif %}{% elif c.role == "merger" %}Merged <a href="https://github.com/{{ c.author }}">@{{ c.author }}</a>'s <a href="{{ c.url }}">{{ c.repo }}#{{ c.number }}</a> — {{ c.title }}{% elif c.role == "approver" %}Approved <a href="https://github.com/{{ c.author }}">@{{ c.author }}</a>'s <a href="{{ c.url }}">{{ c.repo }}#{{ c.number }}</a> — {{ c.title }}{% else %}Reviewed <a href="https://github.com/{{ c.author }}">@{{ c.author }}</a>'s <a href="{{ c.url }}">{{ c.repo }}#{{ c.number }}</a> — {{ c.title }}{% endif %}</span>
    <span class="contrib-date">{{ c.date }}</span>
  </div>
{% endfor %}
</Tera>
</div>
