/* hilawi.com — single-page personal site */

:root {
  --bg: #1d231c;
  --fg: #ffffff;

  --photo-size: clamp(15rem, 40vw, 31.125rem);   /* 240px → 498px */
  --column-gap: clamp(2rem, 8.8vw, 6.9375rem);   /*  32px → 111px */

  --font-serif: ui-serif, "New York", "Iowan Old Style", "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
               "Helvetica Neue", Helvetica, Arial, sans-serif;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center start;   /* vertically centered, flush to the left padding */
  padding: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 5.9vw, 4.625rem);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- layout ---- */

.card {
  display: flex;
  align-items: center;
  gap: var(--column-gap);
}

.portrait {
  flex: none;
  width: var(--photo-size);
  height: auto;
  display: block;
}

.details {
  min-width: 0;
}

/* ---- type ---- */

h1 {
  margin: 0 0 2.25rem;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 4.3vw, 3.375rem);   /* 36px → 54px */
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.005em;
}

.meta {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);  /* 17px → 20px */
  line-height: 1.5;
}

.pin {
  margin-right: 0.4em;
}

.meta a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.meta a:hover,
.meta a:focus-visible {
  text-decoration-thickness: 2px;
}

.meta a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  text-decoration: none;
}

/* ---- stack on narrow screens ---- */

@media (max-width: 48rem) {
  body {
    place-items: start;
  }

  .card {
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(2rem, 7vw, 3rem);
  }

  :root {
    --photo-size: min(31.125rem, 100%);
  }

  h1 {
    margin-bottom: 1.5rem;
  }
}
