:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --text: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --purple-soft: #ede9fe;
  --purple: #7c3aed;
  --green-soft: #dcfce7;
  --green: #16a34a;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}
.section-tight {
  padding: 3.5rem 0;
}
.section-muted {
  background: var(--surface);
}
.section-heading {
  margin-bottom: 2.5rem;
}
.section-heading.centered {
  text-align: center;
}
.section-heading h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}
.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.125rem;
}
.subheading {
  margin: 0 0 1.25rem;
  font-size: 1.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}
.nav {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-link {
  color: #374151;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 0.75rem;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px auto;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.hero {
  padding: 5.5rem 0 4rem;
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
}
.hero-grid,
.about-grid,
.contact-grid,
.split-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.hero-grid,
.about-grid,
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  line-height: 1.05;
}
.hero h1 span {
  color: var(--primary);
}
.hero-role {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  color: #374151;
  margin: 0 0 1rem;
}
.hero-text {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 42rem;
  margin: 0 0 2rem;
}
.hero-actions,
.social-links,
.project-links,
.filter-bar,
.tag-list,
.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.9rem 1.4rem;
  border-radius: 0.9rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
}
.btn-secondary {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.06);
}
.btn-full {
  width: 100%;
}
.btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-links a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  color: #4b5563;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}
.social-links a:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  transform: translateY(-1px);
}
.social-links svg,
.icon-box svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.social-links svg path:last-child {
  fill: currentColor;
  stroke: none;
}

.hero-visual {
  position: relative;
}
.hero-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 1 / 1;
}
.hero-image-wrap img,
.about-image-card img,
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.experience-card {
  position: absolute;
  right: -1rem;
  bottom: -5rem;
  background: white;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}
.experience-card strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1;
}
.experience-card span {
  color: var(--muted);
}

.stats {
  background: white;
}
.stats-grid,
.cards-grid.three-up,
.values-grid,
.projects-grid {
  display: grid;
  gap: 1.5rem;
}
.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  text-align: center;
}
.stats-grid h2 {
  margin: 0 0 0.35rem;
  color: var(--primary);
  font-size: clamp(1.25rem, 2vw, 2.75rem);
}
.stats-grid p {
  margin: 0;
  color: var(--muted);
}
.cards-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.info-card,
.skill-group,
.value-card,
.project-card,
.contact-card,
.about-image-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.info-card {
  padding: 2rem;
}
.info-card h3,
.project-content h3,
.contact-card h3,
.about-copy h3 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
}
.info-card p,
.project-content p,
.contact-intro,
.about-copy p,
.value-card p,
.skill-group h4,
.contact-list p,
.contact-list a {
  color: var(--muted);
}
.icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.icon-box.blue {
  background: var(--primary-soft);
  color: var(--primary);
}
.icon-box.purple {
  background: var(--purple-soft);
  color: var(--purple);
}
.icon-box.green {
  background: var(--green-soft);
  color: var(--green);
}

.about-grid {
  margin-bottom: 3rem;
}
.about-copy p {
  margin: 0 0 1rem;
}
.about-image-card {
  overflow: hidden;
  min-height: 420px;
}
.split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.skills-groups,
.values-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.skills-groups {
  display: grid;
  gap: 1rem;
}
.skill-group,
.value-card {
  padding: 1.25rem;
}
.skill-group h4,
.value-card h4,
.contact-list h4 {
  margin: 0 0 0.75rem;
  color: var(--text);
}
.tag-list span {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 500;
}

.filter-bar {
  justify-content: center;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 0;
  background: #f3f4f6;
  color: #374151;
  font-weight: 600;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
}
.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.project-card {
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.project-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
}
.project-image img {
  transition: transform 0.35s ease;
}
.project-card:hover .project-image img {
  transform: scale(1.05);
}
.project-content {
  padding: 1.5rem;
}
.project-links a {
  color: #374151;
  font-weight: 600;
}
.project-links a:hover,
.contact-list a:hover {
  color: var(--primary);
}
.project-card.hidden {
  display: none;
}

.contact-grid {
  align-items: start;
}
.contact-list {
  flex-direction: column;
}
.contact-list article {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
}
.contact-form {
  display: grid;
  gap: 1rem;
}
.contact-form label {
  display: grid;
  gap: 0.5rem;
}
.contact-form span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.9rem;
  background: white;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
textarea {
  resize: vertical;
  min-height: 140px;
}
.success-message {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 1rem;
}
.success-message h4 {
  margin: 0 0 0.35rem;
}
.success-message p {
  margin: 0;
  color: var(--muted);
}
.hidden {
  display: none;
}

.site-footer {
  background: #111827;
  color: white;
  padding: 2rem 0;
  text-align: center;
}
.site-footer p {
  margin: 0;
}

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards-grid.three-up,
  .skills-groups,
  .values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-block;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-link {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
  }
  .nav-link.active {
    background: rgba(37, 99, 235, 0.08);
  }

  .hero-grid,
  .about-grid,
  .contact-grid,
  .split-grid,
  .stats-grid,
  .cards-grid.three-up,
  .projects-grid,
  .skills-groups,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .experience-card {
    position: static;
    margin-top: 1rem;
    display: inline-block;
  }

  .section,
  .hero {
    padding: 4rem 0;
  }
}
