@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --text: #172033;
  --muted: #607086;
  --line: #dce4ee;
  --accent: #2f7d7b;
  --accent-strong: #245d5b;
  --accent-soft: #dff1ef;
  --nav: rgba(255, 255, 255, .9);
  --shadow: 0 18px 50px rgba(26, 38, 58, .10);
  --radius: 8px;
  --header-height: 76px;
}

body.dark-theme {
  --bg: #101722;
  --surface: #172231;
  --surface-soft: #202d3d;
  --text: #f5f8fb;
  --muted: #adbac8;
  --line: #304155;
  --accent: #80d5cc;
  --accent-strong: #a8e6df;
  --accent-soft: #1d3b3c;
  --nav: rgba(16, 23, 34, .9);
  --shadow: 0 18px 50px rgba(0, 0, 0, .24);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  transition: background .25s ease, color .25s ease;
}

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

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.section {
  padding: 96px 0;
}

.section--light {
  background: var(--surface);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 36px;
}

.section-heading h2,
.about h2,
.contact h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
  margin-bottom: 16px;
}

.section-heading p:not(.eyebrow),
.about__copy,
.contact__intro p {
  color: var(--muted);
  font-size: 1.03rem;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.button {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.button--secondary {
  background: transparent;
  color: var(--accent-strong);
}

.button--secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.site-header {
  background: var(--nav);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.nav {
  align-items: center;
  display: flex;
  gap: 18px;
  min-height: var(--header-height);
}

.nav__logo {
  font-size: 1.05rem;
  font-weight: 800;
  margin-right: auto;
}

.nav__menu {
  align-items: center;
  display: flex;
  gap: 6px;
}

.nav__link {
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .94rem;
  font-weight: 700;
  padding: 9px 12px;
  transition: background .2s ease, color .2s ease;
}

.nav__link:hover,
.nav__link.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav__toggle,
.theme-toggle {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.nav__toggle {
  display: none;
}

.theme-toggle i,
.nav__toggle i {
  font-size: 1.25rem;
}

.hero {
  min-height: 100vh;
  padding: 134px 0 72px;
}

.hero__container {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .78fr);
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.75rem);
  letter-spacing: 0;
  line-height: .95;
  margin-bottom: 22px;
}

.hero__lead {
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.38rem);
  max-width: 720px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0;
}

.hero__meta {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
}

.hero__meta div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.hero__meta strong,
.hero__meta span {
  display: block;
}

.hero__meta strong {
  font-size: 1rem;
  line-height: 1.25;
}

.hero__meta span {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 5px;
}

.code-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0;
  overflow: hidden;
}

.code-card__header {
  align-items: center;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  padding: 16px 18px;
}

.code-card__header span {
  background: var(--accent);
  border-radius: 50%;
  height: 10px;
  opacity: .65;
  width: 10px;
}

.code-card__header span:nth-child(2) {
  opacity: .42;
}

.code-card__header span:nth-child(3) {
  opacity: .28;
}

.code-card__body {
  display: grid;
  gap: 16px;
  min-height: 330px;
  padding: 34px 28px;
  position: relative;
}

.code-card__body::before {
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(47, 125, 123, .14) 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 0 48%, rgba(47, 125, 123, .14) 48% 52%, transparent 52%);
  background-size: 54px 54px;
  content: "";
  inset: 0;
  opacity: .4;
  position: absolute;
}

.code-line {
  animation: codePulse 2.8s ease-in-out infinite;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 999px;
  height: 14px;
  opacity: .9;
  position: relative;
  z-index: 1;
}

.code-line--long {
  width: 88%;
}

.code-line--medium {
  animation-delay: .25s;
  margin-left: 24px;
  width: 68%;
}

.code-line--short {
  animation-delay: .5s;
  margin-left: 48px;
  width: 48%;
}

.code-card__terminal {
  align-self: end;
  background: var(--text);
  border-radius: var(--radius);
  color: var(--bg);
  display: flex;
  gap: 8px;
  min-height: 86px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.terminal-prompt {
  color: var(--accent);
  font-weight: 800;
}

.terminal-text {
  font-weight: 700;
}

.terminal-cursor {
  animation: blink 1s steps(2, start) infinite;
  background: var(--accent);
  display: inline-block;
  height: 24px;
  width: 9px;
}

.code-card__footer {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
}

.code-card__footer span {
  align-items: center;
  background: var(--surface-soft);
  color: var(--accent-strong);
  display: flex;
  font-size: .88rem;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 58px;
  padding: 12px;
  text-align: center;
}

.code-card__footer i {
  font-size: 1.2rem;
}

@keyframes codePulse {
  0%,
  100% {
    transform: translateX(0);
    opacity: .62;
  }

  50% {
    transform: translateX(18px);
    opacity: 1;
  }
}

@keyframes blink {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.contact-links a {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--accent-strong);
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  min-height: 42px;
  padding: 8px 11px;
  transition: background .2s ease, border-color .2s ease;
}

.contact-links a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.contact-links i {
  font-size: 1.25rem;
}

.about {
  align-items: start;
  display: grid;
  gap: 54px;
  grid-template-columns: .9fr 1.1fr;
}

.about__copy {
  display: grid;
  gap: 18px;
}

.experience-grid {
  display: grid;
  gap: 18px;
}

.experience-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 28px;
  grid-template-columns: 180px 1fr;
  padding: 28px;
}

.experience-card__date {
  color: var(--accent-strong);
  font-weight: 800;
}

.experience-card h3,
.skill-card h3,
.project-card h3 {
  font-size: 1.22rem;
  line-height: 1.25;
}

.experience-card__location {
  color: var(--muted);
  margin: 4px 0 18px;
}

.check-list {
  color: var(--muted);
  display: grid;
  gap: 10px;
  list-style: none;
}

.check-list li {
  padding-left: 28px;
  position: relative;
}

.check-list li::before {
  color: var(--accent);
  content: "\2713";
  font-weight: 800;
  left: 0;
  position: absolute;
}

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

.skill-card,
.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.skill-card {
  padding: 24px;
}

.skill-card i {
  align-items: center;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 1.45rem;
  height: 44px;
  justify-content: center;
  margin-bottom: 20px;
  width: 44px;
}

.skill-card p,
.project-card p {
  color: var(--muted);
  margin-top: 10px;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card__image {
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
  object-fit: cover;
  width: 100%;
}

.project-card__body {
  padding: 22px;
}

.project-card a {
  align-items: center;
  color: var(--accent-strong);
  display: inline-flex;
  font-weight: 800;
  gap: 4px;
  margin-top: 18px;
}

.section--contact {
  background: var(--surface-soft);
}

.contact {
  align-items: start;
  display: grid;
  gap: 52px;
  grid-template-columns: .9fr 1.1fr;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  padding: 28px;
}

.contact-form label {
  color: var(--text);
  display: grid;
  font-weight: 800;
  gap: 8px;
}

.contact-form input,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  padding: 13px 14px;
  resize: vertical;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-status {
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
  min-height: 24px;
}

.form-status.is-success {
  color: var(--accent-strong);
}

.form-status.is-error {
  color: #b42318;
}

.footer {
  background: var(--text);
  color: var(--bg);
  padding: 26px 0;
}

.footer__container {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.footer a {
  color: #ffffff;
  font-weight: 800;
}

@media (max-width: 960px) {
  .hero__container,
  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 120px;
  }

  .hero__profile {
    max-width: 480px;
  }
}

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

  .section {
    padding: 72px 0;
  }

  .nav {
    min-height: 66px;
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__menu {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    left: 14px;
    padding: 10px;
    position: absolute;
    right: 14px;
    top: 72px;
  }

  .nav__menu.is-open {
    display: flex;
  }

  .nav__link {
    width: 100%;
  }

  .hero__meta,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .experience-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .code-card__body {
    min-height: 280px;
  }

  .footer__container {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .hero__actions,
  .contact-links {
    flex-direction: column;
  }

  .button,
  .contact-links a {
    width: 100%;
  }

  .contact-form {
    padding: 20px;
  }
}
