/* ============================================
   Abdullatif Aladwan — Portfolio
   Modern, responsive, SEO-friendly
   ============================================ */

:root {
  /* Colors */
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --surface: #1a2234;
  --border: rgba(56, 189, 248, 0.15);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.2);
  --accent-glow: rgba(56, 189, 248, 0.35);
  --gradient-accent: linear-gradient(135deg, #38bdf8 0%, #22d3ee 50%, #67e8f9 100%);
  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(56, 189, 248, 0.12) 0%, transparent 55%);
  /* Typography */
  --font-head: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  /* Spacing */
  --section-pad: clamp(3rem, 8vw, 5rem);
  --container: min(1100px, 92vw);
  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 14px;
  --radius-lg: 20px;
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #67e8f9; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; margin: 0 0 0.5em; line-height: 1.2; }

/* Skip link (a11y & SEO) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--accent); outline-offset: 2px; }

/* ========== Header ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled { padding: 0.6rem 0; }

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo:hover { -webkit-text-fill-color: var(--accent); }

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.lang-switcher {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang-switcher:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* Nav */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.nav-list a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}
.nav-list a:hover { color: var(--accent); background: var(--accent-dim); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text);
}
.nav-toggle:hover { background: var(--accent-dim); }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav { position: fixed; top: 57px; left: 0; right: 0; background: var(--bg-elevated); border-bottom: 1px solid var(--border); padding: 1rem; max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.3s var(--ease), opacity 0.3s var(--ease); }
  .nav.is-open { max-height: 80vh; opacity: 1; overflow-y: auto; }
  .nav-list { flex-direction: column; gap: 0.25rem; }
  .nav-list a { display: block; padding: 0.75rem 1rem; }
}

/* ========== Reveal animations ========== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.reveal.is-visible .reveal-item {
  opacity: 1;
  transform: translateY(0);
}
.reveal.is-visible .reveal-item:nth-child(1) { transition-delay: 0.05s; }
.reveal.is-visible .reveal-item:nth-child(2) { transition-delay: 0.1s; }
.reveal.is-visible .reveal-item:nth-child(3) { transition-delay: 0.15s; }
.reveal.is-visible .reveal-item:nth-child(4) { transition-delay: 0.2s; }
.reveal.is-visible .reveal-item:nth-child(5) { transition-delay: 0.25s; }
.reveal.is-visible .reveal-item:nth-child(6) { transition-delay: 0.3s; }
.reveal.is-visible .reveal-item:nth-child(7) { transition-delay: 0.35s; }
.reveal.is-visible .reveal-item:nth-child(8) { transition-delay: 0.4s; }

/* ========== Sections ========== */
.section {
  padding: var(--section-pad) 0;
  position: relative;
}
body.modal-open { overflow: hidden; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: clamp(0.75rem, 2vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-title::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  border-radius: 1px;
}

/* Inner pages: content below fixed header */
main.page-content { padding-top: 5.5rem; }
.section-title.page-title { font-size: 1rem; margin-bottom: 1.5rem; }
.nav-list a.active { color: var(--accent); }
.card-cert h2,
.card-project-body h2 { font-size: 1.1rem; margin: 0; color: var(--text); font-weight: 600; }
.card-skill h2 { font-size: 1.05rem; color: var(--accent); margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.5rem; }
.card-skill h2 i { font-size: 1.25rem; }
.card-education-body h2 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.card-education-body h2 a { color: var(--text); }
.card-education-body h2 a:hover { color: var(--accent); }
.card-details h3 { font-size: 0.9rem; color: var(--accent); margin-bottom: 0.5rem; }

/* ========== Hero ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6rem 1.5rem 4rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero), var(--bg);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
}

/* Home hero: photo + content side by side, with animations */
.hero-home .hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .hero-home .hero-inner {
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
  }
  .hero-home .hero-content { text-align: left; }
  .hero-home .hero-actions { justify-content: flex-start; }
  .hero-home .hero-social { justify-content: flex-start; }
}
.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(at 20% 30%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
    radial-gradient(at 80% 70%, rgba(34, 211, 238, 0.08) 0%, transparent 50%),
    radial-gradient(at 50% 50%, rgba(56, 189, 248, 0.05) 0%, transparent 60%);
  animation: meshShift 15s ease-in-out infinite alternate;
}
@keyframes meshShift {
  0% { opacity: 1; transform: scale(1) translate(0, 0); }
  100% { opacity: 0.9; transform: scale(1.05) translate(2%, 2%); }
}
.hero-home .hero-photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: heroPhotoReveal 1s var(--ease) both;
}
.hero-photo-ring {
  position: absolute;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(135deg, var(--accent), #67e8f9, var(--accent)) border-box;
  animation: ringRotate 8s linear infinite;
  opacity: 0.6;
}
@keyframes ringRotate {
  to { transform: rotate(360deg); }
}
.hero-home .hero-photo-glow {
  position: absolute;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(40px);
  opacity: 0.6;
  animation: heroGlowPulse 4s ease-in-out infinite;
}
.hero-home .hero-photo {
  position: relative;
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  animation: heroFloat 5s ease-in-out infinite;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.5));
  z-index: 1;
}
@keyframes heroPhotoReveal {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes heroGlowPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}
.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-shapes::before,
.hero-shapes::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  opacity: 0.3;
  animation: shapeFloat 20s linear infinite;
}
.hero-shapes::before {
  width: 300px;
  height: 300px;
  top: 10%;
  right: 10%;
  animation-duration: 25s;
  animation-direction: reverse;
}
.hero-shapes::after {
  width: 180px;
  height: 180px;
  bottom: 20%;
  left: 5%;
  animation-delay: -5s;
}
@keyframes shapeFloat {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -20px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}
.hero-label-line {
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--gradient-accent);
  vertical-align: middle;
  margin-right: 0.75rem;
  border-radius: 1px;
  animation: heroLineIn 0.8s var(--ease) 0.3s both;
}
@keyframes heroLineIn {
  from { width: 0; opacity: 0; }
  to { width: 40px; opacity: 1; }
}
.hero-home .hero-label { animation: fadeInUp 0.8s var(--ease) 0.2s both; }
.hero-home .hero-title { animation: fadeInUp 0.8s var(--ease) 0.35s both; }
.hero-home .hero-subtitle { animation: fadeInUp 0.8s var(--ease) 0.5s both; }
.hero-home .hero-desc { animation: fadeInUp 0.8s var(--ease) 0.6s both; }
.hero-home .hero-actions { animation: fadeInUp 0.8s var(--ease) 0.75s both; }
.hero-home .hero-social { animation: fadeInUp 0.8s var(--ease) 0.9s both; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 0.8s var(--ease) 1.1s both;
  transition: color 0.3s var(--ease);
}
.hero-scroll:hover { color: var(--accent); }
.hero-scroll-icon {
  display: block;
  font-size: 1.5rem;
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.btn i {
  margin-left: 0.4rem;
  font-size: 1.2em;
  transition: transform 0.3s var(--ease);
}
.btn:hover i { transform: translateX(4px); }

.hero-label {
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.hero-name {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 1rem;
  min-height: 1.5em;
}
.typing { color: var(--accent); }
.caret { animation: blink 1s step-end infinite; color: var(--accent); margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--gradient-accent);
  color: var(--bg);
  border: none;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 8px 28px var(--accent-glow); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-ghost:hover { background: var(--accent-dim); }
.hero-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 1.25rem;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.hero-social a:hover { color: var(--accent); background: var(--accent-dim); border-color: var(--accent); transform: translateY(-3px); }

/* ========== Summary ========== */
.summary-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0;
}
.summary-text strong { color: var(--accent); }

/* ========== About (modern, no photo) ========== */
.container-narrow { max-width: 720px; }
.about-page-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-summary {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.about-summary strong { color: var(--accent); }
.about-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 2.5rem;
}
.about-lead strong { color: var(--accent); }
.about-highlights-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.about-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.about-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--accent-glow);
}
.about-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-accent);
  color: var(--bg);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.about-card h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin: 0 0 0.35rem;
}
.about-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.about-meta-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem 2rem;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.about-meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.about-meta-value {
  font-weight: 600;
  color: var(--text);
}
.about-meta-value a { color: var(--text); }
.about-meta-value a:hover { color: var(--accent); }
.about-interests-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.interests-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.interest-tag {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.interest-tag:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* Legacy about (if used elsewhere) */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
.about-body p { color: var(--text-muted); margin-bottom: 1rem; }
.about-highlights {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.about-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.about-highlights li:hover { background: var(--surface); border-left-color: #67e8f9; transform: translateX(4px); }
.about-highlights i { color: var(--accent); font-size: 1.2rem; flex-shrink: 0; }
.about-highlights strong { color: var(--accent); }
.about-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem 2rem;
  margin: 1.5rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-meta dt { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.about-meta dd { margin: 0; color: var(--text); font-weight: 500; }
.about-meta a { color: var(--text); }
.about-meta a:hover { color: var(--accent); }
.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.interest-pill {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.interest-pill:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* ========== Cards (shared) ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover { border-color: var(--accent); box-shadow: 0 12px 40px var(--accent-glow); transform: translateY(-2px); }
.card h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); }
.card-meta { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.card-role { font-size: 0.95rem; color: var(--accent); margin-bottom: 0.75rem; font-style: italic; }
.card ul { color: var(--text-muted); font-size: 0.95rem; }
.card ul li { padding: 0.35rem 0; padding-left: 1.25rem; position: relative; }
.card ul li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }

/* Education card */
.card-education-inner { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 640px) {
  .card-education-inner { flex-direction: row; align-items: flex-start; }
}
.card-education-logo img { border-radius: var(--radius); width: 140px; height: auto; }
.card-details { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1rem; }
.card-details h4 { font-size: 0.9rem; color: var(--accent); margin-bottom: 0.5rem; }
.card-details ul li { padding-left: 0; padding: 0.2rem 0; }
.card-details ul li::before { display: none; }

/* ========== Experience (timeline) ========== */
.timeline { display: flex; flex-direction: column; gap: 1.25rem; }
.card-experience { padding: 1.5rem 1.75rem; }
.card-experience ul { margin-top: 0.75rem; }

/* ========== Projects ========== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card-project { padding: 0; overflow: hidden; }
.project-slider {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.project-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s var(--ease);
}
.project-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-width: 0;
}
.project-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.card-project:hover .project-slide img { transform: scale(1.03); }
.project-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 14, 23, 0.8);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 2;
}
.card-project:hover .project-slider-btn { opacity: 1; }
.project-slider-btn:hover { background: var(--accent); color: var(--bg); transform: translateY(-50%) scale(1.1); }
.project-slider-prev { left: 10px; }
.project-slider-next { right: 10px; }
.project-slider-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.card-project:hover .project-slider-dots { opacity: 1; }
.project-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.project-slider-dot:hover { background: rgba(255,255,255,0.7); }
.project-slider-dot.is-active { background: var(--accent); transform: scale(1.2); }
.card-project-body { padding: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.card-project-body h2 { margin: 0; font-size: 1.1rem; color: var(--text); }
.card-project-body h3 { margin: 0; font-size: 1.1rem; color: var(--text); }
.btn-details {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-details:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }

/* Project details modal */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.project-modal.is-open { opacity: 1; visibility: visible; }
.project-modal[hidden] { display: none !important; }
.project-modal:not([hidden]).is-open { display: flex; }
.project-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 23, 0.85);
  cursor: pointer;
}
.project-modal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  padding: 1.75rem 1.5rem;
}
.project-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.project-modal-close:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.project-modal-title {
  font-size: 1.5rem;
  color: var(--text);
  margin: 0 2rem 1rem 0;
  padding-right: 2rem;
}
.project-modal-body { font-size: 0.95rem; color: var(--text-muted); line-height: 1.65; }
.project-modal-body p { margin: 0 0 0.75rem; }
.project-modal-body p:last-child { margin-bottom: 0; }
.project-modal-body strong { color: var(--accent); }
.project-modal-body ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.project-modal-body ul li { margin-bottom: 0.35rem; }
.project-modal-body ul li::before { display: none; }
.project-modal-body .project-link { display: inline-block; margin-top: 1rem; color: var(--accent); font-weight: 600; }
.project-modal-body .project-link:hover { text-decoration: underline; }

/* ========== Certificates ========== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.card-cert { padding: 0; overflow: hidden; text-align: center; }
.card-cert img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card-cert h3 { padding: 1rem 1.25rem; font-size: 1rem; margin: 0; color: var(--accent); }

/* ========== Skills ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.card-skill h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.card-skill h3 i { font-size: 1.25rem; }
.card-skill ul { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; }
.card-skill ul li {
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card-skill ul li:hover { color: var(--accent); border-color: var(--border); }
.card-skill ul li::before { display: none; }
.soft-skills-list { justify-content: flex-start; }
.card-skill-soft { margin-top: 0; }

/* ========== Resume CTA ========== */
.resume-cta { text-align: center; background: var(--surface); }
.resume-cta-text { color: var(--text-muted); margin-bottom: 1.5rem; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ========== Contact ========== */
.contact-intro { color: var(--text-muted); margin-bottom: 2rem; max-width: 520px; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.card-contact {
  padding: 1.5rem;
  text-align: center;
}
.card-contact i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}
.card-contact h3 { font-size: 1rem; margin-bottom: 0.35rem; color: var(--text); }
.card-contact p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.card-contact a { color: var(--text-muted); }
.card-contact a:hover { color: var(--accent); }
.contact-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.contact-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.contact-social a:hover { color: var(--accent); background: var(--accent-dim); }

/* ========== Footer ========== */
.site-footer {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== Venobox overrides ========== */
.vb-overlay { background: rgba(10, 14, 23, 0.9) !important; }
.vb-content { background: var(--bg-elevated) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-lg) !important; }
.vb-close { color: var(--accent) !important; }
iframe { border-radius: var(--radius) !important; }

/* ========== Responsive tweaks ========== */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .card-details { grid-template-columns: 1fr; }
}
