/* ============================================
   Harrison Smith — Personal Site v3
   Dark theme, amber accent, editorial
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700&family=DM+Serif+Display&display=swap');

/* --- Light Theme (Default) --- */
:root {
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;

  --color-bg: #F5F2EB;
  --color-bg-card: #FDFCF9;
  --color-bg-muted: #EDE9E0;
  --color-bg-footer: #2C2C2A;

  --color-text: #2C2C2A;
  --color-text-secondary: #6B6B66;
  --color-text-muted: #9E9E97;
  --color-text-inverse: #F5F2EB;

  --color-accent: #B8922F;
  --color-accent-light: #F5EDD8;
  --color-accent-dark: #8C6E1F;

  --color-border: #DDD9CF;
  --color-border-hover: #C8C3B8;

  --tag-delivery-bg: #F5EDD8;
  --tag-delivery-text: #8C6E1F;
  --tag-uni-bg: #E0ECF8;
  --tag-uni-text: #185FA5;
  --tag-sports-bg: #E3F0E1;
  --tag-sports-text: #3B6D11;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);

  --max-width: 1100px;
  --content-width: 720px;
  --transition: 0.2s ease;

  --nav-bg: rgba(245, 242, 235, 0.92);
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --color-bg: #14161B;
  --color-bg-card: #1C1E24;
  --color-bg-muted: #22252C;
  --color-bg-footer: #0E1014;

  --color-text: #E8E4DD;
  --color-text-secondary: #7A7D85;
  --color-text-muted: #555860;
  --color-text-inverse: #14161B;

  --color-accent: #D4A853;
  --color-accent-light: #2A2520;
  --color-accent-dark: #B8922F;

  --color-border: #2A2D35;
  --color-border-hover: #3A3D45;

  --tag-delivery-bg: #2A2520;
  --tag-delivery-text: #D4A853;
  --tag-uni-bg: #1A1F2A;
  --tag-uni-text: #7A9EBE;
  --tag-sports-bg: #1A2518;
  --tag-sports-text: #7A9E7E;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);

  --nav-bg: rgba(20, 22, 27, 0.92);
}

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

html { scroll-behavior: smooth; min-height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-dark); }

img { max-width: 100%; height: auto; display: block; }

/* --- Container --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 40px; flex: 1; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--color-text);
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links { display: flex; gap: 28px; list-style: none; }

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border-hover);
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}

.theme-toggle::after {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent);
  position: absolute;
  top: 2px;
  left: 3px;
  transition: transform var(--transition);
}

[data-theme="dark"] .theme-toggle::after {
  transform: translateX(19px);
}

/* Hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--color-text); margin: 5px 0;
  transition: var(--transition);
  border-radius: 1px;
}

/* --- Hero --- */
.hero {
  padding: 72px 0 52px;
}

.hero-content {
  max-width: 720px;
}

.hero-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--color-text);
}

.hero-bio {
  font-size: 15px;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}
.btn-primary:hover { background: var(--color-accent-dark); color: var(--color-text-inverse); }

.btn-secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-hover);
}
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn-linkedin { background: #D4A853; color: var(--color-text-inverse); }
.btn-linkedin:hover { background: #B8922F; color: var(--color-text-inverse); }

/* --- Section headings --- */
.section { padding: 0 0 40px; }

.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  font-weight: 500;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header .view-all {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
}

/* --- Featured Post --- */
.featured-card {
  background: var(--color-bg-card);
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  gap: 20px;
  align-items: center;
  transition: box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}

.featured-card:hover {
  box-shadow: var(--shadow-md);
  color: inherit;
}

.featured-image {
  width: 100px;
  height: 100px;
  min-width: 100px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.featured-image img { width: 100%; height: 100%; object-fit: cover; }

.featured-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }

.featured-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 4px;
  line-height: 1.4;
  color: var(--color-text);
}

.featured-excerpt {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* --- Tags --- */
.tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.tag-delivery { background: var(--tag-delivery-bg); color: var(--tag-delivery-text); }
.tag-uni { background: var(--tag-uni-bg); color: var(--tag-uni-text); }
.tag-sports { background: var(--tag-sports-bg); color: var(--tag-sports-text); }

.read-time { font-size: 11px; color: var(--color-text-muted); }

/* --- Post Cards (list view) --- */
.post-list { display: flex; flex-direction: column; gap: 8px; }

.post-card {
  background: var(--color-bg-card);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}

.post-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.post-card h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--color-text);
}

.post-card-meta { display: flex; gap: 8px; align-items: center; }

.post-card-date {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* --- Post Cards (grid view for homepage) --- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.post-grid-card {
  background: var(--color-bg-card);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.post-grid-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  color: inherit;
  transform: translateY(-2px);
}

.post-grid-card .post-date {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.post-grid-card h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.post-grid-card .post-excerpt {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}

/* --- Topic Cards --- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.topic-card {
  background: var(--color-bg-card);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}

.topic-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  color: inherit;
}

.topic-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 18px;
}

.topic-card h3 { font-size: 13px; font-weight: 500; margin-bottom: 2px; color: var(--color-text); }
.topic-count { font-size: 11px; color: var(--color-text-muted); }

/* --- CTA Strip --- */
.cta-strip {
  background: var(--color-bg-card);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  margin: 0 0 40px;
}

.cta-strip h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 6px;
  color: var(--color-text);
}

.cta-strip p {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.cta-strip-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* --- Footer --- */
.footer {
  background: var(--color-bg-footer);
  color: var(--color-text);
  padding: 28px 0;
  margin-top: 48px;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  color: var(--color-text);
}

.footer-role {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.footer-tagline {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--color-border-hover);
  font-style: italic;
}

.footer-links { display: flex; gap: 20px; }

.footer-links a {
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* --- Page Header --- */
.page-header {
  padding: 56px 0 32px;
}

.page-header-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 10px;
  color: var(--color-text);
}

.page-header p {
  font-size: 15px;
  color: var(--color-text-secondary);
  max-width: 540px;
}

/* --- About Page --- */
.about-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.about-photo-col {
  position: sticky;
  top: 80px;
  align-self: start;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  background: var(--color-bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--color-text-muted);
  overflow: hidden;
}

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

.about-photo-name {
  font-weight: 500;
  font-size: 15px;
  margin-top: 14px;
  color: var(--color-text);
}

.about-photo-detail {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.about-content h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  margin: 36px 0 12px;
  color: var(--color-text);
}

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

.about-content p { margin-bottom: 16px; color: var(--color-text-secondary); font-size: 15px; line-height: 1.8; }

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

.about-content ul li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  color: var(--color-text-secondary);
  font-size: 15px;
}

.about-content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* --- Writing Page --- */
.writing-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  align-items: start;
  padding-bottom: 48px;
}

.writing-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-section { margin-bottom: 32px; }

.sidebar-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.sidebar-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.sidebar-topics { display: flex; flex-direction: column; gap: 10px; }

.sidebar-topic {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--color-border);
  background: var(--color-bg-card);
  transition: border-color var(--transition);
}

.sidebar-topic:hover { border-color: var(--color-accent); color: inherit; }

.sidebar-topic-desc { font-size: 12px; color: var(--color-text-muted); }

.writing-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  border-color: var(--color-accent);
}

/* --- Blog Post Page --- */
.post-content {
  max-width: var(--content-width);
  padding-bottom: 48px;
}

.post-hero { margin-bottom: 32px; }

.post-back {
  font-size: 13px;
  color: var(--color-text-muted);
  display: inline-block;
  margin-bottom: 20px;
}

.post-hero h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--color-text);
}

.post-hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.post-content h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  margin: 36px 0 12px;
  color: var(--color-text);
}

.post-content h3 {
  font-size: 17px;
  font-weight: 500;
  margin: 28px 0 8px;
  color: var(--color-text);
}

.post-content p { margin-bottom: 16px; color: var(--color-text-secondary); font-size: 15px; line-height: 1.8; }

.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--color-accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-accent);
}

.post-content code {
  background: var(--color-bg-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--color-text);
}

.post-content ul, .post-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--color-text-secondary);
  font-size: 15px;
}

.post-content li { margin-bottom: 6px; }

/* --- Work Page --- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.work-card {
  background: var(--color-bg-card);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  transition: all var(--transition);
}

.work-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.work-card h3 { font-size: 16px; font-weight: 500; margin-bottom: 4px; color: var(--color-text); }

.work-card-meta {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.work-card p { font-size: 13px; color: var(--color-text-secondary); line-height: 1.6; }

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 720px;
}

.contact-info h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--color-text);
}

.contact-info p { font-size: 14px; color: var(--color-text-secondary); margin-bottom: 20px; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-link:hover { color: var(--color-accent); }

.contact-link-label {
  font-size: 12px;
  color: var(--color-text-muted);
  min-width: 70px;
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeUp 0.5s ease forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .footer-inner { padding: 0 20px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 20px;
    gap: 16px;
  }
  .nav-toggle { display: block; }
  .nav-right { gap: 16px; }

  .hero h1 { font-size: 28px; }
  .hero { padding: 44px 0 36px; }

  .featured-card { flex-direction: column; }
  .featured-image { width: 100%; height: 140px; min-width: auto; }

  .post-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .about-layout { grid-template-columns: 1fr; gap: 24px; }
  .about-photo-col { position: static; max-width: 220px; }

  .writing-layout { grid-template-columns: 1fr; }
  .writing-sidebar { position: static; }

  .footer-inner { flex-direction: column; gap: 12px; }

  .page-header h1 { font-size: 28px; }
  .post-hero h1 { font-size: 26px; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; }
  .cta-strip-buttons { flex-direction: column; align-items: center; }
}
