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

:root {
  --text: #212529;
  --muted: #6c757d;
  --line: #e5e5e5;
  --max: 1240px;
}

html, body {
  background: #fff;
  color: var(--text);
  font-family: "Albert Sans", -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- Header ---------- */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img { height: 38px; width: auto; }

.main-nav { display: flex; gap: 32px; font-size: 15px; }

.main-nav a {
  color: var(--text);
  padding-bottom: 6px;
  position: relative;
  transition: opacity .2s;
}

.main-nav a:hover { opacity: .65; }

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  max-width: 900px;
  margin: 80px auto 120px;
  padding: 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 60px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #000;
  margin-bottom: 32px;
}

.hero .lead { font-size: 18px; margin-bottom: 20px; }

.hero p {
  font-size: 18px;
  max-width: 720px;
  margin: 0 auto 20px;
}

.hero strong { font-weight: 700; }

.resume-link {
  display: inline-block;
  margin-top: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 17px;
}

.socials {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.socials .rule { width: 120px; height: 1px; background: var(--text); }

.socials a {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  transition: opacity .2s;
}

.socials a:hover { opacity: .6; }

/* ---------- Section titles ---------- */
.section-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 auto 56px;
  max-width: var(--max);
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.section-title::before,
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--text);
}

.section-title span { white-space: nowrap; }

/* ---------- Skills (home) ---------- */
.skills {
  max-width: var(--max);
  margin: 0 auto 140px;
  padding: 0 40px;
}

.skill-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 56px 40px;
  margin-bottom: 80px;
  justify-items: center;
  align-items: center;
}

.skill-icons img {
  height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.skill-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 80px;
  max-width: 900px;
  margin: 0 auto;
  font-size: 16px;
}

.skill-list li { display: flex; gap: 8px; }
.skill-list .star { flex-shrink: 0; }

/* ---------- Projects ---------- */
.projects {
  max-width: var(--max);
  margin: 0 auto 140px;
  padding: 0 40px;
}

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 120px;
}

.project:last-child { margin-bottom: 0; }

.project-text .tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tag {
  background: #eeeeee;
  color: #333;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
}

.project-text h3 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  line-height: 1.25;
}

.project-text p {
  font-size: 16px;
  margin-bottom: 28px;
  max-width: 480px;
}

.btn {
  display: inline-block;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, color .2s;
}

.btn:hover { background: var(--text); color: #fff; }

/* ---------- Certifications (home) ---------- */
.certifications {
  max-width: var(--max);
  margin: 0 auto 120px;
  padding: 0 40px;
}

.cert {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 56px;
  padding-left: 240px;
}

.cert:last-child { margin-bottom: 0; }

.cert img { width: 140px; height: auto; }

.cert h3 { font-size: 24px; font-weight: 600; margin-bottom: 10px; }

.cert a {
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 15px;
}

/* ---------- Contact strip ---------- */
.contact-strip {
  max-width: var(--max);
  margin: 0 auto 40px;
  padding: 40px 40px 24px;
  border-bottom: 1px solid var(--text);
}

.contact-label { font-size: 15px; margin-bottom: 18px; }

.contact-email {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 40px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.footer-nav { display: flex; gap: 24px; }
.footer-nav a:hover { opacity: .6; }

.footer-socials { display: flex; gap: 18px; }
.footer-socials a { color: var(--text); display: inline-flex; }
.footer-socials a:hover { opacity: .6; }

/* ===================================================
   About page
   =================================================== */
.page-about { max-width: var(--max); margin: 0 auto; padding: 40px 40px 0; }

.about-intro {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
  margin: 40px 0 100px;
}

.about-intro h1 {
  font-size: 60px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #000;
  margin-bottom: 32px;
}

.about-intro p { font-size: 17px; margin-bottom: 18px; }

.about-intro-image img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.about-block { margin: 0 0 90px; }

.block-title {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #000;
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--text);
}

.block-title--upper { text-transform: uppercase; letter-spacing: 0.06em; font-size: 22px; }

.story p { font-size: 17px; margin-bottom: 18px; max-width: 980px; }

.experience { margin-bottom: 48px; }
.experience h3 { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.experience .meta { font-size: 15px; color: var(--text); margin-bottom: 14px; }
.experience p { font-size: 16px; margin-bottom: 12px; max-width: 980px; }

.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.edu-grid h3 { font-size: 18px; font-weight: 500; margin-bottom: 8px; line-height: 1.35; }
.edu-grid p { font-size: 15px; color: var(--muted); }

.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px; }
.skills-grid h3 { font-size: 22px; font-weight: 600; margin-bottom: 14px; }
.skills-grid ul { list-style: disc; padding-left: 22px; }
.skills-grid li { font-size: 15px; margin-bottom: 4px; }

.cert-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
}

.cert-grid li { text-align: left; }
.cert-grid p { font-size: 17px; font-weight: 600; line-height: 1.35; }

.cert-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: #f5f5f5;
}

.cert-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cert-thumb--placeholder {
  background: linear-gradient(135deg, #f5f5f5, #eaeaea);
  border-radius: 6px;
}

.cta-block { text-align: center; padding: 60px 20px 80px; }
.cta-block h2 { font-size: 44px; font-weight: 400; letter-spacing: -0.02em; color: #000; margin-bottom: 14px; }
.cta-block p { font-size: 16px; margin-bottom: 28px; color: var(--muted); }

/* ===================================================
   Contact page
   =================================================== */
.page-contact { max-width: var(--max); margin: 0 auto; padding: 40px 40px 0; }

.contact-hero {
  text-align: center;
  margin: 60px 0 60px;
}

.contact-hero h1 {
  font-size: 60px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #000;
  margin-bottom: 28px;
}

.contact-hero p { font-size: 17px; max-width: 640px; margin: 0 auto 8px; }

.contact-form-wrap {
  max-width: 640px;
  margin: 0 auto 100px;
  padding: 0 8px;
}

.contact-form { display: flex; flex-direction: column; gap: 22px; }

.contact-form label { display: block; }
.contact-form label > span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  border-radius: 6px;
  color: var(--text);
  transition: border-color .2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--text);
}

.contact-form textarea { resize: vertical; min-height: 140px; }

.contact-form .btn { align-self: flex-start; cursor: pointer; }

/* ===================================================
   Responsive
   =================================================== */
@media (max-width: 900px) {
  .hero h1, .about-intro h1, .contact-hero h1 { font-size: 40px; }
  .hero { margin: 40px auto 80px; }
  .project { grid-template-columns: 1fr; gap: 32px; margin-bottom: 80px; }
  .skill-icons { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .skill-list { grid-template-columns: 1fr; gap: 16px; }
  .section-title { font-size: 18px; }
  .cert { grid-template-columns: 120px 1fr; gap: 24px; padding-left: 0; }
  .cert img { width: 100px; }
  .cert h3 { font-size: 18px; }
  .contact-email { font-size: 22px; }
  .site-header { padding: 20px; }
  .main-nav { gap: 18px; font-size: 14px; }
  .site-footer { flex-direction: column; gap: 18px; padding: 24px 20px 40px; }

  .about-intro { grid-template-columns: 1fr; gap: 32px; margin: 16px 0 60px; }
  .block-title { font-size: 26px; }
  .edu-grid, .skills-grid { grid-template-columns: 1fr; gap: 32px; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .cta-block h2 { font-size: 30px; }
}

/* ===================================================
   Case study pages
   =================================================== */
.case-study { max-width: 1080px; margin: 0 auto; padding: 0 40px; }

.cs-header { margin: 60px 0 90px; max-width: 760px; }
.cs-header h1 {
  font-size: 52px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #000;
  margin-bottom: 26px;
}
.cs-subtitle { font-size: 18px; color: var(--muted); max-width: 640px; }

.cs-body { margin-bottom: 40px; }

.cs-sec { margin-bottom: 72px; }

.cs-heading {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #000;
  margin-bottom: 22px;
}

.cs-sub {
  font-size: 18px;
  font-weight: 600;
  margin: 26px 0 10px;
  color: var(--text);
}

.cs-text { max-width: 680px; }
.cs-text p, .cs-tm-text p, .cs-col p { font-size: 16.5px; margin-bottom: 16px; }

.cs-list { list-style: disc; padding-left: 22px; margin: 4px 0 16px; }
.cs-list li { font-size: 16.5px; margin-bottom: 8px; }

.cs-lead {
  font-size: 20px;
  font-weight: 500;
  color: #000;
  max-width: 760px;
}

.cs-def { margin-bottom: 16px; }
.cs-def strong { display: block; font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.cs-def span { font-size: 16px; color: var(--text); }

/* quote / emphasis lines */
.cs-quote {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: 24px 0;
}
.cs-quote p {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #000;
}

/* full-width media */
.cs-media img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* gallery */
.cs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.cs-gallery-grid img { width: 100%; height: auto; border-radius: 8px; }

/* text + media */
.cs-textmedia {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.cs-tm-media img { width: 100%; height: auto; border-radius: 8px; }

/* columns */
.cs-col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 56px;
}
.cs-col-heading { font-size: 20px; font-weight: 600; margin-bottom: 12px; }

.cs-github { margin-top: 12px; }

/* read more */
.cs-readmore { margin: 110px 0 40px; }
.rm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.rm-card { display: block; color: var(--text); transition: transform .2s; }
.rm-card:hover { transform: translateY(-4px); }
.rm-thumb {
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 8px;
  background: #f4f4f4;
  margin-bottom: 18px;
}
.rm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rm-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; line-height: 1.3; }
.rm-card p { font-size: 15px; color: var(--muted); }

@media (max-width: 900px) {
  .case-study { padding: 0 20px; }
  .cs-header { margin: 30px 0 50px; }
  .cs-header h1 { font-size: 34px; }
  .cs-heading { font-size: 24px; }
  .cs-sec { margin-bottom: 52px; }
  .cs-textmedia { grid-template-columns: 1fr; gap: 28px; }
  .cs-quote p { font-size: 21px; }
  .rm-grid { grid-template-columns: 1fr; gap: 32px; }
  .cs-readmore { margin: 70px 0 40px; }
}
