:root {
  --primary: #2691d9;
  --primary-50: #e2f6ff;
  --primary-700: #5eb8f7;
  --primary-800: #7ac4f8;
  --grey-100: #3a3a3a;
  --grey-600: #a0a0a0;
  --grey-700: #c0c0c0;
  --grey-900: #f0f0f0;
  --bg: #252525;
  --surface: #2d2d2d;
  --border: #404040;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --card-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--grey-700);
  background: var(--bg);
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo-img {
  display: block;
  height: 40px;
  width: auto;
  object-fit: contain;
}

.site-nav {
  max-width: 960px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: flex-end;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--grey-700);
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-700);
  background: var(--grey-100);
}

.nav-link:focus {
  outline: 2px solid var(--primary-700);
  outline-offset: 2px;
}

.page {
  min-height: 100vh;
  width: 70%;
  max-width: 70%;
  margin: 0 auto;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary-800);
  margin: 0 0 0.5rem 0;
}

.subtitle {
  font-size: 1rem;
  color: var(--grey-600);
  margin: 0;
}

#about,
#skills,
#projects,
#personal-projects,
#contact {
  scroll-margin-top: 4rem;
}

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .landing {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    text-align: left;
  }
  .landing-content {
    flex: 1;
    min-width: 0;
  }
  .landing-image-wrap {
    flex-shrink: 0;
    margin-right: 10rem;
  }
}

.landing-content {
  text-align: center;
}

.landing-name {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 600;
  color: var(--grey-900);
  margin: 0 0 0.25rem 0;
}

.landing-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--grey-600);
  margin: 0 0 0.75rem 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-slogan {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--primary-700);
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

@media (min-width: 640px) {
  .landing-name {
    font-size: 3.5rem;
  }
  .landing-title {
    font-size: 1.15rem;
  }
  .landing-slogan {
    font-size: 2rem;
  }
  .landing-intro {
    font-size: 1.2rem;
  }
}

.landing-intro {
  font-size: 1.1rem;
  color: var(--grey-600);
  margin: 0;
  line-height: 1.5;
}

.landing-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--primary-50);
  box-shadow: var(--card-shadow);
}

@media (min-width: 640px) {
  .landing-image {
    width: 320px;
    height: 320px;
  }
}

.skills-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.skills-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--grey-900);
  margin: 0 0 1.25rem 0;
}

.skills-list {
  display: block;
  width: 100%;
}

/* Force Backend, Frontend, DevOps to stack vertically - one per row */
.skills-stack-vertical {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 2rem;
}

.skills-stack-vertical .skill-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 1.25rem;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.skills-stack-vertical .skill-group-title {
  margin: 0 0 0.75rem 0;
}

.skills-stack-vertical .skill-group .skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 0.75rem;
  width: 100%;
}

@media (min-width: 480px) {
  .skills-stack-vertical .skill-group .skills-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 640px) {
  .skills-stack-vertical .skill-group .skills-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem 1rem;
  }
}

@media (min-width: 880px) {
  .skills-stack-vertical .skill-group .skills-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

.skill-group-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-700);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 0.75rem;
  width: 100%;
}

@media (min-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem 1rem;
  }
}

@media (min-width: 880px) {
  .skills-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-item:hover {
  border-color: var(--primary-700);
  box-shadow: var(--card-shadow-hover);
}

.skill-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.skill-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-700);
  text-align: center;
}

.projects-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--grey-900);
  margin: 0 0 0.75rem 0;
}

#projects {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#projects-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.personal-projects-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.personal-projects-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--grey-900);
  margin: 0 0 1rem 0;
}

.personal-projects-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .personal-projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .personal-projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.project-group-header-content {
  flex: 1;
  min-width: 0;
}

.project-group-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: var(--surface);
  color: var(--grey-700);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.project-group-toggle:hover {
  background: var(--grey-100);
  color: var(--primary-700);
}

.project-group-toggle:focus {
  outline: 2px solid var(--primary-700);
  outline-offset: 2px;
}

.project-group-toggle-icon {
  display: block;
  line-height: 1;
}

.project-group-content {
  overflow: hidden;
  max-height: 5000px;
  transition: max-height 0.35s ease-out;
}

.project-group.is-collapsed .project-group-content {
  max-height: 0;
  transition: max-height 0.3s ease-in;
}

.project-group.is-collapsed .project-group-toggle-icon {
  transform: rotate(-90deg);
}

.project-group-company {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.25rem 0;
}

.project-group-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--grey-900);
  margin: 0 0 0.25rem 0;
}

.project-group-description {
  font-size: 0.95rem;
  color: var(--grey-600);
  margin: 0;
}

.project-group-worked-on {
  font-size: 0.85rem;
  color: var(--grey-600);
  margin: 0.5rem 0 0 0;
}

.grid,
.project-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid,
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grid,
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s ease;
  border: 1px solid var(--border);
}

.project-card:hover {
  box-shadow: var(--card-shadow-hover);
}

a.project-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.project-card-link:hover {
  color: inherit;
}

.project-image-wrap {
  aspect-ratio: 16 / 9;
  background: var(--grey-100);
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-body {
  padding: 1.25rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--grey-900);
  margin: 0 0 0.75rem 0;
}

.project-description {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--grey-700);
  margin: 0 0 1rem 0;
}

.project-tech {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tech-item {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  background: rgba(94, 184, 247, 0.15);
  color: var(--primary-700);
  border-radius: 4px;
}

.contact-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--grey-900);
  margin: 0 0 0.5rem 0;
}

.contact-text {
  font-size: 1rem;
  color: var(--grey-600);
  margin: 0 0 1.25rem 0;
}

.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
}

.contact-links li {
  margin: 0;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-700);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--primary-700);
  transition: background 0.2s ease, color 0.2s ease;
}

.contact-link:hover {
  background: var(--primary-700);
  color: var(--bg);
}

.contact-link-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.contact-link:focus {
  outline: 2px solid var(--primary-700);
  outline-offset: 2px;
}

.construction-notice {
  margin-top: 3rem;
  padding: 2rem 1rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
}

.construction-notice-text {
  font-size: 1rem;
  color: var(--grey-600);
  margin: 0 0 0.5rem 0;
}

.construction-notice-witty {
  font-size: 0.95rem;
  color: var(--grey-600);
  font-style: italic;
  margin: 0;
}
