/* ================================================
   ianpatrickhines.com v3
   Quiet confidence. Nothing to prove.
   ================================================ */

:root {
  --font-serif: -apple-system-ui-serif, ui-serif, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Monaco, "Andale Mono", "Ubuntu Mono", monospace;

  --bg: #faf9f7;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-hover: #000;
  --rule: #ddd;
  --code-bg: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111;
    --text: #e8e8e8;
    --text-secondary: #999;
    --text-hover: #fff;
    --rule: #333;
    --code-bg: rgba(255, 255, 255, 0.08);
  }
}

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

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  transition: background 0.3s ease, color 0.3s ease;
}

.page {
  max-width: 37em;
  margin: 12vh 4rem 20vh;
  font-size: 12pt;
}

@media (max-width: 640px) {
  .page {
    margin: 8vh 1.5rem 12vh;
  }
}

/* --- Name --- */
.name {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.name a {
  color: inherit;
}

.name a:hover {
  text-decoration: underline;
}

/* --- Horizontal Rule --- */
hr {
  border: none;
  width: 40px;
  height: 1px;
  background: var(--rule);
  margin: 1.5rem 0;
}

/* --- Bio Paragraphs --- */
.bio p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.bio p:last-child {
  margin-bottom: 0;
}

/* --- Links --- */
a {
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Code-style links in bio */
.bio a {
  font-family: var(--font-mono);
  font-size: 0.88em;
  font-weight: 400;
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}


/* --- Section Heading --- */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
}

/* --- Projects --- */
.projects {
  margin-top: 1.5rem;
}

.project {
  margin-bottom: 1.5rem;
}

.project:last-child {
  margin-bottom: 0;
}

.project-name {
  font-weight: 600;
}

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

.project-desc {
  color: var(--text-secondary);
  display: block;
}

/* --- Social Links --- */
.social {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.social .sep {
  color: var(--text-secondary);
  margin: 0 0.5em;
}

/* --- Articles --- */
.articles {
  margin-top: 1.5rem;
}

.article {
  margin-bottom: 1.25rem;
}

.article:last-child {
  margin-bottom: 0;
}

.article-title {
  font-weight: 500;
}

.article-title:hover {
  text-decoration: underline;
}

.article-desc {
  color: var(--text-secondary);
  display: block;
}

/* --- Press --- */
.press {
  margin-top: 1.5rem;
}

.press-item {
  margin-bottom: 1.25rem;
}

.press-item:last-child {
  margin-bottom: 0;
}

.item-title {
  font-weight: 500;
}

a.item-title:hover {
  text-decoration: underline;
}

.item-meta {
  color: var(--text-secondary);
  display: block;
  font-style: italic;
}

/* --- Closing/Footer --- */
.footer-rule {
  margin-top: 3.5rem;
}

.closing {
  margin-top: 1.5rem;
}

.closing .photo {
  width: 100%;
  max-width: 280px;
  border-radius: 4px;
  margin-bottom: 1rem;
  filter: grayscale(1);
  transition: filter 0.4s;
  will-change: filter;
}

.closing .photo:hover {
  filter: grayscale(0);
}

.closing p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* --- Utilities --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
