:root {
  --bg:        #f0f2f5;
  --white:     #ffffff;
  --sidebar-w: 260px;
  --accent:    #5b7fe8;
  --accent-dk: #4a6dd4;
  --dark:      #1a1d23;
  --mid:       #4a5568;
  --light:     #8492a6;
  --rule:      #e4e8ee;
  --tag-bg:    #eef1f8;
  --tag-hover: #5b7fe8;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--dark);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.layout {
  display: flex;
  max-width: 1100px;
  margin: 32px auto;
  gap: 20px;
  padding: 0 20px;
  align-items: flex-start;
  opacity: 0;
  animation: fadein 0.5s ease 0.1s forwards;
}

@keyframes fadein { to { opacity: 1; } }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--white);
  border-radius: 10px;
  padding: 28px 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  position: sticky;
  top: 32px;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  margin: 0 auto 14px;
  overflow: hidden;
  display: block;
}

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

.sidebar-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  text-align: center;
  line-height: 1.3;
  margin-bottom: 5px;
}

.sidebar-title {
  font-size: 11px;
  color: var(--light);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 18px;
  font-weight: 400;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 16px 0;
}

.sidebar-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 10px;
}

.sidebar-contact {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sidebar-contact a,
.sidebar-contact span {
  font-size: 11.5px;
  color: var(--mid);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s;
}

.sidebar-contact a:hover { color: var(--accent); }

.contact-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.5;
}

.portfolio-btn {
  display: block;
  margin-top: 16px;
  background: var(--accent);
  color: var(--white);
  text-align: center;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.portfolio-btn:hover { background: var(--accent-dk); }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--white);
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.section-head {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.summary-text {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.8;
  font-weight: 400;
}

.skills-group { margin-bottom: 14px; }
.skills-group:last-child { margin-bottom: 0; }

.skills-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

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

.tag {
  background: var(--tag-bg);
  color: var(--mid);
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 400;
  cursor: default;
  transition: background 0.15s, color 0.15s;
}

.tag:hover { background: var(--accent); color: var(--white); }

.job { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.job:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.job-title { font-size: 13.5px; font-weight: 600; color: var(--dark); line-height: 1.3; }
.job-date { font-size: 11px; color: var(--light); font-weight: 400; white-space: nowrap; padding-top: 2px; }
.job-loc { font-size: 11.5px; color: var(--light); margin-bottom: 10px; }

.bullets { list-style: none; padding: 0; }

.bullets li {
  font-size: 12.5px;
  color: var(--mid);
  line-height: 1.65;
  padding-left: 14px;
  position: relative;
  margin-bottom: 5px;
}

.bullets li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.p-item {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.p-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(91,127,232,0.12);
}

.p-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  line-height: 1.4;
}

.p-title a { color: inherit; text-decoration: none; }
.p-title a:hover { text-decoration: underline; }

.p-desc { font-size: 11.5px; color: var(--light); line-height: 1.6; }

.edu-item {
  font-size: 12.5px;
  color: var(--mid);
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  line-height: 1.5;
}

.edu-item:first-child { padding-top: 0; }
.edu-item:last-child { border-bottom: none; padding-bottom: 0; }
.edu-item strong { font-weight: 600; color: var(--dark); }

@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; position: static; }
  .portfolio-grid { grid-template-columns: 1fr; }
}

@media print {
  body { background: white; }
  .layout { margin: 0; max-width: 100%; }
  .sidebar { position: static; box-shadow: none; }
  .card { box-shadow: none; }
}
