:root {
  --primary: #5b8def;
  --primary-dark: #3f6fd1;
  --soft-blue: #eaf2fd;
  --soft-blue-2: #dce9fb;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --white: #ffffff;
  --success: #2f9e5b;
  --error: #d9534f;
  --border: #d9e6fb;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(91, 141, 239, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--soft-blue);
  color: var(--text-dark);
  line-height: 1.6;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navbar ---------- */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.navbar .brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-dark);
}

.navbar .brand:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-dark);
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-dark);
  text-decoration: none;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-copy {
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--soft-blue);
  color: var(--primary-dark);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.footer-social a:hover {
  background: var(--primary-dark);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-2px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary-dark);
}

.btn-danger {
  background: var(--error);
  color: var(--white);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: 70px 0;
  text-align: center;
}

.hero img.profile-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 24px;
  border: 4px solid var(--white);
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.hero .headline {
  color: var(--primary-dark);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero .about-summary {
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--text-muted);
}

.hero .hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section {
  padding: 50px 0;
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 28px;
  text-align: center;
}

/* ---------- Cards / grid ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.project-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: var(--soft-blue-2);
}

.project-card .project-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card h3 {
  margin: 0 0 8px;
}

.project-card p {
  color: var(--text-muted);
  flex: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.tag {
  background: var(--soft-blue-2);
  color: var(--primary-dark);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

/* ---------- Detail page ---------- */
.detail-header img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.detail-links {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  max-width: 560px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--soft-blue);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
}

/* ---------- Flash messages ---------- */
.flash {
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-weight: 500;
}

.flash-success {
  background: #e4f7ec;
  color: var(--success);
  border: 1px solid #b9e6cb;
}

.flash-error {
  background: #fbe9e8;
  color: var(--error);
  border: 1px solid #f3c6c4;
}

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    gap: 14px;
    font-size: 0.9rem;
  }
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Contact ---------- */
.contact-info {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-top: 24px;
}

.contact-info p {
  margin: 6px 0;
}

/* ---------- Dashboard ---------- */
.dash-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

.dash-sidebar {
  width: 220px;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  flex-shrink: 0;
}

.dash-sidebar a {
  display: block;
  padding: 12px 24px;
  color: var(--text-dark);
  font-weight: 500;
}

.dash-sidebar a:hover,
.dash-sidebar a.active {
  background: var(--soft-blue);
  color: var(--primary-dark);
  text-decoration: none;
  border-right: 3px solid var(--primary);
}

.dash-main {
  flex: 1;
  padding: 32px;
}

.dash-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.stat-card .stat-label {
  color: var(--text-muted);
}

.shortcut-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

table.data-table th,
table.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.data-table th {
  background: var(--soft-blue-2);
  color: var(--text-dark);
}

table.data-table tr:last-child td {
  border-bottom: none;
}

.table-thumb {
  width: 60px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
}

.badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-unread {
  background: #fde8e8;
  color: var(--error);
}

.badge-read {
  background: #e4f7ec;
  color: var(--success);
}

.actions-cell {
  display: flex;
  gap: 8px;
}

.login-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--soft-blue-2);
  color: var(--primary-dark);
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.skill-chip button {
  border: none;
  background: var(--white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--error);
  font-weight: 700;
}
