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

:root {
  --bg:        #0a0a0f;
  --bg2:       #111118;
  --bg3:       #16161f;
  --border:    rgba(255,255,255,0.07);
  --accent:    #6c63ff;
  --accent2:   #00e5ff;
  --text:      #e2e2f0;
  --muted:     #7a7a99;
  --card:      rgba(255,255,255,0.04);
  --radius:    14px;
  --nav-h:     64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 5rem);
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Fira Code', monospace;
  font-size: 1.1rem;
  color: var(--accent2);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex; gap: 2rem; list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -3px; left: 0; right: 0; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px; transition: 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* HERO */
#hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 2rem) clamp(1.5rem, 5vw, 5rem) 4rem;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(108,99,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,99,255,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
  pointer-events: none;
}

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.orb1 { width: 420px; height: 420px; background: rgba(108,99,255,0.18); top: -80px; left: -100px; }
.orb2 { width: 350px; height: 350px; background: rgba(0,229,255,0.12); bottom: 0; right: -80px; }

.hero-inner {
  max-width: 800px; position: relative; z-index: 1;
  display: flex; align-items: center; gap: 3rem;
}

.hero-photo {
  width: 180px; height: 180px; flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(108,99,255,0.5);
  box-shadow: 0 0 0 6px rgba(108,99,255,0.1), 0 8px 40px rgba(0,0,0,0.4);
  animation: fadeUp 0.6s ease both;
}

.hero-text { flex: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.3);
  color: var(--accent);
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}
.hero-badge::before { content: '●'; font-size: 0.6rem; animation: pulse 2s infinite; }

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

.hero-name {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  animation: fadeUp 0.6s 0.1s ease both;
}
.hero-name .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  margin-top: 1rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted);
  font-family: 'Fira Code', monospace;
  animation: fadeUp 0.6s 0.2s ease both;
}
.cursor {
  display: inline-block;
  width: 2px; height: 1.1em;
  background: var(--accent2);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.hero-bio {
  margin-top: 1.5rem;
  max-width: 560px;
  color: var(--muted);
  font-size: 1rem;
  animation: fadeUp 0.6s 0.3s ease both;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-top: 2.5rem;
  animation: fadeUp 0.6s 0.4s ease both;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #9b5de5);
  color: #fff;
  box-shadow: 0 4px 24px rgba(108,99,255,0.35);
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(108,99,255,0.5); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* SECTIONS */
section { padding: 6rem clamp(1.5rem, 5vw, 5rem); }
.section-inner { max-width: 900px; margin: 0 auto; }

.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-label::before { content: '//'; color: var(--muted); }

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.divider {
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  margin-bottom: 2.5rem;
}

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

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

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

.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.stat-num {
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.07em; }

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

.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2), transparent);
}

.timeline-item {
  position: relative;
  padding: 0 0 3rem 2rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-item.visible { opacity: 1; transform: none; }

.timeline-item::before {
  content: '';
  position: absolute; left: -2.45rem; top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 12px rgba(108,99,255,0.6);
}

.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.timeline-card:hover { border-color: var(--accent); transform: translateX(4px); }

.timeline-company { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.timeline-role {
  font-size: 0.9rem; font-weight: 500;
  color: var(--accent2);
  margin-top: 2px;
  font-family: 'Fira Code', monospace;
}

/* LOGOS BANNER */
.logos-banner {
  overflow: hidden;
  padding: 2.5rem 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.logos-banner::before,
.logos-banner::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.logos-banner::before {
  left: 0;
  background: linear-gradient(to right, var(--bg2), transparent);
}
.logos-banner::after {
  right: 0;
  background: linear-gradient(to left, var(--bg2), transparent);
}

.logos-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  animation: scroll-logos 28s linear infinite;
}

.logos-banner:hover .logos-track {
  animation-play-state: paused;
}

.logos-track img {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(0.6);
  opacity: 0.55;
  transition: filter 0.3s, opacity 0.3s, transform 0.3s;
  flex-shrink: 0;
}

.logos-track img:hover {
  filter: grayscale(0) brightness(1);
  opacity: 1;
  transform: scale(1.08);
}

@keyframes scroll-logos {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* CONTACT */
#contact { background: var(--bg2); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.contact-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: rgba(108,99,255,0.06);
}
.contact-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.contact-icon.email    { background: rgba(108,99,255,0.15); }
.contact-icon.twitter  { background: rgba(29,161,242,0.15); }
.contact-icon.linkedin { background: rgba(0,119,181,0.15); }
.contact-icon.github   { background: rgba(255,255,255,0.08); }

.contact-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.contact-value { font-weight: 600; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-card > div:last-child { min-width: 0; overflow: hidden; }

.resume-cta {
  margin-top: 3rem; padding: 2.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.resume-cta p:first-child { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.resume-cta p:last-of-type { color: var(--muted); margin-bottom: 1.5rem; }

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  font-family: 'Fira Code', monospace;
}
footer span { color: var(--accent); }

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* RESPONSIVE */
@media (max-width: 700px) {
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg2); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 1rem 2rem; border-bottom: 1px solid var(--border); }
  .hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; text-align: center; gap: 2rem; }
  .hero-photo { width: 140px; height: 140px; }
  .hero-actions { justify-content: center; }
}
