/* ===== Design tokens — inspired by UIDeck Freelancer (teal accent) ===== */
:root {
  --font: "Estedad", system-ui, -apple-system, sans-serif;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-soft: rgba(13, 148, 136, 0.12);
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --surface: #ffffff;
  --text: #475569;
  --heading: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --header-bg: rgba(255, 255, 255, 0.92);
  --hero-left: #ffffff;
  --hero-right: #0d9488;
  --shadow: 0 16px 48px -20px rgba(15, 23, 42, 0.2);
  --radius: 12px;
}

html.dark {
  --teal: #2dd4bf;
  --teal-dark: #14b8a6;
  --teal-soft: rgba(45, 212, 191, 0.12);
  --bg: #0b1220;
  --bg-alt: #111827;
  --surface: #1e293b;
  --text: #cbd5e1;
  --heading: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
  --header-bg: rgba(11, 18, 32, 0.92);
  --hero-left: #0b1220;
  --hero-right: #0f766e;
  --shadow: 0 16px 48px -16px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}
.container.narrow { width: min(720px, calc(100% - 2rem)); }
.hidden { display: none !important; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo-dark { color: var(--heading); }
.logo-accent { color: var(--teal); }

.nav-desktop {
  display: none;
  gap: 1.75rem;
  align-items: center;
}
.nav-desktop a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--heading);
  position: relative;
  padding-bottom: 4px;
}
.nav-desktop a:hover,
.nav-desktop a.active { color: var(--teal); }
.nav-desktop a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 0.4rem; }
.icon-btn {
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--heading);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { border-color: var(--teal); color: var(--teal); }
html:not(.dark) .icon-sun { display: none; }
html.dark .icon-moon { display: none; }
html.dark .icon-sun { display: inline; color: #fbbf24; }

.nav-mobile {
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--surface);
}
.nav-mobile a {
  text-decoration: none;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-weight: 500;
  color: var(--heading);
}
.nav-mobile a:hover { background: var(--bg-alt); color: var(--teal); }

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
}

/* ===== Hero split (Freelancer style) ===== */
.hero {
  display: grid;
  min-height: calc(100vh - 68px);
  min-height: 560px;
}
.hero-left {
  background: var(--hero-left);
  display: flex;
  align-items: center;
  padding: 3rem 1.25rem;
}
.hero-left-inner {
  width: min(520px, 100%);
  margin-inline: auto;
}
.hero-right {
  background: var(--hero-right);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem 1.5rem 0;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.hero-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.12), transparent 50%);
  pointer-events: none;
}
.hero-photo-wrap {
  position: relative;
  z-index: 1;
  width: min(340px, 85%);
  aspect-ratio: 1;
  border-radius: 1.25rem 1.25rem 0 0;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
}
.hero-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--teal);
  font-weight: 600;
  font-size: 1.05rem;
}
.hero-left h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--heading);
  font-weight: 800;
}
.role {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
}
.lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
  max-width: 28rem;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
  }
  .hero-left {
    padding: 4rem 3rem 4rem 4vw;
  }
  .hero-left-inner {
    margin-inline: 0 0;
    margin-left: auto;
    padding-inline-end: 2rem;
  }
  [dir="rtl"] .hero-left-inner {
    margin-left: 0;
    margin-right: auto;
    padding-inline-end: 0;
    padding-inline-start: 2rem;
  }
  .hero-right {
    min-height: auto;
    /* diagonal cut like Freelancer */
    clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
  }
  [dir="rtl"] .hero-right {
    clip-path: polygon(0 0, 88% 0, 100% 100%, 0 100%);
  }
  .hero-photo-wrap {
    width: min(400px, 78%);
    margin-bottom: 0;
  }
}

/* ===== Buttons ===== */
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-row.center { justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--teal);
  color: #fff !important;
  box-shadow: 0 8px 20px -8px rgba(13, 148, 136, 0.55);
}
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost {
  background: transparent;
  color: var(--heading);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ===== Sections ===== */
.section {
  padding: 4.5rem 0;
  background: var(--bg);
}
.section-alt { background: var(--bg-alt); }

.section-label {
  margin: 0;
  text-align: center;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.95rem;
}
.section-title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.02em;
}
.edu-col {
  text-align: center;
}
.edu-col .card,
.edu-col .cert-item {
  text-align: start;
}
.title-line {
  width: 52px;
  height: 3px;
  margin: 0.85rem auto 2rem;
  background: var(--teal);
  border-radius: 4px;
  position: relative;
}
.title-line::after {
  content: "";
  position: absolute;
  left: calc(100% + 5px);
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.55;
}
.title-line-left { margin-inline: 0 0 1.5rem; }
[dir="rtl"] .title-line::after {
  left: auto;
  right: calc(100% + 5px);
}

/* About */
.about-body {
  margin: 0 0 1.5rem;
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--muted);
  text-align: center;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
}
html.dark .chip { color: var(--teal); }
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.about-actions { justify-content: center; margin-top: 0.25rem; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
@media (min-width: 600px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .skills-grid { grid-template-columns: repeat(4, 1fr); }
}
.skill-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: var(--teal-soft);
  border: 1px solid transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-dark);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
html.dark .skill-card {
  color: var(--teal);
}
.skill-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -10px rgba(13, 148, 136, 0.45);
  background: color-mix(in srgb, var(--teal) 22%, transparent);
}

/* Experience list (no vertical timeline line) */
.timeline {
  max-width: 700px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.timeline-item {
  position: relative;
  padding: 0;
}
.exp-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
}
.section-alt .exp-card { background: var(--surface); }
.exp-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--heading);
  font-weight: 700;
}
.exp-meta {
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
}
.exp-meta a { color: var(--teal); text-decoration: none; }
.exp-meta a:hover { text-decoration: underline; }
.exp-card ul {
  margin: 0;
  padding-inline-start: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.exp-card li + li { margin-top: 0.3rem; }

/* Education */
.edu-grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 800px) {
  .edu-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.75rem;
}
.card h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  color: var(--heading);
  font-weight: 700;
}
.card p, .card a {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}
.card a { color: var(--teal); }
.uni-name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
}
.card a:hover { text-decoration: underline; }

.cert-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.65rem;
}
.cert-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.9rem;
}
.cert-item h3 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--heading);
  font-weight: 600;
}
.cert-item p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Contact */
.contact-section {
  background: var(--bg-alt);
}
.contact-box { text-align: center; }
.contact-sub {
  margin: 0 auto 1.5rem;
  max-width: 28rem;
  color: var(--muted);
}
.phone-ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  background: var(--bg);
}
.footer p { margin: 0; }
