/* Cole Lamphere personal site */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #faf8f5;
  --text: #1a1a1a;
  --text-light: #555;
  --text-faint: #888;
  --border: #e5e1d8;
  --border-strong: #c8c2b3;
  --accent: #2c5f5d;
  --accent-light: #4a8b87;
  --highlight: #fef3c7;
  --max-width: 680px;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-feature-settings: 'kern', 'liga', 'onum';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0 1.25rem;
  margin-bottom: 2.5rem;
}

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

.site-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  font-family: var(--sans);
  font-size: 0.875rem;
}

.site-nav a {
  color: var(--text-light);
  text-decoration: none;
  margin-left: 1.25rem;
  transition: color 0.15s;
}

.site-nav a:first-child {
  margin-left: 0;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

/* Mobile nav */
@media (max-width: 540px) {
  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav a {
    margin-left: 0;
    margin-right: 1rem;
  }
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 0.65em;
}

h1 {
  font-size: 1.8rem;
  margin-top: 0;
}

h2 {
  font-size: 1.35rem;
  margin-top: 1.75em;
}

h3 {
  font-size: 1.1rem;
  margin-top: 1.5em;
}

p {
  margin-bottom: 1.15em;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

strong { font-weight: 600; }
em { font-style: italic; }

ul, ol {
  margin: 0 0 1.15em 1.4em;
}

li { margin-bottom: 0.4em; }

blockquote {
  border-left: 3px solid var(--border-strong);
  padding-left: 1.15rem;
  margin: 1.5em 0;
  color: var(--text-light);
  font-style: italic;
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #efeae0;
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* Home intro block */
.intro {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  align-items: flex-start;
}

.intro-photo {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #ddd;
}

.intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.intro-text {
  font-size: 1rem;
  color: var(--text-light);
}

.intro-text p { margin-bottom: 0.6em; }
.intro-text p:last-child { margin-bottom: 0; }
.intro-text strong { color: var(--text); }

@media (max-width: 540px) {
  .intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .intro-photo {
    width: 80px;
    height: 80px;
  }
}

/* Post list (home, writing) */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
  margin: 0;
}

.post-list li:last-child { border-bottom: none; }

.post-list .meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
  display: block;
}

.post-list .title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  letter-spacing: -0.01em;
}

.post-list .title a {
  color: var(--text);
  text-decoration: none;
}

.post-list .title a:hover {
  color: var(--accent);
}

.post-list .excerpt {
  font-size: 0.92rem;
  color: var(--text-light);
  margin: 0;
}

/* Single post */
.post-header {
  margin-bottom: 1.5rem;
}

.post-header .meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.post-header h1 {
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.post-content {
  font-size: 1rem;
}

.post-content p {
  margin-bottom: 1.2em;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
  border-radius: 2px;
}

.post-content figure {
  margin: 1.5em 0;
}

.post-content figcaption {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: 0.5em;
  text-align: left;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-light);
}

.post-footer .tags {
  margin-bottom: 0.5rem;
}

.post-footer .tag {
  display: inline-block;
  background: #efeae0;
  padding: 0.15rem 0.55rem;
  border-radius: 2px;
  margin-right: 0.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-light);
  text-decoration: none;
}

/* Update banner */
.update-note {
  background: var(--highlight);
  border-left: 3px solid #d97706;
  padding: 0.85rem 1rem;
  margin: 0 0 1.5em;
  font-size: 0.92rem;
}

.update-note strong {
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #92400e;
  display: block;
  margin-bottom: 0.25rem;
}

/* About page */
.about-content {
  font-size: 1rem;
}

.about-photo {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 2rem;
  display: block;
  border-radius: 2px;
}

.about-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.about-meta div { margin-bottom: 0.25rem; }
.about-meta span { color: var(--text); text-transform: none; letter-spacing: 0; font-family: var(--serif); }

/* Now page */
.now-updated {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

/* Photos page */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 700px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.photo-item {
  display: flex;
  flex-direction: column;
}

.photo-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

@media (min-width: 700px) {
  .photo-item img { height: 220px; }
}

.photo-caption {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Inline post image (smaller, contextual) */
.post-img-small {
  max-width: 420px;
  margin: 1.5em 0 !important;
  display: block;
}

.post-img-tiny {
  max-width: 280px;
  margin: 1.5em 0 !important;
  display: block;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2rem 0 2.5rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-faint);
  text-align: center;
}

.site-footer a {
  color: var(--text-light);
  margin: 0 0.5rem;
}

/* Archive year grouping */
.archive-year {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 2rem 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.archive-year:first-child { margin-top: 0; }

/* Contact form (simple) */
.contact-form {
  margin-top: 1.5rem;
}

.contact-form label {
  display: block;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 1rem 0 0.35rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-strong);
  background: white;
  border-radius: 2px;
  color: var(--text);
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

.contact-form button {
  margin-top: 1.25rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  border-radius: 2px;
}

.contact-form button:hover {
  background: var(--accent);
}

/* Reading time / word count helper */
.read-time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-left: 0.5rem;
}

/* Small typo correction (looks like real blog) */
.typo {
  text-decoration: line-through;
  color: var(--text-faint);
}

/* Sidebar style aside */
aside.sidenote {
  font-size: 0.88rem;
  color: var(--text-light);
  background: #f3eedf;
  padding: 0.8rem 1rem;
  margin: 1.5em 0;
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 540px) {
  html { font-size: 17px; }
  .wrap { padding: 0 1rem; }
  .site-header { padding: 1.25rem 0 1rem; margin-bottom: 1.5rem; }
  h1 { font-size: 1.55rem; }
  .post-header h1 { font-size: 1.45rem; }
}
