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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  color: #333;
  line-height: 1.6;
}

a {
  color: #2962c3;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 30px;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 0;
}

/* ---- Header ---- */

#dhead {
  padding: 40px 30px;
}

#dhead .row {
  display: flex;
  align-items: center;
  gap: 30px;
}

#dpic .ppic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 3px solid #eee;
  background: #ddd;
}

#ddesc h1 {
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 4px;
}

#ddesc h2 {
  font-size: 1em;
  font-weight: 400;
  color: #666;
  font-style: italic;
}

#dico {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}

.iico {
  width: 26px;
  height: 26px;
  fill: #555;
  transition: fill 0.2s;
  display: block;
}

a:hover .iico {
  fill: #000;
}

.iico:hover {
  fill: #000;
}

#demail {
  font-size: 0.9em;
  color: #555;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}

/* ---- Timeline ---- */

#history {
  padding-top: 30px;
}

.entry {
  display: flex;
  gap: 15px;
  margin-bottom: 28px;
}

.timespan {
  min-width: 100px;
  font-size: 0.82em;
  color: #999;
  text-align: right;
  padding-top: 2px;
  flex-shrink: 0;
}

.ico {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 50px;
  flex-shrink: 0;
}

.ico-badge {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65em;
  font-weight: 700;
  color: #555;
  letter-spacing: -0.02em;
}

.entry-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #bbb;
  flex-shrink: 0;
}

.desc {
  flex: 1;
  padding-top: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.tag {
  font-size: 0.78em;
  background: #f0f0f0;
  border-radius: 3px;
  padding: 2px 7px;
  color: #555;
}

/* ---- Section titles ---- */

.ctitle {
  font-size: 1.3em;
  font-weight: 700;
  margin: 20px 0 16px;
  letter-spacing: -0.01em;
}

/* ---- Bio ---- */

#bio {
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ---- Project cards ---- */

.cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.card {
  flex: 0 1 calc(25% - 12px);
  min-width: 160px;
}

.ccimg img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

.proj-gradient {
  width: 100%;
  padding-bottom: 62%;
  border-radius: 6px;
}

.p1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.p2 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.p3 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.p4 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.p5 { background: linear-gradient(135deg, #0f0f0f, #c4ff00); }

.cdesc {
  font-size: 0.84em;
  margin-top: 7px;
  line-height: 1.4;
  color: #444;
}

/* ---- Case studies ---- */

.case-study {
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.cs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  background: #f9f9f9;
  user-select: none;
}

.cs-header:hover {
  background: #f0f0f0;
}

.cs-title {
  font-weight: 600;
  font-size: 0.95em;
}

.cs-toggle {
  color: #aaa;
  font-size: 0.75em;
  flex-shrink: 0;
  margin-left: 10px;
}

.cs-body {
  display: none;
  padding: 16px 18px;
  font-size: 0.9em;
  line-height: 1.6;
}

.cs-body p {
  margin-bottom: 10px;
}

.cs-body p:last-child {
  margin-bottom: 0;
}

/* ---- Certifications ---- */

.pub {
  margin-bottom: 14px;
}

.pub-title {
  font-weight: 600;
}

.pub-venue {
  font-size: 0.85em;
  color: #888;
}

/* ---- Lists ---- */

ul {
  list-style: disc;
  padding-left: 18px;
}

ul li {
  margin-bottom: 6px;
}

/* ---- Responsive ---- */

@media (max-width: 620px) {
  #dhead .row {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .timespan {
    display: none;
  }

  .card {
    flex: 0 1 calc(50% - 8px);
    min-width: 130px;
  }

  .container {
    padding: 16px 18px;
  }
}
