:root {
  --bg-body: #161515;
  --bg-surface: #171719;
  --bg-surface-rgb: 23, 23, 25;
  --bg-card: #1f1f21;
  --text-primary: #e6e6e6;
  --text-muted: #b0b0b0;
  --accent-1: #194bfd;
  --accent-2: #00d9ff;
  --accent-1-rgb: 25, 75, 253;
  --accent-2-rgb: 0, 217, 255;
  --card-border-alpha: 1;
  color-scheme: dark;
}

:root[data-theme="cyan"] {
  --bg-body: #161515;
  --bg-surface: #171719;
  --bg-surface-rgb: 23, 23, 25;
  --bg-card: #1f1f21;
  --text-primary: #e6e6e6;
  --text-muted: #b0b0b0;
  --accent-1: #194bfd;
  --accent-2: #00d9ff;
  --accent-1-rgb: 25, 75, 253;
  --accent-2-rgb: 0, 217, 255;
  color-scheme: dark;
}

:root[data-theme="violet"] {
  --bg-body: #15121e;
  --bg-surface: #181425;
  --bg-surface-rgb: 24, 20, 37;
  --bg-card: #201a30;
  --text-primary: #ece9f7;
  --text-muted: #a79fc2;
  --accent-1: #7c3aed;
  --accent-2: #ec4899;
  --accent-1-rgb: 124, 58, 237;
  --accent-2-rgb: 236, 72, 153;
  color-scheme: dark;
}

:root[data-theme="emerald"] {
  --bg-body: #0e1712;
  --bg-surface: #111c16;
  --bg-surface-rgb: 17, 28, 22;
  --bg-card: #16221b;
  --text-primary: #e6f2ea;
  --text-muted: #9db5a8;
  --accent-1: #059669;
  --accent-2: #34d399;
  --accent-1-rgb: 5, 150, 105;
  --accent-2-rgb: 52, 211, 153;
  color-scheme: dark;
}

:root[data-theme="sunset"] {
  --bg-body: #1a1210;
  --bg-surface: #1f1613;
  --bg-surface-rgb: 31, 22, 19;
  --bg-card: #271c17;
  --text-primary: #f5ebe4;
  --text-muted: #c2a99a;
  --accent-1: #ea580c;
  --accent-2: #fbbf24;
  --accent-1-rgb: 234, 88, 12;
  --accent-2-rgb: 251, 191, 36;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg-body: #f4f5fa;
  --bg-surface: #ffffff;
  --bg-surface-rgb: 255, 255, 255;
  --bg-card: #ffffff;
  --text-primary: #1b1b23;
  --text-muted: #5c5c6b;
  --accent-1: #194bfd;
  --accent-2: #0891b2;
  --accent-1-rgb: 25, 75, 253;
  --accent-2-rgb: 8, 145, 178;
  --card-border-alpha: 0.5;
  color-scheme: light;
}

* {
  padding: 0;
  margin: 0;
  font-family: "Satoshi", sans-serif;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* --header-h is measured in script.js so the fixed header never covers a section */
  scroll-padding-top: calc(var(--header-h, 140px) + 16px);
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  overflow-x: hidden;
  padding-top: var(--header-h, 140px);
  transition: background-color 0.4s ease, color 0.4s ease;
  position: relative;
}

/* Ambient theme background effects */
.bg-fx {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particles {
  position: absolute;
  inset: 0;
}

.particle {
  position: absolute;
  bottom: -20px;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--accent-2);
  opacity: 0;
  box-shadow: 0 0 8px 1px rgba(var(--accent-2-rgb), 0.8);
  animation: floatUp var(--duration) linear infinite;
  animation-delay: var(--delay);
}

@keyframes floatUp {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translate(var(--drift), -110vh);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .particle {
    animation: none;
    display: none;
  }
}

.bg-grain {
  position: absolute;
  inset: -10%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
}

.header-section {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: none;
}

.header-section.scrolled {
  box-shadow: 0 8px 30px rgba(var(--accent-2-rgb), 0.25);
  background-color: rgba(var(--bg-surface-rgb), 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-section .top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 80px;
}

.header-section .top-header .header-social ul {
  display: flex;
  gap: 30px;
  font-size: 20px;
  list-style: none;
}

.header-section .top-header .header-social ul li a {
  color: var(--text-primary);
  transition: all 0.3s ease;
  display: inline-block;
}

.header-section .top-header .header-social ul li a:hover {
  color: var(--accent-2);
  transform: translateY(-3px);
}

.header-section .top-header .header-contact {
  display: flex;
  gap: 30px;
}

.header-section .top-header .header-contact .contact-phone,
.header-section .top-header .header-contact .contact-adress,
.header-section .top-header .header-contact .contact-email {
  display: flex;
  gap: 20px;
  align-items: center;
}

.header-section .top-header .header-contact .contact-phone p a,
.header-section .top-header .header-contact .contact-adress p a,
.header-section .top-header .header-contact .contact-email p a {
  color: var(--text-primary);
  text-decoration: none;
}

.header-section .top-header .header-contact .contact-phone .phone-icon,
.header-section .top-header .header-contact .contact-adress .adress-icon,
.header-section .top-header .header-contact .contact-email .email-icon {
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.header-section .top-header .header-contact .contact-phone:hover .phone-icon,
.header-section .top-header .header-contact .contact-adress:hover .adress-icon,
.header-section .top-header .header-contact .contact-email:hover .email-icon {
  color: var(--accent-1);
  transform: scale(1.2);
}

.bottom-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 80px;
}

.bottom-header .header-logo a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 24px;
  letter-spacing: 2px;
}

.bottom-header .header-logo a span {
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.theme-picker {
  position: relative;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(var(--accent-2-rgb), 0.4);
  background: linear-gradient(135deg, rgba(var(--accent-1-rgb), 0.15), rgba(var(--accent-2-rgb), 0.15));
  color: var(--text-primary);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(20deg) scale(1.08);
  border-color: var(--accent-2);
  box-shadow: 0 4px 18px rgba(var(--accent-2-rgb), 0.35);
}

.theme-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid rgba(var(--accent-2-rgb), 0.25);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 1002;
}

.theme-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}

.theme-option:hover {
  background: rgba(var(--accent-2-rgb), 0.12);
}

.theme-option.active {
  background: rgba(var(--accent-2-rgb), 0.18);
  font-weight: 600;
}

.theme-option .swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--sw1) 0deg 120deg, var(--sw2) 120deg 240deg, var(--sw3) 240deg 360deg);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  width: 30px;
  height: 3px;
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  border-radius: 10px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.bottom-header .header-nav ul {
  display: flex;
  gap: 40px;
  list-style: none;
}

.bottom-header .header-nav ul li a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 20px;
  position: relative;
  transition: all 0.3s ease;
}

.bottom-header .header-nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  transition: width 0.3s ease;
}

.bottom-header .header-nav ul li a:hover {
  color: var(--accent-2);
}

.bottom-header .header-nav ul li a:hover::after {
  width: 100%;
}

/* Hand-drawn doodles that sit on top of the layout. They are pure decoration,
   so they never take pointer events and are hidden once space runs out. */
.deco {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  height: auto;
}

.home-page-container {
  border-top: 2px solid rgba(var(--accent-2-rgb), 0.2);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
}

.home-page-container .homepage {
  display: flex;
  align-items: center;
  justify-content: center;
  --col-gap: clamp(40px, 8vw, 150px);
  gap: var(--col-gap);
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.home-page-container .homepage .left-side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1;
  min-width: min(300px, 100%);
}

.home-page-container .homepage .left-side .hp-header {
  color: var(--text-primary);
}

/* Sized so "DEVELOPER" always fits the text column, at every width. */
.home-page-container .homepage .left-side .hp-header h1 {
  font-size: clamp(30px, 5.2vw, 96px);
  letter-spacing: 0.1em;
  line-height: 1.12;
}

.home-page-container .homepage .left-side .hp-subtitle {
  font-size: clamp(13px, 2vw, 18px);
  letter-spacing: clamp(1px, 0.3vw, 3px);
  margin-top: -20px;
  color: var(--text-muted);
}

.home-page-container .homepage .left-side .hp-header h1 span {
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-page-container .homepage .left-side .cv-button button {
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  padding: 18px 60px;
  border: 2px solid var(--accent-2);
  border-radius: 30px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: white;
  letter-spacing: 2px;
  transition: all 0.4s ease;
}

.home-page-container .homepage .left-side .cv-button button:hover {
  background: transparent;
  color: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(var(--accent-2-rgb), 0.5);
}

.home-page-container .homepage .right-side {
  flex: 1;
  min-width: min(300px, 100%);
  max-width: 520px;
}

.home-page-container .homepage .right-side .image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  animation: floatPulse 3s ease-in-out infinite;
  border-radius: 20px;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
    linear-gradient(to right, var(--accent-1), var(--accent-2)) border-box;
}

/* Curls from the SOFTWARE DEVELOPER heading down to the DOWNLOAD CV button.
   It lives in the page gutter, which .home-page-container reserves via
   --deco-gutter at widths where there is room for it (see media queries). */
.home-page-container .homepage .arrow-to-cv {
  display: none;
  position: absolute;
  top: 6%;
  right: calc(100% + var(--deco-gutter, 0px) * 0.12);
  width: calc(var(--deco-gutter, 0px) * 0.62);
  opacity: 0.9;
}

@keyframes floatPulse {
  0%,
  100% {
    transform: translateY(0px);
    box-shadow: 0 15px 50px rgba(var(--accent-2-rgb), 0.6);
  }
  50% {
    transform: translateY(-20px);
    box-shadow: 0 25px 60px rgba(var(--accent-1-rgb), 0.8);
  }
}

.about-me-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
    url("../Images/aboutbackground.png");
  background-size: cover;
  background-position: center;
  padding: 50px 20px;
}

.about-me-container .aboutme {
  display: flex;
  align-items: center;
  justify-content: center;
  --col-gap: clamp(40px, 8vw, 150px);
  gap: var(--col-gap);
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.about-me-container .aboutme .left-side {
  display: flex;
  flex-direction: column;
  gap: 30px;
  flex: 1;
  min-width: min(300px, 100%);
}

.about-me-container .aboutme .left-side .ls-header-text {
  color: #e6e6e6;
}

.about-me-container .aboutme .left-side .ls-header-text h2 {
  font-size: clamp(26px, 4.6vw, 56px);
  letter-spacing: clamp(2px, 0.7vw, 10px);
}

.about-me-container .aboutme .left-side .ls-header-text h2 span {
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-me-container .aboutme .left-side .about-text .text {
  max-width: 600px;
}

.about-me-container .aboutme .left-side .text p {
  color: #e6e6e6;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.8;
}

.about-me-container .aboutme .left-side .text p .highlight {
  color: var(--accent-2);
  font-weight: 600;
}

.about-me-container .aboutme .right-side {
  flex: 1;
  min-width: min(300px, 100%);
  max-width: 520px;
}

.about-me-container .aboutme .right-side .image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 20px;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
    linear-gradient(to right, var(--accent-1), var(--accent-2)) border-box;
  animation: floatPulse 3s ease-in-out infinite;
}

.skills-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 50px 20px;
}

/* Doodle above the "My skills" heading. */
.skills-container .skills .lightbulb {
  display: none;
  position: absolute;
  top: calc(var(--col-gap) * -0.55);
  left: max(4px, calc(var(--col-gap) * 0.1));
  width: clamp(46px, 4.5vw, 78px);
  opacity: 0.9;
}

/* Doodle that curls out of the column gap back towards the skill cards.
   Sized off --col-gap so it always fits between the two columns. */
.skills-container .skills .left-side .arrow {
  display: none;
  position: absolute;
  top: 58%;
  left: calc(100% + var(--col-gap) * 0.08);
  width: calc(var(--col-gap) * 0.78);
  transform: rotate(120deg);
  opacity: 0.9;
}

.skills-container .skills {
  display: flex;
  align-items: center;
  justify-content: center;
  --col-gap: clamp(40px, 8vw, 150px);
  gap: var(--col-gap);
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.skills-container .skills .left-side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  flex: 1;
  min-width: min(300px, 100%);
}

.skills-container .skills .left-side .sk-header h2 {
  color: var(--text-primary);
  font-size: clamp(26px, 4.6vw, 56px);
  letter-spacing: clamp(2px, 0.7vw, 10px);
}

.skills-container .skills .left-side .sk-header h2 span {
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.skills-container .skills .left-side .ls-content .skills-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(76px, 9vw, 140px), 1fr));
  gap: clamp(12px, 1.5vw, 20px);
}

.skills-container .skills .left-side .ls-content .skills-card .skill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2vw, 25px);
  background-color: var(--bg-card);
  border-radius: 15px;
  border: 1px solid rgba(var(--accent-2-rgb), 0.16);
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.skills-container .skills .left-side .ls-content .skills-card .skill:hover {
  transform: translateY(-5px);
  border-color: var(--accent-2);
  box-shadow: 0 10px 30px rgba(var(--accent-2-rgb), 0.4);
}

.skills-container .skills .left-side .ls-content .skills-card .skill img {
  width: clamp(36px, 3.6vw, 50px);
  height: clamp(36px, 3.6vw, 50px);
  transition: all 0.3s ease;
}

.skills-container .skills .left-side .ls-content .skills-card .skill:hover img {
  transform: scale(1.1);
}

.skills-container .skills .left-side .ls-content .skills-card .skill::before {
  content: attr(data-skill);
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.skills-container .skills .left-side .ls-content .skills-card .skill::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--accent-2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.skills-container
  .skills
  .left-side
  .ls-content
  .skills-card
  .skill:hover::before,
.skills-container
  .skills
  .left-side
  .ls-content
  .skills-card
  .skill:hover::after {
  opacity: 1;
  visibility: visible;
}

.skills-container .skills .right-side {
  flex: 1;
  min-width: min(300px, 100%);
  max-width: 520px;
}

.skills-container .skills .right-side .image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 20px;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
    linear-gradient(to right, var(--accent-1), var(--accent-2)) border-box;
  animation: floatPulse 3s ease-in-out infinite;
}

.projects-container {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 100px 20px 50px;
}

.projects-container .projects {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 50px;
  max-width: 1400px;
  margin: 0 auto;
}

.projects-container .projects .projects-header h2 {
  color: var(--text-primary);
  font-size: clamp(26px, 4.6vw, 56px);
  letter-spacing: clamp(2px, 0.7vw, 10px);
}

.projects-container .projects .projects-header h2 span {
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.projects-container .projects .projects-cards {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.projects-container .projects .projects-cards .project-card {
  background: var(--bg-card);
  border: 1px solid rgba(var(--accent-2-rgb), 0.16);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  width: 100%;
  max-width: 380px;
  flex: 1 1 calc(33.333% - 20px);
  min-width: min(300px, 100%);
  transition: all 0.4s ease;
}

.projects-container .projects .projects-cards .project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-2);
  box-shadow: 0 20px 50px rgba(var(--accent-2-rgb), 0.4);
}

.projects-container .projects .projects-cards .project-card .project-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.projects-container .projects .projects-cards .project-card .project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
}

.projects-container
  .projects
  .projects-cards
  .project-card:hover
  .project-image
  img {
  transform: scale(1.1);
}

.projects-container .projects .projects-cards .project-card .project-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-primary);
  padding: 20px;
  flex: 1;
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  gap: 10px;
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-header
  .project-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-header
  .release-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-description {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 65px;
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-tech
  .tech-tag {
  background: rgba(var(--accent-2-rgb), 0.1);
  color: var(--accent-2);
  padding: 7px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(var(--accent-2-rgb), 0.25);
  transition: all 0.3s ease;
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-tech
  .tech-tag:hover {
  background: rgba(var(--accent-2-rgb), 0.2);
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-button {
  margin-top: auto;
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-button
  .github-btn {
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  color: white;
  padding: 10px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-button
  .github-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--accent-2-rgb), 0.35);
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-button
  .github-btn
  i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.projects-container
  .projects
  .projects-cards
  .project-card
  .project-content
  .project-button
  .github-btn:hover
  i {
  transform: scale(1.1);
}

.contact-container {
  border-top: 2px solid rgba(var(--accent-2-rgb), 0.2);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
}

.contact-container .contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-container .contact .contact-header {
  text-align: center;
}

.contact-container .contact .contact-header h2 {
  color: var(--text-primary);
  font-size: clamp(26px, 4.6vw, 56px);
  letter-spacing: clamp(2px, 0.7vw, 10px);
  margin-bottom: 20px;
}

.contact-container .contact .contact-header h2 span {
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-container .contact .contact-header .contact-subtitle {
  color: var(--text-muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
  max-width: 700px;
}

.contact-container .contact .contact-cards {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-container .contact .contact-cards .contact-card {
  background: var(--bg-card);
  border: 1px solid rgba(var(--accent-2-rgb), 0.16);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 300px;
  flex: 1 1 calc(25% - 40px);
  min-width: min(250px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: all 0.4s ease;
}

.contact-container .contact .contact-cards .contact-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-2);
  box-shadow: 0 20px 50px rgba(var(--accent-2-rgb), 0.4);
}

.contact-container .contact .contact-cards .contact-card .contact-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: white;
  transition: all 0.3s ease;
}

.contact-container .contact .contact-cards .contact-card:hover .contact-icon {
  transform: scale(1.1) rotate(10deg);
}

.contact-container .contact .contact-cards .contact-card h3 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
}

.contact-container .contact .contact-cards .contact-card a {
  color: var(--accent-2);
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-container .contact .contact-cards .contact-card a:hover {
  color: var(--accent-1);
}

.footer {
  background: var(--bg-surface);
  padding: 40px 20px;
  border-top: 2px solid rgba(var(--accent-2-rgb), 0.2);
}

.footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer .footer-content .footer-social {
  display: flex;
  gap: 30px;
}

.footer .footer-content .footer-social a {
  color: var(--text-primary);
  font-size: 24px;
  transition: all 0.3s ease;
}

.footer .footer-content .footer-social a:hover {
  color: var(--accent-2);
  transform: translateY(-3px);
}

.footer .footer-content p {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.scroll-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: linear-gradient(to right, var(--accent-1), var(--accent-2));
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(var(--accent-2-rgb), 0.4);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(var(--accent-2-rgb), 0.6);
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   RESPONSIVE
   Type and spacing scale fluidly with clamp() in the base rules above, so the
   breakpoints below only handle things that genuinely need to change shape.
   ========================================================================== */

/* --- Decorative doodles -------------------------------------------------- */

/* The homepage arrow lives in the gutter to the left of the text column, so the
   hero reserves one via --deco-gutter. Every value below is derived from that
   gutter, which guarantees the arrow can never spill off the side of the page. */
@media (min-width: 1200px) {
  .home-page-container {
    --deco-gutter: clamp(110px, 9vw, 150px);
    padding-left: var(--deco-gutter);
  }

  .home-page-container .homepage .arrow-to-cv {
    display: block;
  }
}

/* The skills doodles sit inside the content box, so they only need the two
   columns to still be side by side. */
@media (min-width: 900px) {
  .skills-container .skills .lightbulb,
  .skills-container .skills .left-side .arrow {
    display: block;
  }
}

/* --- Layout -------------------------------------------------------------- */

@media (max-width: 1400px) {
  .header-section .top-header,
  .bottom-header {
    padding: 10px 60px;
  }
}

@media (max-width: 1200px) {
  .header-section .top-header,
  .bottom-header {
    padding: 10px 50px;
  }

  .projects-container .projects .projects-cards .project-card {
    flex: 1 1 calc(50% - 20px);
  }
}

@media (max-width: 1024px) {
  .header-section .top-header,
  .bottom-header {
    padding: 10px 40px;
  }

  .header-section .top-header .header-contact {
    gap: 20px;
  }

  /* Sections stop being full-height once the content no longer fills a screen. */
  .home-page-container,
  .about-me-container,
  .skills-container,
  .projects-container,
  .contact-container {
    min-height: 0;
  }

  .projects-container {
    padding: 60px 20px 50px;
  }
}

@media (max-width: 800px) {
  .hamburger {
    display: flex;
  }

  .header-section .top-header {
    flex-direction: column;
    padding: 12px 20px;
    gap: 12px;
  }

  .header-section .top-header .header-social ul {
    display: none;
  }

  .header-section .top-header .header-contact {
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .bottom-header {
    padding: 12px 20px;
    position: relative;
  }

  .bottom-header .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(70%, 320px);
    height: 100dvh;
    background: var(--bg-surface);
    border-left: 2px solid rgba(var(--accent-2-rgb), 0.3);
    transition: right 0.3s ease;
    z-index: 999;
    padding-top: 80px;
    overflow-y: auto;
  }

  .bottom-header .header-nav.active {
    right: 0;
  }

  .bottom-header .header-nav ul {
    flex-direction: column;
    gap: 30px;
    padding: 40px 30px;
  }

  .bottom-header .header-nav ul li a {
    font-size: 22px;
  }

  .home-page-container .homepage .right-side .image img,
  .about-me-container .aboutme .right-side .image img,
  .skills-container .skills .right-side .image img {
    max-width: 320px;
  }

  .right-side .image {
    display: flex;
    justify-content: center;
  }
}

/* Below this the two-column sections stack. */
@media (max-width: 768px) {
  .home-page-container .homepage,
  .about-me-container .aboutme,
  .skills-container .skills {
    flex-direction: column;
    gap: 50px;
  }

  .home-page-container .homepage .left-side,
  .home-page-container .homepage .right-side,
  .about-me-container .aboutme .left-side,
  .about-me-container .aboutme .right-side,
  .skills-container .skills .left-side,
  .skills-container .skills .right-side {
    width: 100%;
    max-width: 500px;
  }

  .home-page-container .homepage .left-side .hp-header,
  .home-page-container .homepage .left-side .hp-subtitle,
  .about-me-container .aboutme .left-side .ls-header-text,
  .about-me-container .aboutme .left-side .text p,
  .skills-container .skills .left-side .sk-header h2 {
    text-align: center;
  }

  .home-page-container .homepage .left-side .cv-button {
    display: flex;
    justify-content: center;
  }

  .skills-container .skills .left-side .ls-content .skills-card {
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
  }

  .projects-container .projects .projects-cards,
  .contact-container .contact .contact-cards {
    flex-direction: column;
    align-items: center;
  }

  .projects-container .projects .projects-cards .project-card {
    max-width: 500px;
    width: 100%;
    min-height: 0;
  }

  .contact-container .contact .contact-cards .contact-card {
    max-width: 400px;
    width: 100%;
  }

  /* The right-hand illustrations are duplicated decoration once stacked. */
  .about-me-container .aboutme .right-side,
  .skills-container .skills .right-side {
    display: none;
  }

  .home-page-container .homepage .right-side .image img {
    max-width: 280px;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}

/* Phones in portrait: the header contact block needs its own line per item. */
@media (max-width: 560px) {
  .header-section .top-header .header-contact {
    flex-direction: column;
    gap: 8px;
  }

  .header-section .top-header .header-contact .contact-phone,
  .header-section .top-header .header-contact .contact-adress,
  .header-section .top-header .header-contact .contact-email {
    gap: 10px;
  }

  .header-section .top-header .header-contact p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .home-page-container,
  .about-me-container,
  .skills-container,
  .contact-container {
    padding: 40px 16px;
  }

  .projects-container {
    padding: 40px 16px;
  }

  .bottom-header .header-logo a {
    font-size: 20px;
  }

  .bottom-header .header-nav ul {
    gap: 20px;
  }

  .bottom-header .header-nav ul li a {
    font-size: 18px;
  }

  .home-page-container .homepage .left-side .cv-button button {
    padding: 15px 40px;
    font-size: 14px;
  }

  .skills-container .skills .left-side .ls-content .skills-card {
    max-width: 320px;
  }

  .projects-container .projects .projects-cards .project-card .project-image {
    height: 180px;
  }

  .projects-container .projects .projects-cards .project-card .project-content {
    padding: 15px;
  }

  .projects-container
    .projects
    .projects-cards
    .project-card
    .project-content
    .project-tech
    .tech-tag {
    font-size: 11px;
    padding: 5px 12px;
  }

  .contact-container .contact .contact-cards .contact-card {
    padding: 30px 20px;
  }

  .contact-container .contact .contact-cards .contact-card .contact-icon {
    width: 60px;
    height: 60px;
    font-size: 26px;
  }

  .footer .footer-content .footer-social {
    gap: 20px;
  }

  .footer .footer-content .footer-social a {
    font-size: 20px;
  }

  .home-page-container .homepage .right-side .image img,
  .about-me-container .aboutme .right-side .image img,
  .skills-container .skills .right-side .image img {
    max-width: 260px;
  }
}

@media (max-width: 360px) {
  .bottom-header .header-nav ul li a {
    font-size: 16px;
  }

  .home-page-container .homepage .left-side .cv-button button {
    padding: 14px 28px;
    letter-spacing: 1px;
  }
}

/* Short landscape phones: reclaim vertical space eaten by the fixed header. */
@media (max-height: 520px) and (orientation: landscape) {
  .header-section .top-header {
    display: none;
  }

  .home-page-container,
  .about-me-container,
  .skills-container,
  .projects-container,
  .contact-container {
    min-height: 0;
    padding-top: 40px;
    padding-bottom: 40px;
  }
}
