/* ----------------------------------------------------------
   Hang Le — portfolio
   Warm paper, wonky serif, a pink highlighter, and a tilt.
---------------------------------------------------------- */

:root {
  --paper: #fdf9fb;
  --paper-2: #f6eef2;
  --ink: #1a1418;
  --muted: #6f6369;
  --pink: #fb89cf;
  --pink-soft: #ffe3f4;
  /* the wordmark gradient from my old site, kept around since 2019 */
  --gradient: linear-gradient(to top, #ffe838, #fd57bf);
  --rule: #1a1418;
  --max-width: 68rem;

  --display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* tilted elements can overhang; iOS ignores this on body alone */
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  /* faint dot grid, like graph paper */
  background-image: radial-gradient(rgba(26, 20, 24, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { background: var(--pink); text-decoration: none; }

/* ---------- Display type ---------- */
h1, h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 120;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.3rem, 5.6vw, 3.6rem);
  line-height: 1.14;
  margin: 1rem 0 1.75rem;
}

h1 mark, h2 mark {
  background: linear-gradient(transparent 10%, var(--pink) 10%, var(--pink) 90%, transparent 90%);
  color: var(--ink);
  padding: 0 0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-style: italic;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.15;
  margin: 0.5rem 0 2rem;
}

h3 {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

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

.section-intro { margin-top: -1.25rem; margin-bottom: 2.25rem; }

/* ---------- Kicker ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
}

.kicker-square {
  width: 0.55em;
  height: 0.55em;
  background: var(--pink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 2px solid var(--rule);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
}
.nav-brand:hover { background: none; }
.nav-brand:hover .brand-name { background: var(--pink); }

.brand-mark {
  font-size: 1.15rem;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-name {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { background: var(--pink); color: var(--ink); }

.nav-cta {
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper) !important;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--pink) !important; color: var(--ink) !important; }

/* ---------- Layout ---------- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 4.5rem 0 1.5rem; position: relative; }

/* big ghost numeral behind each section heading */
section[data-num]::before {
  content: attr(data-num);
  position: absolute;
  top: 2.6rem;
  right: -0.5rem;
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-weight: 700;
  font-size: clamp(5rem, 13vw, 9rem);
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

section > * { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero { padding-top: 4.5rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
}

.lede { font-size: 1.1rem; max-width: 40rem; }

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}

/* ---------- Spec card (pinned note) ---------- */
.spec-card {
  border: 2px solid var(--rule);
  background: var(--paper);
  font-family: var(--mono);
  margin-top: 2rem;
  transform: rotate(1.2deg);
}

.spec-title {
  background: var(--pink);
  color: var(--ink);
  border-bottom: 2px solid var(--rule);
  padding: 0.5rem 0.9rem;
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
}

.spec-rows { margin: 0; padding: 0; }

.spec-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px dashed rgba(26, 20, 24, 0.25);
  font-size: 0.79rem;
}
.spec-rows > div:last-child { border-bottom: none; }

.spec-rows dt { color: var(--muted); letter-spacing: 0.06em; }
.spec-rows dd { margin: 0; font-weight: 500; text-align: right; }

.status-dot {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  border-radius: 999px;
  background: #3d9a50;
  margin-right: 0.45em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.12s ease, transform 0.12s ease;
}

.btn:hover { background: var(--pink); transform: translateY(-2px); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--pink); color: var(--ink); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--rule); }

.timeline > li {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px dashed rgba(26, 20, 24, 0.3);
}
.timeline > li:last-child { border-bottom: 2px solid var(--rule); }

.timeline-when {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  padding-top: 0.35rem;
  white-space: nowrap;
}

.timeline-what p { margin: 0.35rem 0; }
.timeline-what .muted { font-size: 0.9rem; }

.timeline-what .edu-field { margin: 0.2rem 0 0; font-size: 1.05rem; }
.timeline-what .edu-school { margin: 0.1rem 0 0.25rem; }

.timeline-tasks { margin: 0.6rem 0 0; padding-left: 1.1rem; }
.timeline-tasks li { margin-bottom: 0.35rem; font-size: 0.94rem; }
.timeline-tasks li::marker { color: var(--muted); }

@media (max-width: 620px) {
  .timeline > li { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ---------- Tags ---------- */
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0.9rem 0 0;
}

.tags li {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.65rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

.tags.big li { font-size: 0.78rem; padding: 0.25rem 0.8rem; }

/* ---------- Project cards ---------- */
.cards {
  border: 2px solid var(--rule);
  background: var(--paper);
}

/* one project per row: screenshot left, details right */
.card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 1.75rem;
  align-items: start;
  padding: 1.5rem;
  border-bottom: 1px dashed rgba(26, 20, 24, 0.3);
  transition: background 0.15s ease;
}

.card:last-child { border-bottom: none; }

@media (max-width: 680px) {
  .card { grid-template-columns: 1fr; gap: 1rem; }
}

.card-shot {
  display: block;
  border: 1.5px solid var(--ink);
  overflow: hidden;
  background: var(--paper);
}

.card-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  transition: transform 0.25s ease;
}

.card:hover .card-shot img { transform: scale(1.02); }

.card-body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card:hover { background: var(--pink-soft); }
.card:hover h3 { background: var(--pink); }
.card h3 { display: inline; align-self: start; padding: 0 0.15em; transition: background 0.15s ease; }

.card p { margin: 0.5rem 0; font-size: 0.94rem; }

.card .card-links {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.card .card-links .link-sep { color: var(--muted); margin: 0 0.35rem; }

.badge {
  display: inline-block;
  vertical-align: 0.12em;
  margin-left: 0.4rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.55rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--pink);
}

/* ---------- Contact ---------- */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  border-top: 2px solid var(--rule);
}

.contact-list li {
  display: flex;
  gap: 1.25rem;
  padding: 0.8rem 0;
  border-bottom: 1px dashed rgba(26, 20, 24, 0.3);
  align-items: baseline;
}
.contact-list li:last-child { border-bottom: 2px solid var(--rule); }

.contact-label {
  width: 6rem;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 4rem;
  border-top: 2px solid var(--rule);
}

.site-footer p {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.3rem 1.25rem;
}

.site-footer p:first-child {
  padding-top: 1.5rem;
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-weight: 600;
  font-size: 1.15rem;
}

.moon {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-mono {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  padding-bottom: 1.5rem;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
