@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
  /* Dark mode (default) — professional steel-blue, no neon */
  --bg: #0d1117;
  --card-bg: #161b22;
  --text-primary: #e6edf3;
  --text-secondary: #848d97;
  --muted: #848d97;
  --text: #e6edf3;
  --accent: #5b9bd5;
  --accent-glow: rgba(91, 155, 213, 0.08);
  --border: #21262d;
  --heading-from: #e6edf3;
  --surface-subtle: rgba(255, 255, 255, 0.06);
  --surface-faint: rgba(255, 255, 255, 0.02);
  --border-subtle: rgba(255, 255, 255, 0.06);
}

/* ── Light mode ──────────────────────────────────── */
[data-theme="light"] {
  --bg: #f6f8fa;
  --card-bg: #ffffff;
  --text-primary: #1c2733;
  --text-secondary: #57606a;
  --muted: #57606a;
  --text: #1c2733;
  --accent: #0969da;
  --accent-glow: rgba(9, 105, 218, 0.07);
  --border: #d0d7de;
  --heading-from: #1c2733;
  --surface-subtle: rgba(0, 0, 0, 0.06);
  --surface-faint: rgba(0, 0, 0, 0.02);
  --border-subtle: rgba(0, 0, 0, 0.10);
}

/* ── Auto mode: follow OS preference ────────────── */
@media (prefers-color-scheme: light) {
  [data-theme="auto"] {
    --bg: #f6f8fa;
    --card-bg: #ffffff;
    --text-primary: #1c2733;
    --text-secondary: #57606a;
    --muted: #57606a;
    --text: #1c2733;
    --accent: #0969da;
    --accent-glow: rgba(9, 105, 218, 0.07);
    --border: #d0d7de;
    --heading-from: #1c2733;
    --surface-subtle: rgba(0, 0, 0, 0.06);
    --surface-faint: rgba(0, 0, 0, 0.02);
    --border-subtle: rgba(0, 0, 0, 0.10);
  }
}

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

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

.container {
  width: min(1000px, 92vw);
  margin: 0 auto;
}

/* layout for hero with profile image */
.hero-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items: start; /* align top so profile icons appear below the image, not centered next to the name */
}

.profile-card {
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;
}

.profile-img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 18px;
  border: 3px solid var(--border-subtle);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

/* small icon-only social links under profile image */
.profile-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}
.profile-links .social-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-faint);
  border: 1px solid var(--surface-subtle);
}
.profile-links .social-btn i { font-size: 1.05rem; color: var(--accent); }
.profile-links .social-btn:hover { background: var(--accent); color: var(--bg); }

/* visually hidden but accessible label */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.resume-btn {
  margin-left: 12px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  vertical-align: middle;
}
.resume-btn i { color: var(--accent); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fadeIn {
  animation: fadeIn 0.8s ease forwards;
}

/* Hero Section */
.hero {
  padding: 8rem 0 4rem;
  background: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 70%);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, var(--heading-from), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tag {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 1.05rem;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 700px;
  margin-bottom: 1rem;
}

.header-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Business value chips under the name */
.value-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}
.value-chip {
  background: var(--accent-glow);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.86rem;
  border: 1px solid var(--border);
}
.value-chip:hover { box-shadow: 0 6px 18px rgba(56,189,248,0.08); }

/* make chips behave as links */
.value-chip {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.value-chip:focus { outline: 3px solid rgba(56,189,248,0.12); border-color: rgba(56,189,248,0.3); }

.header-contact span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-contact i {
  color: var(--accent);
}

.contact-chip, .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-faint);
  color: var(--text);
  border: 1px solid var(--surface-subtle);
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.contact-chip:hover { background: rgba(56,189,248,0.06); border-color: rgba(56,189,248,0.18); }

.chip { padding: 10px 14px; }

.cert-list { list-style: none; padding-left: 0; color: var(--muted); }
.cert-list li { margin: 0.4rem 0; }

/* card reveal visible state */
.card { opacity: 0; transform: translateY(12px); transition: all 420ms cubic-bezier(.2,.9,.3,1); }
.card.visible { opacity: 1; transform: translateY(0); }

/* footer */
footer { border-top: 1px solid #1f2937; color: var(--muted); padding: 2.5rem 0; text-align:center; }

/* toast */
#toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 32px;
  background: rgba(17,24,39,0.95);
  color: #e6f7ff;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 6px 26px rgba(2,6,23,0.6);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
  font-weight: 600;
}
#content a, .card a, .cert-list a {
  color: var(--accent);
  text-decoration: none;
}

.card a, .cert-list a {
  background: linear-gradient(to right, var(--heading-from), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

.card a:hover, .cert-list a:hover {
  text-decoration: underline;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* Card Styling */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}

/* Skills category */
.skills-category h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.8rem;
  color: #fff;
}

.skills-category:first-of-type h3 {
  margin-top: 0;
}

/* Skill Filters */
#skill-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: 0.2s ease;
  color: var(--text-secondary);
}

.filter-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background: var(--accent-glow);
  border: 1px solid rgba(91, 155, 213, 0.22);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.skill-tag:hover {
  background: rgba(91, 155, 213, 0.14);
  border-color: rgba(91, 155, 213, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(91, 155, 213, 0.10);
}

/* Skill Filters */
.skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  padding: 6px 12px;
  border: 1px solid rgba(91, 155, 213, 0.28);
  background: transparent;
  color: var(--accent);
  border-radius: 18px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(91, 155, 213, 0.09);
  border-color: rgba(91, 155, 213, 0.5);
}

.filter-btn.active {
  background: rgba(91, 155, 213, 0.14);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(91, 155, 213, 0.12);
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 5px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
}

.timeline-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.timeline-item .date {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

.timeline-item ul {
  margin-top: 0.8rem;
  padding-left: 1.2rem;
  color: var(--text-secondary);
}

/* Education */
.edu-item {
  margin-bottom: 1rem;
}

.edu-item strong {
  color: #fff;
  display: block;
}

.edu-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Social Buttons */
.connect-links {
  display: flex;
  gap: 1rem;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--border);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

footer {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero { padding: 4rem 0 2rem; }
  .card { padding: 1.5rem; }
  .connect-links { flex-direction: column; }
}

/* expandable card body — height driven by JS for any content length */
.card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 500ms cubic-bezier(.2,.9,.3,1);
}

.toggle-btn {
  margin-left: 12px;
  background: transparent;
  border: 1px solid var(--surface-subtle);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.toggle-btn[aria-expanded="true"] { background: rgba(91, 155, 213, 0.08); }

/* ── Theme Toggle Button ────────────────────────── */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.theme-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

@media print { .theme-toggle { display: none; } }
/* ── Print / PDF Export ──────────────────────────────────── */
@media print {
  * { margin: 0; padding: 0; box-shadow: none; }
  
  /* Page Setup */
  @page { margin: 0.5in; size: letter; }
  html, body { background: white; color: #000; font-size: 11pt; line-height: 1.4; }
  
  /* Hero / Header */
  .hero { padding: 1rem 0; background: none; border-bottom: 2px solid #000; margin-bottom: 0.8rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .profile-img, .profile-card, .profile-links { display: none; }
  .value-chips, .subtitle { display: none; }
  .hero-content { grid-column: 1; }
  .hero-title { font-size: 10pt; color: #666; margin: 0; }
  .hero-name { font-size: 18pt; font-weight: bold; margin: 0 0 0.3rem 0; }
  .hero-subtitle { display: none; }
  #social-links { display: none; }
  
  /* Contact Info */
  #header-contact { display: flex; gap: 15px; font-size: 9pt; margin: 0.4rem 0 0 0; flex-wrap: wrap; }
  .contact-chip, .chip { border: none; background: none; padding: 0; display: inline; }
  .contact-chip span, .chip { margin-right: 3px; }
  .contact-chip i, .chip i { display: none; }
  
  /* Sections */
  .section, .card { 
    page-break-inside: avoid; 
    border: none; 
    border-top: 1px solid #ccc;
    box-shadow: none; 
    margin: 0.8rem 0; 
    padding: 0.8rem 0;
    background: none;
  }
  
  .card { border: none; border-top: 1px solid #ccc; }
  .section:first-of-type { border-top: none; margin-top: 0; }
  
  /* Headings */
  h2, .section h2 { 
    font-size: 13pt; 
    font-weight: bold; 
    margin: 0.5rem 0 0.4rem 0; 
    color: #000;
    border-bottom: 1px solid #999;
    padding-bottom: 0.3rem;
  }
  
  .card h2 { border: none; padding: 0; margin: 0.5rem 0 0.3rem 0; }
  .card h2 i { display: none; }
  
  /* Hide Interactive Elements */
  .toggle-btn, .expandable .toggle-btn { display: none; }
  #skill-filters, .filter-btn { display: none; }
  .card-body { 
    max-height: none !important; 
    overflow: visible !important; 
    visibility: visible !important;
    display: block !important;
    aria-hidden: false;
  }
  
  /* Timeline / Experience */
  .timeline { gap: 0; margin: 0; padding: 0; }
  .timeline-item { 
    padding-left: 0; 
    border: none; 
    border-left: none;
    page-break-inside: avoid; 
    margin: 0.4rem 0;
    padding: 0;
  }
  
  .timeline-item::before { display: none; }
  .timeline-item h3 { 
    font-size: 11pt; 
    font-weight: bold; 
    margin: 0.4rem 0 0.2rem 0; 
    color: #000;
  }
  
  .timeline-item .date { 
    font-size: 10pt; 
    color: #666; 
    display: block;
    margin: 0.1rem 0 0.2rem 0;
  }
  
  .timeline-item ul { 
    margin: 0.3rem 0 0 1.2rem; 
    padding: 0; 
    list-style-type: disc;
  }
  
  .timeline-item li { 
    margin: 0.2rem 0; 
    font-size: 10pt; 
    page-break-inside: avoid;
  }
  
  /* Education */
  .edu-item { 
    page-break-inside: avoid; 
    margin: 0.4rem 0; 
    padding: 0;
  }
  
  .edu-item strong { 
    display: block; 
    font-size: 11pt; 
    font-weight: bold;
    margin: 0.3rem 0 0.1rem 0;
  }
  
  .edu-item p { 
    font-size: 10pt; 
    margin: 0.1rem 0; 
    color: #333;
  }
  
  /* Certifications */
  #cert-container { 
    display: block !important;
    margin: 0.4rem 0 !important; 
    padding-left: 1.2rem !important; 
    list-style-type: disc !important;
    list-style-position: inside;
    color: #000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    -webkit-text-fill-color: #000 !important;
  }
  
  #cert-container li { 
    display: list-item !important;
    margin: 0.2rem 0 !important; 
    font-size: 10pt !important; 
    page-break-inside: avoid !important;
    list-style-type: disc !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    -webkit-text-fill-color: #000 !important;
  }
  
  #cert-container li::before {
    content: none;
  }
  
  #cert-container a { 
    color: #000 !important;
    text-decoration: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    -webkit-text-fill-color: #000 !important;
  }
  
  .cert-list { 
    display: block !important;
    margin: 0.4rem 0 !important; 
    padding-left: 1.2rem !important; 
    list-style-type: disc !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    -webkit-text-fill-color: #000 !important;
  }
  
  .cert-list li { 
    display: list-item !important;
    margin: 0.2rem 0 !important; 
    font-size: 10pt !important; 
    page-break-inside: avoid !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    -webkit-text-fill-color: #000 !important;
  }
  
  .cert-list a { 
    color: #000 !important; 
    text-decoration: none !important;
  }
  
  /* Skills */
  .skills-category { margin: 0.4rem 0; }
  .skills-category h3 { 
    font-size: 11pt; 
    font-weight: bold;
    margin: 0.4rem 0 0.2rem 0;
    border: none;
  }
  
  .skills-grid { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 4px; 
    margin: 0.3rem 0; 
  }
  
  .skill-tag { 
    background: none; 
    border: 1px solid #999; 
    padding: 2px 6px; 
    font-size: 9pt; 
    color: #000;
    display: inline-block;
  }
  
  /* Summary / Paragraph Text */
  p { 
    margin: 0.3rem 0; 
    font-size: 10pt; 
    line-height: 1.4;
  }
  
  .fadeIn { animation: none; }
  
  /* Links */
  a { 
    color: #000; 
    text-decoration: none; 
  }
  
  a[href]::after { content: ""; }
  
  /* Container */
  .container { width: 100%; max-width: 100%; }
}
