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

:root {
  --bg:        #0d0d0d;
  --surface:   #141414;
  --border:    #222;
  --accent:    #6ee7b7;
  --muted:     #555;
  --text:      #e2e8f0;
  --subtext:   #94a3b8;
  --tag-bg:    #1a1a1a;
  --gap:       2.5rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:      #f8fafc;
    --surface: #ffffff;
    --border:  #e2e8f0;
    --accent:  #059669;
    --muted:   #94a3b8;
    --text:    #0f172a;
    --subtext: #475569;
    --tag-bg:  #f1f5f9;
  }
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

/* ── Layout ──────────────────────────────────── */
.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

/* ── Header ──────────────────────────────────── */
header {
  padding: 4rem 0 3rem;
  margin-bottom: var(--gap);
}

.header-inner {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.header-text {
  flex: 1;
  min-width: 0;
}

.profile-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  scale: 1.15;
  margin: .5rem .5rem 0;
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
  }
  .header-text {
    text-align: center;
  }
  .contact-row {
    align-items: center;
  }
}

header .role {
  font-size: .85rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}

header h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

header .tagline {
  max-width: 580px;
  color: var(--subtext);
  font-size: .95rem;
  margin-bottom: 1.6rem;
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: var(--subtext);
  text-decoration: none;
}

.contact-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.contact-item.pdf-icon svg {
  width: 16px;
  height: 16px;
}

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

/* ── Section ─────────────────────────────────── */
section { margin-bottom: var(--gap); }

.section-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Experience cards ────────────────────────── */
.job {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
}
.job:last-child { border-bottom: none; }

.job-meta {
  padding-top: .15rem;
}

.job-period {
  font-size: .78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.job-company {
  font-size: .8rem;
  color: var(--subtext);
  margin-top: .25rem;
}

.job-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: .4rem;
  color: var(--text);
}

.job-desc {
  color: var(--subtext);
  font-size: .9rem;
  margin-bottom: .8rem;
}

.achievements {
  list-style: none;
  margin-bottom: .8rem;
}
.achievements li {
  font-size: .88rem;
  color: var(--subtext);
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: .25rem;
}
.achievements li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: .75rem;
  top: .1rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .6rem;
}
.tech-tags span {
  background: var(--tag-bg);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: .72rem;
  padding: .2rem .55rem;
  border-radius: 4px;
  letter-spacing: .03em;
}

/* ── Education ───────────────────────────────── */
.edu-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0 2rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-child { border-bottom: none; }

.edu-meta .edu-year {
  font-size: .78rem;
  color: var(--muted);
}

.edu-degree {
  font-weight: 600;
  font-size: .98rem;
  margin-bottom: .2rem;
}
.edu-school {
  font-size: .85rem;
  color: var(--subtext);
  margin-bottom: .5rem;
}
.edu-detail {
  font-size: .88rem;
  color: var(--subtext);
}

/* ── Certs ───────────────────────────────────── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  transition: border-color .15s;
}
.cert-card:hover {
  border-color: var(--accent);
}

.cert-badge-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 6px;
}

.cert-badge {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
}

.cert-card-text {
  flex: 1;
  min-width: 0;
}

.cert-card .cert-provider {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .3rem;
}

.cert-card .cert-name {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.4;
}

/* ── Skills ──────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
}

.skill-group h4 {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}

.skill-group p {
  font-size: .85rem;
  color: var(--subtext);
  line-height: 1.6;
}

/* ── Languages ───────────────────────────────── */
.lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.lang-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .8rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
}

.lang-item .lang-name {
  font-weight: 600;
  font-size: .95rem;
}

.lang-item .lang-level {
  font-size: .75rem;
  color: var(--subtext);
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 600px) {
  .job, .edu-item {
    grid-template-columns: 1fr;
    gap: .5rem 0;
  }
  .job-meta, .edu-meta {
    display: flex;
    gap: .8rem;
    align-items: baseline;
  }
}
