:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --card: #ffffff;
  --accent: #000000;
  --shadow: rgba(0,0,0,0.08);
}

/* DARK MODE */
.dark {
  --bg: #0e0e0e;
  --text: #eaeaea;
  --muted: #aaaaaa;
  --card: #1b1b1b;
  --accent: #ffffff;
  --shadow: rgba(255,255,255,0.05);
}

* { box-sizing: border-box; transition: background .3s ease, color .3s ease; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 90%;
  max-width: 1080px;
  margin: 0 auto;
}

/* TOP NAV */
.topbar {
  background: var(--accent);
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
}

.navlinks a {
  color: #fff;
  margin-left: 18px;
  text-decoration: none;
  font-weight: 600;
  opacity: .9;
}
.navlinks a:hover { opacity: 1; }

/* Dark Mode Toggle */
.toggle-btn {
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 18px;
}

/* HERO */
.hero {
  padding: 40px 0 24px;
  text-align: center;
}
.hero h1 {
  margin-bottom: 6px;
  font-size: 2.4rem;
}

/* Main Card Area */
.main {
  padding: 40px 0;
  display: grid;
  gap: 28px;
}

/* CARD */
.card {
  background: var(--card);
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 6px 20px var(--shadow);
  animation: fadeUp .6s ease both;
}

.section-title {
  margin-bottom: 16px;
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  font-size: 1.1rem;
  color: var(--accent);
}

/* TIMELINE */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--muted);
}

.timeline-item {
  padding-left: 24px;
  margin-bottom: 20px;
  position: relative;
  animation: fadeLeft .6s ease both;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 12px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 18px;
}

.skill {
  margin-bottom: 12px;
}

.skill .bar {
  background: #cfcfcf;
  height: 10px;
  border-radius: 10px;
  margin-top: 6px;
  overflow: hidden;
}

.skill .fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 1s ease;
}

/* CONTACT */
.contact-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-item {
  background: var(--card);
  padding: 14px;
  border-radius: 10px;
  flex: 1;
  min-width: 200px;
}

/* FOOTER */
.footer {
  padding: 28px 0;
  text-align: center;
  color: var(--muted);
}

/* SMOOTH ANIMATIONS */
html {
  scroll-behavior: smooth;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

/* MOBILE COMPACT */
@media (max-width: 768px) {

  .hero h1 {
    font-size: 1.8rem;
  }

  .main { padding: 20px 0; gap: 20px; }

  .card { padding: 18px; }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .navlinks { display: none; }

  .topbar .container {
    justify-content: space-between;
  }

  .brand { font-size: 1rem; }

}
