:root {
  --bg: #090909;
  --surface: #101010;
  --text: #f1f0ed;
  --muted: #999995;
  --line: #252525;
  --accent: #b7f36b;
  --max: 1120px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: #101010;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 9, 9, 0.86);
  backdrop-filter: blur(16px);
}

.navbar {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: Manrope, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brand span,
.hero h1 span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  color: #c7c7c2;
  font-size: 0.88rem;
}

.nav-links a {
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  padding: 8px;
  border: 0;
  background: none;
}

.menu-toggle > span:not(.sr-only) {
  display: block;
  width: 22px;
  height: 1px;
  margin: 5px;
  background: var(--text);
}

.hero {
  min-height: calc(92vh - 66px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 90px 55px;
}

.eyebrow,
.section-number,
.project-index {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(183, 243, 107, 0.09);
}

.hero h1 {
  max-width: 1050px;
  margin: 28px 0;
  font:
    500 clamp(2.75rem, 7vw, 6.7rem) / 0.98 Manrope,
    sans-serif;
  letter-spacing: -0.065em;
}

.hero-copy {
  max-width: 625px;
  margin: 0;
  color: #aaa9a4;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 11px 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s,
    border-color 0.2s,
    background 0.2s;
}

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

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #111;
}

.button-ghost {
  background: #101010;
}

.button-ghost:hover {
  border-color: #555;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: auto;
  padding-top: 70px;
  color: #6f6f6b;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-heading {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: end;
  gap: 40px;
  padding-top: 22px;
  margin-bottom: 44px;
  border-top: 1px solid var(--line);
}

.section-heading h2,
.about h2 {
  margin: 8px 0 0;
  font:
    500 clamp(2.1rem, 4vw, 3.7rem) / 1.08 Manrope,
    sans-serif;
  letter-spacing: -0.05em;
}

.section-heading > p {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.projects {
  padding-block: 80px 120px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-carousel-controls {
  display: none;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    border-color 0.25s,
    transform 0.25s;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: #3d3d3d;
}

/*
.project-preview iframe {
  display: none;
}
*/

.project-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #181818;
}


.project-browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #202020;
}

.project-browser-bar > span {
  flex: 0 0 8px;
  height: 8px;
  border-radius: 50%;
  background: #616161;
}

.project-browser-bar > span:first-child { background: #da6868; }
.project-browser-bar > span:nth-child(2) { background: #d9af55; }
.project-browser-bar > span:nth-child(3) { background: #62a96c; }

.project-browser-bar div {
  min-width: 0;
  margin-left: 5px;
  padding: 4px 9px;
  overflow: hidden;
  border-radius: 5px;
  background: #111;
  color: #777;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-preview iframe,
.project-preview img {
  display: block;
  width: 100%;
  height: calc(100% - 40px);
  border: 0;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
}

.project-preview > a {
  position: absolute;
  inset: 0;
}

.project-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 23px;
}

.project-info > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.project-info h3 {
  margin: 0;
  font:
    500 1.45rem Manrope,
    sans-serif;
  letter-spacing: -0.035em;
}

.project-info p:not(.project-index) {
  min-height: 45px;
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tags span {
  padding: 3px 9px;
  border: 1px solid #303030;
  border-radius: 30px;
  color: #a5a5a0;
  font-size: 0.66rem;
}

.project-link {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: #b8b8b3;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.project-link b {
  color: var(--accent);
  font-size: 1rem;
}

.about {
  padding-block: 95px;
  border-top: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
  gap: 80px;
}

.about-grid > div {
  padding-top: 18px;
  color: #cfcec9;
  font-size: 1.05rem;
}

.about-grid p {
  margin: 0 0 22px;
}

.about-grid .muted {
  color: var(--muted);
}

.contact {
  padding-block: 100px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 50px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #aaa;
  font-size: 0.75rem;
}

.contact-form input:not(.sr-only),
.contact-form textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #676767;
}

.contact-form .button {
  align-self: flex-start;
}

.form-note {
  margin: 0;
  color: #666;
  font-size: 0.72rem;
}

.contact-aside {
  border-top: 1px solid var(--line);
}

.contact-method {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 20px;
  padding: 20px 2px;
  border-bottom: 1px solid var(--line);
  transition: padding 0.2s;
}

.contact-method:hover {
  padding-left: 8px;
}

.contact-method span {
  grid-column: 1;
  color: #777;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-method strong {
  font-size: 0.88rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.contact-method b {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: var(--accent);
}

footer {
  border-top: 1px solid var(--line);
  color: #777;
  font-size: 0.75rem;
}

footer .container {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px 14px 18px;
    border-bottom: 1px solid var(--line);
    background: #0c0c0c;
  }

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

  .nav-links a {
    padding: 12px;
  }

  .hero {
    min-height: calc(90vh - 66px);
    padding-block: 70px 35px;
  }

  .hero h1 {
    font-size: clamp(2.65rem, 14vw, 4.5rem);
  }

  .hero-meta {
    gap: 13px 18px;
  }

  .section-heading,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project-grid {
    display: flex;
    width: calc(100% + 14px);
    gap: 12px;
    padding-right: 38px;
    padding-bottom: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .project-grid::-webkit-scrollbar { display: none; }

  .project-card {
    flex: 0 0 calc(100% - 38px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .project-card:hover { transform: none; }

  .project-carousel-controls {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
  }

  .carousel-arrow:disabled { opacity: 0.3; cursor: default; }

  .carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .carousel-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #4b4b48;
    cursor: pointer;
    transition: width 0.2s, background 0.2s;
  }

  .carousel-dot[aria-current="true"] {
    width: 18px;
    border-radius: 10px;
    background: var(--accent);
  }

  .projects {
    padding-block: 65px 90px;
  }


  .about {
    padding-block: 72px;
  }

  .about-grid > div {
    padding-top: 0;
  }

  .contact {
    padding-block: 80px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .contact-method strong {
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
