:root {
  --background: #ffffff;
  --foreground: #020817;
  --card: #ffffff;
  --card-foreground: #020817;
  --popover: #ffffff;
  --popover-foreground: #020817;
  --primary: #0f172a;
  --primary-foreground: #f8fafc;
  --secondary: #f8fafc;
  --secondary-foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --accent-foreground: #0f172a;
  --destructive: #ef4444;
  --destructive-foreground: #f8fafc;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #020817;
  --radius: 4px;

  --dsa: #0000FF;
  --oops: #800080;
  --sql: #008000;
  --os: #FF0000;
  --net: #008080;
  --apt: #FFA500;
}

[data-theme='dark'] {
  --background: #000000;
  --foreground: #f8fafc;
  --card: #000000;
  --card-foreground: #f8fafc;
  --primary: #f8fafc;
  --primary-foreground: #000000;
  --secondary: #121212;
  --secondary-foreground: #f8fafc;
  --muted: #121212;
  --muted-foreground: #94a3b8;
  --accent: #121212;
  --accent-foreground: #f8fafc;
  --border: #333333;
  --input: #333333;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  transition: background-color 0.2s, color 0.2s;
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling - Oatmeal Inspired */
.sidebar {
  width: 240px;
  border-right: 1px solid var(--border);
  background-color: var(--background);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar.collapsed {
  width: 64px;
}

.sidebar-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 64px;
  justify-content: flex-start;
  transition: justify-content 0.3s;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 1rem 0;
}

.sidebar-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--background);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: var(--secondary);
}

.sidebar-toggle span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--foreground);
  transition: all 0.3s;
}

/* Hamburger Animation */
.sidebar.collapsed .sidebar-toggle span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.sidebar.collapsed .sidebar-toggle span:nth-child(2) { opacity: 0; }
.sidebar.collapsed .sidebar-toggle span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

.sidebar-logo {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.sidebar.collapsed .sidebar-logo {
  display: none;
}

.sidebar-nav {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  flex-grow: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  text-decoration: none;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s;
  white-space: nowrap;
  gap: 1rem;
}

.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 0.75rem 0;
  gap: 0;
}

.sidebar.collapsed .sidebar-link span:last-child {
  display: none;
}

.sidebar-link:hover, .sidebar-link.active {
  background-color: var(--secondary);
  color: var(--foreground);
}

.sidebar-link span:first-child {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.sidebar.collapsed .sidebar-footer {
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  padding: 1rem 0;
}

.sidebar.collapsed .sidebar-footer span:first-child {
  display: none;
}


/* Main Content Wrapper */
.main-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Prevents overflow issues */
}

header {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  background: var(--background);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 64px;
}


nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--muted-foreground);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s;
}

nav a:hover, nav a.active {
  color: var(--foreground);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-secondary {
  background-color: var(--background);
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

main {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
}

h1, h2, h3 {
  letter-spacing: -0.025em;
  font-weight: 750;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--muted-foreground);
}

/* Category Specifics */
.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Grid for Home */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Checklist Styles */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.checklist-item:hover {
  border-color: var(--foreground);
}

input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 0.125rem;
}

.summary-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

textarea {
  width: 100%;
  min-height: 150px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-family: inherit;
  color: var(--foreground);
  margin: 1rem 0;
  resize: vertical;
}
