/* ============================================
   AI LAB EXPERIENCE - Mohamed Abdelbasit
   Electric blue · Dark · Premium minimal
   ============================================ */

:root {
  --electric: #00d4ff;
  --electric-dim: rgba(0, 212, 255, 0.6);
  --electric-muted: rgba(0, 212, 255, 0.15);
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a25;
  --text-primary: #f0f4f8;
  --text-secondary: #8892a0;
  --text-muted: #5c6574;
  --border: rgba(255, 255, 255, 0.06);
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', sans-serif;
  --glow: 0 0 40px rgba(0, 212, 255, 0.3);
}

[data-theme="light"] {
  --bg-dark: #f5f7fa;
  --bg-card: #ffffff;
  --bg-elevated: #fafbfc;
  --text-primary: #0d1117;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: rgba(0, 0, 0, 0.08);
  --electric-muted: rgba(0, 150, 200, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s, color 0.5s;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ========== TERMINAL LOADER ========== */
.loader {
  position: fixed;
  inset: 0;
  background: #050508;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes loaderFadeOut {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

.loader {
  animation: loaderFadeOut 0.5s ease 4s forwards;
  animation-play-state: paused;
}

.loader:not(.hidden) {
  animation-play-state: running;
}

.loader.hidden {
  animation: none;
}

.loader-terminal {
  width: 90%;
  max-width: 480px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: var(--glow);
}

.loader-terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--border);
}

.loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.loader-dot.red { background: #ff5f56; }
.loader-dot.yellow { background: #ffbd2e; }
.loader-dot.green { background: #27c93f; }

.loader-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.loader-terminal-body {
  padding: 24px;
  background: rgba(5, 5, 10, 0.95);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.loader-line {
  opacity: 0;
  color: var(--electric);
  margin-bottom: 8px;
  animation: loaderLineIn 0.4s ease forwards;
}

.loader-line[data-line="1"] { animation-delay: 0.2s; }
.loader-line[data-line="2"] { animation-delay: 0.8s; }
.loader-line[data-line="3"] { animation-delay: 1.4s; }
.loader-line[data-line="4"] { animation-delay: 2s; }
.loader-line[data-line="5"] { animation-delay: 2.6s; }

@keyframes loaderLineIn {
  to { opacity: 1; }
}

.loader-prompt {
  color: var(--electric-dim);
  margin-right: 8px;
}

.loader-cursor .cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.1rem;
}

.nav-logo-bracket {
  color: var(--electric);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.nav-active {
  color: var(--electric);
}

.nav-links a.nav-active::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--electric-muted);
  color: var(--electric) !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--electric);
  transition: all 0.3s;
}

.nav-cta:hover {
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: var(--electric-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  position: absolute;
}

.theme-toggle {
  position: relative;
}

.theme-toggle .icon-sun { opacity: 1; }
.theme-toggle .icon-moon { opacity: 0; position: absolute; }

[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; }

.nav-mobile-toggle {
  display: none;
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-left {
  display: flex;
  align-items: center;
}

.hero-console {
  padding: 24px 28px;
  background: rgba(18, 18, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
}

.console-line {
  color: var(--text-secondary);
}

.console-status {
  color: var(--electric);
  font-weight: 600;
}

.hero-right {
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(0, 212, 255, 0.15);
  color: var(--electric);
  border: 1px solid var(--electric);
  margin-bottom: 20px;
}

.hero-portrait-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.hero-portrait-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--electric), transparent);
  opacity: 0.5;
  filter: blur(20px);
}

.hero-portrait {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--electric);
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.4);
  position: relative;
}

.hero-name {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-usp {
  font-size: 1.25rem;
  color: var(--electric);
  font-weight: 600;
  min-height: 2rem;
  margin-bottom: 32px;
}

.typing-cursor {
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-social {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
}

.hero-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--electric-muted);
  color: var(--text-secondary);
  transition: all 0.3s;
}

.hero-social a:hover {
  background: var(--electric);
  color: #050508;
  transform: translateY(-2px);
}

.hero-social svg {
  width: 22px;
  height: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--electric);
  color: #050508;
}

.btn-primary:hover {
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--electric);
  color: var(--electric);
}

.btn-glow {
  background: var(--electric-muted);
  color: var(--electric);
  border: 1px solid var(--electric);
}

.btn-glow:hover {
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-sm svg {
  width: 16px;
  height: 16px;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

.hero-scroll svg {
  width: 24px;
  height: 24px;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========== SECTIONS ========== */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 48px;
  text-align: center;
}

.section-tag {
  color: var(--electric);
  font-family: var(--font-mono);
  margin-right: 8px;
}

/* ========== ABOUT ME ========== */
.section-about-me {
  padding: 80px 0;
}

.about-me-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.about-me-image {
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--electric);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
}

.about-me-image img {
  width: 100%;
  height: auto;
  display: block;
}

.about-me-text .section-title {
  text-align: left;
  margin-bottom: 24px;
}

.about-me-lead {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.4;
}

.about-me-body {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.about-me-cta {
  font-size: 1.05rem;
}

.about-me-cta a {
  color: var(--electric);
  font-weight: 600;
  text-decoration: none;
}

.about-me-cta a:hover {
  text-decoration: underline;
}

/* ========== WHY HIRE ME ========== */
.section-why {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.why-lead {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.why-card {
  padding: 28px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s;
}

.why-card:hover {
  border-color: var(--electric);
  transform: translateY(-4px);
}

.why-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--electric);
  color: #050508;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
}

.why-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.why-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== SOLVE INTRO ========== */
.solve-intro {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* ========== PROBLEMS ========== */
.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.problem-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.problem-card:hover {
  transform: translateY(-8px) perspective(500px) rotateX(2deg);
  border-color: var(--electric);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.problem-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 16px;
}

.problem-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.problem-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== SKILLS (Organized sections) ========== */
.skills-impact {
  text-align: center;
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.skills-impact strong {
  color: var(--electric);
}

.skills-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.skills-section {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s;
}

.skills-section:hover {
  border-color: var(--electric);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}

.skills-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.skills-section h3 svg {
  width: 22px;
  height: 22px;
  color: var(--electric);
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.skill-tag:hover {
  border-color: var(--electric);
  color: var(--electric);
}

/* ========== CASE STUDIES ========== */
.case-studies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.case-study {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-study:hover {
  transform: translateY(-8px) perspective(600px) rotateY(2deg);
  border-color: var(--electric);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 212, 255, 0.1);
}

.case-study-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-elevated);
}

.case-study-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-study-inner {
  padding: 28px;
}

.case-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--electric);
  margin: 16px 0 8px;
  letter-spacing: 0.1em;
}

.case-label:first-child {
  margin-top: 0;
}

.case-study-inner p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.case-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.case-title {
  padding: 20px 28px;
  background: var(--bg-elevated);
  font-size: 1.1rem;
  font-weight: 700;
  border-top: 1px solid var(--border);
}

/* ========== ACHIEVEMENTS & CERTIFICATES ========== */
.achievement-featured {
  display: block;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  transition: all 0.4s;
}

.achievement-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0, 212, 255, 0.2);
}

.achievement-featured-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0b3d91 0%, #1a5bb5 40%, #fc3d21 100%);
}

.achievement-featured-content {
  position: relative;
  padding: 40px;
  z-index: 1;
}

.achievement-featured-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  margin-bottom: 16px;
}

.achievement-featured-content h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
}

.achievement-featured-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 16px;
}

.achievement-featured-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.cert-open-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  margin-top: 20px;
  transition: all 0.3s;
}

.achievement-featured .cert-open-icon {
  position: absolute;
  top: 24px;
  right: 24px;
  margin-top: 0;
}

.cert-open-icon:hover {
  background: var(--electric);
  color: #050508;
  transform: scale(1.1) rotate(15deg);
}

.cert-open-icon svg {
  width: 24px;
  height: 24px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
}

.achievement-card {
  position: relative;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  overflow: hidden;
  transition: all 0.3s;
}

.achievement-card:hover {
  border-color: var(--electric);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.15);
}

.achievement-thumb {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.achievement-thumb svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
}

.achievement-card .cert-open-icon {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: var(--electric-muted);
  color: var(--electric);
}

.achievement-card .cert-open-icon svg {
  width: 20px;
  height: 20px;
}

.achievement-card .cert-open-icon:hover {
  background: var(--electric);
  color: #050508;
}

.achievement-card p {
  font-size: 0.9rem;
  font-weight: 600;
  padding-right: 48px;
}

/* ========== TIMELINE ========== */
.timeline {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 48px;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--electric);
  z-index: 1;
}

.timeline-content {
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s;
}

.timeline-content:hover {
  border-color: var(--electric);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--electric);
  margin-bottom: 4px;
}

.timeline-content h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.timeline-desc {
  margin-top: 8px;
  font-size: 0.9rem !important;
  line-height: 1.5;
}

/* ========== VOLUNTARY WORK ========== */
.voluntary-intro {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.voluntary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.voluntary-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s;
}

.voluntary-card:hover {
  border-color: var(--electric);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.voluntary-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--electric-muted);
  border-radius: 14px;
  margin-bottom: 20px;
}

.voluntary-icon svg {
  width: 28px;
  height: 28px;
  color: var(--electric);
}

.voluntary-card h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.voluntary-org {
  font-size: 0.9rem;
  color: var(--electric);
  margin-bottom: 12px;
}

.voluntary-card p:last-child {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== CTA STRIP ========== */
.section-cta-strip {
  padding: 60px 0;
}

.cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 48px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
  border: 1px solid var(--electric);
  border-radius: 20px;
  flex-wrap: wrap;
}

.cta-strip-text {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}


/* ========== CERT MODAL ========== */
.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.cert-modal.active {
  opacity: 1;
  visibility: visible;
}

.cert-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.cert-modal-content {
  position: relative;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.cert-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 8px;
  z-index: 1;
}

.cert-modal-body {
  padding: 48px;
}

.cert-modal-placeholder {
  text-align: center;
  color: var(--text-muted);
}

/* ========== CONTACT ========== */
.section-contact {
  text-align: center;
  padding: 120px 0;
}

.contact-container {
  max-width: 560px;
  margin: 0 auto;
}

.section-contact .section-title {
  font-size: 1.6rem;
  margin-bottom: 32px;
  line-height: 1.4;
}

.btn-contact-glow {
  display: inline-block;
  padding: 20px 48px;
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--electric);
  color: #050508;
  text-decoration: none;
  border-radius: 12px;
  margin-bottom: 40px;
  transition: all 0.3s;
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.4);
}

.btn-contact-glow:hover {
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.6);
  transform: scale(1.05);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--electric);
}

.contact-link svg {
  width: 20px;
  height: 20px;
}

/* ========== FOOTER ========== */
.footer {
  padding: 32px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-bracket {
  color: var(--electric);
}

/* ========== RESPONSIVE ========== */

/* Large desktops (1400px+) */
@media (min-width: 1400px) {
  .container {
    max-width: 1280px;
    padding: 0 48px;
  }
}

/* Tablets & small laptops (1024px) */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }

  .hero-content {
    gap: 40px;
  }

  .hero-name {
    font-size: 2rem;
  }

  .problems-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .case-studies {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .skills-sections {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .achievements-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .section-title {
    font-size: 1.6rem;
  }
}

/* Tablets (768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .nav {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--electric-muted);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
  }

  .hero {
    padding: 100px 0 60px;
    min-height: 100vh;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hero-left {
    order: 2;
    justify-content: center;
  }

  .hero-console {
    font-size: 0.8rem;
    padding: 16px 20px;
  }

  .hero-portrait {
    width: 160px;
    height: 160px;
  }

  .hero-name {
    font-size: 1.8rem;
  }

  .hero-usp {
    font-size: 1.1rem;
  }

  .hero-cta {
    gap: 10px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 36px;
  }

  .about-me-content {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .about-me-text .section-title {
    text-align: center;
  }

  .about-me-image {
    max-width: 240px;
    margin: 0 auto;
  }

  .about-me-lead {
    font-size: 1.2rem;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .problems-grid {
    grid-template-columns: 1fr;
  }

  .case-studies {
    grid-template-columns: 1fr;
  }

  .case-study-inner {
    padding: 20px;
  }

  .case-title {
    padding: 16px 20px;
    font-size: 1rem;
  }

  .skills-sections {
    grid-template-columns: 1fr;
  }

  .skills-impact {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .voluntary-grid {
    grid-template-columns: 1fr;
  }

  .achievement-featured-content {
    padding: 28px;
  }

  .achievement-featured-content h3 {
    font-size: 1.4rem;
  }

  .achievement-featured .cert-open-icon {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }

  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .achievement-card p {
    font-size: 0.85rem;
    padding-right: 44px;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .contact-link {
    min-height: 44px;
    padding: 8px 0;
  }

  .cta-strip {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px;
  }

  .cta-strip-text {
    font-size: 1.2rem;
  }

  .btn-contact-glow {
    padding: 16px 36px;
    font-size: 1.1rem;
  }

  .footer {
    padding: 24px 16px;
  }

  .footer p {
    font-size: 0.85rem;
  }
}

/* Phones (480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 90px 0 50px;
  }

  .hero-portrait {
    width: 140px;
    height: 140px;
  }

  .hero-name {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-usp {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-social a {
    width: 40px;
    height: 40px;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 1.35rem;
    margin-bottom: 28px;
  }

  .about-me-image {
    max-width: 200px;
  }

  .why-card,
  .problem-card,
  .voluntary-card,
  .skills-section {
    padding: 20px;
  }

  .case-study-img {
    aspect-ratio: 16/9;
  }

  .case-label {
    font-size: 0.7rem;
  }

  .case-study-inner p {
    font-size: 0.9rem;
  }

  .case-actions {
    flex-wrap: wrap;
  }

  .case-actions .btn {
    flex: 1;
    min-width: 120px;
  }

  .skills-impact {
    font-size: 0.95rem;
  }

  .skill-tag {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .timeline-content {
    padding: 16px 18px;
  }

  .timeline-date,
  .timeline-content h3,
  .timeline-content p {
    font-size: 0.9rem;
  }

  .achievement-featured-content {
    padding: 24px;
  }

  .achievement-featured-content h3 {
    font-size: 1.25rem;
  }

  .achievement-featured-sub {
    font-size: 1rem;
  }

  .achievement-featured-desc {
    font-size: 0.9rem;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .achievement-card {
    padding: 20px;
  }

  .achievement-thumb svg {
    width: 40px;
    height: 40px;
  }

  .btn-contact-glow {
    padding: 14px 28px;
    font-size: 1rem;
  }

  .hero-usp,
  .about-me-body,
  .solve-intro,
  .skills-impact {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Small phones (360px and below) */
@media (max-width: 360px) {
  .container {
    padding: 0 12px;
  }

  .hero-console {
    font-size: 0.75rem;
    padding: 12px 16px;
  }

  .hero-portrait {
    width: 120px;
    height: 120px;
  }

  .hero-name {
    font-size: 1.45rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .loader-terminal {
    width: 95%;
  }

  .loader-terminal-body {
    padding: 16px;
    font-size: 0.85rem;
  }
}

/* Touch devices: ensure tap targets */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    padding: 14px 24px;
  }

  .nav-links a {
    padding: 12px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .cert-open-icon {
    min-width: 44px;
    min-height: 44px;
  }

  .contact-link {
    min-height: 48px;
    padding: 12px 0;
  }
}

/* Lucide sizing */
[data-lucide] {
  width: 24px;
  height: 24px;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for grid items */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Micro-interactions */
.why-card, .problem-card, .voluntary-card {
  transform-origin: center bottom;
}

.why-card:hover, .voluntary-card:hover {
  box-shadow: 0 16px 48px rgba(0, 212, 255, 0.12);
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--electric);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Skill tag pulse on hover */
.skill-tag {
  transform-origin: center;
}

.skill-tag:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

/* Case study image zoom */
.case-study-img {
  overflow: hidden;
}

.case-study:hover .case-study-img img {
  transform: scale(1.08);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Timeline marker pulse */
.timeline-marker {
  transition: box-shadow 0.3s, transform 0.3s;
}

.timeline-item:hover .timeline-marker {
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.5);
}

/* Contact button pulse */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.4); }
  50% { box-shadow: 0 0 60px rgba(0, 212, 255, 0.6); }
}

.btn-contact-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

.btn-contact-glow:hover {
  animation: none;
}

/* Hero portrait subtle float */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-portrait-wrap {
  animation: float 4s ease-in-out infinite;
}

/* Scroll chevron bounce */
.hero-scroll {
  animation: bounce 2s infinite;
}


/* Accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
}
