/* Minimalist, responsive styles */
:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --accent: #4c7cff;
  --surface: #f6f7f9;
  --ring: #dfe3ea;
}

[data-theme="dark"] {
  --bg: #0b0c0f;
  --text: #e6e8ee;
  --muted: #9aa3b2;
  --accent: #7aa2ff;
  --surface: #121318;
  --ring: #222634;
}

/* RTL Support for Arabic */
[dir="rtl"] {
  direction: rtl;
}

[dir="rtl"] .header-inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-list {
  flex-direction: row-reverse;
}

[dir="rtl"] .flex-container {
  flex-direction: row-reverse;
}

[dir="rtl"] .cta {
  flex-direction: row-reverse;
}

[dir="rtl"] .button {
  flex-direction: row-reverse;
}

[dir="rtl"] .contact-list {
  flex-direction: row-reverse;
}

[dir="rtl"] .tag-list,
[dir="rtl"] .pill-list {
  flex-direction: row-reverse;
}

[dir="rtl"] .card-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .section-head {
  flex-direction: row-reverse;
  text-align: right;
}

@media (max-width: 900px) {
  [dir="rtl"] .flex-container {
    flex-direction: column;
  }
  
  [dir="rtl"] .section-head {
    flex-direction: column;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.section {
  padding-inline: 5vw;
  height: 90vh;
  margin-bottom: 2rem;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section p {
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  background-color: var(--bg);
  border-bottom: 1px solid var(--ring);
  z-index: 2;
}

#skills, #work{
  height: fit-content;
  margin-bottom: 70px
}

.header-inner {
  display: flex;
  justify-content: space-around;
  padding: 1rem 0;
}

.logo {
  font-weight: 600;
  font-size: 1.2rem;
  line-height: auto;
}

.nav-toggle {
  display: none;
}

.nav-list {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list a {
  color: var(--muted);
}

.nav-list a:hover {
  color: var(--text);
}

.theme-toggle {
  border: 1px solid var(--ring);
  background: var(--surface);
  color: var(--text);
  border-radius: 50%;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.theme-toggle:hover {
  background-color: var(--ring);
}

.flex-container{ 
  gap:5rem;
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-around;
  height: 100%;
}


.visual {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  min-width: 50%;
  height: 80%;
}

.hero-text {
  flex: 1 1;
}

.hero-img {
  background-image: url('./assets/hero.png');
}

.about-img {
  border-radius: 26px;
  background-size: cover;
  background-image: url('./assets/me.jpg');
  aspect-ratio: 1/1;
}

.contact-image {
  background-image: url('./assets/call.png');
}

.hero-text h1 {
  line-height: 1.1em;
  margin: 0 0 0.75rem 0;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.02em;
}

.accent { color: var(--accent); }

.cta {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--ring);
  background: var(--surface);
  color: var(--text);
  transition: transform 300ms;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}


.grid{
  justify-content: flex-end;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
}

#skillsContainer {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.skill-card {
  flex: 1 1 200px;
  border: 1px solid var(--ring);
  border-radius: 16px;
  padding: 1rem;
  background: var(--surface);
}

.skill-card h3 {
  margin: 0 0 0.5rem 0;
}

.pill-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pill-list li {
  padding: 0.4rem 0.65rem;
  border: 1px dashed var(--ring);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}


.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ring);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}

.card-media {
  aspect-ratio: 3/2;
  background-size: cover;
  background-position: center;
}

.card-body {
  position: relative;
  bottom: 0;
  padding: 1rem;
}

.card-body h3 {
  margin: 0 0 0.25rem 0;
}

.card-body p {
  margin: 0 0 0.5rem 0;
  color: var(--muted);
}

.tag-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0;
  margin-bottom:0.9rem;
  list-style: none;
}

.tag-list li {
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--ring);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
}

.card-actions {
  margin-top: auto;
  padding: 1rem;
}

/* Contact */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-list a {
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--ring);
  padding: 1rem 0;
}

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

@media (min-width: 1280px) {
  .section{
    padding-inline: 15vw;
  }
}

@media (max-width: 900px) {
  .header-inner {
    padding-block: 0.5rem;
  }
  .flex-container {
    padding-bottom: 1rem;
    justify-content: center;
    align-items: center;
    height: 100%;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .hero-text {
    flex: 0 0;
  }
  .visual {
    order: -1;
    width: 100%;
    height: 80%;
  }
  
  .hero-img {
    background-image: url('./assets/hero_mobile.png');
  }
  .cta {
    justify-content: center;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-toggle {
    display: inline-flex;
    border: 1px solid var(--ring);
    background: var(--surface);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
  }

  .nav[aria-expanded="false"] .nav-list {
    display: none;
  }

  .nav[aria-expanded="true"] .nav-list {
    display: flex;
    position: absolute;
    inset-inline: 0;
    top: 64px;
    background: var(--bg);
    border-bottom: 1px solid var(--ring);
    padding: 1rem;
    justify-content: center;
  }

  .contact-list {
    justify-content: center;
  }
}


@media (max-width: 600px) {
  .section{
    padding-inline: 3vw;
  }
  .section-head {
    flex-direction: column;
    align-items: center;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
