/*
Theme Name: Hamza El Fatihi Portfolio
Theme URI: https://elfatihihamza4.example.com
Author: Hamza El Fatihi
Author URI: https://elfatihihamza4.example.com
Description: A dark, glassmorphism one-page portfolio theme for Hamza El Fatihi — Junior Business & Digital Marketing Analyst. Converted from a Next.js/React design into a static WordPress theme.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hamza-portfolio
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
  --background: oklch(0.07 0.02 255);
  --foreground: oklch(0.96 0.005 240);
  --card: oklch(0.1 0.025 255);
  --primary: oklch(0.68 0.19 255);
  --primary-foreground: oklch(0.07 0.02 255);
  --secondary: oklch(0.14 0.025 255);
  --muted-foreground: oklch(0.62 0.03 255);
  --accent: oklch(0.72 0.18 280);
  --border: oklch(0.2 0.03 255);
  --radius: 0.875rem;

  --blue: oklch(0.68 0.19 255);
  --violet: oklch(0.72 0.18 280);
  --cyan: oklch(0.75 0.15 195);
  --blue-dim: oklch(0.68 0.19 255 / 0.15);
  --blue-glow: oklch(0.68 0.19 255 / 0.35);
  --glass: oklch(0.11 0.025 255 / 0.75);
  --glass-border: oklch(0.4 0.05 255 / 0.25);

  --section-home-glow: oklch(0.68 0.19 255 / 0.12);
  --section-about-glow: oklch(0.72 0.18 280 / 0.1);
  --section-projects-glow: oklch(0.68 0.19 255 / 0.1);
  --section-skills-glow: oklch(0.75 0.15 195 / 0.1);
  --section-cv-glow: oklch(0.72 0.18 280 / 0.1);
  --section-contact-glow: oklch(0.68 0.19 255 / 0.1);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: oklch(0.68 0.19 255 / 0.4); border-radius: 99px; }

.container { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.gradient-text {
  background: linear-gradient(135deg, oklch(0.72 0.19 255), oklch(0.78 0.18 280), oklch(0.75 0.15 195));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.blue-glow { box-shadow: 0 0 40px var(--blue-glow), 0 0 80px oklch(0.68 0.19 255 / 0.1); }

.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.glass-card-strong {
  background: oklch(0.11 0.025 255 / 0.92);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.section { position: relative; padding: 6rem 0; overflow: hidden; }
.section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.section-home::before   { background: radial-gradient(ellipse 80% 60% at 20% 40%, var(--section-home-glow), transparent 70%); }
.section-about::before  { background: radial-gradient(ellipse 70% 50% at 80% 30%, var(--section-about-glow), transparent 70%); }
.section-projects::before { background: radial-gradient(ellipse 80% 60% at 50% 50%, var(--section-projects-glow), transparent 70%); }
.section-skills::before { background: radial-gradient(ellipse 70% 50% at 20% 60%, var(--section-skills-glow), transparent 70%); }
.section-cv::before     { background: radial-gradient(ellipse 80% 60% at 70% 40%, var(--section-cv-glow), transparent 70%); }
.section-contact::before{ background: radial-gradient(ellipse 70% 60% at 30% 50%, var(--section-contact-glow), transparent 70%); }
.section > .container { position: relative; z-index: 1; }

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.section-label span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-label .rule { height: 1px; flex: 1; max-width: 4rem; background: var(--border); }

.section-heading { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; }
.section-sub { color: var(--muted-foreground); margin-top: 0.5rem; max-width: 36rem; line-height: 1.6; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   3. Sidebar navigation (desktop) + top bar (mobile)
   ========================================================================== */
.site-sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 50;
  width: 5rem;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
  border-right: 1px solid oklch(0.2 0.03 255 / 0.4);
}
.site-logo {
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem;
  background: oklch(0.14 0.025 255 / 0.6);
  border: 1px solid oklch(0.2 0.03 255 / 0.6);
}
.sidebar-nav { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.nav-btn {
  position: relative;
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.nav-btn:hover { color: var(--foreground); background: oklch(0.14 0.025 255 / 0.7); }
.nav-btn.active {
  background: oklch(0.68 0.19 255 / 0.2);
  color: var(--primary);
  border-color: oklch(0.68 0.19 255 / 0.4);
  box-shadow: 0 0 40px var(--blue-glow);
}
.nav-btn svg { width: 18px; height: 18px; }
.nav-tooltip {
  position: absolute; left: 3.5rem; top: 50%; transform: translateY(-50%);
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem; font-weight: 500;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s ease;
}
.nav-btn:hover .nav-tooltip { opacity: 1; }
.sidebar-download {
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.sidebar-download:hover { color: var(--primary); background: oklch(0.68 0.19 255 / 0.1); border-color: oklch(0.68 0.19 255 / 0.3); }
.sidebar-download svg { width: 17px; height: 17px; }

.site-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 3.5rem;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid oklch(0.2 0.03 255 / 0.4);
}
.topbar-name { font-weight: 700; font-size: 0.875rem; }
.menu-toggle { background: none; border: none; color: var(--muted-foreground); display: flex; }
.menu-toggle svg { width: 20px; height: 20px; }

.mobile-menu {
  position: fixed; top: 3.5rem; left: 0; right: 0; z-index: 40;
  border-bottom: 1px solid oklch(0.2 0.03 255 / 0.4);
  padding: 1rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem; font-weight: 500;
  color: var(--muted-foreground);
}
.mobile-menu a.active { background: oklch(0.68 0.19 255 / 0.2); color: var(--primary); }
.mobile-menu a svg { width: 16px; height: 16px; }
.mobile-menu .mm-cv { color: var(--primary); border: 1px solid oklch(0.68 0.19 255 / 0.3); margin-top: 0.25rem; }

.main-content { width: 100%; }

@media (min-width: 1024px) {
  .site-sidebar { display: flex; }
  .site-topbar, .mobile-menu { display: none !important; }
  .main-content { margin-left: 5rem; }
}

/* ==========================================================================
   4. Hero
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 5rem;
}
.hero-grid { width: 100%; display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.hero-text {
  display: flex; flex-direction: column; justify-content: center;
  gap: 1.75rem;
  padding: 6rem 2rem 4rem;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  align-self: flex-start;
  padding: 0.375rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 500;
  border: 1px solid oklch(0.68 0.19 255 / 0.3);
  color: var(--primary);
  background: var(--blue-dim);
}
.hero-badge svg { width: 12px; height: 12px; }
.hero-title { font-size: clamp(2.75rem, 7vw, 4.5rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.hero-role { font-size: 1.25rem; color: var(--primary); font-weight: 600; margin-top: 0.25rem; }
.hero-desc { color: var(--muted-foreground); line-height: 1.7; max-width: 32rem; margin-top: 0.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-size: 0.875rem; font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { border-color: oklch(0.68 0.19 255 / 0.4); color: var(--primary); }
.btn-outline:hover { background: oklch(0.68 0.19 255 / 0.1); border-color: oklch(0.68 0.19 255 / 0.7); }
.btn-ghost { border-color: var(--border); color: var(--muted-foreground); }
.btn-ghost:hover { color: var(--foreground); border-color: oklch(0.3 0.03 255); }

.kpi-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.kpi-card { border-radius: 1rem; padding: 0.75rem 1.25rem; }
.kpi-value { font-size: 1.5rem; font-weight: 700; }
.kpi-label { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.15rem; }

.hero-photo-wrap { position: relative; display: none; }
.hero-photo-wrap img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-photo-fade-left {
  position: absolute; inset: 0;
  background: linear-gradient(to right, oklch(0.07 0.02 255) 0%, oklch(0.07 0.02 255 / 0.3) 30%, transparent 60%);
}
.hero-photo-fade-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; height: 10rem;
  background: linear-gradient(to top, oklch(0.07 0.02 255), transparent);
}
.hero-name-badge {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  border-radius: 1rem; padding: 0.75rem 1.25rem; text-align: center; min-width: 13rem;
  border: 1px solid oklch(0.68 0.19 255 / 0.25);
}
.hero-name-badge p:first-child { font-weight: 700; font-size: 0.875rem; }
.hero-name-badge p:last-child { font-size: 0.75rem; color: var(--primary); margin-top: 0.2rem; }

.scroll-indicator {
  position: absolute; bottom: 2rem; left: 2rem;
  display: none;
  flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--muted-foreground);
}
.scroll-pill { width: 1.75rem; height: 2.75rem; border-radius: 999px; border: 1px solid oklch(0.3 0.03 255); display: flex; justify-content: center; padding-top: 0.375rem; }
.scroll-pill span { width: 4px; height: 10px; border-radius: 999px; background: oklch(0.68 0.19 255 / 0.6); animation: scrollBounce 1.8s ease-in-out infinite; }
@keyframes scrollBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
.scroll-indicator span.label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.5; }

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 520px; }
  .hero-text { padding: 0 4rem; }
  .hero-photo-wrap { display: block; }
  .scroll-indicator { display: flex; left: 7rem; }
}

/* ==========================================================================
   5. About
   ========================================================================== */
.about-grid { display: grid; gap: 3.5rem; align-items: center; }
.about-photo-col { position: relative; }
.about-photo-frame {
  position: relative; width: 100%; max-width: 22rem; margin: 0 auto;
  border-radius: 1rem; overflow: hidden; aspect-ratio: 3/4;
  border: 1px solid oklch(0.68 0.19 255 / 0.2);
}
.about-photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.about-float-card {
  position: absolute; bottom: -1.5rem; right: -1rem;
  border: 1px solid oklch(0.68 0.19 255 / 0.3); border-radius: 0.85rem; padding: 0.75rem 1rem;
}
.about-float-card p:nth-child(1) { font-size: 0.7rem; color: var(--muted-foreground); }
.about-float-card p:nth-child(2) { font-size: 0.85rem; font-weight: 600; }
.about-float-card p:nth-child(3) { font-size: 0.7rem; color: var(--primary); }

.about-text h2 { line-height: 1.2; }
.about-text .body { color: var(--muted-foreground); line-height: 1.7; margin-top: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.about-text .body strong { color: var(--foreground); font-weight: 500; }

.trait-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.25rem; }
.trait-card { border-radius: 0.85rem; padding: 1rem; }
.trait-card svg { width: 18px; height: 18px; color: var(--primary); margin-bottom: 0.5rem; }
.trait-card p:first-of-type { font-size: 0.875rem; font-weight: 600; }
.trait-card p:last-of-type { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.25rem; line-height: 1.5; }

@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   6. Projects
   ========================================================================== */
.projects-grid { display: grid; gap: 1.25rem; }
.project-card {
  border-radius: 1rem; border: 1px solid oklch(0.2 0.03 255 / 0.5);
  overflow: hidden; display: flex; flex-direction: column;
  cursor: pointer; transition: all 0.3s ease;
}
.project-card:hover { border-color: oklch(0.68 0.19 255 / 0.35); transform: translateY(-3px); }
.project-accent { height: 3px; width: 100%; }
.project-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.project-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.25rem; }
.project-icon { width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; }
.project-icon svg { width: 19px; height: 19px; }
.project-type { font-size: 0.7rem; padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid; font-weight: 500; white-space: nowrap; }
.project-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.project-problem { font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; flex: 1; }
.project-expand { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.project-card.open .project-expand { max-height: 40rem; }
.project-expand-inner { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid oklch(0.2 0.03 255 / 0.5); display: flex; flex-direction: column; gap: 1rem; }
.project-expand-inner .label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.35rem; }
.project-expand-inner .text { font-size: 0.75rem; color: var(--muted-foreground); line-height: 1.6; }
.project-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tools span { font-size: 0.7rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: oklch(0.14 0.025 255 / 0.8); color: var(--muted-foreground); border: 1px solid var(--border); }
.project-footer { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid oklch(0.2 0.03 255 / 0.3); }
.project-metric { font-size: 1.15rem; font-weight: 700; }
.project-metric-label { font-size: 0.75rem; font-weight: 500; color: var(--foreground); opacity: 0.7; }
.project-metric-note { font-size: 0.7rem; color: var(--muted-foreground); }
.project-toggle { display: flex; align-items: center; gap: 0.35rem; padding: 0.5rem 1rem; border-radius: 0.75rem; font-size: 0.7rem; font-weight: 600; border: 1px solid; }
.project-toggle svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.project-card.open .project-toggle svg { transform: rotate(180deg); }

.projects-cta { margin-top: 3.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.projects-cta p { color: var(--muted-foreground); font-size: 0.875rem; }

@media (min-width: 768px) { .projects-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .projects-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 640px) { .projects-cta { flex-direction: row; justify-content: center; } }

/* ==========================================================================
   7. Skills
   ========================================================================== */
.skills-grid { display: grid; gap: 2rem; }
.radar-card { border-radius: 1rem; padding: 1.5rem; }
.radar-card > p.title { font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; }
.radar-note { font-size: 0.7rem; color: var(--muted-foreground); text-align: center; margin-top: 0.5rem; }
.skill-groups { display: flex; flex-direction: column; gap: 1.5rem; }
.skill-group { border-radius: 1rem; padding: 1.25rem; }
.skill-group-title { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1rem; }
.skill-row { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; }
.skill-row:last-child { margin-bottom: 0; }
.skill-row-top { display: flex; justify-content: space-between; align-items: center; }
.skill-row-top span:first-child { font-size: 0.875rem; color: oklch(0.85 0.01 240); }
.skill-row-top span:last-child { font-size: 0.7rem; color: var(--muted-foreground); font-family: var(--font-mono); }
.skill-track { height: 6px; border-radius: 999px; background: var(--secondary); overflow: hidden; }
.skill-fill { height: 100%; border-radius: 999px; width: 0; transition: width 1s ease; }

@media (min-width: 1024px) { .skills-grid { grid-template-columns: 1fr 2fr; } }

/* ==========================================================================
   8. CV section
   ========================================================================== */
.cv-grid { display: grid; gap: 3.5rem; align-items: center; }
.cv-heading { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; line-height: 1.25; }
.cv-desc { color: var(--muted-foreground); line-height: 1.7; margin-top: 0.75rem; }
.cv-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.quick-facts { border-radius: 1rem; padding: 1.25rem; margin-top: 1.5rem; }
.quick-facts .label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted-foreground); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.75rem; }
.fact-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; margin-bottom: 0.5rem; }
.fact-row:last-child { margin-bottom: 0; }
.fact-row .k { color: var(--muted-foreground); width: 6.5rem; flex-shrink: 0; }
.fact-row .v { font-weight: 500; }

.highlight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.highlight-card { border-radius: 1rem; padding: 1rem; }
.highlight-icon { width: 2.25rem; height: 2.25rem; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; }
.highlight-icon svg { width: 16px; height: 16px; }
.highlight-card .h-label { font-size: 0.7rem; color: var(--muted-foreground); }
.highlight-card .h-detail { font-size: 0.875rem; font-weight: 600; margin-top: 0.1rem; line-height: 1.3; }
.highlight-card .h-sub { font-size: 0.7rem; color: var(--muted-foreground); margin-top: 0.25rem; line-height: 1.3; }

@media (min-width: 1024px) { .cv-grid { grid-template-columns: 1fr 1fr; } }

.cv-modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 1rem;
  background: oklch(0.04 0.01 255 / 0.85);
  backdrop-filter: blur(8px);
}
.cv-modal-overlay.open { display: flex; }
.cv-modal {
  position: relative; width: 100%; max-width: 48rem; height: 80vh;
  border-radius: 1rem; overflow: hidden; border: 1px solid oklch(0.68 0.19 255 / 0.2);
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}
.cv-modal-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid oklch(0.2 0.03 255 / 0.4);
}
.cv-modal-header .title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; }
.cv-modal-header .title svg { width: 15px; height: 15px; color: var(--primary); }
.cv-modal-actions { display: flex; align-items: center; gap: 0.5rem; }
.cv-modal-actions a.dl { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.75rem; border-radius: 0.5rem; background: var(--primary); color: var(--primary-foreground); font-size: 0.75rem; font-weight: 500; }
.cv-modal-actions a.dl svg { width: 13px; height: 13px; }
.cv-modal-close { width: 2rem; height: 2rem; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; color: var(--muted-foreground); background: none; border: none; }
.cv-modal-close:hover { color: var(--foreground); background: var(--secondary); }
.cv-modal iframe { width: 100%; height: 100%; border: none; padding-top: 3rem; }

/* ==========================================================================
   9. Experience / Education timeline
   ========================================================================== */
.timeline { position: relative; display: flex; flex-direction: column; gap: 2rem; }
.timeline-rail { position: absolute; left: 1.5rem; top: 0; bottom: 0; width: 1px; background: var(--border); display: none; }
.timeline-item { position: relative; }
.timeline-dot {
  position: absolute; left: 0.75rem; top: 1.5rem; width: 1.5rem; height: 1.5rem;
  border-radius: 999px; border-width: 2px; border-style: solid;
  display: none; align-items: center; justify-content: center;
}
.timeline-dot svg { width: 12px; height: 12px; }
.timeline-card { border-radius: 1rem; padding: 1.5rem; border: 1px solid oklch(0.2 0.03 255 / 0.5); }
.timeline-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.timeline-badge { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.15rem 0.6rem; border-radius: 999px; border: 1px solid; display: inline-block; margin-bottom: 0.35rem; }
.timeline-title { font-size: 1.1rem; font-weight: 600; }
.timeline-org { font-size: 0.875rem; }
.timeline-loc { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.15rem; }
.timeline-period { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted-foreground); background: var(--secondary); padding: 0.35rem 0.75rem; border-radius: 0.5rem; white-space: nowrap; }
.timeline-list li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); margin-bottom: 0.4rem; line-height: 1.5; }
.timeline-list li:last-child { margin-bottom: 0; }
.timeline-dot-inline { width: 6px; height: 6px; border-radius: 999px; margin-top: 0.5rem; flex-shrink: 0; }

@media (min-width: 768px) {
  .timeline-rail { display: block; }
  .timeline-item { padding-left: 4rem; }
  .timeline-dot { display: flex; }
}

/* ==========================================================================
   10. Contact
   ========================================================================== */
.contact-grid { display: grid; gap: 2.5rem; }
.contact-info-card { border-radius: 1rem; padding: 1.5rem; border: 1px solid oklch(0.2 0.03 255 / 0.5); display: flex; flex-direction: column; gap: 0.5rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem; border-radius: 0.75rem; transition: background 0.2s ease; }
.contact-item:hover { background: oklch(0.14 0.025 255 / 0.5); }
.contact-icon { width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-icon svg { width: 18px; height: 18px; }
.contact-item .c-label { font-size: 0.7rem; color: var(--muted-foreground); }
.contact-item .c-value { font-size: 0.875rem; font-weight: 500; }

.wechat-card { border-radius: 1rem; padding: 1.5rem; border: 1px solid oklch(0.2 0.03 255 / 0.5); display: flex; align-items: center; gap: 1.5rem; margin-top: 1.5rem; }
.wechat-qr { width: 6rem; height: 6rem; flex-shrink: 0; border-radius: 0.75rem; overflow: hidden; border: 1px solid oklch(0.68 0.19 255 / 0.2); background: #fff; }
.wechat-qr img { width: 100%; height: 100%; object-fit: cover; }
.wechat-card .w-title { font-size: 0.875rem; font-weight: 600; }
.wechat-card .w-desc { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.25rem; line-height: 1.5; }
.wechat-card .w-name { font-size: 0.75rem; color: var(--primary); margin-top: 0.25rem; font-family: var(--font-mono); }

.contact-form-card { border-radius: 1rem; padding: 1.5rem; border: 1px solid oklch(0.2 0.03 255 / 0.5); }
.contact-form-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-field label { font-size: 0.75rem; color: var(--muted-foreground); }
.form-field input, .form-field textarea {
  width: 100%; background: oklch(0.14 0.025 255 / 0.5); border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 0.6rem 1rem; font-size: 0.875rem; color: var(--foreground);
  font-family: inherit; resize: none;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: oklch(0.55 0.03 255 / 0.5); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: oklch(0.68 0.19 255 / 0.5); }
.form-submit {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem; border-radius: 0.75rem; background: var(--primary); color: var(--primary-foreground);
  font-weight: 500; font-size: 0.875rem; border: none;
}
.form-submit svg { width: 15px; height: 15px; }
.form-submit:hover { opacity: 0.9; }
.form-success { display: none; flex-direction: column; align-items: center; text-align: center; padding: 2rem 0; gap: 1rem; }
.form-success.show { display: flex; }
.form-success .icon-circle { width: 3.5rem; height: 3.5rem; border-radius: 999px; background: oklch(0.75 0.15 195 / 0.15); border: 1px solid oklch(0.68 0.19 255 / 0.3); display: flex; align-items: center; justify-content: center; }
.form-success .icon-circle svg { width: 22px; height: 22px; color: var(--primary); }
.form-success h3 { font-size: 1.1rem; font-weight: 600; }
.form-success p { font-size: 0.875rem; color: var(--muted-foreground); max-width: 20rem; line-height: 1.5; }
.form-success button { font-size: 0.75rem; color: var(--primary); background: none; border: none; }
.contact-form.hidden { display: none; }
.form-error { font-size: 0.8rem; color: oklch(0.7 0.2 25); margin-top: -0.5rem; margin-bottom: 1rem; display: none; }
.form-error.show { display: block; }

@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-footer { border-top: 1px solid oklch(0.2 0.03 255 / 0.5); padding: 2.5rem 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer-name { font-size: 0.875rem; font-weight: 600; }
.footer-role, .footer-copy { font-size: 0.75rem; color: var(--muted-foreground); }
.footer-social { display: flex; align-items: center; gap: 1rem; }
.footer-social a { width: 2.25rem; height: 2.25rem; border-radius: 999px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted-foreground); transition: all 0.2s ease; }
.footer-social a:hover { color: var(--primary); border-color: oklch(0.68 0.19 255 / 0.4); transform: scale(1.08); }
.footer-social a svg { width: 16px; height: 16px; }

@media (min-width: 640px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
}

/* Screen reader only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
