:root {
  --bg: #f4efe6;
  --ink: #111014;
  --muted: #5a5560;
  --accent: #d95d39;
  --accent-2: #0f766e;
  --card: #fffaf0;
  --line: #1d1b23;
  --shadow: 0 18px 40px rgba(17, 16, 20, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(217, 93, 57, 0.24) 0, transparent 28%),
    radial-gradient(circle at 80% 35%, rgba(15, 118, 110, 0.2) 0, transparent 30%),
    linear-gradient(160deg, #f4efe6 0%, #efe6db 45%, #f8f3ec 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23111014' fill-opacity='0.07'%3E%3Ccircle cx='6' cy='7' r='1'/%3E%3Ccircle cx='30' cy='20' r='1'/%3E%3Ccircle cx='60' cy='46' r='1'/%3E%3Ccircle cx='96' cy='72' r='1'/%3E%3Ccircle cx='82' cy='20' r='1'/%3E%3C/g%3E%3C/svg%3E");
  z-index: -1;
}

.topbar {
  width: min(1120px, 92vw);
  margin: 24px auto;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(17, 16, 20, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  background: rgba(255, 250, 240, 0.62);
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.menu {
  display: flex;
  gap: 24px;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  position: relative;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.menu a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(17, 16, 20, 0.2);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.75);
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-family: "Sora", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--ink);
  color: #fff;
}

main {
  width: min(1120px, 92vw);
  margin: 24px auto 48px;
}

.hero {
  padding: 56px 0 32px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

h1,
h2 {
  margin: 0;
  line-height: 1.14;
}

h1 {
  max-width: 13ch;
  font-size: clamp(2rem, 4.8vw, 4.4rem);
}

h2 {
  font-size: clamp(1.55rem, 3.8vw, 2.8rem);
}

.lead {
  font-family: "Newsreader", serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.6;
  max-width: 58ch;
  color: var(--muted);
  margin: 24px 0 0;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 12px 22px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #c24828);
  box-shadow: 0 10px 24px rgba(217, 93, 57, 0.28);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.6);
}

.projects {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  border: 1px solid rgba(17, 16, 20, 0.14);
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transform: rotate(calc(var(--r) * 1deg));
}

.card:nth-child(1) {
  --r: -0.8;
}

.card:nth-child(2) {
  --r: 0.5;
}

.card:nth-child(3) {
  --r: -0.2;
}

.card h2 {
  margin-top: 8px;
  font-size: 1.4rem;
  line-height: 1.2;
}

.card p {
  font-family: "Newsreader", serif;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.5;
}

.tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent);
}

.figma-section {
  margin-top: 64px;
  background: linear-gradient(155deg, #fffaf0, #fff5ec);
  border: 1px solid rgba(17, 16, 20, 0.13);
  border-radius: clamp(18px, 4vw, 28px);
  padding: clamp(18px, 3.8vw, 34px);
  box-shadow: var(--shadow);
}

.figma-header p {
  margin-top: 12px;
  max-width: 56ch;
  color: var(--muted);
  font-family: "Newsreader", serif;
  font-size: 1.08rem;
}

.figma-frame-wrap {
  margin-top: 20px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(17, 16, 20, 0.14);
  background: #fff;
  min-height: 520px;
}

#figma-embed {
  width: 100%;
  height: 70vh;
  min-height: 520px;
  border: 0;
}

.figma-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact {
  margin-top: 68px;
  padding-bottom: 26px;
}

.contact h2 {
  max-width: 14ch;
  margin-bottom: 20px;
}

.footer {
  width: min(1120px, 92vw);
  margin: 8px auto 28px;
  border-top: 1px solid rgba(17, 16, 20, 0.18);
  padding-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .projects {
    grid-template-columns: 1fr;
  }

  .card {
    transform: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    gap: 10px;
    border-radius: 22px;
  }

  .topbar-controls {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .menu {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding-top: 28px;
  }

  #figma-embed {
    height: 60vh;
    min-height: 400px;
  }
}
