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

:root {
  /* Main backgrounds */
  --bg-primary: #111318;
  --bg-secondary: #171A20;
  --bg-card: #1C2027;
  --bg-card-hover: #232832;

  /* Borders */
  --border-color: #2B313B;
  --border-light: #353C47;

  /* Text */
  --text-primary: #F4F1EA;
  --text-secondary: #B8BDC7;
  --text-muted: #858C98;

  /* Main accent - Lavender */
  --accent-lavender: #B692F6;
  --accent-lavender-light: #C9AEFF;
  --accent-lavender-dark: #8F6CCF;
  --accent-lavender-bg: rgba(182, 146, 246, 0.12);

  /* Section label / eyebrow text - Sage green */
  --accent-green: #A4C98C;
  --accent-green-light: #B9D8A7;
  --accent-green-dark: #769962;
  --accent-green-bg: rgba(164, 201, 140, 0.12);

  /* Secondary warm accent - Peach */
  --accent-peach: #E7A27B;
  --accent-peach-light: #F0B494;
  --accent-peach-dark: #BE7957;
  --accent-peach-bg: rgba(231, 162, 123, 0.12);

  /* Optional blue accent */
  --accent-blue: #8EBCE8;
  --accent-blue-bg: rgba(142, 188, 232, 0.12);

  /* Status / utility colors */
  --success: #8FC59A;
  --warning: #E3B66D;
  --error: #DF7E83;

  /* Buttons */
  --button-primary: #B692F6;
  --button-primary-hover: #C6A7FF;
  --button-primary-text: #16131C;

  --button-secondary: #20242B;
  --button-secondary-hover: #292E37;

  /* Code / tags */
  --tag-bg: #272C35;
  --tag-text: #D8DCE4;

  /* Shadows */
  --shadow-color: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 12% 10%, rgba(182, 146, 246, 0.18), transparent 42%),
    radial-gradient(circle at 92% 88%, rgba(164, 201, 140, 0.12), transparent 38%),
    var(--bg-primary);
}

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

.page-shell {
  width: min(1380px, calc(100% - 20px));
  margin: 28px auto;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  background: linear-gradient(180deg, rgba(28, 32, 39, 0.95), rgba(23, 26, 32, 0.95));
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 16px 40px var(--shadow-color);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand-primary {
  color: var(--text-primary);
  font-weight: 600;
}

.brand-accent {
  color: var(--accent-lavender);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 160ms ease;
}

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

.hero {
  position: relative;
  margin-top: 18px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  height: 30vh;
  min-height: 340px;
  box-shadow: 0 24px 46px var(--shadow-color);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: 50%;
  min-width: 340px;
  height: 100%;
  padding: 20px 34px 34px;
  background:
    linear-gradient(95deg, rgba(16, 18, 24, 0.92) 0%, rgba(16, 18, 24, 0.75) 62%, rgba(16, 18, 24, 0.08) 100%);
}

.hero-eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-green);
}

.hero-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 2vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-title span {
  color: var(--accent-lavender);
}

.hero-copy {
  margin: 20px 0 26px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--button-primary-text);
  background: linear-gradient(180deg, var(--button-primary-hover), var(--button-primary));
}

.btn-secondary {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: rgba(24, 28, 35, 0.9);
}

.btn-secondary:hover {
  background: var(--button-secondary-hover);
}

.contact-message-btn {
  gap: 10px;
  padding: 9px 12px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: currentColor;
}

.btn-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.btn-arrow {
  margin-left: 2px;
  font-size: 1rem;
  line-height: 1;
}

.icon-only-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: rgba(24, 28, 35, 0.9);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.icon-only-btn:hover {
  transform: translateY(-1px);
  background: var(--button-secondary-hover);
}

.icon-only-image {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.icon-only-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-primary);
}

.icon-only-svg svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.projects-section {
  margin-top: 18px;
  padding: 22px 0 6px;
}

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

.section-heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.section-heading-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.skills-section .section-heading-icon,
.info-section-heading .section-heading-icon {
  color: var(--accent-lavender);
}

.section-title {
  margin: 0;
  color: var(--accent-green);
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: -0.02em;
}

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

.project-card {
  position: relative;
  display: block;
  min-height: 276px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 18px 36px var(--shadow-color);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(182, 146, 246, 0.38);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.42);
}

.project-card-media {
  position: absolute;
  inset: 0;
}

.project-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 12, 16, 0.99) 0%, rgba(10, 12, 16, 0.97) 32%, rgba(10, 12, 16, 0.78) 54%, rgba(10, 12, 16, 0.34) 72%, rgba(10, 12, 16, 0.1) 100%);
  transition: opacity 320ms ease;
}

.project-card-icon-wrap {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(182, 146, 246, 0.16);
  background: rgba(182, 146, 246, 0.08);
  color: var(--accent-lavender-light);
}

.project-card-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: inherit;
}

.project-card-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
}

.project-card-icon svg * {
  stroke: currentColor;
}

.project-card--tone-1 .project-card-icon-wrap {
  border-color: rgba(231, 162, 123, 0.22);
  background: rgba(231, 162, 123, 0.12);
  color: var(--accent-peach-light);
}

.project-card--tone-2 .project-card-icon-wrap {
  border-color: rgba(142, 188, 232, 0.24);
  background: rgba(142, 188, 232, 0.12);
  color: #b7d8f3;
}

.project-card--tone-3 .project-card-icon-wrap {
  border-color: rgba(164, 201, 140, 0.24);
  background: rgba(164, 201, 140, 0.12);
  color: var(--accent-green-light);
}

.project-card-content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 276px;
  padding: 16px;
  gap: 14px;
  transition: opacity 260ms ease;
}

.project-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: min(55%, 360px);
}

.project-card-head {
  min-width: 0;
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.project-card-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.08rem;
  line-height: 1.2;
}

.project-card-subtitle {
  margin: 6px 0 10px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.project-card-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.55;
  line-clamp: 4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 320ms ease, object-position 2800ms linear, filter 320ms ease, opacity 320ms ease;
}

.project-card-image--primary {
  z-index: 1;
}

.project-card-image--secondary {
  z-index: 2;
  opacity: 0;
}

.project-card--scroll .project-card-image {
  object-position: center top;
}

.project-card:hover .project-card-image {
  transform: scale(1.02);
  filter: brightness(1.01);
}

.project-card:hover .project-card-media::after,
.project-card:hover .project-card-content {
  opacity: 0;
}

.project-card--scroll:hover .project-card-image {
  object-position: center bottom;
}

.project-card--fade:hover .project-card-image--primary {
  opacity: 0;
}

.project-card--fade:hover .project-card-image--secondary {
  opacity: 1;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 4px;
}

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

.tech-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.tech-pill:nth-child(4n + 1) {
  background: rgba(182, 146, 246, 0.14);
  color: var(--accent-lavender-light);
}

.tech-pill:nth-child(4n + 2) {
  background: rgba(164, 201, 140, 0.14);
  color: var(--accent-green-light);
}

.tech-pill:nth-child(4n + 3) {
  background: rgba(142, 188, 232, 0.14);
  color: var(--accent-blue);
}

.tech-pill:nth-child(4n + 4) {
  background: rgba(231, 162, 123, 0.14);
  color: var(--accent-peach-light);
}

.icon-mask {
  display: inline-block;
  flex: 0 0 auto;
  background-color: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.icon-mask--projects {
  color: var(--accent-lavender);
  mask-image: url('../res/icons/projects.svg');
  -webkit-mask-image: url('../res/icons/projects.svg');
}

.icon-mask--skills {
  color: var(--accent-lavender);
  mask-image: url('../res/icons/skills.svg');
  -webkit-mask-image: url('../res/icons/skills.svg');
}

.icon-mask--external {
  width: 18px;
  height: 18px;
  color: var(--accent-lavender);
  mask-image: url('../res/icons/external-link.svg');
  -webkit-mask-image: url('../res/icons/external-link.svg');
}

.projects-error {
  margin: 0;
  color: var(--text-secondary);
}

.skills-section {
  margin-top: 18px;
  padding: 8px 0 12px;
}

.skills-panel {
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(28, 32, 39, 0.94), rgba(23, 26, 32, 0.9));
  box-shadow: 0 18px 36px var(--shadow-color);
}

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

.skill-card {
  padding: 16px;
  min-height: 0;
  background: transparent;
}

.skill-card + .skill-card {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.skill-card-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--accent-lavender-light);
}

.skill-card-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
}

.skill-card-icon svg * {
  stroke: currentColor;
}

.skill-card-title {
  margin: 0;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
}

.skill-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-pill--skill {
  min-height: 30px;
  font-size: 0.82rem;
}

.about-contact-section {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-top: 18px;
  padding: 8px 0 12px;
}

.info-section-heading {
  margin-bottom: 12px;
}

.info-panel {
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(28, 32, 39, 0.94), rgba(23, 26, 32, 0.9));
  box-shadow: 0 18px 36px var(--shadow-color);
  padding: 16px;
}

.info-panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.info-heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--accent-lavender);
}

.info-heading-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.info-panel-title {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
}

.about-main {
  width: min(50%, 420px);
  margin-bottom: 14px;
}

.about-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.62;
}

.about-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 18px;
  flex-wrap: nowrap;
}

.about-meta-pill {
  flex: 0 1 auto;
  min-width: 0;
}

.about-meta-value-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.about-meta-value {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.about-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--accent-green-light);
}

.about-meta-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.contact-copy {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.65;
}

.contact-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}

.info-panel--about,
.info-panel--contact {
  position: relative;
  overflow: hidden;
}

.info-panel--about::before,
.info-panel--contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.info-panel--about::before {
  background-image: url('../res/banner-about.png');
}

.info-panel--contact::before {
  background-image: url('../res/brand-banner.png');
}

.info-panel--about::after,
.info-panel--contact::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(12, 14, 18, 0.97) 0%, rgba(12, 14, 18, 0.9) 42%, rgba(12, 14, 18, 0.35) 72%, rgba(12, 14, 18, 0.08) 100%);
}

.info-panel--about .about-main,
.info-panel--about .about-meta-row {
  position: relative;
  z-index: 2;
}

.info-panel--contact .contact-copy,
.info-panel--contact .contact-actions {
  position: relative;
  z-index: 2;
  max-width: 50%;
}

@media (max-width: 1024px) {
  .page-shell {
    width: min(1380px, calc(100% - 14px));
    margin: 18px auto;
  }

  .top-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-overlay {
    width: min(86%, 620px);
    min-width: 0;
    padding-right: 24px;
  }

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

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

  .skill-card:nth-child(odd) {
    border-left: none;
  }

  .skill-card:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .skill-card:nth-child(3) {
    border-left: none;
  }

  .project-card-media {
    aspect-ratio: 16 / 9;
  }

  .about-contact-section {
    grid-template-columns: 1fr;
  }

  .info-panel--contact .contact-copy,
  .info-panel--contact .contact-actions {
    max-width: 72%;
  }

}

@media (max-width: 720px) {
  .top-nav {
    padding: 12px 16px;
    align-items: center;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    display: none;
  }

  .hero {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    overflow: visible;
  }

  .hero-media {
    order: 2;
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at center, rgba(17, 19, 24, 0) 48%, rgba(17, 19, 24, 0.46) 100%),
      linear-gradient(180deg, rgba(17, 19, 24, 0.18) 0%, rgba(17, 19, 24, 0) 24%, rgba(17, 19, 24, 0) 76%, rgba(17, 19, 24, 0.22) 100%);
  }

  .hero-overlay {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    padding: 0;
    background: none;
  }

  .hero-copy {
    max-width: 46ch;
    line-height: 1.58;
  }

  .hero-image {
    object-position: center;
  }

  .projects-section {
    padding-top: 18px;
  }

  .skills-section {
    padding-top: 12px;
  }

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

  .skill-card {
    border-left: none !important;
  }

  .skill-card + .skill-card {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .project-card-content {
    position: relative;
    z-index: 1;
    min-height: 0;
    justify-content: flex-start;
    padding: 14px;
    transition: none;
  }

  .project-card-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .project-card-body {
    max-width: none;
    gap: 14px;
  }

  .project-card-header {
    gap: 12px;
  }

  .project-card-media {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 16 / 8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
  }

  .project-card-media::after {
    display: none;
  }

  .project-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

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

  .skill-card {
    padding: 14px;
  }

  .info-panel {
    padding: 14px;
  }

  .about-main {
    width: 100%;
  }

  .about-meta-row {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .info-panel--contact .contact-copy,
  .info-panel--contact .contact-actions {
    max-width: 100%;
  }

  .info-panel--about .about-main,
  .info-panel--about .about-meta-row {
    max-width: 100%;
  }

  .contact-actions {
    flex-wrap: wrap;
  }
}