:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #7329ac;
  --accent-soft: #e8f3ff;
  --chip: #f0f0f2;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

body.dark {
  --bg: #0b0b0c;
  --surface: #141416;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: #2c2c2f;
  --accent: #8e38b6;
  --accent-soft: #112230;
  --chip: #1b1b1f;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Manrope, "SF Pro Text", "Avenir Next", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: -0.01em;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--line);
}

nav {
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  text-decoration: none;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 700;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

nav a:hover {
  color: var(--text);
}

#theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 12px;
  cursor: pointer;
}

.layout {
  max-width: 1220px;
  margin: 0 auto;
  padding: 30px 28px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1.6fr);
  gap: 22px;
}

.left-panel {
  position: sticky;
  top: 94px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.profile-photo {
  width: 100%;
  max-height: 330px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.greeting {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.72rem;
  font-weight: 700;
}

.left-panel h1 {
  margin: 12px 0 2px;
  font-size: clamp(2.1rem, 3.5vw, 3rem);
  line-height: 1.03;
}

.left-panel h2 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.hero-description {
  margin-top: 16px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 34ch;
}

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

.btn {
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  filter: brightness(1.05);
}

.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.socials {
  margin-top: 20px;
  display: flex;
  gap: 14px;
}

.socials a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.socials a:hover {
  color: var(--text);
}

.right-panel {
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

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

.project-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.project-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--muted);
  padding: 4px 8px;
}

.project-link {
  margin-top: auto;
  padding-top: 4px;
  text-decoration: none;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 700;
}

.project-link:hover {
  text-decoration: underline;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.skill-item {
  text-align: center;
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 12px;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.contact-title {
  margin: 0;
  font-size: 1.15rem;
}

.contact-desc {
  margin-top: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-btn {
  display: inline-block;
}

footer {
  max-width: 1220px;
  margin: 4px auto 28px;
  padding: 0 28px;
  color: var(--muted);
  font-size: 0.84rem;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .left-panel {
    position: static;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  nav {
    padding: 12px 16px;
  }

  nav ul {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  nav a {
    font-size: 0.82rem;
  }

  .layout {
    padding: 14px;
  }

  .panel,
  .left-panel {
    border-radius: 16px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}
