@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #f3f7fc;
  --panel: #ffffff;
  --text: #101828;
  --muted: #526074;
  --line: #dfe7f2;
  --accent: #1e5eff;
  --accent-soft: #eaf1ff;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, rgba(30, 94, 255, 0.14), transparent 30%),
    linear-gradient(180deg, #f7f9fd 0%, #eef4fb 100%);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.08em;
  transition: transform 0.25s ease;
  padding: 8px 16px;
  background: var(--accent-soft);
  border-radius: 50px;
  border: 2px solid var(--accent);
}

.logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(30, 94, 255, 0.15);
}

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}

.logo-text {
  font-size: 0.9rem;
  line-height: 1.2;
  color: var(--accent);
  font-weight: 700;
}

.logo span,
.eyebrow,
.section-label,
.project-type,
.portrait-label {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links a,
.footer a,
.text-link {
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.footer a:hover,
.text-link:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  transition: color 0.25s ease;
}

.social-item small {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 2px;
}

.social-item:hover {
  color: var(--accent);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 1rem;
  transition: all 0.25s ease;
}

.social-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--accent);
  color: var(--accent);
  font: inherit;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(30, 94, 255, 0.15);
}

.menu-toggle:active {
  transform: scale(0.98);
}

.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  align-items: center;
  gap: 90px;
  padding: 88px 0;
}

.eyebrow,
.section-label,
.project-type,
.portrait-label {
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.11em;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(30, 94, 255, 0.12);
  animation: pulse 2s infinite;
}

.hero-copy {
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.1s;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3.6rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.085em;
  margin: 25px 0 30px;
  transform: translateZ(0);
}

h1 em,
h2 em {
  font-family: Georgia, serif;
  font-weight: 400;
  color: var(--accent);
}

.intro {
  max-width: 430px;
  color: var(--muted);
  font-size: 1rem;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  font: 500 0.74rem 'DM Mono', monospace;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.button span {
  font-size: 1rem;
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 18px 30px rgba(30, 94, 255, 0.18);
}

.button-primary:hover {
  background: #174ee0;
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 22px 34px rgba(30, 94, 255, 0.24);
}

.button-secondary {
  background: var(--panel);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-3px);
}

.portrait-wrap {
  position: relative;
  justify-self: end;
  width: min(100%, 430px);
  perspective: 1200px;
  animation: floatCard 5s ease-in-out infinite;
}

.portrait-frame {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  aspect-ratio: 1 / 1.08;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 26px 60px rgba(16, 24, 40, 0.08);
}

.portrait-frame:hover {
  box-shadow: 0 30px 70px rgba(16, 24, 40, 0.12);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78);
  border-radius: 12px;
}

.portrait-label {
  position: absolute;
  bottom: -30px;
  left: 6px;
  color: var(--muted);
}

.section {
  padding: 115px 0;
  border-top: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 70px;
}

.section h2 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.07em;
  margin-bottom: 32px;
}

.body-copy {
  max-width: 590px;
  color: var(--muted);
  font-size: 1.05rem;
}

.text-link,
.card-link {
  display: inline-flex;
  gap: 14px;
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.section-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 48px;
}

.skills-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--muted);
  font-size: 0.82rem;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.skills-list span:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.stats-section {
  padding: 100px 0;
  background: linear-gradient(135deg, rgba(30, 94, 255, 0.06) 0%, rgba(30, 94, 255, 0.03) 100%);
  border-radius: 24px;
  margin: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.stat-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: all 0.3s ease;
  animation: slideUp 0.6s ease-out forwards;
  opacity: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(30, 94, 255, 0.12);
  transform: translateY(-8px);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  perspective: 1000px;
}

.project-card {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  position: relative;
  min-height: 340px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.34, 0.1, 0.64, 1);
  animation: slideUp 0.6s ease-out backwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }

.card-background {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(30, 94, 255, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.project-card:hover .card-background {
  opacity: 1;
}

.card-content {
  position: relative;
  z-index: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(30, 94, 255, 0.15);
  transform: translateY(-12px);
}

.project-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.project-number {
  font: 1rem 'DM Mono', monospace;
}

.project-card h3 {
  font-size: 1.7rem;
  letter-spacing: -0.05em;
  margin: 60px 0 10px;
}

.project-card p {
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 245px;
}

.card-link {
  margin-top: auto;
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  padding: 120px 0;
}

.contact-section h2 {
  margin-top: 28px;
  animation: slideUp 0.6s ease-out 0.1s backwards;
  opacity: 0;
}

.contact-section > div {
  animation: slideUp 0.6s ease-out 0.15s backwards;
  opacity: 0;
}

.contact-form {
  max-width: 600px;
  animation: slideUp 0.6s ease-out 0.2s backwards;
  opacity: 0;
}

form {
  display: grid;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: slideUpForm 0.5s ease-out forwards;
  transition: transform 0.3s ease;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

.form-label {
  font: 0.7rem 'DM Mono', monospace;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.11em;
}

.form-input {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 94, 255, 0.1);
  transform: translateY(-2px);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

form .button {
  justify-self: start;
  animation: fadeUp 0.6s ease-out 0.4s forwards;
  opacity: 0;
}

.form-message {
  font-size: 0.8rem;
  color: var(--accent);
  min-height: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-top: 8px;
}

.footer {
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 0.68rem 'DM Mono', monospace;
}

.footer div {
  display: flex;
  gap: 22px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUpForm {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

@keyframes floatCard {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.success-popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.success-popup-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.success-popup {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: scaleIn 0.35s ease-out;
}

.popup-icon {
  font-size: 60px;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.success-popup h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.05em;
}

.success-popup p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 28px;
}

.popup-close-btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.popup-close-btn:hover {
  background: #174ee0;
  transform: translateY(-2px);
}

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

  .nav {
    height: 66px;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 72px 0 100px;
  }

  .portrait-wrap {
    justify-self: start;
    width: 85%;
    max-width: 360px;
  }

  .hero-copy {
    order: 1;
  }

  .portrait-wrap {
    order: 2;
  }

  h1 {
    font-size: clamp(3.5rem, 15vw, 5.5rem);
  }

  .section {
    padding: 80px 0;
  }

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

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .section-heading {
    display: block;
  }

  .section-note {
    margin-top: 14px;
  }

  .footer {
    align-items: flex-start;
    gap: 20px;
    flex-direction: column;
  }

  .success-popup {
    margin: 16px;
    padding: 32px 24px;
  }

  .success-popup h2 {
    font-size: 20px;
  }

  .success-popup p {
    font-size: 14px;
  }

  .popup-icon {
    font-size: 48px;
  }
}

