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

:root {
  --bg: #ffffff;
  --bg2: #f5f5f7;
  --bg3: #e8e8ed;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 2px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.12);
  --radius: 18px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
nav .logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--text); font-weight: 600; }

/* HERO (home) */
.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 100px 2rem 90px;
  text-align: center;
}
.hero-avatar {
  width: 152px;
  height: 152px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 35%;
  margin: 0 auto 2rem;
  display: block;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.hero p {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
  line-height: 1.5;
}
.hero-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* PAGE HERO (subpages) */
.page-hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 70px 2rem 50px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1rem;
}
.page-hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 12px 22px;
  border-radius: 980px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  letter-spacing: -0.01em;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }
.btn-secondary { background: var(--bg2); color: var(--text); }
.btn-secondary:hover { background: var(--bg3); transform: scale(1.02); }

/* BANNER */
.atlas-banner {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
}
.atlas-banner p { font-size: 0.9rem; color: var(--muted); }
.atlas-banner a { color: var(--accent); text-decoration: none; font-weight: 500; }
.atlas-banner a:hover { text-decoration: underline; }

/* SECTIONS */
section {
  max-width: 980px;
  margin: 0 auto;
  padding: 70px 2rem;
}
.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.6rem;
  font-weight: 600;
}
h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--text);
}
.section-desc {
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 3rem;
  font-size: 1rem;
}

.divider {
  height: 1px;
  background: var(--border);
  max-width: 980px;
  margin: 0 auto;
}

/* CARD GRIDS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}
.skill-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.skill-icon { font-size: 1.75rem; margin-bottom: 0.85rem; display: block; }
.skill-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--text); }
.skill-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

.quests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.quest-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.quest-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.quest-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.quest-card p { font-size: 0.875rem; color: var(--muted); flex: 1; line-height: 1.5; }
.quest-url {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
}

/* BLOG */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.archive-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.archive-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.archive-item h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.archive-item time { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.post-date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.blog-post {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 0;
}
.blog-figure {
  margin: 0 0 1.75rem;
}
.blog-figure img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.blog-credit {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.blog-post-nav {
  margin-top: 2rem;
  font-size: 0.9rem;
}
.blog-post-nav a { color: var(--accent); text-decoration: none; font-weight: 500; }
.blog-post-nav a:hover { text-decoration: underline; }
.blog-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 1rem 0 1.25rem;
}
.blog-links a { color: var(--accent); text-decoration: none; font-weight: 500; word-break: break-word; }
.blog-links a:hover { text-decoration: underline; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.project-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.project-card p { font-size: 0.875rem; color: var(--muted); flex: 1; line-height: 1.5; }
.project-footer { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.25rem; }
.lang-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lang-label { font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--bg3);
  color: var(--muted);
  font-weight: 500;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p { color: var(--muted); margin-bottom: 1.1rem; font-size: 1rem; line-height: 1.65; }
.about-text a { color: var(--accent); text-decoration: none; font-weight: 500; }
.about-text a:hover { text-decoration: underline; }
.about-stats { display: flex; flex-direction: column; gap: 1rem; }
.stat-card { background: var(--bg2); border-radius: var(--radius); padding: 1.4rem 1.75rem; }
.stat-card .num { font-size: 2.2rem; font-weight: 700; color: var(--text); line-height: 1; letter-spacing: -0.03em; }
.stat-card .label { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }

/* TIMELINE */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--bg3);
}
.timeline-item { position: relative; padding-bottom: 3rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--bg3);
}
.timeline-item .period {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.timeline-item h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; }
.timeline-item .org { font-size: 0.92rem; color: var(--muted); margin-bottom: 0.75rem; }
.timeline-item .org a { color: var(--accent); text-decoration: none; }
.timeline-item .org a:hover { text-decoration: underline; }
.timeline-item ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.timeline-item ul li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.55;
}
.timeline-item ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* CERT + CHIP LISTS */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cert-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.cert-card .cert-icon { font-size: 1.4rem; line-height: 1.3; }
.cert-card h3 { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.15rem; }
.cert-card p { font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
.cert-card-featured {
  border: 1px solid rgba(0, 113, 227, 0.22);
  background: linear-gradient(180deg, #f7faff 0%, var(--bg2) 100%);
}
.cert-links {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}
.cert-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.cert-links a:hover { text-decoration: underline; }
.service-card-featured {
  border: 1px solid rgba(0, 113, 227, 0.22);
  background: linear-gradient(180deg, #f7faff 0%, var(--bg2) 100%);
}
.service-card .new-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a87b1a;
  margin-bottom: 0.45rem;
}
.page-hero a { color: var(--accent); text-decoration: none; font-weight: 500; }
.page-hero a:hover { text-decoration: underline; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 980px;
  background: var(--bg2);
  color: var(--text);
}

/* CLIENT LIST */
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.client-item {
  background: var(--bg2);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
}

/* SERVICE CARDS */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}
.service-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.service-card .skill-icon { font-size: 1.9rem; }
.service-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.service-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.55; }

/* CTA PANEL */
.cta-panel {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
}
.cta-panel h2 { margin-bottom: 0.75rem; }
.cta-panel p { color: var(--muted); max-width: 560px; margin: 0 auto 1.75rem; }
.cta-panel .hero-links { margin: 0; }
.cta-contact {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.cta-contact a { color: var(--accent); text-decoration: none; font-weight: 500; }
.cta-contact a:hover { text-decoration: underline; }

/* FOOTER */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}
.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-left { display: flex; flex-direction: column; gap: 0.3rem; }
.footer-left strong { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.footer-left span { font-size: 0.82rem; color: var(--muted); }
.footer-left span a { color: var(--muted); text-decoration: none; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

/* RESPONSIVE */
/* Certificate image cards — same footprint as .cert-card */
.cert-image-card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cert-image-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cert-image-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 8px);
  box-shadow: var(--shadow);
}
.cert-image-body { padding: 0 0.5rem 0.4rem; display: flex; flex-direction: column; gap: 0.25rem; }
.cert-image-body h3 { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.cert-image-body p { font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
.cert-image-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 680px) {
  .about-grid { grid-template-columns: 1fr; }
  nav {
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    gap: 0.35rem 1rem;
  }
  nav ul { flex-wrap: wrap; gap: 0.6rem 1.1rem; }
  nav a { font-size: 0.82rem; }
  .hero h1 { letter-spacing: -0.02em; }
  .hero-avatar {
    width: 140px;
    height: 140px;
  }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .archive-item { flex-direction: column; gap: 0.25rem; }
}
