/*
 Theme Name: Osama1 Portfolio
 Theme URI: https://osama1.io/
 Author: Osamah Alamri
 Author URI: https://osama1.io/
 Description: Personal portfolio theme for Osamah - designer & developer.
 Version: 1.0
 Text Domain: osama1-portfolio
*/

/* ====== VARIABLES & GLOBALS ====== */

:root {
  --bg: #050816;
  --bg-soft: #0b1020;
  --card: #111827;
  --card-alt: #020617;
  --border-soft: rgba(148, 163, 184, 0.25);
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.07);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.6);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: #020617;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ====== PAGE WRAPPER ====== */

.os-profile-page {
  font-family: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(
        circle at 0 0,
        rgba(34, 197, 94, 0.1),
        transparent 50%
      ),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 1.5rem 1rem 3rem;
}

.os-profile-container {
  max-width: 1120px;
  margin: 0 auto;
}

/* ====== NAVBAR ====== */

.os-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    to left,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.4)
  );
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0.75rem;
  z-index: 50;
}

.os-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.os-nav-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #22c55e, #14532d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #ecfdf5;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}

.os-nav-text-main {
  font-weight: 700;
  font-size: 0.98rem;
}

.os-nav-text-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.os-nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

.os-nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  transition: all 0.18s ease;
}

.os-nav-links a:hover {
  color: #ecfdf5;
  background: rgba(15, 23, 42, 0.85);
}

.os-nav-cta {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 12px 40px rgba(34, 197, 94, 0.35);
  white-space: nowrap;
}

/* ====== HERO BASE ====== */

.os-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr);
  gap: 1.75rem;
  padding: 1.75rem;
  margin-top: 0.75rem;
  margin-bottom: 1.75rem;
  background: radial-gradient(
        circle at 0 0,
        rgba(34, 197, 94, 0.12),
        transparent 60%
      ),
    radial-gradient(circle at 100% 100%, rgba(15, 118, 110, 0.3), transparent 60%),
    var(--bg-soft);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.os-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 80% 20%,
    rgba(15, 23, 42, 0.75),
    transparent 55%
  );
  opacity: 0.9;
  pointer-events: none;
}

.os-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
  gap: 1.5rem;
}

.os-hero-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.os-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--muted);
  max-width: fit-content;
}

.os-hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.25);
}

.os-hero-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.3;
  font-weight: 800;
}

.os-hero-title span {
  color: #22c55e;
}

.os-hero-sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 36rem;
}

/* أزرار الهيرو */
.os-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
  justify-content: center; /* توحيد التوسيط بدل الـ inline style */
}

/* الثلاثة نفس اللون والشكل */
.os-btn-primary,
.os-btn-ghost,
.os-btn-soft {
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-size: 0.86rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  box-shadow: 0 16px 48px rgba(34, 197, 94, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.os-btn-primary:hover,
.os-btn-ghost:hover,
.os-btn-soft:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 60px rgba(34, 197, 94, 0.55);
  opacity: 0.96;
}

/* ====== HERO – 3LINES STYLE ====== */

.os-hero--simple {
  margin-bottom: 3.5rem; /* مسافة بين الهيرو وأول قسم تحته */
}

.os-hero-inner--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
  margin: 0 auto;
}

.os-hero-main--center {
  align-items: flex-start;
}

.os-hero-title--xl {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
}

.os-hero-sub--wide {
  max-width: 40rem;
}

.os-hero-metrics-row {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1rem;
}

.os-hero-card {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.85)
  );
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 0.9rem 1rem;
}

.os-hero-card--metric {
  padding-bottom: 1.1rem;
}

.os-hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.os-card-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.os-stat {
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.os-stat-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.os-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.os-mini-tagline {
  font-size: 0.78rem;
  color: var(--muted);
}

.os-hero-card--highlight h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.os-hero-card--highlight p {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ====== SECTION BASE ====== */

/* مسافة بين الأقسام + حل مشكلة النزول من المنيو (anchor) */
.os-section {
  margin: 3rem 0 2.4rem;
  scroll-margin-top: 120px; /* يخلي القسم ينزل تحت الهيدر شوي */
}

.os-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.os-section-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.os-section-kicker {
  font-size: 0.8rem;
  color: var(--muted);
}

.os-section--center .os-section-header,
.os-section-header--center {
  align-items: center;
  text-align: right;
}

.os-section-header--center .os-section-kicker:last-child {
  max-width: 26rem;
}

/* ====== CARDS & GRID ====== */

.os-grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

.os-card {
  background: linear-gradient(145deg, var(--card), var(--card-alt));
  border-radius: 18px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-soft);
}

.os-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.os-card-body {
  font-size: 0.8rem;
  color: var(--muted);
}

.os-card--service {
  min-height: 190px;
}

.os-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.os-chip {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
  color: var(--muted);
}

/* ====== PROJECTS ====== */

.os-projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1rem;
}

.os-project-card {
  background: linear-gradient(
    140deg,
    rgba(15, 23, 42, 0.98),
    rgba(6, 78, 59, 0.4)
  );
  border-radius: 20px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(34, 197, 94, 0.35);
  position: relative;
  overflow: hidden;
}

.os-project-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #bbf7d0;
}

.os-project-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.55rem 0 0.25rem;
}

.os-project-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.os-project-meta {
  font-size: 0.78rem;
  color: #a7f3d0;
  margin-bottom: 0.6rem;
}

.os-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.os-link {
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  text-decoration: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.65);
}

.os-link-accent {
  border-color: rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
  background: rgba(6, 95, 70, 0.85);
}

.os-project-secondary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
}

.os-project-mini {
  background: var(--card);
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border-soft);
}

.os-project-mini h4 {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.os-project-mini p {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ====== PORTFOLIO / GALLERY ====== */

.os-portfolio-section {
  margin-top: 1.2rem;
}

.os-portfolio-heading {
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  color: var(--muted);
}

.os-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.os-gallery-item {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: rgba(15, 23, 42, 0.95);
}

.os-gallery-img {
  width: 100%;
  display: block;
  border-radius: 16px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.os-gallery-item:hover .os-gallery-img {
  transform: scale(1.03);
  opacity: 0.96;
}

.os-gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.9),
    transparent
  );
  color: #e5e7eb;
}

/* ====== ABOUT & CONTACT ====== */

.os-columns-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem;
}

.os-footer-columns {
  margin-top: 1rem;
}

.os-contact-card {
  background: radial-gradient(
        circle at 100% 0,
        rgba(34, 197, 94, 0.12),
        transparent 60%
      ),
    rgba(15, 23, 42, 0.98);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.os-contact-rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.os-contact-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.os-contact-label {
  color: var(--muted);
}

.os-contact-link {
  color: #a7f3d0;
  text-decoration: none;
  direction: ltr;
}

.os-footer-note {
  margin-top: 1.3rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

/* ====== RESPONSIVE ====== */

@media (min-width: 768px) {
  .os-hero {
    padding: 2rem;
  }
  .os-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .os-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .os-nav {
    padding-inline: 0.8rem;
  }
  .os-nav-links {
    display: none;
  }
  .os-hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .os-hero {
    padding: 1.4rem 1.1rem;
  }
  .os-hero-metrics-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .os-hero-metrics-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .os-projects-grid,
  .os-columns-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* بطاقات نماذج الأعمال – تصغير الصورة والبطاقة */
#portfolio .os-card {
  padding: 0.75rem 0.9rem;
}

#portfolio .os-card-title {
  font-size: 0.85rem;
}

#portfolio .os-card-body {
  font-size: 0.76rem;
}

/* إطار الصورة */
#portfolio .os-gallery-item {
  border-radius: 14px;
  overflow: hidden;
}

/* صورة العمل داخل البطاقة */
#portfolio .os-gallery-img {
  width: 100%;
  height: 170px;          /* صغّرنا الارتفاع */
  max-height: 170px;
  object-fit: cover;      /* يقصّ الصورة بدل ما يمدّدها */
  border-radius: 14px;
}

/* في الجوال نخليها أصغر شوي */
@media (max-width: 768px) {
  #portfolio .os-gallery-img {
    height: 130px;
    max-height: 130px;
  }
}
/* ضبط عنوان الهيرو في الجوال */
@media (max-width: 768px) {
  .os-hero-title.os-hero-title--xl {
    font-size: 1.9rem;   /* تصغير بسيط عشان السطرين يرتاحون */
    line-height: 1.6;    /* توسيع المسافة بين السطور */
  }

  .os-hero-sub.os-hero-sub--wide {
    margin-top: 0.8rem;  /* مسافة بسيطة تحت العنوان */
  }
}
