/* Visual language follows javohirakramov.com: system font, small sizes,
   gray secondary text, blue links, 160ms color/opacity hovers.
   Grays are a little darker than the reference to pass WCAG AA contrast. */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: #2a2a2a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: #dbe6fd; color: #1a1a1a; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color 160ms ease, opacity 160ms ease; }
a:focus-visible { outline: 1px solid #1a1a1a; outline-offset: 2px; border-radius: 2px; }
h1, h2, p, ul { margin: 0; }
h1, h2 { color: #1a1a1a; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
ul { list-style: none; padding: 0; }

/* ---------- Landing ---------- */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 5rem;
}
.hero {
  display: flex;
  gap: 2.5rem;
  max-width: 680px;
}
.portrait {
  align-self: flex-start;
  width: 170px;
  flex-shrink: 0;
  aspect-ratio: 5 / 7;
  border-radius: 8px;
  overflow: hidden;
  background: #e8e8e6;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* Bio stretches to the photo's height; socials sit at its bottom edge. */
.bio { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; line-height: 1.6; }
.bio .name { font-size: 14.5px; margin-bottom: 0.85rem; }
.bio p { max-width: 46ch; text-align: justify; }

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-top: auto;
  padding-top: 1.1rem;
  font-size: 12px;
  color: #737373;
}
.socials a:hover { color: #1a1a1a; }

.hero-nav { align-self: flex-start; }
.hero-nav ul { display: flex; flex-direction: column; gap: 0.55rem; }
.hero-nav a { font-size: 13.5px; color: #737373; }
.hero-nav a:hover { color: #1a1a1a; }

/* Blue text links */
.bio p a,
.shell > p a,
.project-links a { color: #2563eb; }
.bio p a:hover,
.shell > p a:hover,
.project-links a:hover { opacity: 0.7; }

/* ---------- Inner pages ---------- */
.shell {
  max-width: 580px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  font-size: 14px;
}
.back {
  display: inline-block;
  margin-bottom: 2rem;
  color: #737373;
  font-size: 14px;
}
.back:hover { color: #1a1a1a; }

.section-header { margin-bottom: 2.5rem; }
.section-header h1 { font-size: 17px; }
.note {
  margin-top: 0.6rem;
  max-width: 52ch;
  color: #737373;
  font-size: 13px;
}

/* Projects list */
.project-list > li { padding-bottom: 1.5rem; }
.project-name { font-size: 15px; margin-bottom: 0.35rem; }
.project-name a:hover { color: #2563eb; }
.role { margin-left: 0.4rem; font-size: 13px; font-weight: 400; color: #737373; }
.project-desc { max-width: 52ch; margin-bottom: 0.6rem; color: #4a4a4a; }
.project-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 13px; }

/* Reading */
.plain-list li { padding: 0.35rem 0; }

/* Project detail pages */
.shell > p + p { margin-top: 0.8em; }
.shell > h2 { margin: 2rem 0 0.35rem; font-size: 14px; }
.shell > .project-links { margin-top: 2.25rem; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .landing { min-height: auto; padding: 3rem 1.75rem 5rem; }
  .hero {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 520px;
    text-align: center;
  }
  .portrait { align-self: center; width: 200px; border-radius: 10px; }
  .bio { width: 100%; max-width: 340px; }
  .bio p { max-width: none; }
  .socials { justify-content: center; gap: 0.5rem 1.5rem; font-size: 13px; }

  .hero-nav {
    align-self: center;
    width: 100%;
    max-width: 360px;
    padding-top: 1.25rem;
    border-top: 1px solid #eeeceb;
  }
  .hero-nav ul { flex-direction: row; justify-content: center; gap: 2rem; }
  .hero-nav a { font-size: 14px; }

  .shell { padding: 2.5rem 1.75rem 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
