:root {
  --sand: #f4eddf;
  --paper: #fffaf0;
  --navy: #14284b;
  --navy-soft: #4a5a78;
  --blue: #2f5fd0;
  --blue-tint: #dde7fb;
  --amber: #f3a93c;
  --amber-tint: #fbe5b8;
  --line: rgba(20, 40, 75, 0.14);
  --grid: rgba(120, 90, 30, 0.07);
  --gap: 5px;
  --rule: #000;
  --radius: 0;
  --serif: "STIX Two Text", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--sand);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
}

a { color: inherit; text-decoration-color: currentColor; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; }

.icon { width: 1.05em; height: 1.05em; flex: none; }

.page { display: flex; flex-direction: column; gap: var(--gap); padding: 0; background: var(--rule); }

.hero,
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

.hero {
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  min-height: 100svh;
}

.bento { grid-auto-rows: minmax(0, auto); }

.tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 34px;
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
}

.tile p { margin: 0; }

.tile-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}
.tile-label .icon { opacity: 0.75; }

.t-photo { grid-column: 1 / span 5; grid-row: 1 / span 2; padding: 0; overflow: hidden; }
.t-intro { grid-column: 6 / -1; grid-row: 1; justify-content: center; }
.t-about { grid-column: 6 / -1; grid-row: 2; justify-content: center; }

.t-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.t-now     { grid-column: span 8; min-height: 44vh; }
.t-rust    { grid-column: span 4; }
.t-head    { grid-column: 1 / -1; }
.t-prof    { grid-column: span 7; }
.t-kv      { grid-column: span 5; }
.t-http    { grid-column: span 4; }
.t-auth    { grid-column: span 4; }
.t-blog    { grid-column: span 4; }
.t-contact { grid-column: 1 / -1; }

.t-intro h1 {
  margin: 0 0 6px;
  font-size: clamp(2.8rem, 6.4vw, 4.8rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.affil { color: var(--navy-soft); font-size: 1rem; }
.lede { margin-top: 20px !important; max-width: 52ch; font-size: 1.08rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.2;
  text-decoration: none;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--navy); color: var(--paper); }
.btn.solid { background: var(--navy); color: var(--paper); }
.btn.solid:hover { background: var(--blue); }
.btn.small { padding: 5px 10px; font-size: 0.74rem; gap: 6px; }
.btn.light { color: var(--paper); border-color: rgba(255, 250, 240, 0.7); }
.btn.light:hover { background: var(--amber); border-color: var(--amber); color: var(--navy); }

.t-about p { max-width: 48ch; }
.facts { margin: 18px 0 0; display: grid; }
.facts div { display: grid; grid-template-columns: 5.2rem 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--navy-soft); font-size: 0.95rem; }
.facts dd { margin: 0; font-size: 0.98rem; }

.t-now {
  background: var(--amber);
  justify-content: center;
}
.t-now .tile-label { font-size: 1.1rem; }
.now-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.now-name { font-size: clamp(2.6rem, 5.4vw, 4rem); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.tag {
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--navy);
  border: 1px dashed var(--navy);
  border-radius: var(--radius);
}
.t-now p { max-width: 54ch; }

.t-rust { background: var(--blue); color: var(--paper); justify-content: space-between; }
.t-rust .big {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2em 0.7em;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.t-rust .big span + span::before {
  content: "";
  display: inline-block;
  width: 0.3em;
  height: 0.3em;
  margin-right: 0.7em;
  background: var(--amber);
  transform: rotate(45deg); 
  vertical-align: middle;
}

.t-head {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px 26px;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}
.t-head .icon { color: var(--blue); }

.t-proj { gap: 12px; min-height: 230px; }
.proj-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.t-proj h3 { margin: 0; font-size: 1.45rem; line-height: 1.2; font-weight: 700; }
.t-proj p { max-width: 58ch; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip {
  padding: 2px 9px;
  font-family: var(--mono);
  font-size: 0.74rem;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  opacity: 0.85;
}

.t-prof { background: var(--blue); color: var(--paper); }
.t-prof .chip { color: var(--amber-tint); opacity: 1; }
.t-kv   { background: var(--navy); color: var(--paper); }
.t-kv .chip { color: var(--amber); opacity: 1; }
.t-http { background: var(--blue-tint); }
.t-auth { background: var(--amber-tint); }
.t-blog { background: var(--paper); }

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}
.links a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 13px 15px;
  font-size: 0.95rem;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.links a span { min-width: 0; overflow-wrap: anywhere; }
.links a:hover { }
.links a:hover span { text-decoration: underline; }
.links .icon { color: var(--blue); }
.foot { margin-top: 22px !important; color: var(--navy-soft); font-size: 0.9rem; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: auto; min-height: 0; }
  .t-photo, .t-intro, .t-about { grid-column: 1 / -1; grid-row: auto; }
  .t-photo { height: 62svh; }

  .bento { grid-template-columns: repeat(6, 1fr); }
  .t-now, .t-rust, .t-prof, .t-kv, .t-blog, .t-contact { grid-column: 1 / -1; }
  .t-now { min-height: 0; }
  .t-http, .t-auth { grid-column: span 3; }
  .t-rust { flex-direction: row; align-items: center; gap: 16px; }
  .t-rust .tile-label { margin: 0; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .tile { padding: 24px 20px; }
  .t-photo { height: 54svh; padding: 0; }
  .t-http, .t-auth { grid-column: 1 / -1; }
  .t-proj { min-height: 0; }
  .t-rust { flex-direction: column; align-items: flex-start; }
}
