To solve this optimization problem, we first need to define the decision variables and the objective function. Let's denote:

- \(F\) as the number of furniture pieces to buy and sell.
- \(C\) as the number of carpets to buy and sell.

The objective is to maximize profit. The profit per furniture sold is $40, and the profit per carpet sold is $30. So, the total profit can be represented as \(40F + 30C\).

Given constraints are:
1. Space constraint: Each furniture takes 12 square feet of space, and each carpet takes 7 square feet of space. The company has 1200 square feet available. This can be represented as \(12F + 7C \leq 1200\).
2. Budget constraint: Buying a furniture costs $300, and buying a carpet costs $80. The company has a budget of $30,000. This translates to \(300F + 80C \leq 30000\).
3. Furniture proportion constraint: At least 20% of items in stock must be furniture. If \(T = F + C\) represents the total number of items, then this constraint can be written as \(F/T \geq 0.2\) or \(F \geq 0.2(F + C)\), which simplifies to \(F \geq 0.2F + 0.2C\), and further simplifies to \(0.8F \geq 0.2C\), or \(4F \geq C\).

To ensure that we are dealing with whole numbers of furniture and carpets (since you cannot buy a fraction of an item), both \(F\) and \(C\) should be integers.

Here's how the problem can be translated into Gurobi code in Python:

```python
from gurobipy import *

# Create a model
m = Model("Amazing Decor Optimization")

# Define variables
F = m.addVar(vtype=GRB.INTEGER, name="Furniture")
C = m.addVar(vtype=GRB.INTEGER, name="Carpet")

# Set the objective function: Maximize profit
m.setObjective(40*F + 30*C, GRB.MAXIMIZE)

# Add constraints
# Space constraint
m.addConstr(12*F + 7*C <= 1200, "SpaceConstraint")
# Budget constraint
m.addConstr(300*F + 80*C <= 30000, "BudgetConstraint")
# Furniture proportion constraint
m.addConstr(F >= 0.2*(F + C), "FurnitureProportionConstraint")

# Non-negativity constraints (implicitly handled by GRB.INTEGER with lower bound of 0)

# Solve the model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print(f"Optimal solution: Buy and sell {F.x} furniture and {C.x} carpets.")
    print(f"Maximum profit: ${40*F.x + 30*C.x}")
else:
    print("No optimal solution found. The problem might be infeasible.")
```