:root {
  --bg: #f7f6f3;
  --bg-alt: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --accent: #ff5a3c;
  --accent-ink: #ffffff;
  --border: #e4e1da;
  --shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.25);
  --radius: 18px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14141a;
    --bg-alt: #1c1c24;
    --text: #f2f0eb;
    --text-muted: #a9a7b0;
    --border: #2c2c36;
    --shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Nav */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
  position: relative;
  z-index: 2;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
}

.nav__links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

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

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-bottom: clamp(3rem, 8vw, 6rem);
  display: grid;
  grid-template-rows: auto 1fr;
}

.hero__content {
  padding: clamp(1rem, 6vw, 3rem) clamp(1.5rem, 5vw, 4rem) 0;
  max-width: 640px;
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  margin: 0 0 0.75rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.02;
  margin: 0 0 1rem;
}

.hero__subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 0 2rem;
}

.hero__portrait {
  width: min(340px, 60vw);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--bg-alt);
  box-shadow: var(--shadow);
  margin: 2rem auto 0;
}

@media (min-width: 860px) {
  .hero {
    grid-template-rows: auto auto;
  }
  .hero__portrait {
    position: absolute;
    top: 6rem;
    right: clamp(2rem, 6vw, 6rem);
    width: min(320px, 26vw);
    margin: 0;
  }
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Sections */

.section {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 2rem;
}

.section__lead {
  color: var(--text-muted);
  margin-top: -1.25rem;
  margin-bottom: 2rem;
}

/* Project grid */

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

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card__image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--border);
}

.card__body {
  padding: 1.25rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.card__description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}

.card__links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.card__link:hover {
  text-decoration: underline;
}

/* Contact */

.section--contact {
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.3rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

.contact-card__icon {
  display: inline-flex;
  color: var(--accent);
}

/* Footer */

.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
