:root {
  --bg: #ffffff;
  --card-bg: #f8fafc;
  --card-hover: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
}

/* Basic Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  padding: 2.5rem 1rem;
  scroll-behavior: smooth;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
}

.profile-container {
  max-width: 650px;
  margin: 40px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.profile-img {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}

h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text);
  letter-spacing: -0.025em;
}

p.subtitle, .subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Content & Category Sections */
section {
  margin-bottom: 20px;
}

.category {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  scroll-margin-top: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.65rem;
  margin-bottom: 1.25rem;
}

.category h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

h2 {
  font-size: 1.2rem;
  color: #2c3e50;
  border-bottom: 2px solid #eef2f5;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

p, ul {
  font-size: 0.95rem;
  color: #4a4a4a;
}

ul {
  list-style-type: square;
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
}

/* Directory / Table of Contents */
.directory {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.directory h2 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.directory-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-left: 0;
}

.directory-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.directory-list a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.directory-list a::before {
  content: "↓";
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Links & Directory Items */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.links a {
  display: inline-block;
  padding: 8px 16px;
  background-color: #0066cc;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.links a:hover {
  background-color: #0052a3;
  text-decoration: none;
}

.links a:active {
  transform: scale(0.98);
}

.back-to-top {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background-color: #ffffff;
  border: 1px solid var(--border);
  margin-left: auto;
}

.back-to-top:hover {
  color: var(--accent);
  border-color: var(--border-hover);
}

.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-left: 0;
}

.link-item {
  background-color: #ffffff;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.link-item:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
}

.link-item a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  word-break: break-all;
}

.link-item a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.link-desc {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-top: 0.15rem;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.8rem;
  color: #888;
  margin-top: 30px;
  border-top: 1px solid #eef2f5;
  padding-top: 15px;
}