:root {
  --bg-start: #fff8fb;
  --bg-end: #fff9d8;
  --surface: #fffaf3;
  --surface-2: #ffffff;
  --text: #3b2d5a;
  --muted: #665c88;
  --accent: #f39ac0;
  --accent-2: #f1bd5b;
  --border: rgba(59, 45, 90, 0.08);
  --shadow: 0 22px 50px rgba(120, 87, 145, 0.12);
  --header-height: 82px;
  --radius: 26px;
  --transition: 320ms ease;
  --section-offset: 60px;
  --body-glow: rgba(243, 154, 192, 0.14);
}

body.dark-mode {
  --bg-start: #17120F;
  --bg-end: #2A1E17;
  --surface: #241B16;
  --surface-2: #30231C;
  --text: #F5EBDD;
  --muted: #C7B7A8;
  --accent: #F3A45E;
  --accent-2: #D98B3D;
  --border: rgba(245, 235, 221, 0.14);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
  --body-glow: rgba(243, 164, 94, 0.16);
}



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.72), transparent 16%),
    linear-gradient(180deg, var(--bg-start), var(--bg-end));
  color: var(--text);
  transition: background 900ms ease, color 300ms ease;
  overflow-x: clip;
  position: relative;
}

.floating-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.main-content,
.site-header,
main,
.section,
.section-card,
.hero-card,
.header-banner-wrap,
.material-fact-panel,
.contact-card {
  position: relative;
  z-index: 1;
}

.float-item {
  position: absolute;
  left: var(--x, 0%);
  top: var(--y, 0%);
  /* default desktop size: 56px, desktop random size 40-95, max desktop size: 110px */
  width: clamp(40px, var(--size, 56px), 110px);
  /* default opacity range 0.12-0.18; leave actual per-item opacity in inline or --opacity var */
  opacity: var(--opacity, 0.12);
  pointer-events: none;
  transform-origin: center;
  transform: rotate(var(--rot, 0deg));
  animation: var(--animation-name, floatDrift) var(--duration, 30s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  transition: opacity 1.2s ease;
  will-change: transform, opacity;
}

.float-item.is-hidden {
  opacity: 0 !important;
}

@media (max-width: 768px) {
  /* mobile default size: 42px, mobile random size 28-70, max mobile size: 80px */
  .float-item {
    width: clamp(28px, var(--size-mobile, 42px), 80px);
  }
}

.float-item:nth-child(2n) {
  animation-name: floatRotate;
}

.float-item:nth-child(3n) {
  animation-name: floatDriftHorizontal;
}

.float-item:nth-child(4n) {
  animation-duration: calc(var(--duration, 26s) * 1.1);
}

.float-item img {
  display: block;
  width: 100%;
  height: auto;
}

.floating-bg.debug .float-item {
  opacity: 0.35 !important;
  outline: 1px dashed rgba(255, 255, 255, 0.45);
}

@keyframes floatDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg));
  }
  50% {
    transform: translate3d(4px, -14px, 0) rotate(calc(var(--rot, 0deg) + 8deg));
  }
}

@keyframes floatRotate {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg));
  }
  50% {
    transform: translate3d(-8px, -10px, 0) rotate(calc(var(--rot, 0deg) - 10deg));
  }
}

@keyframes floatDriftHorizontal {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg));
  }
  50% {
    transform: translate3d(12px, -8px, 0) rotate(calc(var(--rot, 0deg) + 6deg));
  }
}

@media (max-width: 768px) {
  .svg-3,
  .svg-5,
  .svg-7 {
    display: none;
  }

  .svg-1 {
    top: 8%;
    left: 12%;
    width: 110px;
  }

  .svg-2 {
    top: 22%;
    left: 74%;
    width: 90px;
  }

  .svg-4 {
    top: 62%;
    left: 16%;
    width: 120px;
  }

  .svg-6 {
    top: 86%;
    left: 24%;
    width: 90px;
  }
}

@keyframes float-slow-1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(8deg); }
}

@keyframes float-slow-2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(10px) rotate(-6deg); }
}

@keyframes float-slow-3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(10deg); }
}

@keyframes float-slow-4 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(12px) rotate(-10deg); }
}

@keyframes float-slow-5 {
  0%, 100% { transform: translateY(0) rotate(28deg); }
  50% { transform: translateY(-10px) rotate(32deg); }
}

@keyframes float-slow-6 {
  0%, 100% { transform: translateY(0) rotate(-18deg); }
  50% { transform: translateY(8px) rotate(-14deg); }
}

@keyframes float-slow-7 {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

@keyframes float-slow-8 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(10px) rotate(8deg); }
}

@keyframes float-slow-9 {
  0%, 100% { transform: translateY(0) rotate(12deg); }
  50% { transform: translateY(-11px) rotate(16deg); }
}

body,
body::before,
body::after,
.section,
.section-card,
.hero-card,
.hero-image-shell,
.header-banner-wrap,
.gallery-item,
.project-card,
.about-media,
.contact-form input,
.contact-form textarea {
  transition: background 900ms ease, color 300ms ease, border-color 300ms ease, box-shadow 500ms ease;
}

body::before,
body::after {
  content: '';
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--body-glow), rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: -1;
}

body::before {
  top: 8%;
  left: -60px;
}

body::after {
  right: -80px;
  bottom: 8%;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.header-top {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0 clamp(0.8rem, 2.4vw, 2rem);
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 0.95rem;
}

.brand-icon {
  width: 44px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: auto;
}

.theme-toggle {
  min-width: 60px;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(243, 154, 192, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: rgba(243, 154, 192, 0.14);
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(243, 154, 192, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 0.25rem;
  white-space: nowrap;
}

.language-option {
  min-width: 36px;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.language-option:hover {
  transform: translateY(-1px);
  background: rgba(243, 154, 192, 0.12);
}

.language-option.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 22px rgba(243, 154, 192, 0.22);
}

.hero-prompt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  width: fit-content;
  background: #fff;
  color: var(--text);
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: 0.06em;
}

.hero-prompt-arrow {
  font-size: 0.95rem;
  color: var(--accent);
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  transition: color var(--transition), transform var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.login-btn {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(243, 154, 192, 0.24);
  font-weight: 700;
  font-size: 0.9rem;
}

.header-banner-wrap {
  width: min(1080px, calc(100% - 1.2rem));
  margin: 0 auto 0.8rem;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(92, 67, 112, 0.14);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
}

.header-banner-wrap img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  object-position: center;
  transition: transform 600ms ease, opacity 300ms ease;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--section-offset) + 1rem) 1rem;
  position: relative;
  z-index: 1;
}

.hero-card,
.section-card {
  width: min(1180px, 100%);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 3rem;
  min-height: 78vh;
  overflow: hidden;
}

.hero-text {
  align-self: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.hero-text h1,
.section-heading h2,
.section-card h2 {
  font-size: clamp(3.2rem, 5vw, 5rem);
  line-height: 0.92;
  margin-bottom: 1rem;
}

.lead,
.section-card p,
.project-card p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 30px rgba(243, 154, 192, 0.3);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-shell {
  width: min(560px, 100%);
  aspect-ratio: 1 / 1.1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.18));
  border-radius: 40px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hero-image-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-card {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 2rem;
  padding: 3rem;
}

.about-media {
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-card {
  padding: 3rem;
}

.section-heading {
  margin-bottom: 1.5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.project-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border-radius: 24px;
  padding: 2rem;
  box-shadow: inset 0 0 0 1px rgba(59, 45, 90, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(31, 29, 59, 0.08);
}

.project-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.4rem;
  border-radius: 18px;
  margin-bottom: 1rem;
}

.materials-hero {
  min-height: auto;
  padding-top: 2rem;
}

.materials-hero-card {
  padding: 2rem;
}

.materials-hero-content {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.materials-hero-text {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.7;
}

.materials-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1rem;
  align-items: start;
}

.materials-layout-single {
  grid-template-columns: 1fr;
}

.materials-info-panel,
.materials-panel {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border-radius: 22px;
  padding: 1.4rem;
  box-shadow: inset 0 0 0 1px var(--border);
}

.materials-panel-full {
  width: 100%;
}

.materials-info-panel h3,
.materials-panel h3 {
  margin-bottom: 0.8rem;
}

.materials-info-panel ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.materials-info-panel li {
  position: relative;
  padding-left: 1rem;
  color: var(--muted);
}

.materials-info-panel li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.materials-grid-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.material-card {
  appearance: none;
  border: none;
  background: var(--surface-2);
  border-radius: 18px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.material-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(31, 29, 59, 0.08);
}

.material-card.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
}

.material-card-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.idea-section,
.stl-section {
  min-height: auto;
  padding-top: 0.5rem;
}

.idea-card,
.stl-card {
  padding: 2rem;
}

.idea-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.idea-item {
  background: linear-gradient(180deg, #fffdfa, #fff7fb);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--border);
}

.stl-box-scrollable-large {
  overflow: hidden;
  padding-top: 0.5rem;
}

.stl-box {
  margin-top: 1.2rem;
  padding: 1rem;
  background: linear-gradient(180deg, #fffdfa, #fff7fb);
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px var(--border);
}

.material-fact-panel {
  position: fixed;
  top: 50%;
  right: 24px;
  width: min(360px, calc(100% - 48px));
  transform: translateY(-50%) translateX(110%);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border-radius: 24px;
  box-shadow: 0 24px 50px rgba(31, 29, 59, 0.18);
  border: 1px solid var(--border);
  padding: 1.1rem;
  z-index: 1200;
  transition: transform 360ms ease;
}

.material-fact-panel.open {
  transform: translateY(-50%) translateX(0);
}

.material-fact-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 0.9rem;
}

.material-fact-panel h4 {
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
}

.material-fact-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.material-fact-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 34px;
  height: 34px;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
}

.stl-box h3 {
  margin-bottom: 0.8rem;
}

.stl-box-scrollable {
  overflow: hidden;
  padding-bottom: 0.2rem;
}

.stl-box-track {
  display: flex;
  gap: 0.8rem;
  width: max-content;
  animation: stl-scroll 36s linear infinite;
  will-change: transform;
}

.stl-box-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 230px;
  min-height: 78px;
  padding: 1rem 1.1rem;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stl-box-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(31, 29, 59, 0.08);
}

.stl-box-name {
  font-size: 1rem;
  font-weight: 700;
}

.stl-box-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

@keyframes stl-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.wide-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gallery-marquee {
  overflow: hidden;
  width: 100%;
}

.gallery-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: gallery-marquee 35s linear infinite;
  will-change: transform;
}

.gallery-marquee:hover .gallery-track {
  animation-play-state: paused;
}

.gallery-item {
  min-height: 260px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface-2);
  flex: 0 0 auto;
  width: min(360px, 28vw);
}

.gallery-item.tall {
  width: min(420px, 34vw);
}

.gallery-item.wide {
  width: min(520px, 44vw);
}

@keyframes gallery-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.access-card,
.contact-card {
  text-align: left;
}

.contact-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.intro-chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.profile-panel {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border-radius: 22px;
  padding: 1.2rem;
  box-shadow: inset 0 0 0 1px var(--border);
}

.profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.9rem;
}

.profile-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.profile-panel h3 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.profile-text {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.chat-shell {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.chat-shell-featured {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border-radius: 24px;
  padding: 1rem;
  box-shadow: inset 0 0 0 1px var(--border);
}

.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.chat-message.veljko {
  flex-direction: row-reverse;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.avatar-me {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.avatar-veljko {
  background: linear-gradient(135deg, #8a5a3d, #d2a47a);
}

.bubble {
  max-width: min(560px, 78%);
  padding: 0.95rem 1rem;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.bubble-me {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  border-bottom-right-radius: 6px;
}

.bubble-veljko {
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--border);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243, 154, 192, 0.12);
}

.contact-status {
  grid-column: 1 / -1;
  min-height: 2.5rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(243, 154, 192, 0.08);
  color: var(--text);
  font-weight: 700;
  display: flex;
  align-items: center;
}

.contact-status.success {
  background: rgba(125, 211, 87, 0.12);
  color: #166534;
}

.contact-status.error {
  background: rgba(244, 63, 94, 0.12);
  color: #9b1234;
}

.full-width {
  grid-column: 1 / -1;
}

.login-btn-large {
  display: inline-flex;
  margin-top: 1rem;
  padding: 1rem 1.6rem;
  font-size: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.social-links a {
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.8rem 1rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .hero-card,
  .split-card {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .gallery-grid,
  .contact-form {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item.wide {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 88px;
  }

  body::before,
  body::after {
    width: 240px;
    height: 240px;
    opacity: 0.48;
  }

  .floating-bg {
    display: block;
  }

  .paw-2,
  .cube-2,
  .filament-2 {
    display: none;
  }

  .paw-1 {
    top: 8%;
    left: 10%;
  }

  .cube-1 {
    top: 68%;
    left: 76%;
  }

  .filament-1 {
    top: 50%;
    left: 50%;
  }

  .section {
    min-height: auto;
    padding: 5rem 0.75rem;
  }

  .hero-text,
  .hero-visual {
    text-align: center;
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-text p,
  .hero-text h1 {
    max-width: 100%;
  }

  .about-media {
    min-height: 280px;
  }

  .header-top {
    padding: 0 0.85rem;
  }

  .header-banner-wrap {
    width: calc(100% - 1rem);
  }

  .header-banner-wrap img {
    max-height: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(var(--header-height) + 0.5rem);
    right: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    padding: 1rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 18px 36px rgba(31, 29, 59, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
  }

  .theme-toggle {
    width: 100%;
  }

  .hero-card,
  .section-card,
  .split-card {
    padding: 1.5rem;
  }

  .hero-card {
    min-height: auto;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-text h1,
  .section-card h2 {
    font-size: clamp(2.6rem, 7vw, 3rem);
  }

  .contact-header,
  .materials-hero-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .intro-chat-layout {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .gallery-grid,
  .contact-form,
  .idea-list,
  .materials-grid-cards,
  .gallery-item.wide,
  .gallery-item.tall {
    grid-template-columns: 1fr;
    grid-column: span 1;
    grid-row: span 1;
  }

  .materials-layout,
  .materials-layout-single {
    grid-template-columns: 1fr;
  }

  .bubble {
    max-width: 100%;
    font-size: 0.92rem;
  }

  .chat-message,
  .chat-message.veljko {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-message.veljko {
    align-items: flex-end;
  }

  .social-links {
    justify-content: flex-start;
  }

  .profile-panel {
    margin-bottom: 0.2rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 4.25rem 0.45rem;
  }

  .header-top {
    padding: 0 0.6rem;
  }

  .brand {
    font-size: 0.82rem;
  }

  .brand-icon {
    width: 36px;
  }

  .header-banner-wrap {
    width: calc(100% - 0.6rem);
    border-radius: 18px;
  }

  .hero-card,
  .section-card,
  .split-card,
  .idea-card,
  .stl-card,
  .materials-hero-card,
  .access-card,
  .contact-card {
    padding: 1rem;
    border-radius: 18px;
  }

  .hero-actions .btn,
  .login-btn,
  .login-btn-large {
    width: 100%;
    justify-content: center;
  }

  .project-card,
  .idea-item,
  .stl-box-item {
    padding: 0.95rem;
  }

  .materials-panel,
  .materials-info-panel {
    padding: 1rem;
  }

  .stl-box-item {
    min-width: 210px;
  }

  .material-fact-panel {
    right: 0.5rem;
    width: calc(100% - 1rem);
    padding: 0.95rem;
  }

  .profile-avatar {
    width: 64px;
    height: 64px;
  }
}
