:root {
  --bg:      #ffffff;
  --bg2:     #ffffff;
  --panel:   #f0ebe1;
  --border:  #e0d9cf;
  --ink:     #1a1714;
  --ink2:    #3d3830;
  --muted:   #7a7268;
  --faint:   #c8c0b4;
  --accent:  #c94f28;
  --accent2: #2b5f8c;
  --green:   #2d6b4a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink2);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* SUBTLE GRID */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,23,20,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,23,20,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 60px;
  background: rgba(250,248,244,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.nav-logo span { color: var(--faint); }

.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--green);
  background: #eef5f1;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid #c4dcd1;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── HERO ── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 48px 80px;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg);
}

.hero-content { max-width: 700px; }

.hero-tag {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-tag::before {
  content: '';
  display: block;
  width: 32px; height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(60px, 9vw, 110px);
  font-weight: 400;
  line-height: 0.92;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hero h1 em { font-style: italic; color: var(--accent); }

.hero-subtitle {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  margin-top: 24px;
  margin-bottom: 28px;
  letter-spacing: 0.08em;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent);
  width: 0;
  animation: typing 2.5s steps(44,end) forwards, cur 0.75s step-end infinite 2.5s;
}
@keyframes typing { to { width: 100%; } }
@keyframes cur    { 50% { border-color: transparent; } }

.hero-desc {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink2);
  max-width: 520px;
  margin-bottom: 48px;
}

.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--ink);
  color: var(--bg);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--ink2); transform: translateY(-2px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 32px;
  border: 1px solid var(--border);
  color: var(--ink2);
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }

/* ── STATS BAR ── */
.stats-bar {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 36px 24px;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 52px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}
.stat-num sup {
  font-family: 'DM Mono', monospace;
  font-size: 18px;
  color: var(--accent);
  vertical-align: super;
}
.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 8px;
}

/* ── SECTIONS ── */
section {
  position: relative;
  z-index: 1;
  padding: 100px 48px;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 56px;
}
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.1em;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 38px;
  font-weight: 400;
  color: var(--ink);
}

/* ── SKILLS GRID ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.skill-card {
  background: var(--bg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s;
}
.skill-card:hover { background: var(--bg2); }
.skill-card:hover::before { transform: scaleY(1); }

.skill-icon { font-size: 26px; margin-bottom: 16px; }
.skill-name {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 10px;
}
.skill-card p { font-size: 14px; color: var(--muted); line-height: 1.7; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--bg2);
  padding: 3px 9px;
  border-radius: 4px;
}
.tag.hot {
  background: #fdf0eb;
  border-color: #f0c4b5;
  color: var(--accent);
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--border);
}
.timeline-item { margin-bottom: 52px; position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -38px; top: 8px;
  width: 11px; height: 11px;
  border: 2px solid var(--accent);
  background: var(--bg);
  transform: rotate(45deg);
}
.timeline-period {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.timeline-role {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
}
.timeline-company {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 14px;
  letter-spacing: 0.04em;
}
.timeline-desc {
  font-size: 15px;
  color: var(--ink2);
  line-height: 1.75;
  max-width: 600px;
  margin-bottom: 16px;
}
.timeline-achievements { display: flex; flex-direction: column; gap: 8px; }
.achievement {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.achievement::before { content: '↗'; color: var(--accent); flex-shrink: 0; }

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.project-card {
  background: var(--bg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}
.project-card:hover { background: var(--bg2); }
.project-num {
  font-family: 'DM Serif Display', serif;
  font-size: 72px;
  font-weight: 400;
  color: var(--border);
  position: absolute;
  top: 16px; right: 24px;
  line-height: 1;
  transition: color 0.3s;
}
.project-card:hover .project-num { color: var(--faint); }
.project-type {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--accent2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.project-name {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 12px;
}
.project-desc { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
.project-stack { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── CERTIFICATIONS ── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cert-card {
  border: 1px solid var(--border);
  padding: 28px 20px;
  text-align: center;
  background: var(--bg);
  border-radius: 8px;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}
.cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: var(--bg2);
}
.cert-icon { font-size: 28px; margin-bottom: 12px; }
.cert-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 8px;
}
.cert-issuer {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

/* ── CONTACT ── */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.big-text {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.0;
  margin-bottom: 24px;
}
.big-text em { font-style: italic; color: var(--accent); }
.contact-left p { font-size: 16px; color: var(--muted); line-height: 1.75; max-width: 400px; }

.contact-links { display: flex; flex-direction: column; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.2s;
}
.contact-link:first-child { border-top: 1px solid var(--border); }
.contact-link:hover { opacity: 0.6; }
.contact-link-icon { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.contact-link-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.contact-link-value { font-size: 15px; color: var(--ink); margin-top: 2px; }

/* ── DIVIDER ── */
.divider { position: relative; z-index: 1; height: 1px; background: var(--border); }

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-text {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.06em;
}

/* ── FADE IN ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  section { padding: 60px 24px; }
  .hero { padding: 100px 24px 60px; }
  .stats-inner { grid-template-columns: repeat(2,1fr); padding: 0 24px; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: repeat(2,1fr); }
  .contact-wrap { grid-template-columns: 1fr; gap: 48px; }
  footer { padding: 20px 24px; }
}