/* ============================================
   Mohamed Zein — Portfolio Styles
   Modern dark theme with gradient accents
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #0f0f23;
  --bg-card: #141428;
  --bg-card-hover: #1a1a35;
  --surface: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --text-primary: #e8e8f0;
  --text-secondary: #8888a8;
  --text-muted: #55556a;

  --accent-cyan: #00d4ff;
  --accent-purple: #7c3aed;
  --accent-pink: #ec4899;
  --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  --gradient-accent: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  --gradient-glow: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(124, 58, 237, 0.15));

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --nav-height: 72px;
  --container-width: 1200px;
  --radius: 16px;
  --radius-sm: 8px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(0, 212, 255, 0.3);
  color: #fff;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #fff;
}

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

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

/* --- Cursor Glow --- */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* --- Particle Canvas --- */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-bracket {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.06);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  max-width: var(--container-width);
  margin: 0 auto;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 640px;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 24px;
}

.hero-greeting {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.hero-name {
  display: block;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-roles {
  margin: 20px 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-height: 40px;
}

.typewriter-cursor {
  color: var(--accent-cyan);
  animation: blink 0.8s infinite;
  font-weight: 300;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-description strong {
  color: var(--text-primary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.35);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.btn-outline:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* --- Hero Stats --- */
.hero-stats {
  display: flex;
  gap: 40px;
}

.stat {
  text-align: left;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-plus {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* --- Hero Visual (Orbit) --- */
.hero-visual {
  flex: 0 0 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-orbit {
  position: relative;
  width: 340px;
  height: 340px;
}

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.3);
}

.orbit-center-content {
  font-size: 1.8rem;
  color: #fff;
}

.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.ring-1 {
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  animation: orbit 12s linear infinite;
}

.ring-2 {
  width: 260px;
  height: 260px;
  margin: -130px 0 0 -130px;
  animation: orbit 18s linear infinite reverse;
}

.ring-3 {
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  animation: orbit 24s linear infinite;
}

@keyframes orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.orbit-icon {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--accent-cyan);
}

.ring-1 .orbit-icon { animation: counter-orbit 12s linear infinite; }
.ring-2 .orbit-icon { animation: counter-orbit 18s linear infinite reverse; }
.ring-3 .orbit-icon { animation: counter-orbit 24s linear infinite; }

@keyframes counter-orbit {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(-360deg); }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.mouse-wheel {
  width: 3px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 2px;
  animation: scroll-wheel 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(10px); }
}

/* --- Sections --- */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 60px;
  letter-spacing: -1px;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-cyan);
  margin-right: 12px;
}

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.02rem;
}

.about-text strong {
  color: var(--accent-cyan);
}

.about-details {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.detail-item i {
  color: var(--accent-cyan);
  width: 20px;
  text-align: center;
}

/* --- Code Card (About) --- */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.about-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28c840; }

.card-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.about-code {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: auto;
}

.about-code code {
  font-family: inherit;
}

.json-key { color: #7c3aed; }
.json-string { color: #28c840; }
.json-bool { color: #ffbd2e; }

/* --- Timeline (Experience) --- */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -40px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-cyan);
  z-index: 1;
}

.timeline-item:first-child .timeline-marker {
  background: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.timeline-company i {
  color: var(--accent-cyan);
  margin-right: 4px;
}

.timeline-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  margin-left: 10px;
  background: rgba(124, 58, 237, 0.08);
  color: var(--accent-purple);
  border-radius: 100px;
  border: 1px solid rgba(124, 58, 237, 0.15);
  vertical-align: middle;
}

.timeline-location {
  margin-left: 16px;
  color: var(--text-muted);
}

.timeline-location i {
  color: var(--text-muted);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  white-space: nowrap;
  background: rgba(0, 212, 255, 0.08);
  padding: 4px 12px;
  border-radius: 100px;
}

.timeline-details {
  list-style: none;
  margin-bottom: 16px;
}

.timeline-details li {
  position: relative;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.timeline-details li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 12px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent-purple);
  border-radius: 100px;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

/* --- Education --- */
.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.edu-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.edu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.edu-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--gradient-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-cyan);
  margin-bottom: 20px;
}

.edu-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.edu-badge.completed {
  background: rgba(40, 200, 64, 0.1);
  color: #28c840;
  border-color: rgba(40, 200, 64, 0.2);
}

.edu-degree {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.edu-school {
  color: var(--accent-cyan);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.edu-location,
.edu-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.edu-location i,
.edu-date i {
  margin-right: 6px;
  width: 14px;
  text-align: center;
}

.edu-note {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

/* --- Skills --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

.skill-category:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.skill-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent-cyan);
}

.skill-category-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.skill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  flex-shrink: 0;
}

/* --- Projects --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.project-icon {
  font-size: 1.8rem;
  color: var(--accent-cyan);
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent-purple);
  border-radius: 100px;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 20px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.project-tech span::before {
  content: '#';
  color: var(--accent-cyan);
  margin-right: 2px;
}

/* --- Certifications --- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: var(--transition);
}

.cert-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.cert-icon {
  font-size: 2rem;
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

.cert-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.cert-issuer {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cert-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.cert-link:hover {
  color: #fff;
}

.cert-link.disabled {
  color: var(--text-muted);
  cursor: default;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 36px;
  line-height: 1.8;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  color: var(--text-primary);
}

.contact-method:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateX(4px);
}

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

.contact-method h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-method p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* --- Contact Form --- */
.contact-form-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.form-group {
  position: relative;
  margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.92rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group label {
  position: absolute;
  left: 16px;
  top: 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
  pointer-events: none;
  transition: var(--transition);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 12px;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  background: var(--bg-card);
  padding: 0 6px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  z-index: 1;
  position: relative;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-social a:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.footer-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --- Loading Screen --- */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 32px;
  animation: loader-pulse 1.5s ease-in-out infinite;
}

.loader-bracket {
  color: var(--accent-cyan);
}

@keyframes loader-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto 20px;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.loader-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.loader-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* --- Resume Button --- */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--accent-cyan);
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.05);
  transform: translateY(-2px);
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

/* --- Skill Progress Bars --- */
.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-bar-item {
  width: 100%;
}

.skill-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.skill-percent {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.skill-bar-track {
  width: 100%;
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.skill-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-bar-fill.animated {
  /* width set by JS via data-width attribute */
}

/* --- Trailblazer Section --- */
.trailblazer-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.trailblazer-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00a1e0, #1798c1, #032d60);
}

.trailblazer-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 36px;
}

.trailblazer-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a1e0, #032d60);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  flex-shrink: 0;
}

.trailblazer-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.trailblazer-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.trailblazer-profile-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #00a1e0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trailblazer-profile-link:hover {
  color: #fff;
}

.trailblazer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.tb-stat {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tb-stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: #00a1e0;
  margin-bottom: 4px;
}

.tb-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

.tb-badges-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

.tb-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.tb-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.tb-badge:hover {
  border-color: #00a1e0;
  color: var(--text-primary);
  transform: translateY(-2px);
}

.tb-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 161, 224, 0.15), rgba(3, 45, 96, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #00a1e0;
  flex-shrink: 0;
}

.tb-event-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tb-event {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0, 161, 224, 0.06);
  border: 1px solid rgba(0, 161, 224, 0.15);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.tb-event i {
  color: #00a1e0;
  font-size: 0.75rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 140px;
  }

  .hero-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-description {
    max-width: 100%;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    flex: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .trailblazer-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: translateX(100%);
    transition: var(--transition);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.2rem;
    padding: 12px 24px;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 70px 0;
  }

  .section-title {
    font-size: 1.6rem;
    margin-bottom: 40px;
  }

  .hero-orbit {
    width: 260px;
    height: 260px;
  }

  .ring-3 {
    width: 260px;
    height: 260px;
    margin: -130px 0 0 -130px;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }

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

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 30px;
  }

  .timeline-marker {
    left: -30px;
    width: 12px;
    height: 12px;
  }

  .timeline-header {
    flex-direction: column;
  }

  .hero-stats {
    gap: 24px;
  }

  .trailblazer-wrapper {
    padding: 24px;
  }

  .trailblazer-header {
    flex-direction: column;
    text-align: center;
  }

  .trailblazer-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .tb-stat {
    padding: 16px 8px;
  }

  .tb-stat-number {
    font-size: 1.6rem;
  }

  .tb-badge-list {
    flex-direction: column;
  }

  .tb-event-list {
    flex-direction: column;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2.2rem;
    letter-spacing: -1px;
  }

  .hero-roles {
    font-size: 1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .timeline-content {
    padding: 20px;
  }

  .contact-form-wrapper {
    padding: 24px;
  }
}
