/* alhasaniq.com — minimalist personal site */

:root {
  --max-width: 640px;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --bg: #fafafa;
  --accent: #2563eb;
  --border: #e6e6e6;
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Single centered column */
body > * {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Header / profile */
.site-header {
  padding-top: 96px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 28px;
}

.avatar {
  width: 192px;
  height: 192px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
  flex-shrink: 0;
}

.profile-text {
  min-width: 0;
}

.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.bio {
  margin: 12px 0 0;
  max-width: 60ch;
  color: var(--text);
}

/* Sections */
.section {
  margin-top: 56px;
}

.section-title {
  margin: 0 0 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Entry lists */
.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry {
  padding: 12px 0;
}

.entry + .entry {
  border-top: 1px solid var(--border);
}

/* Blog rows: title left, date right */
.entry--row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.entry-title {
  color: var(--text);
  text-decoration: none;
}

/* Little "external link" arrow after each entry title */
.entry-title::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-left: 0.35em;
  background-color: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2.5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cline%20x1='7'%20y1='17'%20x2='17'%20y2='7'/%3E%3Cpolyline%20points='8%207%2017%207%2017%2016'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2.5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cline%20x1='7'%20y1='17'%20x2='17'%20y2='7'/%3E%3Cpolyline%20points='8%207%2017%207%2017%2016'/%3E%3C/svg%3E")
    center / contain no-repeat;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.entry-title:hover {
  color: var(--accent);
}

.entry-title:hover::after {
  background-color: var(--accent);
  transform: translate(1px, -1px);
}

.entry-meta {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* GitHub mark before each project title */
.entry--project .entry-title::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: -0.15em;
  background-color: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='%23000'%3E%3Cpath%20d='M12%20.297c-6.63%200-12%205.373-12%2012%200%205.303%203.438%209.8%208.205%2011.385.6.113.82-.258.82-.577%200-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422%2018.07%203.633%2017.7%203.633%2017.7c-1.087-.744.084-.729.084-.729%201.205.084%201.838%201.236%201.838%201.236%201.07%201.835%202.809%201.305%203.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93%200-1.31.465-2.38%201.235-3.22-.135-.303-.54-1.523.105-3.176%200%200%201.005-.322%203.3%201.23.96-.267%201.98-.399%203-.405%201.02.006%202.04.138%203%20.405%202.28-1.552%203.285-1.23%203.285-1.23.645%201.653.24%202.873.12%203.176.765.84%201.23%201.91%201.23%203.22%200%204.61-2.805%205.625-5.475%205.92.42.36.81%201.096.81%202.22%200%201.606-.015%202.896-.015%203.286%200%20.315.21.69.825.57C20.565%2022.092%2024%2017.592%2024%2012.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='%23000'%3E%3Cpath%20d='M12%20.297c-6.63%200-12%205.373-12%2012%200%205.303%203.438%209.8%208.205%2011.385.6.113.82-.258.82-.577%200-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422%2018.07%203.633%2017.7%203.633%2017.7c-1.087-.744.084-.729.084-.729%201.205.084%201.838%201.236%201.838%201.236%201.07%201.835%202.809%201.305%203.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93%200-1.31.465-2.38%201.235-3.22-.135-.303-.54-1.523.105-3.176%200%200%201.005-.322%203.3%201.23.96-.267%201.98-.399%203-.405%201.02.006%202.04.138%203%20.405%202.28-1.552%203.285-1.23%203.285-1.23.645%201.653.24%202.873.12%203.176.765.84%201.23%201.91%201.23%203.22%200%204.61-2.805%205.625-5.475%205.92.42.36.81%201.096.81%202.22%200%201.606-.015%202.896-.015%203.286%200%20.315.21.69.825.57C20.565%2022.092%2024%2017.592%2024%2012.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
    center / contain no-repeat;
  transition: background-color 0.15s ease;
}

.entry--project .entry-title:hover::before {
  background-color: var(--accent);
}

/* Disabled (non-navigable) project title, e.g. a private WIP repo */
.entry-title--disabled {
  color: var(--muted);
  cursor: default;
}

.entry-title--disabled::after {
  display: none;
}

/* "WIP" badge */
.badge {
  display: inline-block;
  margin-left: 0.5em;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--border);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 0.12em;
}

/* Project rows: description under the title */
.entry-desc {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 80px;
  padding-top: 24px;
  padding-bottom: 96px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

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

.icon-link {
  display: inline-flex;
}

/* Contact page */
.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}

.back-link:hover {
  color: var(--accent);
}

.contact-intro {
  margin: 0 0 28px;
  max-width: 54ch;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 480px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form button {
  align-self: flex-start;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--text);
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
}

.contact-form button:hover {
  background: var(--accent);
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Honeypot field: off-screen, not display:none (bots skip display:none) */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Submission status message */
.form-status {
  margin: 0 0 20px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  max-width: 480px;
}

.form-status[data-kind="ok"] {
  color: #14532d;
  background: #dcfce7;
}

.form-status[data-kind="error"] {
  color: #7f1d1d;
  background: #fee2e2;
}

/* Tighten spacing on small screens */
@media (max-width: 560px) {
  .site-header {
    padding-top: 64px;
  }

  .profile {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .avatar {
    width: 128px;
    height: 128px;
  }

  .site-footer {
    padding-bottom: 64px;
  }
}
