/* ============================================
   Kevin P. Dyer - Sleek minimal theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root,
[data-theme="light"] {
  --color-bg: #fafafa;
  --color-bg-secondary: #ffffff;
  --color-bg-tertiary: #f5f5f5;
  --color-text: #171717;
  --color-text-muted: #525252;
  --color-text-subtle: #737373;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-hover: rgba(0, 0, 0, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --color-bg: #0c0c0c;
  --color-bg-secondary: #141414;
  --color-bg-tertiary: #1a1a1a;
  --color-text: #fafafa;
  --color-text-muted: #a3a3a3;
  --color-text-subtle: #737373;
  --color-accent: #3b82f6;
  --color-accent-hover: #60a5fa;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
}

[data-theme="light"] body::before,
:root body::before {
  background: radial-gradient(ellipse 70% 40% at 50% -10%, rgba(37, 99, 235, 0.06), transparent);
}

[data-theme="dark"] body::before {
  background: radial-gradient(ellipse 70% 40% at 50% -10%, rgba(59, 130, 246, 0.08), transparent);
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p {
  color: var(--color-text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.875rem 0;
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

[data-theme="dark"] .nav {
  background: rgba(12, 12, 12, 0.85);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

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

.nav-links {
  display: flex;
  gap: 0.125rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--color-text);
  background: var(--color-bg-tertiary);
}

.nav-links a.active {
  color: var(--color-accent);
  background: transparent;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

@media (max-width: 600px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg-secondary);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .nav-links.active { display: flex; }
  .nav { position: relative; }
}

/* Hero */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 0.375rem;
}

.hero-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.hero-bio {
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.hero-link:hover {
  border-color: var(--color-border-hover);
  color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.hero-link svg {
  width: 16px;
  height: 16px;
}

.quick-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-link {
  color: var(--color-text-subtle);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

/* Page Header */
.page-header {
  padding: 6rem 0 1.5rem;
  text-align: center;
}

.page-title {
  font-size: 2rem;
}

/* Section */
.section {
  padding: 1.5rem 0 3rem;
}

/* Publications */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.publication {
  padding: 1.125rem 1.25rem;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.publication:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-sm);
}

.publication-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.publication-authors {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.125rem;
}

.publication-authors strong {
  color: var(--color-text);
  font-weight: 600;
}

.publication-venue {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  margin-bottom: 0.5rem;
}

.publication-award {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--color-bg-tertiary);
  color: var(--color-text-muted);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .publication-award {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  background: transparent;
  border-radius: 4px;
  transition: background var(--transition);
}

.pub-link:hover {
  background: var(--color-bg-tertiary);
}

/* Category Headers */
.category-header {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-subtle);
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

.category-header:first-of-type {
  margin-top: 0;
}

/* Projects */
.projects-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.project {
  padding: 1.125rem 1.25rem;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.project:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-sm);
}

.project-header {
  margin-bottom: 0.375rem;
}

.project-title {
  font-size: 1rem;
  font-weight: 600;
}

.project-title a {
  color: var(--color-text);
  transition: color var(--transition);
}

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

.project-description {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.55;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--color-bg-tertiary);
  color: var(--color-text-subtle);
  border-radius: 4px;
}

/* Footer */
.footer {
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-tertiary);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  transition: color var(--transition);
}

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

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-border-hover);
}

.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

.theme-toggle .moon-icon {
  display: none;
}

.theme-toggle .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: none;
}

::selection {
  background: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] ::selection {
  background: rgba(59, 130, 246, 0.25);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content > * {
  animation: fadeInUp 0.4s ease-out backwards;
}

.hero-text h1 { animation-delay: 0.05s; }
.hero-title { animation-delay: 0.1s; }
.hero-bio { animation-delay: 0.15s; }
.hero-links { animation-delay: 0.2s; }
.quick-links { animation-delay: 0.25s; }

@media print {
  .nav, .footer, .theme-toggle { display: none !important; }
  body::before { display: none; }
}
