:root {
  --paper: #f5f0e6;
  --ink: #23201b;
  --muted: #6f675b;
  --accent: #7a5a2e;
  --line: #d8cfbf;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --arabic: "Amiri", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16140f;
    --ink: #ece5d6;
    --muted: #a0978a;
    --accent: #c9a56b;
    --line: #353027;
  }
}

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

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  overflow: hidden;              /* one screen, no scrolling */
  -webkit-font-smoothing: antialiased;
}

.page {
  height: 100dvh;
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vh, 3rem) 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.25rem, 4vh, 2.25rem);
  text-align: center;
  animation: rise 0.9s ease-out both;
}

/* Intro */

.bismillah {
  font-family: var(--arabic);
  font-size: clamp(1rem, 2.4vh, 1.25rem);
  color: var(--accent);
  margin-bottom: clamp(0.75rem, 2.5vh, 1.5rem);
}

h1 {
  font-weight: 400;
  font-size: clamp(2.5rem, 8vh, 4rem);
  letter-spacing: 0.01em;
  line-height: 1;
}

.role {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.9rem;
}

.bio {
  font-size: clamp(1.1rem, 2.6vh, 1.3rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--muted);
  margin-top: clamp(0.9rem, 2.5vh, 1.5rem);
}

.rule {
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--accent);
  margin: 0 auto;
  opacity: 0.6;
}

/* Project links */

.links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.links a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(0.7rem, 2vh, 1rem) 0.25rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  text-align: left;
  transition: padding 0.25s ease, color 0.25s ease;
}

.links .name {
  font-size: clamp(1.15rem, 2.8vh, 1.4rem);
  font-weight: 500;
}

.links .desc {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}

.links a:hover,
.links a:focus-visible {
  color: var(--accent);
  padding-left: 0.75rem;
  outline: none;
}

/* Footer */

.aside {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
}

.aside a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

.aside a:hover { color: var(--accent); }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
}

/* Narrow phones: stack link name over description */
@media (max-width: 420px) {
  .links a { flex-direction: column; gap: 0.15rem; }
  .links .desc { text-align: left; }
}

/* Very short screens (landscape phones): allow scrolling rather than clip */
@media (max-height: 560px) {
  body { overflow: auto; }
  .page { height: auto; min-height: 100dvh; }
}
