:root {
  --bg: #f5f7fb;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --card-bg: #ffffff;
  --card-hover-shadow: rgba(0, 0, 0, 0.08);
  --chip-bg: #f3f4f6;
  --chip-border: #e5e7eb;
  --skill-tag-bg: #f1f5f9;
  --cert-bg: #f9fbff;
  --job-bg: #fafafa;
  --badge-bg: #eef3ff;
  --badge-text: #2b55d6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --text: #f9fafb;
    --muted: #9ca3af;
    --border: #374151;
    --accent: #60a5fa;
    --card-bg: #1f2937;
    --card-hover-shadow: rgba(0, 0, 0, 0.3);
    --chip-bg: #374151;
    --chip-border: #4b5563;
    --skill-tag-bg: #1f2937;
    --cert-bg: #1f2937;
    --job-bg: #1f2937;
    --badge-bg: #1e3a8a;
    --badge-text: #93c5fd;
  }
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial,
    sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.positioning {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.container {
  max-width: 880px;
  margin: 48px auto;
  padding: 32px 28px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.15s ease, background-color 0.3s ease;
  animation: fadeInSlideUp 0.6s ease-out forwards;
}

.container:hover {
  box-shadow: 0 22px 55px var(--card-hover-shadow);
}

.soft-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.soft-chips span {
  display: block;
  text-align: center;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  font-size: 0.85rem;
}

.soft-chips span:hover {
  background: var(--border);
  /* subtly darker than chip-bg */
}

.skill-group {
  margin-bottom: 14px;
}

.skill-group h3 {
  margin: 10px 0 6px;
  font-size: 0.95rem;
  color: var(--text);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags span {
  display: inline-block;
  padding: 6px 10px;
  background: var(--skill-tag-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
}

h1 {
  margin: 0;
  letter-spacing: 0.2px;
}

.subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
}

.certification h2 {
  margin-bottom: 10px;
}

.cert-card {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--cert-bg);
}

.cert-icon {
  margin-right: 6px;
  font-size: 0.9rem;
}

.cert-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 3px;
}

.section {
  margin-top: 30px;
  opacity: 0;
  animation: fadeInSlideUp 0.6s ease-out forwards;
}

.section:nth-child(1) {
  animation-delay: 0.1s;
}

.section:nth-child(2) {
  animation-delay: 0.2s;
}

.section:nth-child(3) {
  animation-delay: 0.3s;
}

.section:nth-child(4) {
  animation-delay: 0.4s;
}

.section:nth-child(5) {
  animation-delay: 0.5s;
}

.section h2 {
  margin-bottom: 14px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--border);
}

.job {
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
  background: var(--job-bg);
}

.job-title {
  font-weight: 700;
}

.job-meta {
  color: var(--muted);
  font-size: 0.87rem;
  margin-bottom: 6px;
}

ul {
  padding-left: 18px;
}

footer {
  margin-top: 48px;
  padding-top: 10px;
}

/* remove wrapper background entirely */
footer .wrapper {
  padding: 12px 0;
}

.contact-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  padding: 12px 0 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-footer a,
.contact-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
}

.contact-footer a:hover {
  text-decoration: underline;
}

.contact-footer i {
  color: var(--muted);
}

.footer-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-meta a {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-meta a:hover {
  background: var(--border);
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--job-bg);
}

.project-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 3px 0 6px;
}

.project-card a {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.project-card a:hover {
  text-decoration: underline;
}

/* Sidebar Layout */
.resume-content {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.sidebar {
  flex: 0 0 260px;
  /* Fixed width sidebar */
  font-size: 0.9rem;
}

.main-content {
  flex: 1;
  min-width: 0;
  /* Prevent flex overflow */
}

/* Sidebar Specifics */
.contact-section {
  margin-bottom: 32px;
}

.contact-section h3 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-links a,
.contact-links span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.contact-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.contact-links i {
  color: var(--muted);
  width: 16px;
  text-align: center;
}

/* Adjust Section Headers in Sidebar */
.sidebar .section {
  margin-top: 32px;
}

.sidebar h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
}

.sidebar .skill-group h3 {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Main Content Adjustments */
.main-content .header {
  margin-bottom: 32px;
}

.main-content .section:first-child {
  margin-top: 0;
}