:root {
  --bg: #f5f5f5;
  --bg-soft: #ededed;
  --ink: #111111;
  --muted: #2f2f2f;
  --accent: #111111;
  --accent-strong: #111111;
  --accent-warm: #111111;
  --card: #ffffff;
  --radius: 18px;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

.container {
  width: min(90%, var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: var(--bg-soft);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 16px;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 999;
}

.skip-link:focus {
  left: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 2px solid #111;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-text {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--accent-strong);
}

.hero {
  padding-top: 96px;
}

.hero-grid {
  display: grid;
  gap: 32px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin-bottom: 12px;
}

.eyebrow {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-strong);
  margin-bottom: 12px;
  font-size: 0.75rem;
}

.tagline {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 2px solid #111;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn.primary {
  background: #111;
  color: #fff;
}

.btn.primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #111;
}

.btn.ghost {
  border: 2px solid #111;
  color: #111;
  background: transparent;
}

.btn.ghost:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #111;
}

.social {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #fff;
  border: 2px solid #111;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.icon-link svg {
  width: 20px;
  height: 20px;
  fill: var(--ink);
}

.icon-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #111;
}

.hero-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-frame {
  position: relative;
  border: 2px solid #111;
  padding: 12px;
  background: #fff;
}

.hero-frame::after {
  content: "";
  position: absolute;
  inset: 10px -12px -12px 12px;
  border: 2px solid #111;
  background: #e6e6e6;
  z-index: -1;
}

.hero-frame img {
  width: min(360px, 70vw);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-header p {
  color: var(--muted);
}

.about-grid {
  display: grid;
  gap: 18px;
  color: var(--muted);
}

.experience-list {
  display: grid;
  gap: 18px;
}

.experience-card {
  background: var(--card);
  padding: 22px;
  border-radius: var(--radius);
  border: 2px solid #111;
}

.experience-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.experience-header span {
  color: var(--muted);
  font-size: 0.9rem;
}

.role {
  font-weight: 700;
  color: var(--accent-strong);
  margin-bottom: 8px;
}

.project-grid {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  scroll-padding: 6px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 42, 46, 0.25) transparent;
  -webkit-overflow-scrolling: touch;
}

.project-grid::-webkit-scrollbar {
  height: 8px;
}

.project-grid::-webkit-scrollbar-thumb {
  background: rgba(31, 42, 46, 0.25);
  border-radius: 999px;
}

.project-card {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  border: 2px solid #111;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 clamp(260px, 80vw, 380px);
  scroll-snap-align: start;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 4px 4px 0 #111;
}

.project-card p {
  color: var(--muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.pill {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(244, 162, 89, 0.2);
  color: #8b4a1f;
  font-weight: 600;
  font-size: 0.85rem;
}

.documentation-grid {
  display: grid;
  gap: 18px;
}

.doc-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 2px solid #111;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.doc-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(31, 42, 46, 0.06);
}

.doc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.doc-card:hover .doc-media img {
  transform: scale(1.04);
}

.doc-caption {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-caption p {
  color: var(--muted);
  font-size: 0.95rem;
}

.skills-grid {
  display: grid;
  gap: 18px;
}

.skills-card {
  background: var(--card);
  padding: 22px;
  border-radius: var(--radius);
  border: 2px solid #111;
}

.skills-card h3 {
  margin-bottom: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  border: 2px solid #111;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: "JetBrains Mono", "Space Mono", "Courier New", monospace;
}

.contact-card {
  display: grid;
  gap: 18px;
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  border: 2px solid #111;
}

.contact-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.contact-link {
  font-weight: 700;
  color: var(--accent-strong);
}

.site-footer {
  padding: 24px 0 36px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mono {
  font-family: "JetBrains Mono", "Space Mono", "Courier New", monospace;
}

@media (max-width: 720px) {
  .section {
    padding: 56px 0;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 8px;
    border-top: 2px solid #111;
  }

  .site-nav a {
    flex: 0 0 auto;
  }

  .hero {
    padding-top: 72px;
  }

  .hero-grid {
    gap: 20px;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 6vw, 2.6rem);
  }

  .tagline {
    font-size: 0.98rem;
  }

  .cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .social {
    flex-wrap: wrap;
  }

  .hero-media {
    justify-content: flex-start;
  }

  .hero-frame {
    width: min(320px, 90vw);
  }

  .hero-frame img {
    width: 100%;
  }

  .project-card {
    flex-basis: 86vw;
  }

  .documentation-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  .about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .experience-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .documentation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .documentation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    transition: none;
  }

  .btn,
  .icon-link {
    transition: none;
  }
}
