/* morahmani.com — quantitative research portfolio */

:root {
  --bg: #0a0e14;
  --bg-elevated: #111820;
  --bg-card: #141c26;
  --border: #243044;
  --text: #e8edf4;
  --text-muted: #8b9cb3;
  --accent: #4da3b8;
  --accent-dim: #2d6b7a;
  --accent-glow: rgba(77, 163, 184, 0.12);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max-width: 720px;
  --page-padding: clamp(1.25rem, 4vw, 2.5rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent),
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #6ec4d6;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

/* Site nav */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3rem;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Header */

.site-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.tagline {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 36ch;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.btn:hover {
  border-color: var(--accent-dim);
  background: var(--bg-card);
  color: var(--text);
}

.btn-primary {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Sections */

section {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

p:last-child {
  margin-bottom: 0;
}

/* Principles */

.principles {
  list-style: none;
  padding: 0;
  margin: 0;
}

.principles li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.principles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Project cards */

.projects {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project-card {
  padding: 1.25rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.project-card:hover {
  border-color: var(--accent-dim);
}

.project-card p {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Tool cards */

.tool-card .tool-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.tool-link {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--accent);
}

.tool-card-soon {
  opacity: 0.6;
}

.soon-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  white-space: nowrap;
}

.badge-coming {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  vertical-align: middle;
  margin-left: 0.5rem;
}

/* Skills grid */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.skill {
  font-size: 0.875rem;
  padding: 0.45rem 0.65rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  text-align: center;
}

/* Footer */

.site-footer {
  padding: 2rem 0 3rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

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

@media (max-width: 480px) {
  .site-header {
    padding-top: 2rem;
  }

  .links-row {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}
