:root {
  --bg-primary: #f7faff;
  --bg-secondary: #f5f7fa;
  --bg-box: linear-gradient(135deg, #f6f7f8, #d4dadb);
  --bg-box-hover: #b6b8c9;
  --bg-nav: linear-gradient(135deg, rgb(0, 101, 168), rgb(51, 74, 88));
  
  --text-primary: #1e293b;
  --text-secondary: #374151;
  --text-tertiary: #475569;
  --text-title: #1e3a8a;
  --text-box-title: #2563eb;
  --text-nav: #dce2eb;
  --text-nav-hover: #2563eb;
  --text-logo-h1: #dbe0ec;
  --text-logo-p: #dfe7f3;
  
  --border-box: #1d6ccc;
  --border-box-hover: #60a5fa;
  --nav-shadow: rgba(0,0,0,0.08);
  --box-shadow-hover: rgba(0,0,0,0.15);
}

body:has(#theme-toggle:checked) {
  --bg-primary: #0f172a;
  --bg-secondary: #0f172a;
  --bg-box: linear-gradient(135deg, #1e293b, #334155);
  --bg-box-hover: #475569;
  --bg-nav: linear-gradient(135deg, #1e3a5f, #2d3748);
  
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-title: #60a5fa;
  --text-box-title: #60a5fa;
  --text-nav: #e2e8f0;
  --text-nav-hover: #60a5fa;
  --text-logo-h1: #dbe0ec;
  --text-logo-p: #dfe7f3;
  
  --border-box: #60a5fa;
  --border-box-hover: #93c5fd;
  --nav-shadow: rgba(0,0,0,0.3);
  --box-shadow-hover: rgba(0,0,0,0.5);
}

.theme-checkbox {
  display: none;
}

body {
  font-family: "Poppins", Arial, sans-serif;
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  text-align: center;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav {
  background: var(--bg-nav);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  box-shadow: 0 3px 10px var(--nav-shadow);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 25px;
}

.logo-circle {
  background: var(--bg-nav);
  color: white;
  font-size: 1.6rem;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s;
}

.logo-circle:hover {
  transform: rotate(10deg) scale(1.1);
}

.logo-text h1 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--text-logo-h1);
}

.logo-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-logo-p);
}

.menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu a {
  text-decoration: none;
  color: var(--text-nav);
  margin: 0 10px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: 0.3s;
}

.menu a:hover {
  background-color: rgb(255, 255, 255);
  color: white,var(--text-nav-hover);
}


.menu .active {
  color: #cbd4e7;
  font-weight: 600;
}

.theme-switch {
  cursor: pointer;
  width: 50px;
  height: 26px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  transition: background 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.theme-icon {
  display: none;
}

.theme-switch::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  left: 3px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body:has(#theme-toggle:checked) .theme-switch::after {
  transform: translateX(24px);
}

.h1 {
  margin-top: 50px;
  color: var(--text-title);
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.p {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.directory {
  width: 90%;
  margin: 40px auto;
}

.row {
  display: inline-block;
  width: 100%;
  margin-bottom: 30px;
}

.box {
  display: inline-block;
  width: 31%;
  margin: 10px;
  background: var(--bg-box);
  border: 3px solid var(--border-box);
  border-radius: 20px;
  padding: 30px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.box:hover {
  background-color: var(--bg-box-hover);
  border-color: var(--border-box-hover);
  box-shadow: 0 4px 12px var(--box-shadow-hover);
}

.box img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-top: 10px;
}

.box h3 {
  color: var(--text-box-title);
  margin-bottom: 6px;
  transition: color 0.3s ease;
}

.box p {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  transition: color 0.3s ease;
}