@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;600&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui;
  background: #0f172a;
  color: #e5e7eb;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* هدر */

.site-header {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid #1f2937;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.logo {
  font-size: 20px;
  font-weight: 600;
}

nav a {
  margin-left: 16px;
  font-size: 14px;
  opacity: 0.8;
}

nav a:hover {
  opacity: 1;
}

/* فوتر */

.site-footer {
  border-top: 1px solid #1f2937;
  margin-top: 40px;
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
}

main.container {
  padding: 24px 16px 40px;
}

/* بخش درباره من */

.hero {
  background: radial-gradient(circle at top left, #1d4ed8, transparent 60%),
              radial-gradient(circle at bottom right, #22c55e, transparent 60%);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  border: 1px solid #1f2937;
}

.hero h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.hero p {
  margin: 0;
  line-height: 1.8;
}

/* عنوان پروژه‌ها */

.projects h2 {
  margin-bottom: 16px;
}

/* گرید کارت‌ها */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* کارت پروژه با انیمیشن و هاور */

.project-card {
  background: #020617;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;

  /* انیمیشن و ترنزیشن */
  transform: translateY(0) scale(1);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

/* انیمیشن ورود کارت‌ها */

@keyframes fadeUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* افکت هاور کارت */

.project-card:hover {
  transform: translateY(-12px) scale(1.05);
  box-shadow: 0 25px 45px rgba(0,0,0,0.45);
  border-color: #2563eb;
}

/* نور ملایم زیر کارت هنگام هاور */

.project-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(37,99,235,0.18), transparent 60%);
  transform: scale(0);
  transition: transform 0.45s ease;
  pointer-events: none; /* این خط معجزه می‌کنه */
}

.project-card:hover::before {
  transform: scale(1);
}

/* متن داخل کارت */

.project-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.project-date {
  font-size: 13px;
  color: #9ca3af;
}

.project-desc {
  font-size: 14px;
  line-height: 1.7;
}

/* دکمه‌ها */

.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #22c55e);
  color: #f9fafb;
  font-size: 13px;
  border: none;
  cursor: pointer;
  text-align: center;
  margin-top: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.35);
}

.btn-secondary {
  background: #111827;
}

.btn-danger {
  background: #b91c1c;
}

.btn-small {
  padding: 6px 10px;
  font-size: 12px;
}

/* پنل ادمین */

.auth-box,
.admin-panel {
  background: #020617;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #1f2937;
}

.auth-box h2,
.admin-panel h2 {
  margin-top: 0;
}

.auth-box form,
.admin-section form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 13px;
}

input,
textarea {
  background: #020617;
  border-radius: 8px;
  border: 1px solid #1f2937;
  padding: 8px 10px;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 13px;
}

input:focus,
textarea:focus {
  outline: 1px solid #2563eb;
}

.error {
  color: #f97316;
  font-size: 13px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-section {
  margin-top: 20px;
}

.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.grid-form textarea {
  grid-column: 1 / -1;
}

.grid-form button {
  grid-column: 1 / -1;
  justify-self: flex-start;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.project-edit-form {
  flex: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1fr;
  gap: 6px;
}

.project-edit-form textarea {
  grid-column: 1 / -1;
}

/* ریسپانسیو */

@media (max-width: 768px) {
  .project-edit-form {
    grid-template-columns: 1fr;
  }
  .project-row {
    flex-direction: column;
  }
  .grid-form {
    grid-template-columns: 1fr;
  }
}


.project-card { 
    position: relative; 
    z-index: 1; 
    
} 
.project-card * { 
    position: relative; 
    z-index: 2; 
    
} 

.project-card::before { 
    z-index: 0; 
        
}

.project-card {
  min-height: 300px;
}
