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

:root {
  --bg: #0d0d0d;
  --surface: #111827;
  --card: #1a1a2e;
  --accent: #00f5ff;
  --accent2: #a855f7;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --border: rgba(0, 245, 255, 0.12);
  --border2: rgba(168, 85, 247, 0.15);
  --glow: rgba(0, 245, 255, 0.2);
  --glow2: rgba(168, 85, 247, 0.2);
  --radius: 14px;
}

html { scroll-behavior: smooth; }

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

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent2), var(--accent)); border-radius: 3px; }

/* ─── SCROLL PROGRESS ─── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  width: 0%;
  z-index: 200;
  transition: width 0.1s linear;
}

/* ─── REVEAL ANIMATION ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.accent { color: var(--accent); }
.highlight {
  color: var(--accent);
  font-weight: 600;
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2.5rem;
  background: rgba(13, 13, 13, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s;
}
.navbar.scrolled { padding: 0.6rem 2.5rem; }

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s;
  border-radius: 2px;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a.active::after, .nav-links a:hover::after { width: 100%; }

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

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 245, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.hero-badge-dot {
  width: 7px; height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-greeting {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.hero-name {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  background: linear-gradient(135deg, #fff 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.hero-sub {
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
  color: var(--accent);
  min-height: 1.5rem;
  margin-bottom: 2rem;
}
.cursor { animation: blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-stack {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.stack-pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  color: var(--text);
}

/* Terminal */
.hero-terminal {
  background: #0a0a14;
  border: 1px solid rgba(0,245,255,0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(0,245,255,0.07);
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.t-dot { width: 12px; height: 12px; border-radius: 50%; }
.t-red    { background: #ff5f56; }
.t-yellow { background: #ffbd2e; }
.t-green  { background: #27c93f; }
.t-title  { margin-left: 0.5rem; color: var(--text-muted); font-size: 0.78rem; }

.terminal-body {
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  line-height: 1.7;
}
.t-prompt { color: var(--accent); margin-right: 0.5rem; }
.t-out    { color: #94a3b8; padding-left: 1.2rem; }
.t-json   { color: var(--text); }
.t-key    { color: var(--accent); }
.t-str    { color: #86efac; }
.t-blink  { animation: blink 1s infinite; color: var(--accent); }

/* Hero scroll arrow */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-decoration: none;
  animation: float 2.5s ease-in-out infinite;
}
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}
@keyframes float { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }

/* ─── SECTIONS ─── */
.section { padding: 6rem 2rem; }
.section-alt { background: var(--surface); }

.container { max-width: 1100px; margin: 0 auto; }

.section-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 3.5rem;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 24px var(--glow);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 24px var(--glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: rgba(255,255,255,0.1);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
}
.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; }
.btn-full { width: 100%; text-align: center; }

/* ─── ABOUT ─── */
.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: start;
}
.about-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.avatar-ring {
  position: relative;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 50%;
}
.avatar-placeholder {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
}
.about-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.stat-num { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-left: auto; }

.about-text p {
  color: #94a3b8;
  margin-bottom: 1rem;
  font-size: 1.02rem;
}
.about-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ─── SERVICES ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(168,85,247,0.12);
}
.service-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.service-icon--1 { background: rgba(0,245,255,0.1); color: var(--accent); }
.service-icon--2 { background: rgba(168,85,247,0.1); color: var(--accent2); }
.service-icon--3 { background: rgba(34,197,94,0.1); color: #22c55e; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.service-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.service-list { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.service-list li { font-size: 0.85rem; color: var(--text-muted); padding-left: 1rem; position: relative; }
.service-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

/* ─── SKILLS ─── */
.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.skill-bars { display: flex; flex-direction: column; gap: 1.4rem; }
.skill-bar-item {}
.skill-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
}
.skill-pct { color: var(--accent); font-family: 'Fira Code', monospace; }
.skill-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

.skill-tags-col { display: flex; flex-direction: column; gap: 1.5rem; }
.skill-group h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  background: rgba(0,245,255,0.07);
  border: 1px solid rgba(0,245,255,0.18);
  color: var(--accent);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.83rem;
  transition: background 0.2s;
}
.tag:hover { background: rgba(0,245,255,0.16); }
.tag-purple {
  background: rgba(168,85,247,0.07);
  border-color: rgba(168,85,247,0.2);
  color: var(--accent2);
}
.tag-purple:hover { background: rgba(168,85,247,0.15); }
.tag-dim {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  color: var(--text-muted);
}
.tag-dim:hover { background: rgba(255,255,255,0.08); }
.tag-sm { font-size: 0.75rem; padding: 0.22rem 0.6rem; }

/* ─── TIMELINE ─── */
.timeline {
  position: relative;
  max-width: 750px;
  margin: 0 auto;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--accent2), var(--accent));
  opacity: 0.3;
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.timeline-marker {
  position: absolute;
  left: -1.75rem;
  top: 6px;
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 10px var(--glow);
}
.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.timeline-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(0,245,255,0.07);
}
.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.timeline-date { font-size: 0.8rem; color: var(--text-muted); font-family: 'Fira Code', monospace; }
.timeline-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  background: rgba(0,245,255,0.1);
  color: var(--accent);
  border: 1px solid rgba(0,245,255,0.2);
}
.timeline-badge--edu {
  background: rgba(168,85,247,0.1);
  color: var(--accent2);
  border-color: rgba(168,85,247,0.2);
}
.timeline-card h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.timeline-company { font-size: 0.85rem; color: var(--accent); margin-bottom: 0.5rem; }
.timeline-card > p { color: var(--text-muted); font-size: 0.9rem; }

/* ─── PROJECTS ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.75rem;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent2);
  box-shadow: 0 16px 48px rgba(168,85,247,0.13);
}
.project-thumb {
  height: 140px;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}
.project-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-size: 30px 30px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.1) 1px, transparent 1px);
}
.project-thumb--1 { background: linear-gradient(135deg, #0f3460, #1a6aff); }
.project-thumb--2 { background: linear-gradient(135deg, #2d0a4e, #a855f7); }
.project-thumb--3 { background: linear-gradient(135deg, #0a2e1a, #22c55e); }
.project-thumb-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.3);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  position: relative;
  z-index: 1;
}
.project-body { padding: 1.5rem; flex: 1; }
.project-body h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.project-body p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-footer {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
}

/* ─── CONTACT ─── */
.contact-sub {
  text-align: center;
  color: var(--text-muted);
  margin-top: -2rem;
  margin-bottom: 3rem;
}
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateX(6px);
  box-shadow: 0 4px 20px rgba(0,245,255,0.08);
}
.contact-icon-wrap {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon-wrap--1 { background: rgba(0,245,255,0.1); color: var(--accent); }
.contact-icon-wrap--2 { background: rgba(168,85,247,0.1); color: var(--accent2); }
.contact-icon-wrap--3 { background: rgba(34,197,94,0.1); color: #22c55e; }
.contact-card-label { display: block; font-size: 0.9rem; font-weight: 600; }
.contact-card small { font-size: 0.78rem; color: var(--text-muted); display: block; }

/* Contact form */
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.form-group input, .form-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
  outline: none;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,245,255,0.08);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(100,116,139,0.6); }

/* ─── FOOTER ─── */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.footer-sub { font-size: 0.78rem; opacity: 0.5; }

/* ─── SCROLL TO TOP ─── */
.scroll-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--accent2);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  z-index: 50;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { background: var(--accent); color: #000; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-terminal { display: none; }
  .skills-layout { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-visual { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .about-stats { flex-direction: row; }
  .about-actions { justify-content: center; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(13,13,13,0.97);
    padding: 1.5rem 2rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1.25rem;
    backdrop-filter: blur(16px);
  }
  .burger { display: flex; }
  .section { padding: 4rem 1.25rem; }
  .hero { padding: 6rem 1.25rem 3rem; }
  .timeline { padding-left: 1.5rem; }
  .about-stats { flex-direction: column; align-items: center; }
  .contact-layout { gap: 2rem; }
}
