/* ===== ALEXIS JUBIN — CV SITE ===== */
/* Dark navy theme with cyan/teal accents */

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

/* --- Reset & Variables --- */
:root {
  --bg-primary: #0b1120;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-card-hover: #1f2b3d;
  --border: #1e3a5f;
  --border-light: #2a4a6b;
  --cyan: #22d3ee;
  --cyan-dim: #0891b2;
  --cyan-glow: rgba(34, 211, 238, 0.15);
  --teal: #14b8a6;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --white: #ffffff;
  --danger: #f87171;
  --warning: #fbbf24;
  --success: #34d399;
  --purple: #a78bfa;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --nav-height: 70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: calc(var(--nav-height) + 1rem); }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--cyan-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* --- Typography --- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

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

p { color: var(--text-secondary); margin-bottom: 1rem; }

.accent { color: var(--cyan); }
.mono { font-family: var(--font-mono); }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.page-content {
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 4rem;
  min-height: 100vh;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(11, 17, 32, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.nav-logo .accent { font-weight: 800; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
  background: var(--cyan-glow);
}

/* Language Selector */
.lang-selector {
  position: relative;
  margin-left: 1rem;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover { border-color: var(--cyan-dim); color: var(--cyan); }

.lang-btn svg { width: 16px; height: 16px; }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
  z-index: 100;
}

.lang-dropdown.open { display: block; }

.lang-dropdown-search {
  position: sticky;
  top: 0;
  padding: 0.6rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.lang-dropdown-search input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-main);
  outline: none;
}

.lang-dropdown-search input:focus { border-color: var(--cyan-dim); }

.lang-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.8rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-main);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.lang-option:hover { background: var(--cyan-glow); color: var(--cyan); }
.lang-option.active { color: var(--cyan); font-weight: 600; }

/* Mobile Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

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

/* --- Anchor offset for fixed nav --- */
section[id] {
  scroll-margin-top: var(--nav-height);
}

/* --- Hero Section --- */
.hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--nav-height));
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 2rem;
}

.hero .container {
  width: 100%;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--cyan-glow);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 50px;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-tag .dot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero-title { margin-bottom: 1rem; }
.hero-title .line { display: block; }
.hero-title .highlight {
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Orbit Scene --- */
.orbit-scene {
  width: 340px;
  height: 340px;
  position: relative;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.orbit-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.12);
}

.orbit-ring--1 { animation: orbit-spin 25s linear infinite; }
.orbit-ring--1::before { inset: 15%; }
.orbit-ring--2 { animation: orbit-spin 35s linear infinite reverse; }
.orbit-ring--2::before { inset: 0; }

.orbit-node {
  position: absolute;
  width: 46px;
  height: 46px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  /* place on circle using CSS trig functions */
  left: calc(50% - 23px + var(--radius) * cos(var(--angle)));
  top: calc(50% - 23px + var(--radius) * sin(var(--angle)));
  transition: box-shadow 0.3s, border-color 0.3s;
}

.orbit-node:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
}

.orbit-ring--1 .orbit-node { --radius: 100px; animation: counter-spin-cw 25s linear infinite; }
.orbit-ring--2 .orbit-node { --radius: 160px; animation: counter-spin-ccw 35s linear infinite; }

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.35), 0 0 100px rgba(34, 211, 238, 0.1);
  animation: center-pulse 3s ease-in-out infinite;
}

@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes counter-spin-cw { to { transform: rotate(-360deg); } }
@keyframes counter-spin-ccw { to { transform: rotate(360deg); } }
@keyframes center-pulse {
  0%, 100% { box-shadow: 0 0 50px rgba(34, 211, 238, 0.35), 0 0 100px rgba(34, 211, 238, 0.1); }
  50% { box-shadow: 0 0 60px rgba(34, 211, 238, 0.5), 0 0 120px rgba(34, 211, 238, 0.2); }
}

/* --- Theme Toggle --- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition);
  margin-left: 0.5rem;
}

.theme-toggle:hover { border-color: var(--cyan-dim); color: var(--cyan); }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* --- Light Theme --- */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border: #e2e8f0;
  --border-light: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --cyan-glow: rgba(8, 145, 178, 0.1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.9);
}

[data-theme="light"] .orbit-node {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .orbit-center {
  box-shadow: 0 0 40px rgba(8, 145, 178, 0.25);
}

[data-theme="light"] .stat-number {
  background: linear-gradient(135deg, var(--cyan-dim), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
}

/* --- Typing effect --- */
.typed-cursor {
  display: inline-block;
  width: 3px;
  margin-left: 2px;
  background: var(--cyan);
  animation: blink 0.8s step-end infinite;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-dim), var(--teal));
  color: var(--bg-primary);
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.4);
  transform: translateY(-2px);
  color: var(--bg-primary);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-glow);
}

/* --- Section Header --- */
.section-header {
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--cyan);
}

.section-title {
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 1.05rem;
  max-width: 600px;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--cyan-dim);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* --- Timeline (Experience / Education) --- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--cyan);
  border-radius: 50%;
  transform: translateX(-5px);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.timeline-card { margin-top: 0.25rem; }

.timeline-card h3 { margin-bottom: 0.25rem; }

.timeline-card .company {
  color: var(--cyan-dim);
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-card .location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pin-icon {
  flex-shrink: 0;
}

.timeline-card ul {
  list-style: none;
  padding: 0;
}

.timeline-card ul li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.timeline-card ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 700;
}

/* --- Skills Grid --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.skill-category h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.skill-category h3 .icon {
  width: 36px;
  height: 36px;
  background: var(--cyan-glow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  padding: 0.35rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
}

.skill-tag:hover {
  border-color: var(--cyan-dim);
  color: var(--cyan);
  background: var(--cyan-glow);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.2);
}

/* --- Projects Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.project-card .project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.project-card .project-icon {
  width: 48px;
  height: 48px;
  background: var(--cyan-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.project-card .project-links {
  display: flex;
  gap: 0.75rem;
}

.project-card .project-links a {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.project-card .project-links a:hover { color: var(--cyan); }

.project-card h3 { margin-bottom: 0.5rem; }

.project-card .project-desc {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.project-card .project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-card .project-tech span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: rgba(34, 211, 238, 0.08);
  border-radius: 4px;
  color: var(--cyan);
}

/* --- Blog Grid --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.blog-card .blog-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-card h3 { margin-bottom: 0.5rem; }

.blog-card .blog-excerpt {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.blog-card .read-more {
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item .icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--cyan-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-item h4 { margin-bottom: 0.2rem; }
.contact-item p { margin: 0; font-size: 0.95rem; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--cyan-dim);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

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

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--cyan); }

/* --- Stats Row --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- Status Badge --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.available {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--success);
}

/* --- Blog placeholder --- */
.coming-soon {
  text-align: center;
  padding: 4rem 2rem;
}

.coming-soon .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { order: -1; }
  .orbit-scene { width: 280px; height: 280px; }
  .orbit-ring--1 .orbit-node { --radius: 80px; }
  .orbit-ring--2 .orbit-node { --radius: 130px; }
  .contact-grid { grid-template-columns: 1fr; }
  .projects-grid, .blog-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 1.25rem; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 2rem;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: var(--transition);
  }

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

  .nav-links a { font-size: 1.1rem; padding: 0.75rem 1rem; }

  .lang-selector { margin-left: 0; }

  .nav-toggle { display: flex; }

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

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}
