:root {
  --ink:    #0d1117;
  --mid:    #1c2333;
  --muted:  #6e7891;
  --line:   #e8eaf0;
  --accent: #2563eb;
  --sky:    #0ea5e9;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Inter', sans-serif; background: #fff; color: var(--ink); }

/* Keep long-form copy justified across sections */
p,
.fact-text,
.project-desc,
.exp-bullets li,
.personal-card-text,
.contact-inner p {
  text-align: justify;
  text-justify: inter-word;
}

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 60px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { text-decoration: none; font-size: .85rem; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--accent); }

/* ── HERO ── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  background: var(--ink);
  padding: 80px 2.5rem 4rem;
}
.hero-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.hero-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 2.5rem;
  align-items: center;
}
.hero-photo-wrap { justify-self: end; }
.hero-photo {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
}
.hero-label {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sky); margin-bottom: 1.75rem;
}
.hero-label::before { content: ''; display: block; width: 28px; height: 2px; background: var(--sky); }
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.03em;
  color: #fff; margin-bottom: 1.25rem;
}
.hero h1 span { color: var(--sky); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 300;
  color: #8b9ab5; max-width: 600px; line-height: 1.7; margin-bottom: 2.5rem;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; border-radius: 8px;
  padding: .75rem 1.75rem; font-size: .9rem; font-weight: 600;
  transition: all .2s; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); }
.btn-ghost { border: 1.5px solid #2e3a52; color: #8b9ab5; }
.btn-ghost:hover { border-color: var(--sky); color: var(--sky); transform: translateY(-1px); }

/* Hero stats strip */
.hero-stats {
  display: flex; gap: 3rem; flex-wrap: wrap;
  margin-top: 4rem; padding-top: 2.5rem;
  border-top: 1px solid #1e2d42;
}
.stat-n { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: #fff; }
.stat-l { font-size: .8rem; font-weight: 500; color: var(--muted); margin-top: .2rem; }

/* ── SECTIONS ── */
section { padding: 5rem 2.5rem; }
.container { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 3rem;
}

/* ── ABOUT ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.about-text p { font-size: 1.05rem; line-height: 1.8; color: #374151; margin-bottom: 1.1rem; }
.about-text p:last-child { margin-bottom: 0; }
.fact-list { list-style: none; display: flex; flex-direction: column; gap: .85rem; }
.fact-list li { display: flex; gap: .85rem; align-items: flex-start; }
.fact-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0; margin-top: .55rem;
}
.fact-text { font-size: .95rem; line-height: 1.6; color: #4b5563; }

/* ── PROJECTS ── */
.projects-bg { background: #f8f9fc; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.project-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.1); }
.project-img {
  width: 100%; height: 220px; object-fit: cover; display: block;
  background: #e8eaf0;
  border-bottom: 1px solid var(--line);
}
/* CAD models, diagrams and schematics — show full image without cropping */
.project-img.diagram {
  object-fit: contain;
  background: #fff;
  padding: .75rem;
}
.project-body { padding: 1.25rem 1.4rem 1.5rem; }
.project-tag {
  display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  background: #eff6ff; border-radius: 4px; padding: .2rem .55rem;
  margin-bottom: .65rem;
}
.project-title { font-size: 1rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem; line-height: 1.35; }
.project-desc { font-size: .85rem; color: var(--muted); line-height: 1.6; }
.project-links { display: flex; gap: .75rem; padding: 0 1.4rem 1.25rem; }
.project-link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .04em;
  text-decoration: none; padding: .3rem .75rem; border-radius: 6px;
  transition: background .2s, color .2s;
}
.project-link.app { background: var(--accent); color: #fff; }
.project-link.app:hover { background: #1d4ed8; }
.project-link.repo { background: #f1f5f9; color: var(--muted); cursor: not-allowed; }
.project-link-icon { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }

/* ── EXPERIENCE ── */
.exp-list { display: flex; flex-direction: column; gap: 0; }
.exp-item {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--line);
}
.exp-item:last-child { border-bottom: 1px solid var(--line); }
.exp-meta { padding-top: .15rem; }
.exp-period { font-size: .8rem; font-weight: 500; color: var(--muted); margin-bottom: .35rem; }
.exp-company { font-size: .85rem; font-weight: 600; color: var(--accent); }
.exp-location { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.exp-title { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-bottom: .6rem; }
.exp-bullets { list-style: none; display: flex; flex-direction: column; gap: .35rem; }
.exp-bullets li { font-size: .88rem; color: #4b5563; line-height: 1.55; padding-left: 1rem; position: relative; }
.exp-bullets li::before { content: '–'; position: absolute; left: 0; color: var(--muted); }

/* ── SKILLS ── */
.skills-bg { background: var(--ink); }
.skills-bg .section-title { color: #fff; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.skill-group-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sky); margin-bottom: 1.5rem;
}
.skill-row { margin-bottom: 1.1rem; }
.skill-head { display: flex; justify-content: space-between; margin-bottom: .4rem; }
.skill-name { font-size: .88rem; font-weight: 500; color: #c8d0e0; }
.tag-cloud-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 2.5rem;
}
.tag-cloud-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8b9ab5;
  margin-bottom: .9rem;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.tag {
  font-size: .78rem; font-weight: 500; color: #8b9ab5;
  border: 1px solid #1e2d42; border-radius: 20px;
  padding: .3rem .85rem;
}

/* ── EDUCATION ── */
.edu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.edu-card {
  padding: 1.5rem; border-radius: 12px; border: 1px solid var(--line);
  background: #fff;
  transition: border-color .2s, transform .2s;
}
.edu-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.edu-card.no-link:hover { border-color: var(--line); transform: none; }
.edu-years { font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: .5rem; }
.edu-degree { font-size: .95rem; font-weight: 600; color: var(--ink); line-height: 1.35; margin-bottom: .4rem; }
.edu-school { font-size: .8rem; color: var(--accent); }
.edu-degree-link, .edu-school-link {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}
.edu-degree-link:hover, .edu-school-link:hover { color: var(--accent); }

/* ── PERSONAL ── */
.personal-bg { background: #f8f9fc; }
.personal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
.personal-card {
  background: #fff; border-radius: 14px; padding: 1.75rem 1.25rem;
  text-align: center; border: 1px solid var(--line);
  height: 100%;
}
.personal-icon { font-size: 2.25rem; margin-bottom: .85rem; }
.personal-card-title { font-size: .95rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem; }
.personal-card-text { font-size: .82rem; color: var(--muted); line-height: 1.6; }

/* ── CONTACT ── */
.contact-bg { background: var(--ink); }
.contact-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.contact-inner h2 { font-family: 'Space Grotesk', sans-serif; font-size: 2.5rem; font-weight: 700; color: #fff; margin-bottom: .75rem; }
.contact-inner p { color: #8b9ab5; font-size: 1rem; margin-bottom: 2.5rem; line-height: 1.7; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .85rem; }
.contact-link {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; font-size: .88rem; font-weight: 500;
  color: #8b9ab5; border: 1.5px solid #1e2d42; border-radius: 10px;
  padding: .7rem 1.4rem; transition: all .2s;
}
.contact-link:hover { border-color: var(--sky); color: var(--sky); background: rgba(14,165,233,.05); }
.contact-link-icon { font-size: 1rem; }
.contact-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #1e2d42; }
.contact-footer p { font-size: .8rem; color: #3d4f68; }
.contact-footer a { color: var(--sky); text-decoration: none; }
.contact-footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero-photo-wrap { justify-self: start; }
  .about-grid, .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .tag-cloud-grid { grid-template-columns: 1fr 1fr; }
  .edu-grid { grid-template-columns: 1fr 1fr; }
  .personal-grid { grid-template-columns: 1fr 1fr; }
  .exp-item { grid-template-columns: 1fr; gap: .5rem; }
  .exp-meta { display: flex; gap: 1rem; align-items: baseline; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  section { padding: 3.5rem 1.25rem; }
  .hero { padding: 80px 1.25rem 3rem; }
  .hero-photo-wrap { justify-self: center; }
  .hero-photo {
    width: 180px;
    height: 180px;
  }
  .skills-grid, .tag-cloud-grid, .edu-grid, .personal-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.75rem; }
}
