:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #181818;
  --muted: #686868;
  --line: #deded9;
  --accent: #2854ff;
  --accent-text: #ffffff;
  --card-1: #dce8ff;
  --card-2: #dff5e6;
  --card-3: #ffe7ca;
}

[data-theme="dark"] {
  --bg: #121212;
  --surface: #1b1b1b;
  --text: #f2f2f2;
  --muted: #acacac;
  --line: #353535;
  --accent: #87a0ff;
  --accent-text: #101010;
  --card-1: #1b315a;
  --card-2: #1c4931;
  --card-3: #583b1f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  transition: background 0.25s, color 0.25s;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: auto;
}

.header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav a:hover,
.footer a:hover {
  color: var(--accent);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface);
  font-size: 1.2rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr;
  align-items: center;
  gap: 70px;
  min-height: 600px;
  padding: 80px 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: bold;
  letter-spacing: 0.14em;
}

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(2.8rem, 6vw, 5.3rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.02;
}

.hero-text {
  max-width: 600px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 21px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: bold;
}

.button.primary {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent);
}

.button.secondary {
  background: var(--surface);
}

.hero-card {
  position: relative;
  padding: 35px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.hero-card::after {
  position: absolute;
  right: -55px;
  bottom: -55px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  opacity: 0.18;
}

.hero-card h2 {
  margin: 32px 0 14px;
  font-size: 2rem;
}

.hero-card p {
  color: var(--muted);
  line-height: 1.6;
}

.code-tag {
  color: var(--accent);
  font-family: monospace;
  font-size: 1rem;
}

.section {
  padding: 100px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 730px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.row-heading {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.row-heading > p {
  max-width: 285px;
  color: var(--muted);
  line-height: 1.6;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 42px;
}

.about-grid > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px;
}

.skills span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 42px;
}

.project-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 15px;
}

.project-one { background: var(--card-1); }
.project-two { background: var(--card-2); }
.project-three { background: var(--card-3); }

.project-number {
  font-size: 0.85rem;
  font-weight: bold;
}

.project-type {
  margin-bottom: 8px;
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.13em;
}

.project-card h3 {
  margin-bottom: 17px;
  font-size: 1.75rem;
}

.project-card a {
  font-weight: bold;
}

.contact {
  margin: 0 auto 50px;
  padding: 85px 30px;
  border-radius: 18px;
  text-align: center;
  background: var(--surface);
}

.contact h2 {
  margin-bottom: 15px;
}

.contact > p:not(.eyebrow) {
  color: var(--muted);
}

.contact .button {
  margin-top: 16px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 32px, 1120px);
  }

  .nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: auto;
    padding: 65px 0;
  }

  .hero-card {
    min-height: 250px;
  }

  .about-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .row-heading,
  .footer {
    display: block;
  }

  .row-heading > p {
    margin-top: 18px;
  }

  .project-card {
    min-height: 230px;
  }

  .footer p {
    margin-bottom: 15px;
  }
}