/* Values measured from the live Wix site at 1280x509:
   headings roboto-bold 60px/84px #333, nav lato 18px, white page. */
:root {
  --ink: #333333;
  --muted: #6b6b6b;
  --accent: #1f6dff;
  --bg: #ffffff;
  --line: #ececec;
  --max: 1100px;
  --font-head: "Roboto", system-ui, sans-serif;
  --font-body: "Lato", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: inherit; }

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

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2rem;
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

.brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 2.4rem;
}

.site-nav a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s ease;
}

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

.nav-toggle, .nav-toggle-label { display: none; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 2rem; }
.section { padding: 3rem 0; }

main { min-height: 60vh; }

/* ---------- Home / hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

/* "idea?" and "reality." sit side by side as two equal blocks, centred,
   60px/84px on the original at a 1280 viewport. */
.hero-words {
  display: flex;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.7vw, 3.75rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 3.2rem 0 1.5rem;
}
.hero-words span {
  flex: 0 0 24.15%;   /* 309 / 1280 */
  text-align: left;
}

.hero-media {
  display: block;
  margin-bottom: 3rem;
}
.hero-media > img {
  width: 76.6%;        /* 980 / 1280 */
  max-width: 980px;
  height: auto;
  margin: 0 auto;
}
.hero-intro { max-width: var(--max); margin: 2.5rem auto 0; }

.hero-intro h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 0.4rem;
}

.hero-intro p { font-size: 1.2rem; color: var(--muted); margin: 0 0 2rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  transition: all 0.15s ease;
}

.btn:hover { background: var(--ink); color: #fff; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #1559d6; border-color: #1559d6; }

/* ---------- Page titles ---------- */
.page-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 1.5rem 0 2.5rem;
}

/* ---------- Projects grid ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.project-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3f3f3;
  border-radius: 6px;
}

.project-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .thumb img { transform: scale(1.04); }

.project-card h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0.8rem 0 0.2rem;
}

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

/* ---------- Project detail ---------- */
.back-link {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  margin: 1rem 0 1.5rem;
}
.back-link:hover { color: var(--accent); }

.project-detail h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.4rem;
}

.project-detail .lead { font-size: 1.25rem; color: var(--muted); margin: 0 0 2rem; }
.project-detail .body p { margin: 0 0 1.1rem; }
.project-detail .body ul { margin: 0 0 1.1rem 1.2rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 2rem;
}
.gallery img { width: 100%; border-radius: 6px; }

.section-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
}

/* ---------- Resume ---------- */
.resume-embed {
  position: relative;
  width: 100%;
  padding-top: 75%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 30px rgba(0,0,0,0.08);
}
.resume-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info address {
  font-style: normal;
  margin-bottom: 1.6rem;
  color: var(--muted);
}
.contact-info .addr-label {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 0.2rem;
}

.contact-info a { color: var(--accent); }

.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-links a {
  font-family: var(--font-head);
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}

form .row { display: flex; gap: 1rem; }
form .field { margin-bottom: 1rem; flex: 1; }
form label {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
form input, form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
}
form textarea { min-height: 140px; resize: vertical; }
form button {
  font-family: var(--font-head);
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  cursor: pointer;
}
form button:hover { background: #1559d6; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-media { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; }
  .nav-toggle-label {
    display: block;
    cursor: pointer;
    width: 28px; height: 22px;
    position: relative;
  }
  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 3px; background: var(--ink); border-radius: 2px;
  }
  .nav-toggle-label span { top: 50%; transform: translateY(-50%); }
  .nav-toggle-label span::before { top: -8px; }
  .nav-toggle-label span::after { top: 8px; }

  .site-nav {
    flex-basis: 100%;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
    display: none;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }

  .project-grid { grid-template-columns: 1fr; }
  .hero-words { gap: 1.5rem; }
  .gallery { grid-template-columns: 1fr; }
}
