@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600&family=Cabin+Sketch&family=VT323&display=swap");

:root {
  --primary: #C778DD;
  --gray: #ABB2BF;
  --bg: #282c33;
  --surface: #2f333b;
  --white: #F5F7F8;
  --border: #3a3f47;
  --accent: #9b8fef;
  --warn: #e5a96a;
  --red: #e06c75;
  --green: #98c379;
  --texture: #9052a8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth
}

body {
  font-family: "Fira Code", "Courier New", monospace;
  background: var(--bg);
  color: var(--gray)
}

h1,
h2,
h3,
h4 {
  color: var(--white)
}

h2 {
  font-size: 32px;
  font-weight: 500
}

ul {
  list-style: none
}

button {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--white);
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: background .3s
}

button:hover {
  background: var(--primary)
}

a {
  color: var(--white);
  text-decoration: none
}

/* ── HEADER ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg);
  padding: 28px 0 8px;
  border-bottom: 1px solid var(--border)
}

header.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, .5)
}

.navbar {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 8px
}

.logo {
  font-size: 20px;
  color: var(--white);
  margin: 0;
  text-shadow: 0 0 10px #b81616, 0 0 22px #ff8a00;
  animation: wobble 4s infinite
}

@keyframes wobble {

  0%,
  100% {
    transform: rotate(0)
  }

  25% {
    transform: rotate(7deg)
  }

  75% {
    transform: rotate(-7deg)
  }
}

.nav-list {
  display: flex;
  gap: 28px
}

.nav-link {
  color: var(--gray);
  font-size: 16px;
  transition: color .2s
}

.nav-link:hover {
  color: var(--white)
}

.nav-link::before {
  content: "#";
  color: var(--primary)
}

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white)
}

@media(max-width:600px) {
  .nav-list {
    display: none
  }

  .burger {
    display: flex
  }

  .nav-list.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px
  }
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 99
}

.sidebar-line {
  width: 1px;
  height: 150px;
  background: var(--gray)
}

.sidebar ul {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.sidebar a svg {
  fill: var(--gray);
  transition: fill .25s;
  display: block
}

.sidebar a:hover svg {
  fill: var(--white)
}

@media(max-width:1100px) {
  .sidebar {
    display: none
  }
}

/* ── MAIN ── */
.main-container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 105px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 96px
}

/* ── HERO ── */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 40px
}

@media(max-width:700px) {
  .hero {
    flex-direction: column
  }
}

.hero-content {
  flex: 1
}

.hero-role {
  font-size: 13px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px
}

.hero-role::before {
  content: "// "
}

.hero-content h2 {
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.3;
  margin-bottom: 14px;
  opacity: 0;
  transform: translateX(-28px);
  animation: slideIn 1s ease forwards
}

.hero-content h2 span {
  color: var(--primary)
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0)
  }
}

.hero-content p {
  line-height: 1.9;
  font-size: 16px;
  border-left: 2px solid var(--primary);
  padding-left: 14px;
  margin-top: 24px
}

.hero-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: float 4s ease-in-out infinite
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-14px)
  }
}

.hero-image img {
  width: 240px;
  border-radius: 5px;
  object-fit: cover
}

.portfolio-note-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--gray);
  padding: 8px;
  width: 310px
}

.purple-square {
  width: 14px;
  height: 14px;
  background: var(--primary);
  flex-shrink: 0
}

.portfolio-note {
  font-size: 13px;
  margin: 0
}

.portfolio-note span {
  color: var(--white);
  font-weight: bold
}

.portfolio-note .os-link {
  color: var(--white);
  font-weight: bold;
  text-decoration: none;
  border-bottom: 1px dashed var(--primary);
  transition: color .2s, border-color .2s
}

.portfolio-note .os-link:hover {
  color: var(--primary);
  border-bottom-style: solid
}

@media(max-width:700px) {
  .portfolio-note-wrapper {
    width: 100%
  }
}

/* ── QUOTE ── */
.quote {
  border: 1px solid var(--gray);
  position: relative
}

.quote blockquote {
  color: var(--white);
  font-size: 22px;
  padding: 36px 48px 12px;
  text-align: center;
  font-style: italic
}

.quote blockquote::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 8px;
  color: var(--gray);
  font-size: 52px;
  font-weight: 700;
  background: var(--bg);
  padding: 0 4px;
  line-height: 1
}

.quote figcaption {
  display: block;
  text-align: right;
  font-size: 15px;
  color: var(--gray);
  padding: 4px 16px 14px
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px
}

.section-header h2 {
  position: relative
}

.section-header h2::before {
  content: "#";
  color: var(--primary)
}

.section-header h2::after {
  content: "";
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  height: 1px;
  background: var(--primary)
}

@media(max-width:900px) {
  .section-header h2::after {
    display: none
  }
}

.section-header a {
  color: var(--white);
  text-decoration: underline;
  font-size: 15px
}

/* ── PROJECT CARDS ── */
.project-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch
}

@media(max-width:768px) {
  .project-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:480px) {
  .project-cards {
    grid-template-columns: 1fr
  }
}

.project-card {
  border: 1px solid var(--gray);
  cursor: pointer;
  transition: transform .3s, border-color .3s;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden
}

.project-card:hover {
  transform: scale(1.03);
  border-color: var(--primary)
}

.card-preview {
  width: 100%;
  height: 188px;
  overflow: hidden;
  border-bottom: 1px solid var(--gray);
  flex-shrink: 0
}

.card-preview.split {
  display: flex;
}

.card-preview.split img {
  width: 50%;
  height: 100%;
  border-right: 1px solid var(--gray);
  border-bottom: none;
  object-fit: contain;
  object-position: center;
}

.card-preview.split img:last-child {
  border-right: none;
}

.card-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform .4s
}

.project-card:hover .card-preview img {
  transform: scale(1.04)
}

.acard-header {
  height: 44px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  background: var(--surface);
  flex-shrink: 0
}

.acard-emoji {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0
}

.acard-accent-line {
  height: 2px;
  flex: 1;
  border-radius: 1px;
  opacity: .6
}

.project-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  color: var(--gray);
  border-bottom: 1px solid var(--gray);
  padding: 8px;
  font-size: 12px;
  height: 52px;
  overflow: hidden;
  align-content: flex-start
}

.project-card ul li {
  white-space: nowrap
}

.project-card ul li::after {
  content: " | ";
  color: var(--gray);
  opacity: .4
}

.project-card ul li:last-child::after {
  content: ""
}

.project-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1
}

.prob-line {
  color: var(--warn) !important
}

.fix-line {
  color: var(--accent) !important;
  flex: 1
}

.project-links {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  margin-top: auto;
  padding-top: 8px;
  overflow: hidden;
  min-width: 0
}

.project-links button {
  font-size: 11px;
  padding: 5px 8px;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis
}

.project-links button a {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block
}

.os-badge {
  font-size: 10px;
  padding: 3px 6px;
  border: 1px solid #fde68a;
  color: #fbbf24;
  background: transparent;
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0
}

@media(max-width:500px) {
  .project-links {
    gap: 4px
  }

  .project-links button {
    font-size: 10px;
    padding: 4px 6px
  }

  .os-badge {
    font-size: 9px;
    padding: 2px 5px
  }
}

/* ── AUTOMATION ── */
.auto-intro {
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 32px;
  border-left: 2px solid var(--primary);
  padding-left: 14px
}

.auto-cats {
  display: flex;
  flex-direction: column;
  gap: 32px
}

.cat-label {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px
}

.cat-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--primary);
  opacity: .25
}

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

@media(max-width:768px) {
  .auto-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:480px) {
  .auto-grid {
    grid-template-columns: 1fr
  }
}

.cat-tag {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
  letter-spacing: .1em
}

#automation-teaser .project-card {
  min-height: 140px
}

#automation-teaser .project-info {
  justify-content: center
}

/* ── SKILLS — row layout ── */
.skills-area {
  display: flex;
  gap: 32px;
  align-items: flex-start
}

.skills-illustration {
  flex-shrink: 0;
  width: 160px
}

.skills-illustration img {
  width: 100%;
  height: auto;
  display: block
}

.skills-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  flex: 1;
  width: 100%
}

.skill-row {
  border: 1px solid var(--gray);
  display: flex;
  flex-direction: column;
  height: 100%
}

.skill-row-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray);
  background: var(--surface);
}

.skill-header-top {
  display: flex;
  align-items: center;
  gap: 8px
}

.skill-row-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0
}

.skill-row-title {
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em
}

.skill-row-sub {
  color: var(--primary);
  font-size: 9px;
  line-height: 1.2
}

.skill-row-body {
  display: flex;
  flex-direction: column;
  padding: 0;
  flex: 1
}

.skill-sub {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border)
}

.skill-sub:last-child {
  border-bottom: none
}

.skill-sub h4 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray);
  margin-bottom: 8px;
  font-weight: 400
}

.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--gray);
  font-size: 11px
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 40px;
  text-align: center
}

.skill-item i {
  font-size: 20px;
  color: var(--gray);
  transition: color .2s
}

.skill-item:hover i {
  color: var(--primary)
}

.skill-item span {
  font-size: 9px;
  color: var(--gray)
}

@media(max-width:700px) {
  .skills-area {
    flex-direction: column
  }
}

@media(max-width:480px) {
  .skill-row-body {
    flex-direction: column
  }

  .skill-sub {
    border-right: none;
    border-bottom: 1px solid var(--border)
  }

  .skill-sub:last-child {
    border-bottom: none
  }
}

/* ── BADGES ── */
.holopin-desc {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 18px
}

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

@media(max-width:600px) {
  .badges-grid {
    grid-template-columns: 1fr
  }
}

.badge-board {
  border: 1px solid var(--gray);
  background: #1a1d22;
  display: flex;
  flex-direction: column;
  gap: 0
}

.badge-board-label {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 8px 14px;
  border-bottom: 1px solid var(--gray);
  background: var(--surface)
}

.badge-board a {
  display: block;
  overflow: hidden
}

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

.badge-placeholder {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-bottom: 1px solid var(--gray);
  padding: 20px
}

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

.badge-board button {
  margin: 12px 14px;
  width: calc(100% - 28px);
  align-self: flex-start
}

/* ── HOLOPIN ── */
.holopin-desc {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 18px
}




/* ── CONTACTS ── */
.contacts-contents {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: flex-start
}

@media(max-width:580px) {
  .contacts-contents {
    flex-direction: column
  }
}

.contacts-contents>p {
  max-width: 440px;
  font-size: 16px;
  line-height: 1.9
}

.contacts-card {
  border: 1px solid var(--gray);
  padding: 16px;
  min-width: 240px
}

.contacts-card h4 {
  margin-bottom: 14px;
  font-size: 16px
}

.contact {
  color: var(--gray);
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 9px
}

.contact a {
  color: var(--gray);
  font-size: 15px;
  transition: color .2s
}

.contact a:hover {
  color: var(--white)
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--gray);
  padding: 18px 0;
  margin-top: 100px
}

.footer-container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.footer-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px
}

.footer-divider {
  color: var(--border);
  font-size: 14px
}

.copyright {
  font-size: 12px;
  color: var(--gray);
  margin: 0;
  text-align: center;
  flex: 1
}

/* ── CREDLY BADGES ── */
.credly-section {
  margin-top: 0
}

.credly-intro {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 18px
}

.credly-board {
  background: #111317;
  border: 1px solid var(--gray);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px
}

.credly-board-inner {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  min-height: 120px
}

.credly-placeholder {
  color: var(--gray);
  font-size: 12px;
  text-align: center;
  border: 1px dashed var(--border);
  padding: 20px 40px;
  font-style: italic
}

.credly-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 8px 16px;
  transition: background .2s
}

.credly-link:hover {
  background: var(--primary);
  color: #fff
}

.credly-note {
  font-size: 11px;
  color: var(--gray);
  opacity: .6;
  text-align: center
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  z-index: 9999;
  align-items: center;
  justify-content: center
}

.modal-overlay.open {
  display: flex
}

.modal-box {
  background: var(--bg);
  border: 1px solid var(--primary);
  width: 92vw;
  max-width: 1080px;
  height: 87vh;
  display: flex;
  flex-direction: column
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0
}

.modal-title {
  font-size: 13px
}

.modal-title span {
  color: var(--primary)
}

.modal-external {
  color: var(--primary);
  font-size: 12px;
  text-decoration: underline
}

.modal-close {
  width: 26px;
  height: 26px;
  background: none;
  border: 1px solid var(--gray);
  color: var(--gray);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center
}

.modal-close:hover {
  border-color: var(--primary);
  color: var(--white);
  background: transparent
}

.modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none
}

.modal-no-embed {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center
}

.modal-no-embed p {
  font-size: 13px;
  max-width: 340px;
  line-height: 1.7
}

.modal-no-embed a {
  color: var(--primary);
  text-decoration: underline
}

/* ── BACK TO TOP ── */
#btt {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 38px;
  height: 38px;
  background: var(--primary);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 998;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%)
}

#btt.visible {
  opacity: 1;
  pointer-events: auto
}

#btt:hover {
  background: var(--accent)
}

/* ── ALL PROJECTS MODAL ── */
.all-projects-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto
}

.all-projects-modal.open {
  display: flex
}

.all-projects-content {
  background: var(--bg);
  border: 1px solid var(--border);
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px
}

.all-projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border)
}

.all-projects-header h2 {
  color: var(--white);
  margin: 0
}

.close-modal {
  background: none;
  border: 1px solid var(--gray);
  color: var(--gray);
  font-size: 24px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1
}

.close-modal:hover {
  border-color: var(--primary);
  color: var(--white)
}

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

@media(max-width:900px) {
  .all-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:600px) {
  .all-projects-grid {
    grid-template-columns: 1fr
  }
}
