/* ── RESET & VARIABLES ─────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg:        #0a0a0f;
  --bg2:       #0f0f18;
  --bg3:       #131320;
  --surface:   #1a1a2e;
  --border:    rgba(255,255,255,0.07);
  --accent:    #00e5c3;
  --accent2:   #7c5cfc;
  --accent3:   #ff6b6b;
  --text:      #e8e8f0;
  --muted:     #6b6b8a;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --font-body: 'Figtree', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #000; }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent2); border-radius: 2px; }

/* ── CURSOR ────────────────────────────────────────────────── */
.cursor {
  position: fixed; width: 10px; height: 10px;
  background: var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform 0.1s, width 0.3s, height 0.3s, opacity 0.3s;
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1.5px solid var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: transform 0.18s ease, width 0.3s, height 0.3s, opacity 0.3s;
  opacity: 0.5;
}

/* ── NOISE OVERLAY ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1000; opacity: 0.35;
}

/* ── NAV ───────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 5vw;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
nav.scrolled { padding: 0.8rem 5vw; }

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--muted); }

.nav-links {
  display: flex; gap: 2.5rem; list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 1.5px;
  background: var(--text);
  transition: all 0.3s;
}

/* ── HERO ──────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 6rem 5vw 4rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.hero-label::before {
  content: '';
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span { display: block; }
.hero-title .accent { color: var(--accent); }

.hero-desc {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 500;
}
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Hero image / card */
.hero-visual {
  display: flex; justify-content: center; align-items: center;
  position: relative;
}

.photo-frame {
  position: relative;
  width: 320px; height: 380px;
}
.photo-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--accent), var(--accent2), transparent);
  border-radius: 4px;
  z-index: 0;
}
.photo-frame img {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 3px;
  display: block;
  filter: grayscale(20%) contrast(1.05);
}

.float-badge {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  z-index: 2;
  animation: float 3s ease-in-out infinite;
  backdrop-filter: blur(10px);
}
.float-badge.b1 { top: -16px; right: -24px; animation-delay: 0s; }
.float-badge.b2 { bottom: 20px; left: -28px; animation-delay: 1.5s; }
.float-badge .dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  margin-right: 6px; animation: pulse 1.5s infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Hero background effects */
.hero-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}
.glow1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,229,195,0.08) 0%, transparent 70%);
  top: -100px; right: -100px;
}
.glow2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124,92,252,0.08) 0%, transparent 70%);
  bottom: -50px; left: 10%;
}

/* Ticker */
.ticker-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  background: var(--bg2);
}
.ticker {
  display: flex; gap: 0;
  animation: ticker 25s linear infinite;
  width: max-content;
}
.ticker-item {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0 2.5rem;
}
.ticker-item .sep { color: var(--accent); margin-left: 2.5rem; }
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── SECTIONS SHARED ───────────────────────────────────────── */
section { padding: 6rem 5vw; }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.section-label::after {
  content: '';
  flex: 1; max-width: 60px;
  height: 1px; background: var(--accent);
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 3.5rem;
  line-height: 1.1;
}

/* ── ABOUT ─────────────────────────────────────────────────── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}
.about-text p strong { color: var(--text); font-weight: 600; }

.stats-row {
  display: flex; gap: 2rem; flex-wrap: wrap;
  margin-top: 2.5rem;
}
.stat {
  border-left: 2px solid var(--accent);
  padding-left: 1.2rem;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.skill-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.skill-item::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s;
  transform-origin: bottom;
}
.skill-item:hover { border-color: rgba(0,229,195,0.3); transform: translateX(4px); }
.skill-item:hover::before { transform: scaleY(1); }
.skill-icon {
  font-size: 1.3rem;
  width: 36px; text-align: center;
}
.skill-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
}
.skill-level {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

/* ── EXPERIENCE ────────────────────────────────────────────── */
#experience { background: var(--bg); }

.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 1px; background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 4px rgba(0,229,195,0.15);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.timeline-role {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.timeline-company {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.timeline-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.timeline-list li {
  font-size: 0.9rem;
  color: var(--muted);
  display: flex; align-items: flex-start; gap: 0.8rem;
}
.timeline-list li::before {
  content: '→';
  color: var(--accent);
  font-family: var(--font-mono);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ── PROJECTS ──────────────────────────────────────────────── */
#projects { background: var(--bg2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
}
.project-card.visible { opacity: 1; transform: translateY(0); }

.project-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,229,195,0.04), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.project-card:hover { border-color: rgba(0,229,195,0.3); transform: translateY(-6px); }
.project-card:hover::after { opacity: 1; }

.project-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}
.project-icon {
  font-size: 1.4rem; color: var(--accent);
}
.project-links {
  display: flex; gap: 0.8rem;
}
.project-links a {
  color: var(--muted);
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.3s;
}
.project-links a:hover { color: var(--accent); }

.project-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.project-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.project-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.7rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.3s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── FORMATION ─────────────────────────────────────────────── */
#formation { background: var(--bg); }

.formation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.formation-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.8rem;
  transition: all 0.3s;
}
.formation-card:hover { border-color: rgba(124,92,252,0.4); transform: translateY(-3px); }

.formation-icon {
  font-size: 1.8rem; margin-bottom: 1rem;
}
.formation-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.formation-inst {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.formation-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent2);
  letter-spacing: 0.1em;
}

/* ── CONTACT ───────────────────────────────────────────────── */
#contact {
  background: var(--bg2);
  text-align: center;
}
#contact .section-label { justify-content: center; }
#contact .section-label::after { display: none; }
#contact .section-label::before {
  content: '';
  flex: 0 0 60px; height: 1px; background: var(--accent);
}

.contact-subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 3rem;
}

.contact-links {
  display: flex; justify-content: center;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 3rem;
}
.contact-link {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.9rem 1.8rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  transition: all 0.3s;
  background: var(--bg3);
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}
.contact-link i { font-size: 1rem; }

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 5vw;
}
footer p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
footer span { color: var(--accent); }

/* ── MOBILE NAV DRAWER ─────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,10,15,0.97);
  z-index: 490;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--accent); }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin: 0 auto 2.5rem; }
  .hero-cta { justify-content: center; }
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .formation-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 1.5rem; }
}

/* ── ANIMATIONS ────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero text animation */
@keyframes slideUp {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}

.hero-title .line span {
  animation: slideUp 0.8s cubic-bezier(0.16,1,0.3,1) both;
}
.hero-title .line:nth-child(1) span { animation-delay: 0.1s; }
.hero-title .line:nth-child(2) span { animation-delay: 0.2s; }
.hero-title .line:nth-child(3) span { animation-delay: 0.3s; }

.hero-label { animation: fadeIn 0.8s 0.05s both; }
.hero-desc   { animation: fadeIn 0.8s 0.45s both; }
.hero-cta    { animation: fadeIn 0.8s 0.55s both; }
.photo-frame { animation: fadeIn 0.8s 0.4s both; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Glitch hover on logo */
.nav-logo:hover {
  animation: glitch 0.4s steps(2) infinite;
}
@keyframes glitch {
  0%   { text-shadow: 2px 0 var(--accent), -2px 0 var(--accent2); }
  25%  { text-shadow: -2px 0 var(--accent), 2px 0 var(--accent2); }
  50%  { text-shadow: 2px 2px var(--accent3), -2px -2px var(--accent); }
  75%  { text-shadow: -1px 0 var(--accent2), 1px 0 var(--accent); }
  100% { text-shadow: none; }
}
