/* tylerchalk.com: Tyler's personal site. Plain HTML and CSS, no build step.
   Colors and type match chalkinsurance.com so the two read as a pair. */

:root {
  --navy: #0e1e3a;
  --navy-deep: #0a1628;
  --chalk: #f6f4ee;
  --white: #ffffff;
  --slate: #51607a;
  --body: #33415c;
  --amber: #f2b544;
  --terracotta: #d2603a;
  --blue: #8db3de;
  --rule: rgba(14, 30, 58, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--navy);
  font-family: Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

h1,
h2 {
  margin: 0;
  font-family: 'Inter Tight', Inter, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 4.25rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
}

.h2--spaced {
  margin-top: 3.5rem;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.wrap--narrow {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--slate);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Header */

.site-header {
  background: var(--chalk);
  border-bottom: 1px solid var(--rule);
}

.site-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.wordmark {
  font-family: 'Inter Tight', Inter, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 10px 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
}

.site-nav a {
  padding: 12px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--navy);
  text-decoration: underline;
}

/* Intro */

.intro {
  padding: 56px 0 72px;
}

.intro__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.lede {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--body);
  font-size: 1.2rem;
  line-height: 1.55;
}

.intro__actions {
  margin: 2rem 0 0;
}

.portrait {
  margin: 0;
  max-width: 340px;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 78% 40%;
  border-radius: 6px;
}

/* Buttons and links */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 26px;
  background: var(--navy);
  color: var(--white);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #1b2f5c;
}

.button--amber {
  background: var(--amber);
  color: var(--navy);
}

.button--amber:hover {
  background: #e8a33d;
}

.textlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
}

/* Bands */

.band {
  padding: 72px 0;
}

.band--white {
  background: var(--white);
}

.band--navy {
  background: var(--navy);
  color: var(--white);
}

/* Projects */

.projects {
  display: grid;
  gap: 20px;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.project {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px;
  background: var(--chalk);
  border-radius: 8px;
  text-decoration: none;
  transition: box-shadow 0.15s ease;
}

.project:hover {
  box-shadow: 0 10px 28px rgba(14, 30, 58, 0.12);
}

.project__kind {
  color: var(--slate);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project__name {
  margin-top: 0.5rem;
  font-family: 'Inter Tight', Inter, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.project__body {
  margin-top: 0.75rem;
  color: var(--body);
  font-size: 0.97rem;
}

.project__link {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.project:hover .project__link {
  text-decoration: underline;
}

/* Story and other running text */

.prose p:not(.eyebrow) {
  margin: 1.25rem 0 0;
  color: var(--body);
  font-size: 1.08rem;
  line-height: 1.7;
}

.prose h2 + p {
  margin-top: 1.75rem;
}

/* Career */

.career {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.career li {
  display: grid;
  gap: 2px 20px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  color: var(--body);
}

.career li:last-child {
  border-bottom: 1px solid var(--rule);
}

.career__years {
  color: var(--navy);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Contact */

.contact__lede {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin: 2rem 0 0;
}

/* Footer */

.site-footer {
  padding: 28px 0 36px;
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0.35rem 0 0;
}

/* Wider screens */

@media (min-width: 640px) {
  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .career li {
    grid-template-columns: 8.5rem 1fr;
  }
}

@media (min-width: 900px) {
  .intro {
    padding: 80px 0 104px;
  }

  .intro__grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 72px;
  }

  .band {
    padding: 96px 0;
  }

  .projects {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
