:root {
  color-scheme: dark;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #05060d;
  --bg-soft: #0f111a;
  --text: #f4f6fb;
  --muted: #a0acc5;
  --card: #101522;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #2563eb;
  --accent-2: #1e3a8a;
  --gradient: linear-gradient(135deg, rgba(37, 99, 235, 0.85) 0%, rgba(30, 58, 138, 0.85) 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

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

.profile-header {
  position: relative;
  padding-bottom: 4rem;
}

.cover {
  height: 220px;
  background: linear-gradient(135deg, #111827 0%, #1f2937 40%, #111827 100%);
}

.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  margin-top: -4rem;
  padding: 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.profile-avatar {
  width: 140px;
  height: 140px;
  margin: 0;
  border-radius: 50%;
  padding: 0.18rem;
  background: white;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-details .name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-details h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.role {
  margin: 0.25rem 0;
  font-weight: 600;
}

.meta {
  margin: 0;
  color: var(--muted);
}

.summary {
  margin-top: 0.75rem;
  color: #d4dcf8;
}

.language-tags {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.language-pill {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 0.3rem 0.85rem 0.3rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.language-pill img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-card {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  background: #0d1322;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.link-card svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.6);
}

.content {
  padding-bottom: 4rem;
  display: grid;
  gap: 1.5rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-weight: 600;
  color: #e2e8f0;
}

.form-field input,
.form-field textarea {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.contact-submit {
  justify-self: start;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  background: var(--gradient);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-submit:hover,
.contact-submit:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
  outline: none;
}

.contact-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.stack > * + * {
  margin-top: 1rem;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

h3 {
  margin: 0 0 0.5rem;
}

.timeline-card {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.12);
}

.company-meta {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1rem;
}

.company-meta img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 0.6rem;
  background: #fff;
  padding: 0.3rem;
}

.tenure {
  margin: 0;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}

.tenure-duration {
  color: #d4dcf8;
  font-weight: 600;
}

.tenure-duration::before {
  content: '';
}

.role-list {
  margin-left: 1.5rem;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  padding-left: 1.5rem;
}

.role-entry {
  position: relative;
  padding-bottom: 1.25rem;
}

.role-entry:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.63rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #0f172a;
}

.role-heading h4 {
  margin: 0;
}

.skills-inline {
  margin: 0.6rem 0 0;
  color: #c6d3ff;
  font-size: 0.9rem;
}

.edu-card {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
}

.edu-meta {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.edu-meta img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.2rem;
}

.skills-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.skills-grid li {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.65);
}

.skill-label {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted);
  background: #05060d;
}

@media (max-width: 900px) {
  .profile-card {
    grid-template-columns: auto 1fr;
  }

  .profile-links {
    flex-direction: row;
  }

  .role-list {
    margin-left: 0.75rem;
    padding-left: 1rem;
  }
}

@media (max-width: 640px) {
  .cover {
    height: 160px;
  }

  .profile-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-links {
    flex-direction: column;
    align-items: center;
  }

  .company-meta {
    flex-direction: column;
    text-align: center;
  }

  .role-list {
    margin-left: 0;
    padding-left: 0.75rem;
  }

  .timeline-dot {
    left: -1.1rem;
  }
}
