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

:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #1c2128;
  --accent: #00ff88;
  --accent2: #00b4d8;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #30363d;
  --radius: 12px;
  --font: 'Segoe UI', system-ui, sans-serif;
  --mono: 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
}

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

/* ===== NAV ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: bold;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.hamburger {
  display: none;
  background: none; border: none;
  color: var(--text); font-size: 1.4rem; cursor: pointer;
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg2); padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
  .nav-links.open { display: flex; }
}

/* ===== CONTAINER ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute; bottom: -6px; left: 0;
  width: 50px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

section { padding: 5rem 0; }

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding-top: 80px;
}

.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(0,255,136,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(0,180,216,0.06) 0%, transparent 60%);
  animation: pulse-bg 6s ease-in-out infinite alternate;
}

@keyframes pulse-bg {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative; z-index: 1;
  max-width: 1100px; width: 100%; padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; }
}

/* Terminal */
.terminal-window {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(0,255,136,0.05);
}

.terminal-bar {
  background: var(--bg3);
  padding: 0.6rem 1rem;
  display: flex; align-items: center; gap: 0.4rem;
}

.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title { color: var(--text-muted); font-size: 0.8rem; margin-left: auto; margin-right: auto; font-family: var(--mono); }

.terminal-body { padding: 1.2rem 1.5rem; font-family: var(--mono); font-size: 0.88rem; min-height: 150px; }
.terminal-body p { margin-bottom: 0.4rem; }
.prompt { color: var(--accent); }
.output { color: var(--text-muted); padding-left: 1rem; }
.typed { color: var(--accent2); padding-left: 1rem; min-height: 1.4rem; }
.cursor { animation: blink 1s infinite; color: var(--accent); }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* Hero text */
.hero-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub { color: var(--accent2); font-size: 1.1rem; margin: 0.5rem 0; }
.hero-desc { color: var(--text-muted); margin-bottom: 1.5rem; }

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

.btn {
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.btn-primary:hover { background: #00e67a; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,255,136,0.3); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: rgba(0,255,136,0.08); transform: translateY(-2px); }

.hero-socials { display: flex; gap: 1rem; }
.hero-socials a {
  color: var(--text-muted);
  font-size: 1.3rem;
  transition: color 0.2s, transform 0.2s;
}
.hero-socials a:hover { color: var(--accent); transform: translateY(-2px); }

/* ===== ABOUT ===== */
#about { background: var(--bg2); }
.about-grid { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; align-items: start; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }

.about-avatar { display: flex; flex-direction: column; align-items: center; gap: 1rem; }

.avatar-ring {
  width: 160px; height: 160px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
}

.status-badge {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(0,255,136,0.1);
  border: 1px solid rgba(0,255,136,0.3);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.82rem;
  color: var(--accent);
}

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

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,255,136,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(0,255,136,0); }
}

.about-text p { color: var(--text-muted); margin-bottom: 1rem; }
.about-text strong { color: var(--accent); }

.about-stats { display: flex; gap: 2rem; margin-top: 1.5rem; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--accent); font-family: var(--mono); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ===== SKILLS ===== */
.skills-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.tab-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover {
  background: var(--accent);
  color: #0d1117;
  border-color: var(--accent);
  font-weight: 600;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.skill-cards { display: flex; flex-wrap: wrap; gap: 1rem; }
.skill-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; padding: 1.2rem 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s;
  min-width: 100px;
}
.skill-card:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,255,136,0.1);
}
.skill-card i { font-size: 1.8rem; color: var(--accent2); }
.skill-icon { font-size: 1.8rem; }

/* ===== EXPERIENCE ===== */
#experience { background: var(--bg2); }
.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));
}

.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-dot {
  position: absolute; left: -2.45rem; top: 1.2rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg2);
  box-shadow: 0 0 10px rgba(0,255,136,0.5);
}

.timeline-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.timeline-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
}
.timeline-header:hover { background: rgba(0,255,136,0.03); }
.timeline-header h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.company { color: var(--accent2); font-size: 0.85rem; }
.timeline-meta { text-align: right; }
.date { color: var(--text-muted); font-size: 0.8rem; display: block; margin-bottom: 0.3rem; }
.timeline-meta i { color: var(--text-muted); transition: transform 0.3s; }
.timeline-header.open i { transform: rotate(180deg); }

.timeline-body {
  padding: 0 1.5rem;
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}
.timeline-body.open { max-height: 400px; padding: 0 1.5rem 1.2rem; }
.timeline-body ul { list-style: none; }
.timeline-body ul li {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 0.3rem 0;
  padding-left: 1rem;
  position: relative;
}
.timeline-body ul li::before {
  content: '▹';
  position: absolute; left: 0;
  color: var(--accent);
}

/* ===== PROJECTS ===== */
.projects-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
  background: rgba(0,180,216,0.15);
  color: var(--accent2);
  border-color: var(--accent2);
}

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

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.25s;
  display: flex; flex-direction: column; gap: 0.8rem;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,255,136,0.08);
}

.project-icon { font-size: 1.8rem; }
.project-card h3 { font-size: 0.95rem; color: var(--text); }
.project-card p { font-size: 0.83rem; color: var(--text-muted); flex: 1; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(0,180,216,0.12);
  color: var(--accent2);
  font-size: 0.72rem;
  border: 1px solid rgba(0,180,216,0.25);
}

.project-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.83rem;
  display: flex; align-items: center; gap: 0.4rem;
  transition: color 0.2s;
  width: fit-content;
}
.project-link:hover { color: var(--accent); }

/* ===== CONTACT ===== */
#contact { background: var(--bg2); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info p { color: var(--text-muted); margin-bottom: 1.5rem; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex; align-items: center; gap: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-item:hover { color: var(--accent); }
.contact-item i { font-size: 1.1rem; color: var(--accent2); width: 20px; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form input,
.contact-form textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

/* ===== FADE IN ANIMATION ===== */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.5s, transform 0.5s; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
