/* Enhanced Professional Styles with Dark Mode Support */

:root {
  /* Light mode colors */
  --bg: #fafbfc;
  --bg-secondary: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --text: #24292f;
  --text-secondary: #57606a;
  --muted: #6e7781;
  --line: #d1d9e0;
  --line-light: #e1e7ed;
  --brand: #0969da;
  --brand-hover: #0860ca;
  --success: #1a7f37;
  --warning: #9a6700;
  
  /* Design tokens */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(31, 35, 40, 0.04), 0 1px 2px rgba(31, 35, 40, 0.06);
  --shadow: 0 4px 12px rgba(31, 35, 40, 0.08);
  --shadow-lg: 0 12px 28px rgba(31, 35, 40, 0.12);
  --maxw: 1200px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Typography scale */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --surface: #161b22;
    --surface-2: #21262d;
    --text: #f0f6fc;
    --text-secondary: #8b949e;
    --muted: #6e7681;
    --line: #30363d;
    --line-light: #21262d;
    --brand: #58a6ff;
    --brand-hover: #79b8ff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.36);
  }
}

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

html {
  height: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Links */
a {
  color: var(--brand);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;  /* Move it further up */
  left: -100px;  /* Move it off to the left too */
  background: var(--brand);
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  transition: top 0.2s, left 0.2s;
}

.skip-link:focus {
  top: 0;
  left: 0;  /* Bring it back when focused */
}

/* Top Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(250, 251, 252, 0.8);
  border-bottom: 1px solid var(--line);
  transition: var(--transition);
}

@media (prefers-color-scheme: dark) {
  .topbar {
    background: rgba(13, 17, 23, 0.8);
  }
}

.topwrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site {
  font-family: 'Fleur De Leah', cursive;
  font-weight: 720;
  font-size: 2.2rem;  /* Slightly larger for calligraphy */
  letter-spacing: 1px;
  color: var(--text);
  transition: transform 0.2s ease;
}

.site:hover {
  //transform: translateX(2px);
  text-decoration: none;
}

nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.navlink {
  position: relative;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.navlink:hover {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.navlink[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* Layout */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 80px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  animation: fadeIn 0.5s ease;
}

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

@media (max-width: 980px) {
  .wrap {
    grid-template-columns: 1fr;
    padding: 24px 16px 60px;
  }
}

/* Sidebar */
.side {
  position: sticky;
  top: 80px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.side:hover {
  box-shadow: var(--shadow-lg);
}

.avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--line-light);
  margin: 0 auto 16px;
  transition: transform 0.3s ease;
}

.avatar:hover {
  transform: scale(1.05);
}

.name {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 8px 0 4px;
  text-align: center;
  letter-spacing: -0.02em;
}

.role {
  color: var(--text-secondary);
  text-align: center;
  margin: 4px 0 16px;
  font-size: 0.95rem;
}

.bio {
  color: var(--muted);
  margin: 12px 0 20px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
}

.slist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.slist li {
  margin: 10px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.slist img {
  width: 20px;
  height: 20px;
  display: block;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.slist li:hover img {
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn:hover {
  background: var(--surface);
  border-color: var(--text-secondary);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

/* Main Content */
.main {
  min-width: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  transition: var(--transition);
}

.panel:hover {
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
}

.lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Lists */
.list {
  list-style: disc;  /* or circle, square */
  padding-left: 20px;
  margin: 10px 0;
}

.list li {
  padding: 4px 0;
  margin: 8px 0;
  /* Remove all the border, background, and box styling */
}

.list li:first-child {
  margin-top: 0;
}

.list li:last-child {
  margin-bottom: 0;
}

.meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.meta a {
  color: var(--text-secondary);
  font-weight: 500;
}

.meta a:hover {
  color: var(--brand);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Footer */
.footer {
  color: var(--muted);
  text-align: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-light);
  font-size: 0.875rem;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .topwrap {
    padding: 10px 16px;
  }
  
  .site {
    font-size: 1rem;
  }
  
  .navlink {
    padding: 4px 12px;
    font-size: 0.875rem;
  }
  
  .panel {
    padding: 20px;
  }
  
  .avatar {
    width: 150px;
    height: 150px;
  }
  
  .name {
    font-size: 1.5rem;
  }
}

/* Print Styles */
@media print {
  .topbar,
  .skip-link {
    display: none;
  }
  
  .wrap {
    display: block;
  }
  
  .side {
    position: static;
    margin-bottom: 2rem;
  }
  
  .panel {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  a {
    color: inherit;
    text-decoration: underline;
  }
}

/* Loading animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
