/* ---------- Fonts ---------- */
@font-face {
  font-family: "Marcellus SC";
  src: url("../fonts/marcellus-sc-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Tokens ---------- */
:root {
  --bg: #17110c;
  --bg-raised: #221a12;
  --ink: #fbf1e2;
  --ink-dim: #cdbca3;
  --amber: #f5a72e;
  --coral: #ff6b4a;
  --border: rgba(251, 241, 226, 0.14);

  --font-display: "Marcellus SC", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1120px;
  --radius: 18px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(23, 17, 12, 0.92) 0%, rgba(23, 17, 12, 0.75) 70%, transparent 100%);
  backdrop-filter: blur(6px);
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-family: var(--font-display);
  font-weight: 400;
}

.logo span {
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  letter-spacing: 0.04em;
}

.logo span:first-child {
  color: var(--ink);
}

.logo span:last-child {
  font-size: clamp(0.62rem, 1.4vw, 0.82rem);
  color: var(--amber);
  margin-top: 0.15em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.03em;
  font-size: 1.1rem;
}

.site-nav a {
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--amber);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--coral);
  transition: width 0.25s ease;
}

.site-nav a:hover::after {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: -5.5rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 17, 12, 0.15) 0%, rgba(23, 17, 12, 0.35) 55%, var(--bg) 96%),
    linear-gradient(90deg, rgba(23, 17, 12, 0.55) 0%, rgba(23, 17, 12, 0) 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem) 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

.hero-portrait {
  width: clamp(140px, 16vw, 190px);
  height: clamp(140px, 16vw, 190px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--amber);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
  padding: 0;
  background: none;
  appearance: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-portrait:hover,
.hero-portrait:focus-visible {
  transform: scale(1.04);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(10, 7, 4, 0.88);
  backdrop-filter: blur(4px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(90vw, 560px);
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: clamp(1.25rem, 4vw, 3rem);
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-raised);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.hero-content h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.02;
  margin: 0;
  background: linear-gradient(95deg, var(--ink) 30%, var(--amber) 75%, var(--coral) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--ink-dim);
  max-width: 34ch;
  margin: 0;
}

/* ---------- Projects ---------- */
.projects {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6.5rem) clamp(1.25rem, 4vw, 3rem) clamp(5rem, 10vw, 7rem);
}

.projects h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  margin: 0 0 2rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--amber);
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0;
}

.project-card p {
  color: var(--ink-dim);
  margin: 0;
  font-size: 0.95rem;
}

.project-card .project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.project-card .project-tags span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(245, 167, 46, 0.12);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}

.projects-empty {
  grid-column: 1 / -1;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--ink-dim);
}

.projects-empty strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  max-width: var(--container);
  margin: 0 auto;
  color: var(--ink-dim);
  font-size: 0.9rem;
}

.site-footer a {
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s ease;
}

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

@media (max-width: 560px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
