:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #61707d;
  --paper: #e8edf2;
  --panel: #ffffff;
  --line: #cfd8e3;
  --blue: #0b70e0;
  --blue-soft: #e9f2ff;
  --navy: #071523;
  --green: #5f8f7b;
  --warm: #efe9df;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.13);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #dfe6ee 0, var(--paper) 360px),
    var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 14px max(20px, calc((100vw - var(--max)) / 2));
  background:
    linear-gradient(135deg, rgba(7, 21, 35, 0.98), rgba(11, 36, 60, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 36px rgba(7, 21, 35, 0.2);
  backdrop-filter: blur(16px);
}

.brand,
.nav,
.hero-actions,
.social-links,
.skill-list,
.footer-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  color: white;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), #36d1c8);
  color: white;
  font-family: "JetBrains Mono", monospace;
}

.brand-text {
  white-space: nowrap;
}

.nav {
  gap: 26px;
  color: #c8d6e3;
  font-size: 0.94rem;
  font-weight: 700;
}

.nav a:hover,
.header-link:hover,
.footer a:hover {
  color: #54c7ff;
}

.header-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-weight: 800;
}

.hero {
  width: min(100%, var(--max));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(30px, 6vw, 76px);
  align-items: center;
  margin: 0 auto;
  padding: clamp(50px, 8vw, 92px) 20px 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  margin: 0 0 18px;
  padding: 8px 14px;
  border: 1px solid rgba(95, 143, 123, 0.28);
  border-radius: 8px;
  background: rgba(95, 143, 123, 0.1);
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.06;
}

h1 {
  max-width: 700px;
  font-size: clamp(2.25rem, 4vw, 3.35rem);
  letter-spacing: 0;
}

h2 {
  max-width: 780px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  letter-spacing: 0;
}

h3 {
  font-size: 1.22rem;
}

.hero-copy {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.8vw, 1.22rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 126px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 800;
}

.button.primary {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  box-shadow: 0 14px 28px rgba(7, 21, 35, 0.18);
}

.button.secondary {
  background: #f7f9fb;
  color: var(--ink);
}

.social-links {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.social-links a {
  color: var(--blue);
  font-weight: 800;
}

.social-links a:hover {
  color: var(--navy);
}

.portrait-card {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
  box-shadow: var(--shadow);
}

.portrait-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  object-fit: cover;
  object-position: center top;
}

.portrait-card figcaption {
  padding: 14px 4px 4px;
}

.portrait-card strong,
.portrait-card span {
  display: block;
}

.portrait-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(58px, 8vw, 96px) 20px;
  scroll-margin-top: 86px;
}

.section-heading {
  max-width: 840px;
  padding-bottom: 8px;
}

.section-heading h2 {
  position: relative;
  padding-bottom: 18px;
}

.section-heading h2::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 92px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #36d1c8);
  content: "";
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  margin-top: 32px;
}

.about-grid p,
.resume-text p,
.work-card p,
.timeline p,
.skill-card p {
  color: var(--muted);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.work-card {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
  box-shadow: 0 10px 28px rgba(23, 32, 42, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.work-card:first-child {
  grid-column: 1 / -1;
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(7, 21, 35, 0.96), rgba(13, 47, 77, 0.94));
  border-color: rgba(255, 255, 255, 0.12);
  color: white;
}

.work-card:first-child p {
  color: #d9e7f4;
}

.work-card:first-child .project-stack {
  color: #54c7ff;
}

.work-card:hover {
  border-color: rgba(11, 112, 224, 0.28);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.project-stack,
.timeline span {
  margin: 0 0 22px;
  color: var(--blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.resume-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(280px, 0.62fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.resume-image {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.resume-image img {
  display: block;
  width: 100%;
}

.resume-button {
  margin-top: 24px;
}

.skills {
  width: 100%;
  max-width: none;
  margin-top: 24px;
  padding: clamp(58px, 8vw, 92px) max(20px, calc((100vw - var(--max)) / 2));
  background:
    linear-gradient(135deg, rgba(7, 21, 35, 0.98), rgba(12, 43, 67, 0.96));
  color: white;
}

.skills .section-heading {
  max-width: var(--max);
}

.skills .eyebrow {
  border-color: rgba(88, 201, 255, 0.28);
  background: rgba(88, 201, 255, 0.11);
  color: #58c9ff;
}

.skills h2 {
  color: white;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: var(--max);
  margin-top: 34px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.skill-card h3 {
  margin-bottom: 12px;
  color: white;
}

.skill-card p {
  margin-bottom: 24px;
  color: #d6e5f0;
}

.skill-list {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.skill-list span {
  padding: 9px 11px;
  border: 1px solid rgba(100, 202, 255, 0.25);
  border-radius: 8px;
  background: rgba(233, 242, 255, 0.1);
  color: #f3f9ff;
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.timeline article {
  position: relative;
  min-height: 220px;
  padding: 26px 26px 26px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
  box-shadow: 0 12px 34px rgba(23, 32, 42, 0.09);
}

.timeline article::before {
  position: absolute;
  top: 26px;
  bottom: 26px;
  left: 0;
  width: 5px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, var(--blue), #36d1c8);
  content: "";
}

.experience-card:first-child {
  border-color: rgba(11, 112, 224, 0.28);
  background:
    linear-gradient(135deg, #ffffff, #eef6ff);
}

.experience-points {
  display: grid;
  gap: 9px;
  margin: 20px 0 0;
  padding-left: 18px;
  color: #344555;
}

.experience-points li::marker {
  color: var(--blue);
}

.footer {
  width: min(100%, var(--max));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 28px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.footer-links {
  gap: 18px;
  flex-wrap: wrap;
  font-weight: 800;
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .hero,
  .about-grid,
  .work-grid,
  .resume-feature,
  .skill-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 34px;
  }

  .portrait-card {
    width: min(340px, 100%);
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
  }

  .brand-text {
    display: none;
  }

  .header-link {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.84rem;
  }

  .hero,
  .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    gap: 24px;
    padding-top: 30px;
    padding-bottom: 46px;
  }

  h1 {
    font-size: clamp(1.92rem, 8vw, 2.3rem);
  }

  h2 {
    font-size: clamp(1.72rem, 8.5vw, 2.28rem);
  }

  .hero-copy {
    margin-top: 18px;
    font-size: 1rem;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .social-links {
    gap: 14px;
    justify-content: center;
  }

  .button {
    width: 100%;
  }

  .portrait-card {
    width: min(220px, 100%);
  }

  .portrait-card figcaption {
    padding-top: 10px;
  }

  .section {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .about-grid,
  .work-grid,
  .skill-grid,
  .timeline {
    gap: 14px;
    margin-top: 24px;
  }

  .work-card,
  .skill-card,
  .timeline article {
    min-height: auto;
    padding: 18px;
  }

  .work-card:first-child {
    min-height: auto;
  }

  .resume-feature {
    gap: 22px;
  }

  .resume-image {
    max-height: 260px;
  }

  .resume-image img {
    height: 260px;
    object-fit: cover;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 16px;
    padding-right: 16px;
  }
}
