/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0b0f1a;
  --bg-card:   #111827;
  --bg-card-2: #1a2236;
  --accent:    #c9a96e;
  --accent-2:  #d4b896;
  --accent-glow: rgba(201,169,110,0.35);
  --text:      #e2e8f0;
  --text-dim:  #94a3b8;
  --text-bright:#f8fafc;
  --border:    rgba(148,163,184,0.1);
  --radius:    16px;
  --radius-sm: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0;
  margin: 0;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201,169,110,0.10), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(184,148,62,0.05), transparent);
}

/* Islamic geometric pattern overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('../images/islamic-pattern.svg');
  background-size: 200px 200px;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 100% 90% at 50% 30%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 90% at 50% 30%, black 40%, transparent 80%);
}
.main-content { position: relative; z-index: 1; }

/* Override Cayman theme defaults */
.page-header { display: none !important; }
.main-content { max-width: 960px !important; margin: 0 auto !important; padding: 2rem 2rem 4rem !important; }
.main-content h1, .main-content h2, .main-content h3,
.main-content h4, .main-content h5, .main-content h6 {
  color: var(--text-bright) !important;
  margin-bottom: 0 !important;
}
.main-content a { color: var(--accent-2) !important; }

/* ===== Layout ===== */
.container, .content, .main-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

/* ===== Typography ===== */
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text-bright); }
h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-bright);
     margin-top: 0; padding-bottom: 0.6rem; border-bottom: 2px solid var(--accent); display: inline-block; }
h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-bright); margin: 0; }

p { color: var(--text); }
strong { color: var(--text-bright); font-weight: 600; }

a { color: var(--accent-2); text-decoration: none; transition: color 0.2s; }
a:hover { color: #e8d0a8; }

hr { border: 0; height: 1px; background: var(--border); margin: 2.5rem 0; }

ul { padding-left: 1.2rem; }
li { color: var(--text); margin-bottom: 0.4rem; }
li::marker { color: var(--accent); }

/* ===== Hero ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 30px var(--accent-glow), 0 8px 24px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 45px var(--accent-glow), 0 12px 32px rgba(0,0,0,0.4);
}

/* Islamic geometric 8-pointed star frame around avatar */
.hero-avatar-wrap { width: 130px; height: 130px; }
.avatar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  z-index: 0;
}
.avatar-glow svg {
  width: 100%;
  height: 100%;
  animation: geo-spin 40s linear infinite;
  filter: drop-shadow(0 0 6px rgba(201,169,110,0.4));
}
@keyframes geo-spin {
  to { transform: rotate(360deg); }
}

/* Geometric section divider */
.geo-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2.5rem 0;
  gap: 0.5rem;
  opacity: 0.8;
}
.geo-divider svg {
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(201,169,110,0.3));
}
.geo-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to var(--dir, right), var(--accent), transparent);
}
.geo-divider-line.left { --dir: right; }
.geo-divider-line.right { --dir: left; }

.hero-text { position: relative; z-index: 1; }
.hero-text h1 { margin: 0 0 0.3rem 0; font-size: 2rem; line-height: 1.2; }
.subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-2);
  margin: 0 0 0.3rem 0;
}
.tagline {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin: 0 0 1rem 0;
  letter-spacing: 0.02em;
}

/* Contact chips */
.contacts { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; justify-content: center; }
.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  background: rgba(201,169,110,0.08);
  border: 1px solid rgba(201,169,110,0.25);
  color: var(--accent-2) !important;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.25s ease;
  text-decoration: none !important;
}
.contact-chip:hover {
  background: rgba(201,169,110,0.18);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201,169,110,0.2);
}
.chip-icon { font-style: normal; font-size: 0.85rem; }

/* Islamic geometric corner ornament for hero */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23c9a96e' stroke-width='0.6' opacity='0.25'%3E%3Cpolygon points='100,60 103,72 108,64 107,76 116,72 112,82 122,82 115,88 124,94 115,96 122,104 112,104 116,114 107,110 108,120 103,114 100,124 97,114 92,120 93,110 84,114 88,104 78,104 85,96 76,94 85,88 78,82 88,82 84,72 93,76 92,64 97,72'/%3E%3Cpolygon points='100,74 106,80 108,88 106,96 100,102 94,96 92,88 94,80'/%3E%3Ccircle cx='100' cy='88' r='6'/%3E%3Ccircle cx='100' cy='88' r='2.5'/%3E%3Ccircle cx='100' cy='60' r='1.5' fill='%23e8d0a8'/%3E%3Ccircle cx='116' cy='72' r='1' fill='%23e8d0a8'/%3E%3Ccircle cx='124' cy='94' r='1' fill='%23e8d0a8'/%3E%3Ccircle cx='116' cy='114' r='1' fill='%23e8d0a8'/%3E%3Ccircle cx='100' cy='124' r='1.5' fill='%23e8d0a8'/%3E%3Ccircle cx='84' cy='114' r='1' fill='%23e8d0a8'/%3E%3Ccircle cx='76' cy='94' r='1' fill='%23e8d0a8'/%3E%3Ccircle cx='84' cy='72' r='1' fill='%23e8d0a8'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

/* ===== Sections ===== */
.section {
  margin-bottom: 2.5rem;
  animation: fade-up 0.6s ease both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 1.8rem;
  margin-top: 1.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), rgba(201,169,110,0.1));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.timeline-item:hover {
  border-color: rgba(201,169,110,0.3);
  box-shadow: 0 4px 20px rgba(201,169,110,0.08);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.8rem;
  top: 1.6rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px var(--accent-glow);
  transform: translateX(-4px);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.timeline-content h3 { margin-bottom: 0.6rem; }
.timeline-content ul { margin-top: 0.4rem; }
.timeline-content li { font-size: 0.92rem; line-height: 1.65; }

.company {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 0.9em;
}
.company::before { content: "@ "; }

/* ===== Publications ===== */
.pub-list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.pub {
  padding: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  font-size: 0.92rem;
  line-height: 1.6;
  transition: border-color 0.3s ease;
}
a.pub { color: inherit !important; text-decoration: none !important; display: block; cursor: pointer; }
a.pub:hover { border-left-color: var(--accent-2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,169,110,0.12); }
.pub:hover { border-left-color: var(--accent-2); }
.pub strong { font-size: 0.93rem; }
.pub-authors { color: var(--text-dim); font-size: 0.85rem; }
.pub-authors em { color: var(--accent-2); font-style: normal; font-weight: 600; }
.pub-venue {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(201,169,110,0.1);
  padding: 0.15rem 0.6rem;
  border-radius: 100px;
}

/* ===== Education ===== */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.edu-card {
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s ease;
}
.edu-card:hover { border-color: rgba(201,169,110,0.3); }
.edu-degree { font-weight: 700; color: var(--text-bright); font-size: 0.95rem; margin-bottom: 0.25rem; }
.edu-school { font-size: 0.82rem; color: var(--accent-2); margin-bottom: 0.5rem; font-weight: 500; }
.edu-detail { font-size: 0.84rem; color: var(--text-dim); line-height: 1.5; }

/* ===== Skills ===== */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.5rem; }
.skill-group { }
.skill-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.25s ease;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  background: rgba(201,169,110,0.08);
}
.tag small { color: var(--text-dim); font-weight: 400; }

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .container, .content, .main-content { padding: 1.25rem 1rem 3rem; }

  .hero { padding: 2rem 1.5rem; }
  .hero-text h1 { font-size: 1.6rem; }

  .avatar { width: 110px; height: 110px; }

  .edu-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }

  .timeline { padding-left: 1.4rem; }
  .timeline-item { padding: 1rem; }
  .timeline-item::before { left: -1.4rem; }
}

@media (max-width: 400px) {
  h1 { font-size: 1.5rem; }
  .hero { padding: 1.5rem 1rem; }
  .avatar { width: 90px; height: 90px; }
}
