/* ---------- theme: simple, business-card feel ---------- */
:root {
  --bg: #f5f5f5;        /* soft light gray */
  --ink: #111;
  --muted: #666;
  --line: #e6e6e6;
  --card: #ffffff;
  --thumb: #f2f2f2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Times New Roman", Times, Georgia, serif;   /* classic business-card serif */
  font-size: 18px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

h1 {
  font-size: 2rem;
  font-weight: bold;
  margin: 0 0 1.5rem;
}

/* home page links: no underline; on hover they rise slightly and darken a touch, like the icons */
.lift { display: inline-block; color: #222; transition: color 0.15s ease, transform 0.15s ease; }
.lift:hover { color: #000; transform: translateY(-1px); }

/* ---------- inner pages ---------- */
.page { max-width: 720px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.page.wide { max-width: 1240px; }

.top { margin: 0 0 2.5rem; font-size: 0.95rem; color: var(--muted); }
.top a:hover { color: var(--ink); }

.note { color: var(--muted); }
.label { font-size: 1.15rem; font-weight: bold; margin: 2rem 0 0.25rem; }

ul { padding-left: 1.3rem; }
li { margin: 0.45rem 0; }

/* ---------- home ---------- */
.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;     /* whole block sits just above the middle (optical center) */
  text-align: center;
  padding: 1.5rem 1.5rem calc(1.5rem + 12vh);   /* extra bottom space lifts the block ~6vh */
}

.home h1 {
  font-size: 2.15rem;   /* ~34px */
  font-weight: bold;
  line-height: 1.1;
  margin: 0 0 0.5rem;
}

.home nav { display: flex; flex-direction: column; align-items: center; font-size: 1.1rem; line-height: 1.35; }

.icons { display: flex; gap: 1.1rem; margin-top: 0.8rem; }
.icons a, .icons button {
  display: inline-flex;
  color: #333;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}
.icons a:hover, .icons button:hover { color: var(--ink); transform: translateY(-1px); }
.icons svg { width: 19px; height: 19px; }

.email { position: relative; display: inline-flex; }
#copied {
  position: absolute;
  left: calc(100% + 0.6rem);
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}
#copied.show { opacity: 1; }

/* ---------- projects grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.project:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); }

.project .thumb { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--thumb); border-bottom: 1px solid var(--line); }  /* empty gray box until an image is added */
.project h2 { font-size: 16px; font-weight: bold; line-height: 1.3; margin: 1rem 1rem 0.35rem; }   /* sized so every title fits on one line on desktop */
.project p { margin: 0 1rem 1.2rem; font-size: 15px; line-height: 1.5; color: #444; }

/* ---------- about: résumé layout at the same scale as the Projects page ---------- */
.page.about { max-width: 1040px; }   /* centered block, a little narrower than Projects so the rows fill it */
.about h1 { margin-bottom: 0.75rem; }
.about .intro { margin: 0 0 2.5rem; font-size: 19px; }

/* small spaced-out section labels */
.about .label {
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.5rem 0 0.75rem;
}
/* the only divider: a line between Work and Activities */
.activities + .label { border-top: 1px solid var(--line); margin-top: 2.25rem; padding-top: 2.5rem; }

/* each row: role and organization, with its thumbnails right beside it */
.activities { list-style: none; padding: 0; margin: 0; }
.activities li {
  display: grid;
  grid-template-columns: 380px auto;
  justify-content: start;
  align-items: center;
  column-gap: 2rem;
  margin: 0;
  padding: 0;
  min-height: 54px;            /* one-line rows take the same room as two-line ones */
}
/* the same, roomier gap between every row, with or without thumbnails */
.activities li + li { margin-top: 2.25rem; }

/* role on top, organization underneath in smaller gray text */
.role { display: flex; flex-direction: column; gap: 0.2rem; line-height: 1.3; }
.role .title { font-size: 22px; }
.role .org { font-size: 17px; color: var(--muted); }

/* clickable thumbnails: lift on hover, border darkens, small arrow in the corner */
.thumbs { display: flex; gap: 0.75rem; }
.media {
  position: relative;
  display: block;
  width: 270px;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media::after {
  content: "\2197";
  position: absolute;
  right: 8px;
  bottom: 3px;
  font-size: 15px;
  color: #fff;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}
.media:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); }

/* ---------- demos ---------- */
figure { margin: 2rem 0; }
figcaption { margin-bottom: 0.5rem; font-weight: bold; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .activities li { grid-template-columns: 1fr; row-gap: 0.75rem; }   /* thumbnails go under the text */
  .media { width: 200px; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .home h1 { font-size: 2rem; }
  .media { width: 150px; }
  .role .title { font-size: 19px; }
  .role .org { font-size: 16px; }
}
