/* ===== VARIABLES ===== */
:root {
  --bg: #fdf8f2;
  --text: #2c2c2c;
  --amber: #b07d4f;
  --sage: #6b8f71;
  --white: #ffffff;
  --border: #e8ddd0;
  --placeholder-img: #d0c4b0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 8px;
  --font-heading: 'Lora', serif;
  --font-body: 'Inter', sans-serif;
  --nav-height: 60px;
  --text-secondary: #555;
  --text-muted: #767676;
  --code-bg: #f0ece6;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
a.link-plain { color: inherit; }
a.link-plain:hover { color: var(--amber); }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}
.navbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.navbar-brand:hover { text-decoration: none; color: var(--amber); }
.navbar-links { display: flex; gap: 2rem; list-style: none; }
.navbar-links a {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.navbar-links a:hover,
.navbar-links a.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
  text-decoration: none;
}

/* ===== LAYOUT ===== */
main { flex: 1; }
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.3; }
h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.6rem; margin-bottom: 1rem; color: var(--amber); }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

/* ===== FOOTER ===== */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.footer-copy { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* ===== PHOTO PLACEHOLDER ===== */
.photo-placeholder {
  background: var(--placeholder-img);
  border-radius: 50%;
  flex-shrink: 0;
}
.photo-sm {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.photo-lg {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ===== HERO (HOME) ===== */
.hero {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 4rem 0 3rem;
  flex-wrap: wrap;
}
.hero-text { flex: 1; min-width: 240px; }
.hero-tagline {
  font-size: 1rem;
  color: var(--sage);
  font-weight: 500;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}
.hero-bio { color: var(--text-secondary); font-size: 1.05rem; }

/* ===== WHAT I DO TILES ===== */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.tile {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border-top: 3px solid var(--amber);
}
.tile h3 { color: var(--amber); margin-bottom: 0.5rem; }
.tile p { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }

/* ===== ABOUT PAGE ===== */
.about-hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.about-hero-text { flex: 1; min-width: 240px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 600px) {
  .two-col { grid-template-columns: 1fr; }
  .navbar-links { gap: 1rem; }
  .hero { padding: 2rem 0 1.5rem; }
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.timeline-item { margin-bottom: 1.25rem; }
.timeline-item strong { display: block; font-size: 0.95rem; }
.timeline-item span { font-size: 0.85rem; color: var(--text-muted); }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; }
.tag {
  background: #edf4ef;
  color: var(--sage);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.skills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; }
.skill {
  background: #fef3e8;
  color: var(--amber);
  border-radius: var(--radius);
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== WORKS CARDS ===== */
.page-header { margin-bottom: 2.5rem; }
.page-header p { color: var(--text-secondary); font-size: 1.05rem; margin: 0; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  text-decoration: none;
}
.card-date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.card h3 { font-size: 1.05rem; margin-bottom: 0.6rem; color: var(--text); }
.card p { font-size: 0.9rem; color: var(--text-secondary); margin: 0; flex: 1; }

/* ===== SINGLE WORK ===== */
.back-link { margin-bottom: 2rem; display: inline-block; color: var(--amber); font-size: 0.95rem; }
.back-link:hover { text-decoration: underline; }
.work-header { margin-bottom: 2.5rem; }
.work-date { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.4rem; }
.work-body { max-width: 700px; }
.work-body h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; color: var(--amber); }
.work-body h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.work-body p { color: var(--text-secondary); }
.work-body ul, .work-body ol { margin: 0 0 1rem 1.5rem; }
.work-body li { margin-bottom: 0.4rem; }
.work-body code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}
.work-body pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1rem;
}

/* ===== ERROR / LOADING STATES ===== */
.state-message {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.state-message a { color: var(--amber); }

/* ===== PRESENTATIONS & PUBLICATIONS ===== */
.pub-category { margin-bottom: 1rem; }
.pub-category:last-child { margin-bottom: 2.5rem; }
.pub-category summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sage);
  padding: 0.5rem 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.pub-category summary::-webkit-details-marker { display: none; }
.pub-category summary::after {
  content: '▸';
  font-size: 0.7rem;
  transition: transform 0.2s;
}
.pub-category[open] summary::after {
  transform: rotate(90deg);
}
.pub-item {
  display: flex;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.pub-item:last-child { border-bottom: none; }
.pub-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 85px;
  padding-top: 0.2rem;
}
.pub-title {
  font-size: 0.93rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.pub-venue {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin: 0;
}
@media (max-width: 600px) {
  .pub-item { flex-direction: column; gap: 0.25rem; }
  .pub-date { min-width: unset; }
}

/* ===== BEEN PART OF — LOGOS GRID ===== */
.logos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
}
.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: opacity 0.15s, transform 0.15s;
}
.logo-link:hover { opacity: 0.75; transform: translateY(-2px); }
.org-logo { height: 60px; width: auto; display: block; }

/* ===== FIND ME ===== */
.find-me { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; margin-top: 0.5rem; }
.find-me-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.find-me-link:hover { color: var(--amber); text-decoration: none; }
.social-icon { width: 32px; height: 32px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .card:hover { transform: none; }
  html { scroll-behavior: auto; }
}
