:root {
  --bg: #f4f8fc;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #5b6b80;
  --faint: #94a3b8;
  --line: #d9e6f2;
  --accent: #5aa9e6;
  --accent-deep: #2b7bbf;
  --accent-soft: #e4f1fc;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Sticky header: photo + name slide in once the hero name scrolls away */
.topbar {
  position: sticky; top: 0; z-index: 10;
  padding: 20px 32px; display: flex; justify-content: flex-end; align-items: center;
  border-bottom: 1px solid transparent;
  transition: padding 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.topbar.scrolled {
  padding-top: 10px; padding-bottom: 10px;
  background: rgba(244, 248, 252, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom-color: var(--line);
}
.brand {
  position: absolute; left: 32px; top: 50%;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  opacity: 0; visibility: hidden; transform: translate(-6px, -50%);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.topbar.scrolled .brand { opacity: 1; visibility: visible; transform: translate(0, -50%); }
.brand-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft) url(assets/me.jpg) center / cover;
  border: 1.5px solid var(--accent);
}
.brand-name { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; }
.socials { display: flex; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
  font-size: 13px; font-weight: 500; text-decoration: none;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.chip svg { width: 14px; height: 14px; fill: currentColor; }
.chip:hover { border-color: var(--accent); color: var(--accent-deep); box-shadow: 0 4px 12px rgba(43, 123, 191, 0.12); }

main { max-width: 1000px; margin: 0 auto; padding: 0 32px 40px; }

/* Hero */
.hero { text-align: center; padding: 24px 0 24px; }
.avatar {
  width: 156px; height: 156px; margin: 0 auto 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, var(--accent-soft), var(--surface));
  background-size: cover;
  background-position: center;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--line), 0 10px 30px rgba(43, 123, 191, 0.12);
}
.avatar span {
  font-size: 52px; font-weight: 300; letter-spacing: 1px;
  color: var(--accent-deep);
}
.avatar.has-photo span { display: none; }
h1 {
  font-size: 44px; font-weight: 650; letter-spacing: -0.03em;
  margin: 0; line-height: 1.1;
}
.subtitle { color: var(--muted); margin: 10px 0 0; }

/* Two-column label/content rows */
.row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 24px 0;
}
.row h2 {
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  margin: 0; line-height: 1.6;
}
.content { min-width: 0; }
.prose p { margin: 0 0 16px; max-width: 620px; }
.prose p:last-child { margin-bottom: 0; }
.prose a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-deep); }

/* Ornamental divider */
.divider {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 24px 0;
}
.divider::before, .divider::after {
  content: ""; width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}
.divider::after { transform: scaleX(-1); }
/* A small diamond flanked by two tiny dots */
.divider span {
  position: relative;
  width: 7px; height: 7px;
  margin: 0 10px;
  transform: rotate(45deg);
  background: var(--accent);
}
.divider span::before, .divider span::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--accent); opacity: 0.6;
}
.divider span::before { transform: translate(-50%, -50%) translate(-9px, 9px); }
.divider span::after { transform: translate(-50%, -50%) translate(9px, -9px);
}

/* Experience list */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: 0; }
.item-title { font-weight: 500; }
.item-meta { color: var(--muted); font-size: 14px; }
.co-logo { width: 16px; height: 16px; object-fit: contain; border-radius: 3px; vertical-align: -3px; margin: 0 5px 0 2px; }
.item-date { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; align-self: center; }
.item-note { grid-column: 1 / -1; margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }

/* Project cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}
/* Little corner studs, like a framed plate */
.card::before, .card::after {
  content: ""; position: absolute; bottom: 8px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--line);
}
.card::before { left: 8px; }
.card::after { right: 8px; }
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(43, 123, 191, 0.14);
}
.card-body { padding: 14px 16px 24px; }
.card h3 {
  font-size: 17px; font-weight: 650; letter-spacing: -0.01em;
  margin: 0 0 6px; line-height: 1.3;
}
.card p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.tag {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px; color: #fff;
}
.tag-green { background: #16a34a; }
.tag-blue { background: var(--accent-deep); }
.tag-gold { background: #b7862f; }

.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--line);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Hackathons */

/* "Show more" for projects only appears on phones */
.show-more {
  display: none;
  margin: 14px auto 0;
  padding: 8px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
  font: inherit; font-size: 14px; font-weight: 500; color: var(--accent-deep);
  cursor: pointer;
}
.show-more:hover { border-color: var(--accent); }

/* Hackathon tiles: trophy, details, links */
.hack-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hack {
  display: grid;
  grid-template-columns: 64px 128px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.hack:hover { border-color: var(--accent); box-shadow: 0 8px 22px rgba(43, 123, 191, 0.12); }
.hack-thumb {
  display: block;
  width: 128px; aspect-ratio: 4 / 3;
  object-fit: cover; object-position: top;
  border: 1px solid var(--line); border-radius: 6px;
}
.hack-info p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.hack-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 4px; }
.sponsor {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.sponsor img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; }
.card-links { display: flex; gap: 16px; font-size: 14px; font-weight: 500; }
.card-links a { color: var(--accent-deep); text-decoration: none; }
.card-links a:hover { text-decoration: underline; }
.hack .card-links { flex-direction: column; gap: 4px; white-space: nowrap; }


.hack-place { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trophy-icon { width: 46px; height: 46px; filter: drop-shadow(0 3px 4px rgba(15, 23, 42, 0.18)); }
.hack-place small { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.hack-place.gold small { color: #a87412; }
.hack-place.silver small { color: #5b6b80; }


/* Recommendations */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 14px; row-gap: 14px; }
.quote {
  position: relative;
  margin: 0;
  padding: 20px 22px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  /* Share row tracks across cards so the quote, name and See more line up */
  display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0;
}
.quote blockquote {
  margin: 0 0 16px;
  font-size: 16px; line-height: 1.55; font-weight: 500; letter-spacing: -0.01em;
  color: var(--text);
}
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar-sm {
  position: relative; overflow: hidden;
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 12px; font-weight: 600;
}
/* Photo sits over the initials; if it fails to load it removes itself */
.avatar-sm img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.who { display: flex; flex-direction: column; line-height: 1.35; }
.who strong { font-size: 14px; font-weight: 600; }
.who span { font-size: 13px; color: var(--muted); }
.quote details { align-self: start; padding-top: 12px; border-top: 1px solid var(--line); }
.quote summary {
  cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 500; color: var(--accent-deep);
}
.quote summary::-webkit-details-marker { display: none; }
.quote summary::after { content: "See more ↓"; }
.quote details[open] summary::after { content: "See less ↑"; }
.quote .full p { margin: 10px 0 0; font-size: 14px; line-height: 1.65; color: var(--muted); max-width: 640px; }

/* Fade-in on scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

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

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .topbar { padding: 16px; justify-content: center; }
  .topbar.scrolled { justify-content: flex-end; }
  .brand { left: 16px; }
  /* Icons only on phones; the labels stay for screen readers */
  .topbar .chip { font-size: 0; gap: 0; padding: 8px; }
  .topbar .chip svg { width: 16px; height: 16px; }
  main { padding: 0 16px 32px; }
  h1 { font-size: 36px; }
  .row { grid-template-columns: 1fr; gap: 12px; }
  .grid { grid-template-columns: 1fr; }
  .projects:not(.expanded) > .card:nth-child(n+4) { display: none; }
  .show-more { display: block; }
  .quotes { grid-template-columns: 1fr; }
  /* Compact tile: small preview beside trophy + company, then text and link full width */
  .hack { grid-template-columns: 104px 1fr; gap: 8px 14px; padding: 14px; align-items: start; }
  .hack-thumb { grid-column: 1; grid-row: 1 / 3; width: 104px; }
  .hack-place { grid-column: 2; grid-row: 1; flex-direction: row; gap: 6px; align-self: end; }
  .trophy-icon { width: 26px; height: 26px; }
  .hack-place small { font-size: 12px; }
  .hack-info { display: contents; }
  .hack-head { grid-column: 2; grid-row: 2; margin: 0; align-self: start; }
  .hack-info p { grid-column: 1 / -1; grid-row: 3; margin-top: 4px; }
  .hack .card-links { grid-column: 1 / -1; grid-row: 4; flex-direction: row; gap: 16px; }
  .list li { grid-template-columns: 1fr; }
  .item-date { align-self: start; }
}
