@font-face {
  font-family: 'Thmanyah';
  src: url('../otf/thmanyahseriftext-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah';
  src: url('../otf/thmanyahseriftext-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah';
  src: url('../otf/thmanyahseriftext-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Thmanyah';
  src: url('../otf/thmanyahseriftext-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Seasonal / Tree Stump Colors */
  --primary: #8C5A35; /* Wood brown */
  --primary-hover: #6c4222;
  --secondary: #D4A373; /* Light wood */
  --accent: #E9EDC9; /* Soft leaf green */
  --accent-dark: #A3B18A;
  --background: #FAEDCD; /* Warm paper / old parchment */
  --card-bg: #FEFAE0; /* Lighter background for cards */
  --text-main: #3E2723; /* Dark brown for text */
  --text-muted: #6D4C41;
  --border-color: #D4A373;
  --white: #FFFFFF;
  --danger: #c62828;
}

body.dark-mode {
  --primary: #C58A5C;
  --primary-hover: #D4A373;
  --secondary: #8C5A35;
  --accent: #4B5A3F;
  --accent-dark: #2F3A26;
  --background: #1A120E;
  --card-bg: #2A1F1A;
  --text-main: #FAEDCD;
  --text-muted: #D4A373;
  --border-color: #4A3525;
  --white: #2A1F1A;
}

#back-to-top {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  font-size: 1.2rem;
  border: none;
  outline: none;
  background-color: var(--primary);
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: background-color 0.3s, transform 0.3s;
}

#back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-5px);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Thmanyah', serif;
  font-weight: bold; /* Requested default */
  background-color: var(--background);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  line-height: 1.8;
  direction: rtl;
  font-size: 18px;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  margin-top: 0;
  font-weight: 900;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Layout */
.container {
  max-width: var(--container-max, 1000px);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

header {
  padding: 20px 0;
  text-align: center;
  border-bottom: 1px solid rgba(212, 163, 115, 0.2);
  margin-bottom: 40px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--background);
  background: color-mix(in srgb, var(--background) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  transition: background 0.3s ease;
}

.logo,
.logo-text {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
}

.logo-link {
  margin-left: 20px;
}

.logo span {
  color: var(--accent-dark);
}

nav {
  margin-top: 0;
  margin-left: 20px;
}

nav a {
  margin: 0 10px;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 8px;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background-color: var(--primary);
  transition: width 0.3s ease;
  border-radius: 2px;
}

nav a:hover::after, nav a.active::after {
  width: 80%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-link img {
  width: 60px;
  height: 60px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

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

.menu-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--primary);
  font-size: 1.2rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.menu-toggle:hover {
  background: var(--card-bg);
}

#theme-toggle {
  background: transparent;
  color: var(--primary);
  padding: 8px 12px;
  border-radius: 50%;
  font-size: 1.2rem;
  border: 2px solid var(--border-color);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Mobile/tablet/desktop breakpoints → see css/responsive.css */

/* Skills Section */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 40px 0;
}

.skill-tag {
  background: var(--white);
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: bold;
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
  transition: transform 0.3s;
}

.skill-tag:hover {
  transform: translateY(-5px);
  background: var(--primary);
  color: var(--white);
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border-color: var(--border-color);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 2px solid var(--border-color);
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary);
  color: var(--white);
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

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

footer,
.site-footer {
  border-top: 2px solid var(--border-color);
  margin-top: 60px;
  color: var(--text-muted);
}

.site-footer {
  padding: 50px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 15px;
}

.footer-brand .footer-logo img {
  width: 65px;
  height: 65px;
}

.footer-brand p {
  line-height: 1.8;
  margin: 0;
  font-size: 0.95rem;
}

.footer-links h4,
.footer-contact h4 {
  color: var(--primary);
  font-size: 1.1rem;
  margin: 0 0 18px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 1rem;
  font-weight: bold;
}

.footer-contact p {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(212, 163, 115, 0.3);
  font-size: 0.9rem;
}

/* Sections */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.section-header .section-title {
  margin-bottom: 0;
}

.view-all-link {
  font-weight: bold;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.view-all-link:hover {
  color: var(--primary-hover);
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
  color: var(--primary);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: 0;
  width: 60%;
  height: 5px;
  background: linear-gradient(to left, var(--primary), var(--accent-dark));
  border-radius: 5px;
}

/* Keep content visible until AOS initializes */
body:not(.aos-init) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

/* SPA Views */
.view {
  display: none;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}
.view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhancements & Animations */
.glass-panel {
  background: rgba(254, 250, 224, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 163, 115, 0.3);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(62, 39, 35, 0.05);
}

.trunk-badge {
  display: inline-block;
  background-color: var(--accent);
  color: var(--primary-hover);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 900;
  margin-bottom: 15px;
  border: 1px solid var(--accent-dark);
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 60vh;
  padding: 60px 20px;
  margin-bottom: 60px;
  animation: floatBackground 15s ease-in-out infinite alternate;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.5;
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -50px; left: -50px;
  width: 250px; height: 250px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  opacity: 0.3;
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 20px;
  text-shadow: 2px 2px 10px rgba(140, 90, 53, 0.1);
    height: 1.4em;
}

.hero p {
  font-size: 1.3rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 40px;
  line-height: 1.9;
}

/* Interactive Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 35px;
  margin-bottom: 50px;
}

.card {
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(212, 163, 115, 0.15);
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 5px;
  background-color: var(--primary);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(62, 39, 35, 0.1);
  border-color: var(--secondary);
}
.card:hover::after {
  transform: scaleY(1);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
  transition: transform 0.5s ease;
}
.card:hover .card-img {
  transform: scale(1.05);
}

.card-img-wrapper {
  overflow: hidden;
}

.card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--text-main);
}

.card-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 25px;
  flex-grow: 1;
}

.card .btn {
  align-self: flex-start;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.card .btn:hover {
  background: var(--primary);
  color: var(--white);
}

/* Reviews Scroll */
.reviews-section {
  background: linear-gradient(135deg, var(--accent) 0%, var(--background) 100%);
  padding: 60px 40px;
  border-radius: 24px;
  margin-bottom: 70px;
  position: relative;
}
.reviews-section::before {
  content: '❝';
  position: absolute;
  top: 20px; right: 40px;
  font-size: 6rem;
  color: var(--white);
  opacity: 0.5;
  font-family: sans-serif;
}

.reviews-grid {
  display: flex;
  gap: 25px;
  overflow-x: auto;
  padding-bottom: 20px;
  scroll-snap-type: x mandatory;
}
.reviews-grid::-webkit-scrollbar {
  height: 8px;
}
.reviews-grid::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 4px;
}

.review-card {
  min-width: 300px;
  max-width: 400px;
  scroll-snap-align: center;
  background-color: var(--white);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  border-right: 4px solid var(--primary);
}
.review-service {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-hover);
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.review-card h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
}
.review-card p {
  font-size: 1.1rem;
  line-height: 1.6;
  font-style: italic;
}

/* Contact Flex/Grid */
.contact-section {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  margin-bottom: 60px;
  align-items: center;
}
.contact-info {
  flex: 1;
  min-width: 0;
}
.contact-form {
  flex: 1;
  min-width: 0;
  background-color: var(--white);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.05);
  border: 1px solid var(--border-color);
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background-color: #fafafa;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(140, 90, 53, 0.2);
  background-color: var(--white);
}

.social-bar {
  margin-top: 20px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.social-links--primary {
  margin-top: 25px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--card-bg);
  color: var(--primary);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  font-size: 1.25rem;
}

.social-links a:hover {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.social-links a span {
  display: none;
}

.social-more-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px dashed var(--border-color);
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--accent) 100%);
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  padding: 0;
}

.social-more-btn i {
  font-size: 1rem;
  line-height: 1;
}

.social-more-btn span {
  display: block;
  font-size: 0.55rem;
  font-weight: bold;
  line-height: 1;
}

.social-more-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  border-style: solid;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(140, 90, 53, 0.25);
}

/* Social modal popup */
.social-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(62, 39, 35, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.social-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.social-modal-overlay[hidden] {
  display: none !important;
}

.social-modal-overlay:not([hidden]) {
  display: flex;
}

.social-modal {
  position: relative;
  width: min(440px, 100%);
  max-height: min(85vh, 560px);
  overflow-y: auto;
  padding: 32px 28px 28px;
  border-radius: 22px;
  text-align: center;
  transform: scale(0.88) translateY(28px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.social-modal-overlay.is-open .social-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.social-modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--primary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.social-modal-close:hover {
  background: var(--primary);
  color: var(--white);
  transform: rotate(90deg);
}

.social-modal-title {
  margin: 12px 0 6px;
  color: var(--text-main);
  font-size: 1.35rem;
}

.social-modal-sub {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.social-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.social-modal-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: socialModalLinkIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.social-modal-link:hover {
  transform: translateY(-4px);
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(140, 90, 53, 0.2);
}

.social-modal-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  color: var(--primary);
  transition: color 0.3s ease;
}

.social-modal-link:hover .social-modal-link-icon {
  color: var(--white);
}

.social-modal-custom-icon {
  max-width: 36px;
  max-height: 36px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.social-modal-link-label {
  font-size: 0.82rem;
  font-weight: bold;
  line-height: 1.3;
}

@keyframes socialModalLinkIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.spam-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.spam-captcha-input {
  max-width: 120px;
}

/* About Section */
.about-section {
  margin-bottom: 60px;
}

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
}

.about-image {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 20px;
  border: 3px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.about-image-placeholder {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  border: 3px solid var(--border-color);
}

.about-text {
  line-height: 2;
}

.about-text p {
  margin: 0 0 15px;
}

/* Form Labels */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-status {
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-weight: bold;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(163, 177, 138, 0.3);
  color: var(--accent-dark);
}

.form-status.error {
  display: block;
  background: rgba(198, 40, 40, 0.1);
  color: var(--danger);
}

/* Reviews CTA */
.reviews-cta {
  text-align: center;
  margin-top: 25px;
  font-size: 1.05rem;
}

.reviews-cta a {
  font-weight: 900;
  text-decoration: underline;
}

.reviews-scroll-hint {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.hero-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

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

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

/* Tree Loading Animation */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.tree-spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  border-top-color: var(--primary);
  border-right-color: var(--primary);
  animation: growSpin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  margin-bottom: 20px;
}
@keyframes growSpin {
  0% { transform: rotate(0deg) scale(0.8); opacity: 0.7; }
  50% { transform: rotate(180deg) scale(1.1); opacity: 1; }
  100% { transform: rotate(360deg) scale(0.8); opacity: 0.7; }
}
.loader-text {
  color: var(--primary);
  font-weight: 900;
  font-size: 1.2rem;
  animation: pulse 1.5s infinite;
  letter-spacing: 1px;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.error-state {
  color: var(--danger);
  text-align: center;
  padding: 30px;
  border: 1px solid var(--danger);
  border-radius: 12px;
  background-color: #ffebee;
  grid-column: 1 / -1;
}

/* Content Details (Article/Project View) */
.detail-header {
  margin-bottom: 40px;
  text-align: center;
}
.detail-cover {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.detail-content {
  font-size: 1.15rem;
  line-height: 2;
  color: var(--text-main);
  background: var(--white);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.03);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 15px 0;
}
.detail-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1rem;
}

/* Dark Mode Specifics */
body.dark-mode .glass-panel {
  background: rgba(42, 31, 26, 0.7);
  border-color: rgba(74, 53, 37, 0.5);
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background-color: var(--card-bg);
  border-color: var(--border-color);
  color: var(--text-main);
}

body.dark-mode .error-state {
  background-color: #3a1a1a;
  border-color: #8b3a3a;
  color: #ff8a8a;
}

body.dark-mode .review-card {
  background-color: var(--card-bg);
}

body.dark-mode .reviews-section {
  background: linear-gradient(135deg, var(--accent) 0%, var(--card-bg) 100%);
}

/* Smooth transitions for all themed elements */
.card, .glass-panel, .contact-form, .review-card, .reviews-section, footer, .btn, .skill-tag {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Skeleton loading */
.skeleton-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(212, 163, 115, 0.15);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton-img {
  height: 180px;
  background: linear-gradient(90deg, var(--accent) 25%, var(--card-bg) 50%, var(--accent) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}

.skeleton-line {
  height: 16px;
  margin: 15px 20px 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent) 25%, var(--card-bg) 50%, var(--accent) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}

.skeleton-line.short {
  width: 60%;
  margin-bottom: 20px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.content-in {
  animation: contentIn 0.4s ease-out both;
}

@keyframes contentIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 50px 30px;
  background: var(--card-bg);
  border-radius: 20px;
  border: 2px dashed var(--border-color);
}

.empty-state-emoji {
  font-size: 3.5rem;
  margin-bottom: 15px;
}

.empty-state h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.8;
}

/* Reading progress bar */
#reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(to left, var(--primary), var(--accent-dark));
  z-index: 10001;
  transition: width 0.1s linear;
  border-radius: 0 0 0 2px;
}

.btn-sm-card {
  margin-top: 15px;
  padding: 5px 15px;
  font-size: 0.9rem;
}

.review-skeleton-card {
  min-width: 280px;
  max-width: 400px;
  padding-bottom: 10px;
}
