* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #f59e0b;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #e1ebff;
  --bg-white: #fafafa;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --footer-bg: #1f2937;
  --footer-text: #9ca3af;
}

[data-theme="dark"] {
  --primary-color: #3b82f6;
  --secondary-color: #2563eb;
  --accent-color: #fbbf24;
  --text-dark: #f9fafb;
  --text-light: #d1d5db;
  --bg-light: #111827;
  --bg-white: #1f2937;
  --border-color: #374151;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  --footer-bg: #0f172a;
  --footer-text: #64748b;
}

body {
  font-family: "Nunito", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-light);
  transition: all 0.3s ease;
  position: relative;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  opacity: 0.3;
  pointer-events: none;
  transform: translate(var(--random-x, 0px), var(--random-y, 0px));
  transition: transform var(--duration, 3000ms) ease-in-out;
}

[data-theme="dark"] body::before {
  opacity: 0.2;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  opacity: 0.2;
  pointer-events: none;
  transform: translate(var(--random-x2, 0px), var(--random-y2, 0px));
  transition: transform var(--duration2, 3000ms) ease-in-out;
}

[data-theme="dark"] body::after {
  opacity: 0.15;
}

html {
  scroll-behavior: smooth;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
  background: transparent;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 0.5rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s ease-in-out;
  transform: translateX(-50%);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary-color);
}

.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-light);
}

.theme-toggle:hover {
  border-color: var(--primary-color);
  color: var(--accent-color);
  transform: scale(1.1);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #3b82f6;
  cursor: pointer;
  z-index: 1001;
}

.icon {
  height: 40px;
  padding-top: 5px;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.mobile-menu-overlay.active {
  display: block;
}

.hero {
  padding: 8rem 0 4rem;
  text-align: center;
  background: transparent;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-content .subtitle {
  font-size: 1.5rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.hero-content .description {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 3rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  width: 275px;
  text-align: center;
  justify-content: center;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

section {
  padding: 4rem 0;
  position: relative;
  z-index: 10;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1,
h2 {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  background-size: 100% 100%;
}

.section-title p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.about {
  background: rgba(250, 250, 250, 0.3);
}

[data-theme="dark"] .about {
  background: rgba(31, 41, 55, 0.3);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  text-align: center;
}

.about-image .placeholder {
  width: 300px;
  height: 300px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: white;
  font-size: 4rem;
}

.about-text h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.unrwa:visited {
  color: inherit;
}

.unrwa {
  color: var(--primary-color);
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.skills {
  background: rgba(243, 244, 246, 0.3);
}

[data-theme="dark"] .skills {
  background: rgba(17, 24, 39, 0.3);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
}

.skill-category h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-list {
  list-style: none;
}

.skill-list li {
  padding: 0.5rem 0;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-color);
}

.skill-list li:last-child {
  border-bottom: none;
}

.projects {
  background: rgba(250, 250, 250, 0.3);
}

[data-theme="dark"] .projects {
  background: rgba(31, 41, 55, 0.3);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.project-content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.project-links a:hover {
  color: var(--secondary-color);
}

.blog {
  background: rgba(243, 244, 246, 0.3);
}

[data-theme="dark"] .blog {
  background: rgba(17, 24, 39, 0.3);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: inherit;
}

.blog-image {
  height: 200px;
  width: 100%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-content {
  padding: 1.5rem;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.blog-date,
.blog-read-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-content h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  line-height: 1.4;
}

.blog-excerpt {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-tag {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.blog-cta {
  text-align: center;
  margin-top: 3rem;
}

.typewriter-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0 3rem;
  margin-bottom: 2rem;
}

.typewriter-container typewriter-effect {
  text-align: center;
  max-width: 100%;
}

.contact {
  background: rgba(250, 250, 250, 0.3);
}

[data-theme="dark"] .contact {
  background: rgba(31, 41, 55, 0.3);
}

.contact-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-intro h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.contact-intro p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.contact-form-container {
  display: flex;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-form-container web-inquiry-form {
  width: 100%;
}

.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0;
}

[data-theme="dark"] .footer {
  background: var(--footer-bg);
  color: var(--footer-text);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left p {
  color: var(--footer-text);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--footer-text);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
}

.blog-header {
  margin-top: 2rem;
}

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

.fade-in {
  animation: fadeInUp 0.8s ease forwards;
}

@media screen and (min-width: 768px) and (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: calc(100vh - 2rem);
    padding: 6rem 0 2rem;
  }
}

@media screen and (max-width: 767px) and (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: calc(100vh + 40px);
    padding: 5rem 0 1rem;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content .subtitle {
    font-size: 1rem;
  }

  .hero-content .description {
    font-size: 0.95rem;
    margin: 0 auto 2rem;
  }

  .cta-buttons .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0px;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-light);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    gap: 0;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:hover {
     color: #2563eb;
    transition: all 0.3s ease-in-out;
  }

  /* [data-theme="dark"] .nav-links {
    background: var(--bg-white);
    border-left-color: var(--border-color);
  } */

  .nav-links.mobile-open {
    right: 0;
  }

  .nav-links li {
    margin: 1rem 0;
    width: 90%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0 1rem;
    font-size: 1.1rem;
    width: 100%;
    border-radius: 8px;
    transition: background-color 0.3s ease;
  }


  .theme-toggle {
    margin: 0 auto;
  }

  .theme-toggle:hover {
    border-color:  #2563eb;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content .subtitle {
    font-size: 1.2rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about .section-title p,
  .about-content {
    padding-inline: 1.2rem;
  }

  .about-content h3 {
    text-align: center;
  }

  .about-image .placeholder {
    width: 200px;
    height: 200px;
    font-size: 3rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .container {
    padding: 0 1rem;
  }

  .nav {
    padding: 1rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  body::before,
  body::after {
    opacity: 0.15;
  }

  [data-theme="dark"] body::before,
  [data-theme="dark"] body::after {
    opacity: 0.08;
  }

  h1,
  h2 {
    background: linear-gradient(
      135deg,
      var(--primary-color),
      var(--accent-color)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 6rem 0 3rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .section-title h2,
  typewriter-effect {
    font-size: 1.8rem;
  }

  .skills-grid,
  .projects-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
}