/* reset & base */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fdfdfd;
  --text: #2c2c2c;
  --muted: #6b7280;
  --primary: #0077ff;
  --primary-600: #005fc1;
  --card: #ffffff;
  --border: #e5e7eb;
  --hero-start: #c3e0f8;
  --hero-end: #f2f9ff;
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

ul {
  list-style: none;
}

/* container tweaks */
.container { width: 90%; max-width: 1100px; margin: 0 auto; padding: 20px 0; }

/* header */
header { background-color: var(--card); border-bottom: 1px solid #eee; padding: 20px 0; position: sticky; top: 0; z-index: 100; }

.brand { color: #1f2937; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-size: .875rem; margin-bottom: .5rem; }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#nav-links {
  display: flex;
  gap: 25px;
}

#nav-links a {
  font-weight: 500;
  padding: 5px 0;
  position: relative;
}

#nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

#nav-links a:hover::after {
  width: 100%;
}

#menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

/* hero section */
#hero {
  text-align: center;
  padding: 100px 20px;
  background: linear-gradient(to right, var(--hero-start), var(--hero-end));
  color: #2d2d2d;
}

#hero h2 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 15px;
}

#hero .highlight { color: var(--primary); }

#hero p {
  font-size: 20px;
  margin-bottom: 30px;
}

/* typing effect */
#typing-text {
  min-height: 1.5em;
  display: inline-block;
  height: 1.5em;
  line-height: 1.5em;
  vertical-align: top;
}

#typing-text::after {
  content: "|";
  animation: blink 1s infinite;
  color: var(--primary);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.btn {
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn:hover { background-color: var(--primary-600); }

.btn-outline-primary { color: var(--primary); background: transparent; border: 1px solid var(--primary); }
.btn-outline-primary:hover { color: #fff; background: var(--primary); }

/* sections */
section {
  padding: 80px 0;
}

h2 { font-size: 32px; margin-bottom: 20px; color: #1e1e1e; }

/* about */
#about p {
  max-width: 700px;
  margin: 0 auto 20px;
  text-align: center;
}

/* projects */
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 20px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.12);
}
.badge.text-bg-light { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }

/* skills */
.skills-list { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }
.skills-list li { padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 14px; }

/* contact */
#contact p {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 20px;
}

form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input, textarea {
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  resize: none;
  transition: border 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #0077ff;
}

button[type="submit"] {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button[type="submit"]:hover { background-color: var(--primary-600); }

/* footer */
footer { text-align: center; padding: 30px 0; background-color: #fafafa; color: #666; font-size: 14px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 50%; transform: translateX(-50%); width: 2px; background: var(--border); height: 100%; }
.timeline li { position: relative; padding: 0 0 20px 0; }
.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 20px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.12);
}

/* responsive nav */
@media (max-width: 768px) {
  #nav-links {
    display: none;
    flex-direction: column;
    gap: 15px;
    background: #fff;
    position: absolute;
    top: 70px;
    right: 20px;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
  }

  #nav-links.active {
    display: flex;
  }

  #menu-toggle {
    display: block;
  }
}



/* dark mode */
/* accessibility */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 16px; top: 10px; width: auto; height: auto; background: #000; color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 1000; }

/* dark mode */
body.dark-mode { background-color: #121212; color: #e0e0e0; }

/* text & links */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode p,
body.dark-mode .card-text,
body.dark-mode .nav-link,
body.dark-mode .lead,
body.dark-mode .text-muted,
body.dark-mode a {
  color: #e0e0e0 !important;
}

/* cards, sections, and containers */
body.dark-mode .card,
body.dark-mode .bg-light,
body.dark-mode section,
body.dark-mode header,
body.dark-mode footer,
body.dark-mode .container {
  background-color: #1e1e1e !important;
  color: #e0e0e0 !important;
  border-color: #333 !important;
}

/* forms */
body.dark-mode .form-control {
  background-color: #2b2b2b !important;
  color: #fff !important;
  border-color: #444 !important;
}

body.dark-mode .form-control::placeholder {
  color: #aaa !important;
}

body.dark-mode textarea.form-control {
  background-color: #2b2b2b !important;
  color: #fff !important;
}

/* hero section dark mode */
body.dark-mode #hero {
  background: linear-gradient(to right, #2a2a2a, #1e1e1e) !important;
  color: #e0e0e0 !important;
}

body.dark-mode #hero.bg-light {
  background: linear-gradient(to right, #2a2a2a, #1e1e1e) !important;
}

body.dark-mode #hero .container {
  background-color: transparent !important;
}

body.dark-mode #hero .highlight { color: #4a9eff !important; }

body.dark-mode #typing-text::after {
  color: #4a9eff !important;
}

/* buttons */
body.dark-mode .btn-primary { background-color: #2196f3 !important; border-color: #2196f3 !important; color: #fff !important; }

body.dark-mode .btn-primary:hover { background-color: #1976d2 !important; }

/* navbar links */
body.dark-mode .nav-link:hover { color: #ffffff !important; }

/* gitHub iframe */
body.dark-mode iframe { filter: brightness(0.9); }

/* utilities */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Dark mode fixes: Skills pills and Experience cards */
body.dark-mode .skills-list li {
  background-color: #2b2b2b !important;
  border-color: #444 !important;
  color: #e0e0e0 !important;
}

body.dark-mode .timeline-card {
  background-color: #1e1e1e !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
  /* Dark elevation */
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 1px 2px rgba(0,0,0,0.4), 0 8px 28px rgba(0,0,0,0.5) !important;
}

body.dark-mode .timeline::before {
  background: #333 !important;
}

body.dark-mode .project-card {
  background-color: #1e1e1e !important;
  border-color: #2a2a2a !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 1px 2px rgba(0,0,0,0.4), 0 8px 28px rgba(0,0,0,0.5) !important;
}
body.dark-mode .project-card:hover,
body.dark-mode .timeline-card:hover {
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 10px 24px rgba(0,0,0,0.5), 0 24px 60px rgba(0,0,0,0.6) !important;
}