/* thim.dev — Swiss/International Style, hand-built, no build step. */

:root {
  --ink: #111111;
  --body: #3d3d3d;
  --muted: #767676;
  --faint: #a8a8a8;
  --hover-bg: #f4f4f4;
  --accent: #e63329;
  --bg: #ffffff;

  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0, 1);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:hover { color: var(--accent); }

::selection {
  background: var(--accent);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img { display: block; }

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

/* ---------- Layout ---------- */

.page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.shell {
  width: 100%;
  max-width: 880px;
  padding: 0 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 3px solid var(--ink);
}

.wordmark {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: 13px;
}

.nav a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.12s;
}

.nav a:hover { border-bottom-color: var(--accent); }

/* ---------- Hero ---------- */

.hero {
  display: flex;
  gap: 48px;
  align-items: center;
  padding: 72px 0 56px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kicker {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.kicker-mark {
  display: inline-block;
  width: 11px;
  height: 11px;
  background: var(--accent);
  margin-right: 10px;
}

h1 {
  margin: 0;
  font-size: 88px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.tagline {
  margin: 0;
  font-family: var(--mono);
  font-size: 17px;
  color: var(--body);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  max-width: 44ch;
  line-height: 1.5;
  min-height: 51px; /* reserves 2 lines so rotation never reflows the page */
}

.tagline-glyph {
  color: var(--faint);
  font-size: 12px;
}

.bio {
  margin: 0;
  font-size: 16px;
  color: var(--body);
  max-width: 52ch;
  line-height: 1.65;
}

.hero-photo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.hero-photo img {
  width: 240px;
  height: 300px;
  object-fit: cover;
}

.caption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  align-self: flex-start;
}

/* ---------- Sections ---------- */

.section {
  padding: 32px 0 8px;
  border-top: 3px solid var(--ink);
}

.section-contact {
  padding: 32px 0 40px;
  margin-top: 32px;
}

.section-heading {
  margin: 0 0 28px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.section-contact .section-heading { margin-bottom: 24px; }

/* ---------- Work ---------- */

.jobs {
  display: flex;
  flex-direction: column;
}

.job {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 22px 12px;
  margin: 0 -12px;
  transition: background-color 0.2s;
}

.job:hover { background: var(--hover-bg); }

.job-years {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  padding-top: 4px;
}

.job-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-org {
  font-size: 17px;
  font-weight: 600;
}

.job-duration {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
}

.roles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.role-title {
  font-size: 14.5px;
  color: var(--ink);
}

.role-years {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Contact ---------- */

.buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 14px;
  padding: 12px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent);
}

.btn-filled {
  background: var(--ink);
  color: #ffffff;
}

.btn-filled:hover { color: #ffffff; }

/* ---------- Footer ---------- */

.colophon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 0 40px;
  border-top: 3px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

/* ---------- Entrance animation ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

.rise { animation: rise 0.7s var(--ease) both; }

.rise-1 { animation-duration: 0.6s; animation-delay: 0s;   }
.rise-2 { animation-duration: 0.7s; animation-delay: 0.1s; }
.rise-3 { animation-duration: 0.7s; animation-delay: 0.2s; }
.rise-4 { animation-duration: 0.7s; animation-delay: 0.3s; }
.rise-5 { animation-duration: 0.8s; animation-delay: 0.4s; }
.rise-6 { animation-duration: 0.8s; animation-delay: 0.5s; }
.rise-7 { animation-duration: 0.8s; animation-delay: 0.6s; }

/* ---------- Narrow screens ---------- */

@media (max-width: 600px) {
  .shell { padding: 0 24px; }
  /* Stack explicitly rather than relying on flex-wrap: with min-width relaxed,
     the text column would otherwise shrink to nothing beside the 240px photo. */
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    padding: 56px 0 48px;
  }
  .hero-text {
    min-width: 0;
    width: 100%;
  }
  .hero-photo { align-items: flex-start; }
  h1 { font-size: 64px; }
  .job {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .job-years { padding-top: 0; }
  .role {
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .rise {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
