/* Dr. Michael Tivin — CV — Warm, Academic, Professional */

:root {
  --bg: #faf8f5;
  --bg-card: #ffffff;
  --bg-nav: rgba(250, 248, 245, 0.96);
  --text: #1a1a2e;
  --text-muted: #5c5c6d;
  --accent: #c17f59;
  --accent-hover: #a86a47;
  --accent-soft: rgba(193, 127, 89, 0.15);
  --accent-dark: #2d3e50;
  --border: #e8e4de;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, sans-serif;
  --max-width: 700px;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(26, 26, 46, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 80%, var(--accent-soft) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(45, 62, 80, 0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  backdrop-filter: blur(8px);
  transition: background 0.3s, box-shadow 0.3s;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent-dark);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-muted);
}

/* Main */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 4rem;
  padding-top: 100px;
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
  border-bottom: 1px solid var(--border);
  animation: heroFade 0.8s ease-out;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.hero-title-suffix {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.hero-location {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-summary {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
}

/* Sections */
.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent-dark);
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

/* Experience */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.exp-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  align-items: start;
  padding: 1rem 0;
  border-radius: var(--radius);
  transition: background 0.25s ease, transform 0.2s ease;
}

.exp-item.reveal-ready {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.25s;
}

.exp-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.exp-item:hover {
  background: var(--accent-soft);
}

.exp-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  transition: color 0.2s;
}

.exp-item:hover .exp-date {
  color: var(--accent-hover);
}

.exp-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.exp-company {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.exp-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.exp-content ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
}

.exp-content li {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  line-height: 1.55;
}

/* Skills */
.skills-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.skill-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skill-box.reveal-ready {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.25s;
}

.skill-box.revealed {
  opacity: 1;
  transform: translateY(0);
}

.skill-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26, 26, 46, 0.1);
}

.skill-box--full {
  grid-column: 1 / -1;
}

.skill-box h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

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

.skill-box li {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.skill-box li:last-child {
  border-bottom: none;
}

/* Education */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edu-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1rem;
  border-radius: var(--radius);
  transition: background 0.25s ease;
}

.edu-item.reveal-ready {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.25s;
}

.edu-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.edu-item:hover {
  background: var(--accent-soft);
}

.edu-date {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.edu-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.edu-school {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Contact */
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;
}

.contact-email-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.contact-email-reveal-btn {
  padding: 0.875rem 1.5rem;
  background: var(--accent-dark);
  color: white;
  border: none;
  font-weight: 500;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.contact-email-reveal-btn:hover {
  background: #3d5060;
}

.contact-email-revealed {
  display: flex;
  align-items: stretch;
}

.contact-email-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  border-right: 1px solid var(--border);
  transition: background 0.2s;
  min-width: 200px;
}

.contact-email-link:hover {
  background: var(--accent-soft);
}

.contact-email-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  padding: 0;
  background: var(--bg);
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: color 0.2s, background 0.2s;
}

.contact-email-copy:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.contact-email-copy.copied {
  color: var(--accent);
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.2s;
  font-size: 0.95rem;
  font-family: inherit;
}

.contact-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    padding: 0 1.25rem;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links.is-open {
    display: flex;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.is-open a {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  main {
    padding: 0 1.25rem 3rem;
    padding-top: 84px;
  }

  .hero {
    padding: 2.5rem 0 3rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .edu-item {
    grid-template-columns: 1fr;
  }
}
