/* ============================================================
   بهاء كمون — طالب حقوق
   الهوية البصرية: #783d19 / #39191a / #f9ebc7
   ============================================================ */

:root {
  --brown: #783d19;
  --brown-deep: #5d2f12;
  --dark: #39191a;
  --dark-2: #2a1112;
  --cream: #f9ebc7;
  --cream-2: #fdf6e6;
  --page: #fdfaf3;
  --ink: #2b1512;
  --muted: #7c6459;
  --line: rgba(120, 61, 25, 0.16);
  --line-strong: rgba(120, 61, 25, 0.32);
  --white: #ffffff;
  --ok: #1f7a4d;
  --err: #a52a2a;
  --shadow-sm: 0 2px 10px rgba(57, 25, 26, 0.06);
  --shadow: 0 14px 38px -18px rgba(57, 25, 26, 0.35);
  --shadow-lg: 0 30px 70px -34px rgba(57, 25, 26, 0.5);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1140px;
  --font-body: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-display: 'Amiri', 'Tajawal', Georgia, serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--page);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a {
  color: var(--brown);
  text-decoration: none;
  transition: color .18s ease, opacity .18s ease;
}
a:hover { color: var(--brown-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 .5em;
  color: var(--dark);
  letter-spacing: 0;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.18rem, 2vw, 1.5rem); }

p { margin: 0 0 1.1em; }

ul, ol { padding-inline-start: 1.4em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}

.narrow { max-width: 820px; }

/* ============================== HEADER ============================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(253, 246, 230, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dark);
  flex-shrink: 0;
}

.brand:hover { color: var(--dark); }

.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--cream), 0 4px 14px -4px rgba(57, 25, 26, .45);
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--dark);
}

.brand-text small {
  font-size: .78rem;
  color: var(--brown);
  letter-spacing: .2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  position: relative;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--dark);
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

.nav a:hover { background: var(--cream); color: var(--brown); }

.nav a.active {
  background: var(--brown);
  color: var(--cream);
  font-weight: 700;
  box-shadow: 0 6px 18px -8px rgba(120, 61, 25, .8);
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  border-radius: 12px;
  font-size: 1.2rem;
  color: var(--brown);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ============================== BUTTONS ============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .97rem;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  line-height: 1.2;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brown);
  color: var(--cream);
  box-shadow: 0 10px 26px -14px rgba(120, 61, 25, .95);
}
.btn-primary:hover { background: var(--brown-deep); color: var(--cream); }

.btn-dark {
  background: var(--dark);
  color: var(--cream);
  box-shadow: 0 10px 26px -14px rgba(57, 25, 26, .95);
}
.btn-dark:hover { background: var(--dark-2); color: var(--cream); }

.btn-cream {
  background: var(--cream);
  color: var(--dark);
  border-color: var(--cream);
}
.btn-cream:hover { background: #fff5d9; color: var(--dark); }

.btn-ghost {
  background: transparent;
  color: var(--brown);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--cream); border-color: var(--brown); color: var(--brown-deep); }

.btn-outline-light {
  background: transparent;
  color: var(--cream);
  border-color: rgba(249, 235, 199, .5);
}
.btn-outline-light:hover { background: rgba(249, 235, 199, .12); color: var(--cream); border-color: var(--cream); }

.btn-sm { padding: 8px 16px; font-size: .86rem; }
.btn-block { width: 100%; }

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

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 500px at 88% -12%, rgba(249, 235, 199, .16), transparent 62%),
    radial-gradient(760px 420px at 6% 108%, rgba(120, 61, 25, .55), transparent 66%),
    linear-gradient(140deg, var(--dark) 0%, var(--dark-2) 46%, var(--brown-deep) 100%);
  color: var(--cream);
  padding: 74px 0 92px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(249, 235, 199, .035) 0 1px, transparent 1px 16px);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 46px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(249, 235, 199, .12);
  border: 1px solid rgba(249, 235, 199, .28);
  color: var(--cream);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .3px;
  margin-bottom: 22px;
}

.hero h1 {
  color: var(--cream);
  font-size: clamp(2.15rem, 5vw, 3.6rem);
  margin-bottom: .35em;
  text-shadow: 0 2px 26px rgba(0, 0, 0, .28);
}

.hero-name {
  display: block;
  font-size: .52em;
  color: rgba(249, 235, 199, .78);
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: .5em;
  letter-spacing: .5px;
}

.hero-lead {
  font-size: 1.08rem;
  color: rgba(249, 235, 199, .9);
  max-width: 56ch;
  margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-card {
  position: relative;
  background: rgba(249, 235, 199, .07);
  border: 1px solid rgba(249, 235, 199, .22);
  border-radius: 26px;
  padding: 26px;
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-lg);
}

.hero-emblem {
  width: 108px;
  height: 108px;
  border-radius: 22px;
  object-fit: cover;
  margin: 0 auto 18px;
  box-shadow: 0 0 0 3px rgba(249, 235, 199, .22), 0 18px 40px -14px rgba(0, 0, 0, .7);
}

.hero-facts { display: grid; gap: 12px; }

.hero-fact {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(57, 25, 26, .35);
  border: 1px solid rgba(249, 235, 199, .12);
}

.hero-fact i {
  color: var(--cream);
  font-size: 1rem;
  margin-top: 5px;
  width: 18px;
  text-align: center;
  opacity: .85;
}

.hero-fact span { display: block; font-size: .95rem; color: var(--cream); font-weight: 500; }
.hero-fact small { display: block; font-size: .72rem; color: rgba(249, 235, 199, .6); letter-spacing: .4px; }

/* ============================== SECTIONS ============================== */

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-cream { background: var(--cream-2); }
.section-cream-2 { background: linear-gradient(180deg, var(--cream-2), #fbf1d9); }

.section-head { margin-bottom: 38px; max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--brown);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--brown);
  border-radius: 2px;
  opacity: .6;
}

.section-head.center .eyebrow::after {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--brown);
  border-radius: 2px;
  opacity: .6;
}

.section-head p { color: var(--muted); font-size: 1.02rem; margin: 0; }

.rule {
  width: 64px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brown), transparent);
  margin: 16px 0 22px;
}
.section-head.center .rule { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--brown), transparent); }

/* ============================== CARDS ============================== */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Interest card */
.interest {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.interest:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.interest-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--cream), #f3e0b2);
  color: var(--brown);
  font-size: 1.15rem;
  margin-bottom: 16px;
  border: 1px solid rgba(120, 61, 25, .14);
}

.interest h3 { font-size: 1.16rem; margin-bottom: .4em; }
.interest p { font-size: .93rem; color: var(--muted); margin: 0; line-height: 1.75; }

/* Stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: var(--dark);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stat {
  padding: 26px 20px;
  text-align: center;
  border-inline-end: 1px solid rgba(249, 235, 199, .14);
  color: var(--cream);
}
.stat:last-child { border-inline-end: none; }

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--cream);
  line-height: 1.2;
}

.stat span { font-size: .84rem; color: rgba(249, 235, 199, .72); }

/* ============================== ARTICLE CARDS ============================== */

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.article-card-media {
  height: 6px;
  background: linear-gradient(90deg, var(--brown), var(--dark));
}

.article-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--brown-deep);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .2px;
  border: 1px solid rgba(120, 61, 25, .16);
  margin-bottom: 13px;
}

.chip-dark {
  background: rgba(57, 25, 26, .08);
  color: var(--dark);
  border-color: rgba(57, 25, 26, .16);
}

.chip-soft {
  background: var(--cream-2);
  color: var(--brown);
  border-color: var(--line);
}

.article-card h3 {
  font-size: 1.2rem;
  margin-bottom: .5em;
  line-height: 1.5;
}

.article-card h3 a { color: inherit; }
.article-card h3 a:hover { color: var(--brown); }

.article-card-excerpt {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 18px;
  flex: 1;
}

.meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.meta i { color: var(--brown); opacity: .8; margin-inline-end: 4px; }

.read-more {
  font-weight: 700;
  font-size: .86rem;
  color: var(--brown);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.read-more:hover { gap: 10px; }

/* ============================== ARTICLE PAGE ============================== */

.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--brown-deep) 100%);
  color: var(--cream);
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(249, 235, 199, .04) 0 1px, transparent 1px 18px);
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--cream); margin-bottom: .3em; }
.page-hero p { color: rgba(249, 235, 199, .82); margin: 0; max-width: 66ch; font-size: 1.02rem; }

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: rgba(249, 235, 199, .66);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.crumbs a { color: rgba(249, 235, 199, .78); }
.crumbs a:hover { color: var(--cream); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}

.prose {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  font-size: 1.02rem;
  line-height: 2.05;
  color: #3a2520;
}

.prose h2 {
  font-size: 1.55rem;
  margin-top: 1.9em;
  margin-bottom: .7em;
  padding-inline-start: 14px;
  border-inline-start: 4px solid var(--brown);
  line-height: 1.5;
}

.prose h3 { font-size: 1.22rem; margin-top: 1.6em; margin-bottom: .5em; color: var(--brown-deep); }
.prose ul, .prose ol { margin-bottom: 1.3em; }
.prose li { margin-bottom: .55em; }
.prose strong { color: var(--dark); font-weight: 700; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  background: var(--cream-2);
  border-inline-start: 4px solid var(--brown);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--brown-deep);
  font-style: normal;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.sidebar { display: grid; gap: 22px; position: sticky; top: 96px; }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h4 {
  font-size: 1.02rem;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sidebar-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.sidebar-list a { font-size: .9rem; font-weight: 500; color: var(--ink); display: block; line-height: 1.6; }
.sidebar-list a:hover { color: var(--brown); }
.sidebar-list small { display: block; color: var(--muted); font-size: .74rem; font-weight: 400; }

.sidebar-cta {
  background: linear-gradient(150deg, var(--dark), var(--brown-deep));
  color: var(--cream);
  border: none;
}
.sidebar-cta h4 { color: var(--cream); border-color: rgba(249, 235, 199, .2); }
.sidebar-cta p { color: rgba(249, 235, 199, .8); font-size: .87rem; margin-bottom: 16px; }

/* ============================== FILTERS ============================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 32px;
}

.filter-chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 600;
  transition: all .18s ease;
}

.filter-chip:hover { background: var(--cream); color: var(--brown-deep); }

.filter-chip.active {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--cream);
  box-shadow: 0 8px 20px -12px rgba(120, 61, 25, .9);
}

.search-form {
  display: flex;
  gap: 10px;
  margin-inline-start: auto;
}

.input, .textarea, .select {
  width: 100%;
  font-family: var(--font-body);
  font-size: .95rem;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
  line-height: 1.5;
}

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brown);
  box-shadow: 0 0 0 3px rgba(120, 61, 25, .12);
}

.textarea { min-height: 130px; resize: vertical; }

.search-form .input { min-width: 220px; }

/* ============================== CV PAGE ============================== */

.cv-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px; align-items: start; }

.cv-aside { position: sticky; top: 96px; display: grid; gap: 20px; }

.cv-photo {
  background: linear-gradient(150deg, var(--dark), var(--brown-deep));
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  color: var(--cream);
  box-shadow: var(--shadow);
}

.cv-photo img {
  width: 118px;
  height: 118px;
  border-radius: 26px;
  object-fit: cover;
  margin: 0 auto 18px;
  box-shadow: 0 0 0 3px rgba(249, 235, 199, .25), 0 20px 40px -16px rgba(0, 0, 0, .7);
}

.cv-photo h2 { color: var(--cream); font-size: 1.5rem; margin-bottom: .25em; }
.cv-photo p { color: rgba(249, 235, 199, .78); font-size: .88rem; margin-bottom: 18px; }

.cv-contact { list-style: none; padding: 0; margin: 0; text-align: start; display: grid; gap: 10px; }
.cv-contact li { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: rgba(249, 235, 199, .88); }
.cv-contact i { width: 18px; text-align: center; opacity: .75; }
.cv-contact a { color: inherit; }
.cv-contact a:hover { color: var(--cream); text-decoration: underline; }

.cv-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.cv-block-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.cv-block-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--cream), #f3e0b2);
  color: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  border: 1px solid rgba(120, 61, 25, .14);
}

.cv-block-head h2 { font-size: 1.3rem; margin: 0; }

/* timeline */
.timeline { position: relative; padding-inline-start: 26px; }
.timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--brown), rgba(120, 61, 25, .12));
  border-radius: 2px;
}

.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -26px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--brown);
}

.timeline-item h3 { font-size: 1.08rem; margin-bottom: .15em; }

.timeline-org {
  font-size: .87rem;
  color: var(--brown);
  font-weight: 600;
  margin-bottom: .45em;
}

.period {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  color: var(--brown-deep);
  background: var(--cream);
  padding: 2px 11px;
  border-radius: 999px;
  margin-bottom: 8px;
  border: 1px solid rgba(120, 61, 25, .14);
}

.timeline-item p { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.8; }

/* skill groups */
.skill-group { margin-bottom: 26px; }
.skill-group:last-child { margin-bottom: 0; }

.skill-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brown-deep);
  margin-bottom: 14px;
}

.skill-group-title i {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--cream);
  color: var(--brown);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  border: 1px solid rgba(120, 61, 25, .14);
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 9px; }

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 10px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  font-size: .87rem;
  color: var(--ink);
  font-weight: 500;
  transition: all .16s ease;
}

.skill-tag:hover { background: var(--cream); border-color: var(--line-strong); }

.skill-tag.tech {
  background: var(--dark);
  color: var(--cream);
  border-color: var(--dark);
  font-weight: 700;
  letter-spacing: .2px;
}
.skill-tag.tech i { color: var(--cream); opacity: .8; }

/* ============================== LIBRARY ============================== */

.book-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  height: 100%;
}

.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.book-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }

.book-cover {
  width: 54px;
  height: 70px;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--brown), var(--dark));
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 8px 20px -10px rgba(57, 25, 26, .8);
  border: 1px solid rgba(249, 235, 199, .2);
}

.book-top h3 { font-size: 1.06rem; margin-bottom: .3em; line-height: 1.55; }
.book-author { font-size: .82rem; color: var(--brown); font-weight: 600; margin: 0; }

.book-desc { font-size: .89rem; color: var(--muted); line-height: 1.8; flex: 1; margin-bottom: 18px; }

.book-actions { display: flex; gap: 9px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 16px; }

/* ============================== CONTACT ============================== */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 34px; align-items: start; }

.contact-methods { display: grid; gap: 14px; }

.contact-method {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
  color: var(--ink);
}

.contact-method:hover {
  border-color: var(--line-strong);
  transform: translateX(-4px);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.contact-method-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: var(--cream);
  background: var(--brown);
}

.contact-method-icon.dark { background: var(--dark); }
.contact-method-icon.green { background: #1f7a4d; }
.contact-method-icon.blue { background: #0a66c2; }
.contact-method-icon.pink { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }

.contact-method strong { display: block; font-size: .94rem; font-weight: 700; }
.contact-method span { display: block; font-size: .82rem; color: var(--muted); direction: ltr; text-align: start; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 7px; color: var(--dark); }
.field .hint { font-size: .76rem; color: var(--muted); font-weight: 400; margin-top: 5px; display: block; }

/* ============================== ALERTS ============================== */

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 20px;
  border: 1px solid transparent;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert-ok { background: #eaf6ef; border-color: #b7e0c7; color: #145c37; }
.alert-err { background: #fdeced; border-color: #f3c2c5; color: #8e1f26; }
.alert-info { background: var(--cream-2); border-color: var(--line-strong); color: var(--brown-deep); }

/* ============================== EMPTY ============================== */

.empty {
  text-align: center;
  padding: 64px 26px;
  background: var(--white);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty i { font-size: 2.2rem; color: var(--brown); opacity: .4; margin-bottom: 16px; display: block; }
.empty h3 { font-size: 1.15rem; margin-bottom: .4em; }
.empty p { color: var(--muted); font-size: .92rem; margin: 0 auto; max-width: 46ch; }

/* ============================== PAGINATION ============================== */

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 42px; flex-wrap: wrap; }

.pagination a, .pagination span {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
}

.pagination a:hover { background: var(--cream); color: var(--brown-deep); }
.pagination .current { background: var(--brown); border-color: var(--brown); color: var(--cream); }

/* ============================== FOOTER ============================== */

.site-footer {
  background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
  color: rgba(249, 235, 199, .78);
  padding: 56px 0 0;
  margin-top: 0;
}

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

.footer-brand { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }

.footer-brand img {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(249, 235, 199, .18);
  flex-shrink: 0;
}

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--cream);
  margin-bottom: 2px;
}

.footer-brand small { font-size: .8rem; color: rgba(249, 235, 199, .6); }

.site-footer p { font-size: .89rem; line-height: 1.85; }

.site-footer h4 {
  color: var(--cream);
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .4px;
  margin-bottom: 16px;
}

.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a { color: rgba(249, 235, 199, .72); font-size: .88rem; }
.footer-links a:hover { color: var(--cream); }

.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 235, 199, .1);
  border: 1px solid rgba(249, 235, 199, .18);
  color: var(--cream);
  font-size: .98rem;
  transition: all .18s ease;
}

.social-btn:hover { background: var(--cream); color: var(--dark); transform: translateY(-2px); }

.footer-bottom {
  border-top: 1px solid rgba(249, 235, 199, .13);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: rgba(249, 235, 199, .55);
}

/* ============================== ADMIN ============================== */

.admin-body { background: #f4f1ea; }

.admin-header {
  background: var(--dark);
  color: var(--cream);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  flex-wrap: wrap;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--cream);
  font-weight: 700;
  font-size: 1rem;
}

.admin-brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }

.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }

.admin-nav a {
  padding: 7px 14px;
  border-radius: 9px;
  font-size: .86rem;
  color: rgba(249, 235, 199, .78);
  font-weight: 500;
}
.admin-nav a:hover { background: rgba(249, 235, 199, .12); color: var(--cream); }
.admin-nav a.active { background: var(--cream); color: var(--dark); font-weight: 700; }

.admin-main { padding: 34px 0 70px; }

.admin-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.admin-title h1 { font-size: 1.7rem; margin: 0; }

.panel {
  background: var(--white);
  border: 1px solid rgba(120, 61, 25, .14);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(57, 25, 26, .05);
  overflow: hidden;
  margin-bottom: 24px;
}

.panel-head {
  padding: 16px 22px;
  border-bottom: 1px solid rgba(120, 61, 25, .1);
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-head h2 { font-size: 1.05rem; margin: 0; font-family: var(--font-body); font-weight: 700; }
.panel-body { padding: 22px; }

.data-table { width: 100%; border-collapse: collapse; font-size: .89rem; }

.data-table th {
  text-align: start;
  padding: 12px 16px;
  background: #faf7f0;
  font-weight: 700;
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .3px;
  border-bottom: 1px solid rgba(120, 61, 25, .1);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(120, 61, 25, .07);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fdfbf6; }

.table-wrap { overflow-x: auto; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  background: var(--cream);
  color: var(--brown-deep);
  border: 1px solid rgba(120, 61, 25, .14);
}

.badge-ok { background: #e6f4ec; color: #15703f; border-color: #b7e0c7; }
.badge-off { background: #f2eeee; color: #7c6459; border-color: #ded3ce; }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.icon-btn {
  width: 33px;
  height: 33px;
  border-radius: 9px;
  border: 1px solid rgba(120, 61, 25, .18);
  background: var(--white);
  color: var(--brown);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  cursor: pointer;
  transition: all .16s ease;
}

.icon-btn:hover { background: var(--cream); border-color: var(--brown); }
.icon-btn.danger { color: var(--err); border-color: #eecdd0; }
.icon-btn.danger:hover { background: #fdeced; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  padding-top: 18px;
  margin-top: 6px;
  border-top: 1px solid rgba(120, 61, 25, .1);
  flex-wrap: wrap;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 80% 0%, rgba(120, 61, 25, .5), transparent 60%),
    linear-gradient(150deg, var(--dark), var(--dark-2));
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--cream-2);
  border-radius: 22px;
  padding: 38px 32px;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8);
}

.login-card img {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto 20px;
  box-shadow: 0 0 0 3px var(--cream), 0 14px 30px -14px rgba(0, 0, 0, .6);
}

.login-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: .3em; }
.login-card .sub { text-align: center; font-size: .86rem; color: var(--muted); margin-bottom: 26px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }

.stat-card {
  background: var(--white);
  border: 1px solid rgba(120, 61, 25, .13);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(57, 25, 26, .04);
}

.stat-card span { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.stat-card strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--brown); line-height: 1.1; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs a {
  padding: 8px 16px;
  border-radius: 9px;
  font-size: .87rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(120, 61, 25, .14);
}
.tabs a:hover { background: var(--cream-2); }
.tabs a.active { background: var(--brown); color: var(--cream); border-color: var(--brown); }

.prose-editor { font-family: 'Courier New', monospace; font-size: .9rem; direction: rtl; line-height: 1.7; }

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

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-card { max-width: 460px; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .cv-grid { grid-template-columns: 1fr; }
  .cv-aside { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-inline-end: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid rgba(249, 235, 199, .14); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 16px; line-height: 1.8; }
  .section { padding: 52px 0; }
  .header-inner { min-height: 68px; }
  .brand-logo { width: 42px; height: 42px; border-radius: 12px; }
  .brand-text strong { font-size: 1.12rem; }
  .brand-text small { font-size: .7rem; }
  .menu-btn { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--cream-2);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 18px 18px;
    gap: 6px;
    box-shadow: 0 18px 30px -18px rgba(57, 25, 26, .35);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 16px; border-radius: 11px; }
  .hero { padding: 52px 0 62px; }
  .hero-lead { font-size: 1rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .prose { padding: 26px 22px; font-size: .98rem; line-height: 1.95; }
  .cv-block { padding: 24px 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .search-form { margin-inline-start: 0; width: 100%; }
  .search-form .input { min-width: 0; flex: 1; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 40px 0; }
  .section-head { margin-bottom: 28px; }
  .admin-nav { width: 100%; overflow-x: auto; padding-bottom: 6px; }
}

@media print {
  .site-header, .site-footer, .hero-actions, .sidebar, .no-print { display: none !important; }
  body { background: #fff; }
  .prose { border: none; box-shadow: none; padding: 0; }
}
