/* ==========================================================
   Lamcellari · Portfolio stylesheet
   Contents
     1. Variables
     2. Base
     3. Layout
     4. Header
     5. Buttons
     6. Panels and headings
     7. Lists (What I do, How it works)
     8. Project cards and grid
     9. Pricing table
    10. Contact links
    11. Footer
    12. Background canvas
    13. Responsive
   ========================================================== */


/* ---------- 1. Variables ---------- */
:root {
  /* colors */
  --bg: #0b0f14;
  --panel: #121820;
  --line: #1f2a36;
  --text: #e6edf3;
  --muted: #8b98a5;
  --faint: #5a6978;
  --accent: #00e5a0;
  --on-accent: #04120d;

  /* fonts */
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Consolas, "DejaVu Sans Mono", monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* shape */
  --radius: 12px;
  --radius-sm: 8px;
}


/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  line-height: 1.6;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(0, 229, 160, 0.14), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
}

/* dark overlay so the grid stays subtle behind text */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(rgba(11, 15, 20, 0.82), rgba(11, 15, 20, 0.92));
}


/* ---------- 3. Layout ---------- */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 60px;
}


/* ---------- 4. Header ---------- */
header {
  margin-top: 50px;
  padding: 90px 0 50px 24px;
  border-left: 4px solid var(--accent);
}

h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  line-height: 1.1;
}

h1 span {
  color: var(--accent);
}

.role {
  margin: 12px 0 6px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.25rem;
}

.tag {
  margin: 0 0 26px;
  font-size: 1.05rem;
}


/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 229, 160, 0.3);
}

.more {
  display: block;
  margin: 22px auto 0;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent);
  font-family: var(--mono);
  cursor: pointer;
}

.more:hover {
  background: var(--accent);
  color: var(--on-accent);
}


/* ---------- 6. Panels and headings ---------- */
section {
  margin-top: 22px;
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 24, 32, 0.92);
}

h2 {
  margin: 0 0 16px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.1rem;
}

h2::before {
  content: "// ";
  color: var(--accent);
}

.note {
  margin: 14px 0 0;
  font-size: 0.9rem;
}

.note b {
  color: var(--text);
}


/* ---------- 7. Lists (What I do, How it works) ---------- */
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

li:last-child {
  border-bottom: 0;
}

/* "What I do" labels */
li b {
  min-width: 78px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 600;
}

/* "How it works" numbered steps */
ol {
  counter-reset: step;
}

ol li {
  counter-increment: step;
}

ol li::before {
  content: "0" counter(step);
  min-width: 34px;
  color: var(--accent);
  font-family: var(--mono);
}


/* ---------- 8. Project cards and grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

/* thumbnail area */
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0e141b;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* placeholder tile used when a card has no image yet */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--accent);
  font-family: var(--mono);
  background: radial-gradient(circle at 70% 20%, rgba(0, 229, 160, 0.2), transparent 60%);
}

.play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: var(--accent);
  font-size: 0.8rem;
}

/* card text */
.body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 16px;
}

.body h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.body p {
  margin: 0;
  font-size: 0.92rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tags span {
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.view {
  margin-top: auto;
  padding-top: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* "Show more": cards with class "extra" stay hidden until the grid is open */
.extra {
  display: none;
}

.grid.open .extra {
  display: flex;
}


/* ---------- 9. Pricing table ---------- */
table {
  width: 100%;
  border-collapse: collapse;
}

td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

td:last-child {
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  text-align: right;
}


/* ---------- 10. Contact links ---------- */
.handle {
  color: var(--text);
  font-family: var(--mono);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.links a {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
  text-decoration: none;
}

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


/* ---------- 11. Footer ---------- */
footer {
  margin-top: 34px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.85rem;
  text-align: center;
}


/* ---------- 12. Background canvas ---------- */
.motion {
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
}

.motion:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}


/* ---------- 13. Responsive ---------- */

/* tablets and small laptops */
@media (max-width: 900px) {
  .wrap {
    padding: 0 24px 50px;
  }

  header {
    margin-top: 30px;
    padding: 70px 0 40px 22px;
  }
}

/* a lone card in a section stretches across the row (switches off when a second card is added) */
@media (min-width: 601px) {
  .grid .card:only-child {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .grid .card:only-child .thumb {
    width: 44%;
    aspect-ratio: auto;
    min-height: 190px;
  }
}

/* large phones and small tablets: one-column cards */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* phones */
@media (max-width: 520px) {
  .wrap {
    padding: 0 16px 40px;
  }

  header {
    margin-top: 16px;
    padding: 48px 0 32px 16px;
    border-left-width: 3px;
  }

  .role {
    font-size: 1.1rem;
  }

  .tag {
    font-size: 1rem;
  }

  /* full-width, thumb-friendly buttons */
  .btn {
    display: block;
    padding: 14px 22px;
    text-align: center;
  }

  .more {
    min-height: 44px;
  }

  section {
    padding: 20px 18px;
  }

  li {
    flex-direction: column;
    gap: 2px;
  }

  /* contact buttons share the row and are easy to tap */
  .links a {
    flex: 1 1 calc(50% - 10px);
    min-height: 44px;
    padding: 12px 14px;
    text-align: center;
  }

  td {
    padding: 12px 0;
  }
}

/* very small phones */
@media (max-width: 360px) {
  .links a {
    flex-basis: 100%;
  }
}

/* respect "reduce motion" for hover animations too */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .card {
    transition: none;
  }
}
