:root {
  --cream: #f7f1e6;
  --cream-dark: #eee4d3;
  --ink: #211c17;
  --muted: #71685e;
  --line: #d8cdbc;
  --accent: #bc5a22;
  --tag-bg: #f3eadc;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.container {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 241, 230, 0.94);
  backdrop-filter: blur(10px);
}

.nav {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.logo span,
h1 span,
.intro-label,
.section-number {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
}

.nav-links a:hover,
.hero-links a:hover,
.project-link:hover {
  color: var(--accent);
}

.menu-button {
  display: none;
  width: 40px;
  height: 38px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 1px;
  margin: 6px auto;
  background: var(--ink);
}

.hero {
  min-height: 390px;
  padding: 4.5rem 0 3.5rem;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  align-items: center;
  gap: 4rem;
}

.intro-label {
  margin: 0 0 0.3rem;
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
}

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(3.2rem, 7vw, 5.6rem);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.hero-title {
  max-width: 510px;
  margin-bottom: 1rem;
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
  line-height: 1.2;
}

.hero-description {
  max-width: 530px;
  color: var(--muted);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.4rem;
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
}

.dot-grid {
  width: 100%;
  min-height: 240px;
  opacity: 0.65;
  background-image: radial-gradient(var(--line) 1.4px, transparent 1.5px);
  background-size: 28px 28px;
}

.section,
.bottom-section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  margin-bottom: 1.6rem;
}

.section-number {
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: 0.95rem;
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
}

.projects-list {
  border-top: 1px solid var(--line);
}

.project-row {
  display: grid;
  grid-template-columns: 38px minmax(280px, 1.8fr) minmax(190px, 0.9fr) 105px;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.project-number {
  margin: 0;
  color: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
}

.project-content h3 {
  margin-bottom: 0.15rem;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.project-content p {
  margin-bottom: 0;
  font-size: 0.83rem;
}

.project-content .project-subtitle {
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
}

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

.tags span {
  padding: 0.22rem 0.45rem;
  border: 1px solid var(--line);
  background: var(--tag-bg);
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  white-space: nowrap;
}

.project-link {
  align-self: center;
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
}

.bottom-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.about-block,
.contact-block {
  min-width: 0;
}

.about-block > p,
.contact-block > p {
  max-width: 470px;
  margin-bottom: 1.3rem;
  font-size: 0.9rem;
}

.skills-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.skills-mini h3 {
  margin-bottom: 0.25rem;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 0.78rem;
}

.skills-mini p {
  margin: 0;
  font-size: 0.78rem;
}

.contact-block {
  padding-left: 3rem;
  border-left: 1px solid var(--line);
}

.email-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 360px;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.18);
}

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

.email-icon {
  font-size: 1.4rem;
}

.email-card strong,
.email-card small {
  display: block;
}

.email-card strong {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
}

.email-card small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  padding: 1.1rem 0 2rem;
  border-top: 1px solid var(--line);
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
}

.footer p {
  margin: 0;
}

.footer p:nth-child(2) {
  text-align: center;
}

.footer a {
  font-size: 1rem;
}

@media (max-width: 780px) {
  .container {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 62px;
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.6rem;
    border: 1px solid var(--line);
    background: var(--cream);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.7rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3.5rem 0;
  }

  .dot-grid {
    min-height: 120px;
  }

  .project-row {
    grid-template-columns: 30px 1fr;
    gap: 0.7rem;
  }

  .tags,
  .project-link {
    grid-column: 2;
  }

  .project-link {
    justify-self: start;
    margin-top: 0.3rem;
  }

  .bottom-section {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-block {
    padding-top: 3rem;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .footer {
    grid-template-columns: 1fr auto;
  }

  .footer p:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .skills-mini {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero-links {
    gap: 0.8rem;
  }
}
