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

:root {
  --bg:        #0a0a0f;
  --bg2:       #111118;
  --bg3:       #16161f;
  --border:    #1e1e2e;
  --accent:    #6c63ff;
  --accent2:   #00d4ff;
  --text:      #e2e8f0;
  --muted:     #718096;
  --card:      #12121a;
  --radius:    12px;
  --nav-bg:    rgba(10, 10, 15, 0.85);
}


html { scroll-behavior: smooth; }

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

/* Scrollbar */
::-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; width: 100%; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: 'Fira Code', monospace;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.nav-logo span { color: var(--accent2); }
.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;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { width: 100%; }
.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 0.45rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.nav-cta:hover { opacity: 0.85; transform: translateY(-1px); }

/* HERO */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 7rem 2rem 4rem;
  max-width: 1100px; margin: 0 auto;
  gap: 4rem;
}
.hero-text { flex: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.3);
  color: var(--text);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-family: 'Fira Code', monospace;
  margin-bottom: 1.5rem;
}
.hero-badge::before { content: '●'; font-size: 0.6rem; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 700;
    line-height: 1.15;
  margin-bottom: 1rem;
}
h1 .name { color: var(--text); }
h1 .role-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.15em;
    line-height: 1.15;
  max-width: 100%;
}
h1 .role {
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.typed-cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--accent2);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
}
.hero-sub strong { color: var(--text); }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5045d9);
  color: #fff;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(108,99,255,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(108,99,255,0.5); }
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.btn-outline:hover { border-color: var(--text); transform: translateY(-2px); }
.hero-photo {
  position: relative;
  flex-shrink: 0;
}
.hero-photo img {
  width: 280px; height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 60px rgba(108,99,255,0.3), 0 0 120px rgba(0,212,255,0.1);
}
.hero-photo::before {
  content: '';
  position: absolute; inset: -12px;
  border-radius: 50%;
  border: 1px dashed rgba(108,99,255,0.3);
  animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* SECTION COMMONS */
section { padding: 6rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--accent2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.section-line {
  width: 50px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  margin-bottom: 3rem;
}

/* ABOUT */
#about { background: var(--bg2); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-text p { color: var(--muted); margin-bottom: 1rem; font-size: 0.97rem; }
.about-text p strong { color: var(--text); }
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.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(--text); transform: translateY(-3px); }
.stat-number {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Fira Code', monospace;
}
.stat-number span { font-size: 1.4rem; color: var(--accent2); }
.stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }

/* SKILLS */
#skills { background: var(--bg); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.skill-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: border-color 0.25s, transform 0.25s;
}
.skill-group:hover { border-color: var(--text); transform: translateY(-4px); }
.skill-group-icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
.skill-group-title { font-weight: 600; font-size: 1rem; margin-bottom: 1.2rem; color: var(--text); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.2);
  color: var(--text);
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  transition: background 0.2s;
}
.tag:hover { background: rgba(108,99,255,0.2); }
.tag.cyan {
  background: rgba(0,212,255,0.08);
  border-color: rgba(0,212,255,0.2);
  color: var(--accent2);
}
.tag.cyan:hover { background: rgba(0,212,255,0.15); }

/* PROJECTS */
#projects { background: var(--bg2); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex; flex-direction: column;
  transition: border-color 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover { border-color: var(--text); transform: translateY(-5px); }
.project-card:hover::before { opacity: 1; }
.project-icon { font-size: 2rem; margin-bottom: 1rem; }
.project-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.project-desc { color: var(--muted); font-size: 0.9rem; flex: 1; margin-bottom: 1.5rem; }
.project-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.project-links { display: flex; gap: 0.75rem; }
.project-link {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  transition: 0.2s;
}
.project-link.primary {
  background: var(--accent);
  color: #fff;
}
.project-link.primary:hover { opacity: 0.85; }
.project-link.secondary {
  border: 1px solid var(--border);
  color: var(--muted);
}
.project-link.secondary:hover { border-color: var(--text); color: var(--text); }

/* EXPERIENCE */
#experience { background: var(--bg); }
.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(--accent), var(--accent2), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding: 1.8rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.timeline-item:hover { border-color: var(--text); }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.6rem; top: 1.8rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 4px rgba(108,99,255,0.2);
}
.timeline-period {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--accent2);
  margin-bottom: 0.4rem;
}
.timeline-role { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.2rem; }
.timeline-company { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.75rem; }
.timeline-desc { font-size: 0.9rem; color: var(--muted); }

/* CONTACT */
#contact { background: var(--bg2); }
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info p { color: var(--muted); font-size: 0.97rem; margin-bottom: 2rem; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.contact-item:hover { border-color: var(--text); transform: translateX(4px); }
.contact-item-icon { font-size: 1.2rem; width: 2rem; text-align: center; }
.contact-item-label { font-size: 0.8rem; color: var(--muted); }
.contact-item-value { font-size: 0.9rem; font-weight: 500; }
form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
input, textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: vertical;
}
input:focus, textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}
textarea { min-height: 130px; }
.form-submit {
  background: linear-gradient(135deg, var(--accent), #5045d9);
  color: #fff;
  border: none;
  padding: 0.85rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(108,99,255,0.3);
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,0.45); }

/* FOOTER */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}
footer span { color: var(--text); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }


/* MOBILE */
.hamburger { display: none; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    display: none; position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg2);
    flex-direction: column;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1.2rem;
  }
  .nav-links.open { display: flex; }
  .nav-cta { display: none; }
  #hero { flex-direction: column-reverse; text-align: center; padding-top: 8rem; gap: 2rem; }
  h1 { font-size: clamp(1.9rem, 9vw, 2.4rem); }
  h1 .role-line {
    min-height: 1.15em;
    line-height: 1.15;
  }
  h1 .role {
    font-size: clamp(1.45rem, 6.8vw, 1.9rem);
  }
  .hero-btns { justify-content: center; }
  .hero-photo img { width: 200px; height: 200px; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-tags {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }
  .skill-tags .tag {
    width: 100%;
    padding: 0.35rem 0.25rem;
    text-align: center;
    font-size: 0.66rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; }
}

/* BACK TO TOP */
#back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 99;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #fff;
  border: none; border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(108,99,255,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
#back-to-top.show { opacity: 1; pointer-events: auto; }
#back-to-top:hover { transform: translateY(-3px); }


/* ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
