/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #faf9f6;
  --text: #1a1a1a;
  --text-light: #555555;
  --accent: #0060df;
  --accent-hover: #004bb5;
  --border: #e5e5e5;
  --accent-line: #0060df;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  border-top: 2.5px solid var(--accent-line);
}

/* Subtle fade-in */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Layout ---- */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  animation: fadeIn 0.5s ease-out;
}

/* ---- Header ---- */
header {
  margin-bottom: 3rem;
}

.site-title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.8rem;
  color: var(--text);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  font-weight: 400;
  transition: color 0.2s;
}

.site-title:hover {
  color: var(--accent);
}

.header-links {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.social-links a:hover {
  color: var(--accent-hover);
}

.header-divider {
  color: var(--border);
  font-size: 0.9rem;
  user-select: none;
}

.main-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  padding-bottom: 1px;
  border-bottom: 1.5px solid transparent;
}

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

.main-nav a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ---- Landing page ---- */
.tagline {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  font-style: normal;
  color: var(--text-light);
  margin-bottom: 2rem;
  letter-spacing: 0;
}

.landing-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.landing-gallery.single-row {
  grid-template-columns: 1fr 1fr;
}

.landing-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.landing-gallery img:hover {
  transform: scale(1.02);
  filter: brightness(1.03);
}

@media (max-width: 480px) {
  .landing-gallery {
    grid-template-columns: 1fr;
  }
  .landing-gallery img {
    height: 200px;
  }
}

/* ---- Page content ---- */
.page h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.page p {
  color: var(--text);
  margin-bottom: 1.15rem;
  line-height: 1.75;
}

.page a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

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

.page ul {
  list-style: none;
  padding: 0;
}

.page ul li {
  color: var(--text);
  padding: 0.2rem 0;
  font-size: 0.95rem;
}

.page strong {
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--text);
}

.page strong a,
.page a strong {
  color: var(--accent);
}

.page strong a:hover,
.page a strong:hover {
  color: var(--accent-hover);
}

/* Tighten space between category label and its list */
.page p + ul {
  margin-top: -0.5rem;
}

/* Add breathing room between end of a list and next category label */
.page ul + p {
  margin-top: 1.5rem;
}

/* Blockquotes for quotes page */
.page blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: var(--text-light);
  font-style: italic;
}

.page h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.page h2:first-child {
  margin-top: 0;
}

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

.page table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.5rem;
}

.page thead {
  display: none;
}

.page table td {
  padding: 0.45rem 0;
  vertical-align: baseline;
  color: var(--text-light);
  border: none;
}

.page table td:first-child {
  white-space: nowrap;
  width: 6.5rem;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.page table td:last-child a {
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.page table td:last-child a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---- Logo rows (what i do) ---- */
.logo-section {
  margin-bottom: 2.5rem;
}

.logo-section h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.logo-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  width: 120px;
}

.logo-item:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

/* Fixed-height container for all logos to ensure vertical alignment */
.logo-icon-container {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}

.logo-icon-wide {
  width: auto;
  max-width: 110px;
  height: 40px;
  border-radius: 0;
}

.logo-icon-gondola {
  width: auto;
  max-width: 100px;
  height: 36px;
  border-radius: 0;
}

.logo-icon.logo-icon-pg {
  width: 56px;
  height: 56px;
}

.logo-icon-jhtv {
  width: auto;
  max-width: 110px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}

.logo-icon-sbg {
  width: auto;
  max-width: 110px;
  height: 40px;
  background-color: #B83A4B;
  padding: 5px 8px;
  border-radius: 10px;
}

.logo-label {
  font-size: 0.78rem;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
}

.logo-role {
  font-size: 0.68rem;
  color: var(--text-light);
  text-align: center;
  line-height: 1.3;
  margin-top: 0.1rem;
}

/* ---- Story photos (who i am) ---- */
.story-photo {
  margin: 1.75rem 0;
}

.story-photo img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: center center;
  border-radius: 6px;
}

.story-photo img.photo-baseball {
  object-position: center 20%;
  max-height: 320px;
}

.story-photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.75rem 0;
}

.story-photo-pair img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center center;
  border-radius: 6px;
}

.story-photo-pair img.photo-grandma-2 {
  object-position: center 30%;
}

/* ---- Projects toggle (what i do) ---- */
.projects-toggle {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.projects-toggle summary {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  letter-spacing: -0.01em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.projects-toggle summary::-webkit-details-marker {
  display: none;
}

.projects-toggle summary::before {
  content: "+";
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-light);
  transition: transform 0.2s;
}

.projects-toggle[open] summary::before {
  content: "-";
}

.projects-toggle summary:hover {
  color: var(--accent);
}

.projects-list {
  margin-top: 1.5rem;
}

.project-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.project-logo-container {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.project-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}

.project-logo-purelash {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.project-logo-storee {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: #f5d462;
  padding: 10px 4px;
}

.project-logo-btb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
}

.project-logo-stacked {
  flex-direction: column;
  height: auto;
  gap: 0.4rem;
  margin-top: 0.1rem;
}

.project-logo-stacked .project-logo {
  width: 48px;
  height: 48px;
}

.project-name a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

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

.project-info {
  flex: 1;
  min-width: 0;
}

.project-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
}

.project-year {
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.85rem;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

.projects-reflection {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ---- Book covers row (blog posts) ---- */
.book-covers-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1.75rem 0;
}

.book-cover-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 140px;
}

.book-cover-item img {
  width: 130px;
  height: 195px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.book-cover-label {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.4rem;
  text-align: center;
}

@media (max-width: 480px) {
  .book-covers-row {
    gap: 0.6rem;
  }
  .book-cover-item {
    width: 100px;
  }
  .book-cover-item img {
    width: 95px;
    height: 143px;
  }
}

/* ---- Selection highlight ---- */
::selection {
  background: rgba(0, 96, 223, 0.12);
  color: var(--text);
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  html {
    font-size: 16px;
  }
  .container {
    padding: 2.5rem 1.25rem 4rem;
  }
  header {
    margin-bottom: 2rem;
  }
  .header-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  .header-divider {
    display: none;
  }
  .logo-row {
    gap: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .logo-item {
    flex-direction: row;
    width: 100%;
    gap: 0.75rem;
  }
  .logo-icon-container {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }
  .landing-gallery img:hover {
    transform: none;
    filter: none;
  }
  .logo-item:hover {
    transform: none;
  }
  .story-photo img {
    max-height: 220px;
  }
  .story-photo-pair {
    gap: 0.5rem;
  }
  .story-photo-pair img {
    height: 160px;
  }
  .project-item {
    gap: 0.75rem;
  }
  .project-logo-container {
    width: 48px;
    height: 48px;
  }
  .project-logo {
    width: 40px;
    height: 40px;
  }
  .project-logo-purelash,
  .project-logo-storee,
  .project-logo-btb {
    width: 40px;
    height: 40px;
  }
}
