:root {
  color-scheme: dark;
  --ink: #080e1a;
  --night: #0c1422;
  --paper: #f1f4f7;
  --white: #f4f8ff;
  --mist: #afbdcf;
  --line: #2a3a50;
  --blue: #76d9ff;
  --strong-blue: #095d7f;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--white); background: var(--ink); font: 1rem/1.65 var(--font); }
[hidden] { display: none !important; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }
section:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; }
h2 { font-size: clamp(2.15rem, 4.3vw, 3.7rem); font-weight: 650; letter-spacing: -.055em; }
h3 { font-weight: 650; letter-spacing: -.026em; }
.shell { width: min(100% - 112px, 1240px); margin-inline: auto; }
.section-pad { padding-block: clamp(68px, 8vw, 112px); }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 10; padding: .65rem 1rem; background: var(--white); color: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: relative; z-index: 2; border-bottom: 1px solid #202d40; background: #080e19; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 82px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; text-decoration: none; font-weight: 750; line-height: 1.1; letter-spacing: .17em; font-size: 1.17rem; }
.brand small { display: block; margin-top: 6px; color: var(--mist); letter-spacing: .15em; font-size: .62rem; font-weight: 650; }
.brand-icon {
  display: block;
  width: 39px;
  height: 39px;
  background: url("assets/barel-logo.jpeg") 48% 25% / 105px auto no-repeat;
  border-radius: 5px;
  box-shadow: 0 0 0 1px #26354b;
}
.main-nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 38px); }
.main-nav a { padding-block: 9px; color: #c8d3e3; font-size: .9rem; font-weight: 550; text-decoration: none; }
.main-nav a:hover, .back-top:hover { color: var(--blue); }
.main-nav .nav-contact { border: 1px solid #3c5771; padding-inline: 17px; border-radius: 5px; color: var(--white); }
.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid #3c5771;
  border-radius: 5px;
  padding: 0 12px;
  background: transparent;
  color: inherit;
  font: 600 .9rem var(--font);
  cursor: pointer;
}
.menu-toggle span { width: 15px; height: 9px; border-block: 1px solid currentColor; }

.hero { position: relative; isolation: isolate; overflow: hidden; background: #07101e; }
.hero-art {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(90deg, #07101e 0%, #07101e 20%, #07101ecf 39%, #07101e16 69%, #07101e08 100%),
    linear-gradient(0deg, #07101e 0%, transparent 23%),
    url("assets/fotonik.webp");
  background-position: center, center, right center;
  background-size: cover, cover, min(100%, 1250px) auto;
  background-repeat: no-repeat;
}
.hero-inner { min-height: clamp(580px, 48vw, 730px); display: flex; flex-direction: column; justify-content: center; position: relative; padding-block: 64px; }
.hero-copy { max-width: 680px; }
.eyebrow { display: flex; align-items: baseline; gap: 10px; color: var(--blue); font-size: .875rem; font-weight: 700; letter-spacing: .125em; text-transform: uppercase; }
.eyebrow span { align-self: center; width: 20px; height: 1px; flex: 0 0 20px; background: currentColor; }
.hero h1 {
  margin-top: 23px;
  font-size: clamp(3rem, 6vw, 6.2rem);
  font-weight: 650;
  letter-spacing: -.075em;
  line-height: .99;
}
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-description { max-width: 450px; margin-top: 24px; color: #c5d2e3; font-size: clamp(1rem, 1.45vw, 1.2rem); }
.hero-actions, .address-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 29px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: .64rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
}
.button-primary { color: #071322; background: #84dcff; }
.button-primary:hover { background: #b7ecff; }
.button-primary:focus-visible { outline-color: var(--white); }
.button-outline { color: var(--white); background: #0a1726b8; border-color: #4a617c; }
.button-outline:hover { border-color: var(--blue); color: var(--blue); }
.section-light { color-scheme: light; background: var(--paper); color: #101a2a; }
.section-light .eyebrow { color: var(--strong-blue); }
.about-intro { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; margin-top: 20px; }
.about-description { color: #38495c; max-width: 57ch; }
.about-description p + p { margin-top: 1rem; }
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 47px; border: 1px solid #c7d4e0; border-radius: 6px; }
.focus-grid article { padding: 26px clamp(18px, 3vw, 36px); }
.focus-grid article + article { border-left: 1px solid #c7d4e0; }
.focus-grid h3 { margin: 15px 0 9px; font-size: 1.18rem; }
.focus-grid p { color: #45566a; }
.focus-icon { display: block; position: relative; color: #126386; width: 35px; height: 28px; }
.icon-wave { background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; }
.icon-wave::before, .icon-wave::after { content: ""; position: absolute; top: 7px; width: 16px; height: 14px; border: 1.5px solid currentColor; border-color: currentColor transparent transparent; border-radius: 50%; }
.icon-wave::after { left: 14px; transform: rotate(180deg); }
.icon-optic::before, .icon-optic::after { content: ""; position: absolute; border: 1.5px solid currentColor; inset: 4px 6px; border-radius: 60% 35%; transform: rotate(-33deg); }
.icon-optic::after { inset: 8px 11px; }
.icon-ai::before, .icon-ai::after { content: ""; position: absolute; border: 1.5px solid currentColor; inset: 3px 7px; border-radius: 3px; }
.icon-ai::after { inset: 8px 12px; border-radius: 50%; }

.projects { background: #0b1423; }
.projects h2, .contact h2 { margin-top: 16px; }
.section-description { color: var(--mist); margin-top: 15px; max-width: 62ch; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 36px; align-items: start; }
.project-card { overflow: hidden; border: 1px solid #2b3f58; border-radius: 8px; background: #111c2c; }
.project-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at center, #124363, transparent 72%), #0b1829;
  border-bottom: 1px solid #2b3f58;
}
.project-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(#8ac4ff1f 1px, transparent 1px), linear-gradient(90deg, #8ac4ff1f 1px, transparent 1px);
  background-size: 23px 23px;
  background-position: center;
  mask-image: radial-gradient(ellipse, black, transparent 86%);
}
.cavity::after { content: ""; position: absolute; inset: 50% 12% auto; height: 1px; background: linear-gradient(90deg, transparent, #88ebff, transparent); }
.project-visual i { position: absolute; display: block; }
.cavity i { width: 16px; height: 76px; border: 1px solid #73d5ff; border-radius: 50%; box-shadow: 0 0 16px #3abfff70, inset 0 0 15px #3abfff57; transform: translateX(var(--offset, 0)); }
.cavity i:nth-child(1) { --offset: -92px; height: 27px; opacity: .52; }
.cavity i:nth-child(2) { --offset: -49px; height: 48px; opacity: .76; }
.cavity i:nth-child(4) { --offset: 49px; height: 48px; opacity: .76; }
.cavity i:nth-child(5) { --offset: 92px; height: 27px; opacity: .52; }
.photonics { background: radial-gradient(ellipse at center, #223863, transparent 75%), #111425; }
.photonics i { width: 155px; height: 1px; transform-origin: left center; transform: translateX(75px) rotate(var(--angle, 0deg)); background: linear-gradient(90deg, #a8ecff, transparent); }
.photonics i:nth-child(1) { --angle: -23deg; }
.photonics i:nth-child(2) { --angle: -11deg; }
.photonics i:nth-child(4) { --angle: 14deg; }
.photonics i:nth-child(5) { --angle: 25deg; }
.photonics::after { content: ""; position: absolute; top: 50%; width: 145px; height: 2px; transform: translateX(-74px); background: linear-gradient(90deg, transparent, #c8ddff); box-shadow: 0 0 11px #65bbff87; }
.project-content { padding: clamp(20px, 3vw, 35px); }
.project-meta { color: var(--blue); font-size: .875rem; font-weight: 650; }
.project-content h3 { font-size: clamp(1.4rem, 2.35vw, 2.15rem); margin-block: 13px; }
.project-content p:not(.project-meta) { color: var(--mist); }
details { margin-top: 21px; border-top: 1px solid #314360; }
summary { padding: 14px 0 0; color: var(--blue); cursor: pointer; font-weight: 650; }
summary:hover { color: #c4efff; }
.project-detail { padding-top: 12px; }
.project-detail .byline { margin-top: 12px; font-size: .875rem; }

.link-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; padding-block: clamp(60px, 7vw, 90px); }
.external-links { border-top: 1px solid #bccedd; }
.external-links a { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; column-gap: 16px; padding: 15px 0; border-bottom: 1px solid #bccedd; text-decoration: none; }
.external-links a:hover strong { color: var(--strong-blue); text-decoration: underline; text-underline-offset: 3px; }
.external-links small, .domain { display: block; color: #45586e; }
.domain { font-size: .875rem; overflow-wrap: anywhere; }
.contact { background: radial-gradient(ellipse at 65% 0%, #14283b, transparent 72%), var(--ink); }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.contact-layout p:not(.eyebrow) { color: var(--mist); margin-top: 18px; max-width: 40ch; }
.address-card { border: 1px solid #334961; border-radius: 7px; padding: clamp(22px, 3vw, 36px); background: #0b1828; }
.address-card h3 { font-size: 1.35rem; margin-bottom: 12px; }
address { font-style: normal; color: #c4d3e5; }
.address-actions { margin-top: 19px; }
.site-footer { border-top: 1px solid #26384d; }
.footer-inner { flex-wrap: wrap; padding-block: 15px; color: var(--mist); }
.footer-inner .brand { color: var(--white); }
.back-top { color: inherit; font-size: .875rem; text-underline-offset: 4px; }

@media (max-width: 960px) {
  .shell { width: calc(100% - 64px); }
  .hero-art { background-size: cover, cover, auto 100%; background-position: center, center, 73% center; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 40px); }
  .header-inner { min-height: 68px; flex-wrap: wrap; gap: 0 16px; }
  .menu-toggle { display: inline-flex; }
  .main-nav { flex-basis: 100%; display: grid; gap: 0; padding-bottom: 11px; }
  .main-nav a { display: block; padding: 11px 0; border-top: 1px solid #26384d; }
  .main-nav .nav-contact { padding: 11px 0; border-width: 1px 0 0; border-radius: 0; }
  .hero-inner { min-height: 570px; padding-block: 175px 58px; }
  .hero-art {
    background-image: linear-gradient(0deg, #07101e 2%, #07101e 31%, #07101ed6 49%, #07101e30 76%, #07101e12 100%), url("assets/fotonik.webp");
    background-size: cover, auto 67%;
    background-position: center, 74% top;
  }
  .hero h1 { font-size: clamp(2.65rem, 9vw, 4.5rem); }
  .about-intro, .project-grid, .link-layout, .contact-layout { grid-template-columns: 1fr; gap: 24px; }
  .about-intro h2 br { display: none; }
  .focus-grid { grid-template-columns: 1fr; margin-top: 28px; }
  .focus-grid article + article { border-left: 0; border-top: 1px solid #c7d4e0; }
  .footer-inner { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
