/* =============================================================================
   IlyaOs.com — site stylesheet
   Hand-written, framework-free. One file for the whole site.
   Sections:  1) tokens  2) base  3) header + nav  4) cover  5) buttons
              6) inner pages  7) footer  8) responsive
   ========================================================================== */

/* 1) Design tokens ---------------------------------------------------------- */
:root {
  --font-body:   'Mulish', Arial, Helvetica, sans-serif;
  --font-nav:    Arial, Helvetica, sans-serif;

  --color-text:    #000;
  --color-invert:  #fff;
  --color-muted:   #555;
  --color-accent:  #ff7a52;        /* signature coral accent */
  --color-accent-dark: #e95f37;
  --color-link:    var(--color-accent);
  --color-panel:   #ececec;       /* light side panel */
  --color-page-bg: #eeeeec;
  --color-band:    rgba(246, 246, 244, .90);
  --color-band-alt:rgba(224, 224, 220, .68);
  --color-footer:  #161616;

  --header-height: 110px;
  --cover-height:  100vh;
  --gutter:        40px;
  --content-max:   1200px;
}

/* 2) Base ------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.5;
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, .018) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, #f7f7f5 0%, var(--color-page-bg) 100%);
}

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

a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-weight: 600; margin: 0 0 .5em; }

/* 3) Header + navigation ---------------------------------------------------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;            /* top:0; left/right:0 */
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--gutter);
  height: var(--header-height);
  padding: 0 var(--gutter);
  overflow: visible;
}

.site-header__logo img {
  width: min(330px, 26vw);
  height: auto;
}

.main-nav { margin-left: auto; }

/* mobile nav toggle — pure CSS, no JS */
.nav-toggle { display: none; }
.nav-burger { display: none; }

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav__list > li { position: relative; }

.main-nav__list a {
  font-family: var(--font-nav);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-invert);
  white-space: nowrap;
}
.main-nav__list a:hover { text-decoration: none; opacity: .8; }

.has-submenu > a::after {
  content: '';
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  vertical-align: middle;
}

/* dropdown submenu */
.submenu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: var(--color-invert);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s;
}
.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu a {
  display: block;
  padding: 8px 20px;
  color: var(--color-text);
  letter-spacing: .5px;
}
.submenu a:hover { background: #f3f3f3; opacity: 1; }

/* 4) Cover (homepage) ------------------------------------------------------- */
body.home { background: var(--color-footer); }   /* dark area below the capped cover */

.cover {
  display: flex;
  height: var(--cover-height);
  min-height: 560px;
}

.cover__col {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) 20vh;
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  color: var(--color-text);
}

/* whole panel is clickable when it links somewhere */
a.cover__col { color: inherit; }
a.cover__col:hover { text-decoration: none; }

.cover__col--quote   { background-image: url('../assets/static.sitecdn.com/tild6333-6536-4036-b864-643861333761/bg1.png'); }
.cover__col--inventor{ background-image: url('../assets/static.sitecdn.com/tild6164-3330-4134-a334-316565353239/bg.png'); }
.cover__col--mentor  {
  background-image: url('../assets/static.sitecdn.com/tild3139-3239-4435-b535-623865343632/bg3.png');
  color: var(--color-invert);
}

.cover__title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 24px;
}

.cover__quote {
  font-size: 16px;
  font-style: normal;
  line-height: 1.5;
  margin: 0;
  color: #1a1a1a;
}
.cover__quote cite { display: block; margin-top: 0; font-style: normal; }
.cover__col--quote { justify-content: flex-end; padding-bottom: 13vh; }

/* 5) Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-block;
  align-self: flex-start;
  padding: 14px 30px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-invert);
  border-radius: 30px;
  letter-spacing: .3px;
}
.btn:hover { text-decoration: none; opacity: .9; }

/* accent pill button for light pages */
.btn--dark {
  background: var(--color-accent);
  color: var(--color-invert);
  border: 1px solid var(--color-accent);
}
.btn--dark:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); color: var(--color-invert); opacity: 1; }

/* feature: centered, airy showcase block (projects, inventions, diy) */
.feature {
  padding: 86px var(--gutter);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .90), rgba(255, 255, 255, .76));
}
.feature:nth-of-type(even) {
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, .018) 0 1px, transparent 1px 18px),
    var(--color-band-alt);
}
.feature__inner { max-width: 760px; margin: 0 auto; }
.feature__eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 12px;
}
.feature__title {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 32px;
}
.feature__media { margin: 0 0 32px; }
.feature__media img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .16);
}
.feature__media--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature__media--grid img { aspect-ratio: 4 / 3; object-fit: cover; }
.feature__lead {
  font-size: 17px;
  line-height: 1.7;
  color: #333;
  margin: 0 auto 22px;
  max-width: 620px;
}
.feature__meta {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-muted);
  margin: 0 auto 22px;
  max-width: 620px;
}
.feature__meta b { color: var(--color-text); }

/* scientific paper cards (snippet illustration + citation) */
.paper {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 26px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 30px;
  border-top: 1px solid rgba(0, 0, 0, .08);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .05);
  text-align: left;
}
.paper + .paper { margin-top: 18px; }
.paper:first-of-type { border-top: 1px solid rgba(0, 0, 0, .08); }
.paper__thumb img {
  width: 130px;
  height: auto;
  border: 1px solid #ececec;
  border-radius: 3px;
  background: #fff;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.paper__pub { margin: 12px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--color-muted); }
.paper__body h3 { font-size: 18px; font-weight: 700; line-height: 1.35; margin: 0 0 8px; }

/* software card (HookDump) */
.softcard {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  max-width: 920px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .08);
  text-align: left;
}
.softcard__side h3 { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.softcard__side h3 span { font-weight: 400; color: var(--color-muted); }
.softcard__body p { margin: 0 0 16px; }
.softcard__body p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .softcard { grid-template-columns: 1fr; gap: 16px; padding: 24px; } }
.paper__body .meta { color: var(--color-muted); font-size: 14px; margin: 0 0 10px; }
.paper__body .more { font-weight: 600; }
@media (max-width: 600px) {
  .paper { grid-template-columns: 92px 1fr; gap: 16px; }
  .paper__thumb img { width: 92px; }
}

/* press grid (media publications) */
.press-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 980px) { .press-grid { grid-template-columns: repeat(2, 1fr); } }
.press-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 10px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .07);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.press-card:hover { box-shadow: 0 18px 44px rgba(0, 0, 0, .13); transform: translateY(-2px); }
a.press-card { color: var(--color-text); text-decoration: none; }
a.press-card:hover { text-decoration: none; }
.press-card__img { aspect-ratio: 16 / 9; background: #f4f4f4; }
.press-card__img img { width: 100%; height: 100%; object-fit: cover; }
.press-card__body { padding: 20px 22px 24px; }
.press-card__body h3 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; }
.press-card__body h3 a { color: var(--color-text); }
.press-card__meta { font-size: 13px; color: var(--color-muted); margin: 0 0 10px; }
.press-card__body p { font-size: 14px; line-height: 1.55; color: #444; margin: 0; }
@media (max-width: 700px) { .press-grid { grid-template-columns: 1fr; } }

/* horizontal thumbnail filmstrip with captions (diplomas) */
.filmstrip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.filmstrip__item {
  flex: 0 0 auto;
  width: 180px;
  margin: 0;
  scroll-snap-align: start;
  cursor: zoom-in;
}
.filmstrip__item img {
  width: 180px;
  height: 134px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 6px;
  background: #fff;
  display: block;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
  transition: box-shadow .2s, transform .2s;
}
.filmstrip__item:hover img { box-shadow: 0 8px 22px rgba(0, 0, 0, .12); transform: translateY(-2px); }
.filmstrip__item figcaption { margin-top: 8px; font-size: 12px; line-height: 1.35; color: var(--color-muted); }
.filmstrip::-webkit-scrollbar { height: 8px; }
.filmstrip::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 4px; }
.filmstrip::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 4px; }

/* lightbox (gallery image viewer) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .92);
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 60px rgba(0, 0, 0, .6);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: .75;
  transition: opacity .15s;
}
.lightbox__close:hover,
.lightbox__nav:hover { opacity: 1; }
.lightbox__close { top: 16px; right: 24px; font-size: 40px; padding: 8px 14px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 60px; padding: 10px 20px; }
.lightbox__prev { left: 8px; }
.lightbox__next { right: 8px; }
.lightbox__caption {
  position: absolute;
  bottom: 46px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 15px;
  padding: 0 60px;
  opacity: .95;
}
.lightbox__count {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 13px;
  opacity: .7;
}

/* 6) Inner pages ------------------------------------------------------------ */

/* generic centered content column */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* hero: full-width background image with a white text card */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: var(--header-height) var(--gutter) 60px;
  background-size: cover;
  background-position: 50% 50%;
}
.hero::before {                         /* darkening so the white card pops (matches original) */
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6);
}
.hero__card {
  position: relative;
  width: min(460px, 100%);
  background: rgba(255, 255, 255, .94);
  padding: 44px 44px 52px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}
.hero__card h1 { font-size: 26px; font-weight: 600; margin: 0; }
.hero__card .muted { color: var(--color-muted); margin: 4px 0 24px; }
.hero__card p { margin: 0 0 18px; }

/* page-hero: dark banner with the page title (inner pages) */
.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 168px;
  padding: 86px var(--gutter) 16px;
  text-align: center;
  background: #1c1c1c center/cover no-repeat;
  color: var(--color-invert);
  box-shadow: inset 0 -36px 80px rgba(0, 0, 0, .30);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, .20) 52%, rgba(0, 0, 0, .48)),
    rgba(0,0,0,.24);
}
.page-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}
.page-hero h1 {
  position: relative;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin: 0;
}

/* plain text / prose section */
.section {
  padding: 64px 0;
  background: var(--color-band);
}
.section:nth-of-type(odd) { background: var(--color-band-alt); }
.section--tight { padding: 44px 0; }
.section__title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .5px;
  text-align: center;
  margin: 0 0 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, .13);
}
.prose { max-width: 760px; }
.prose p { margin: 0 0 18px; }

/* timeline (year + description) */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid #e6e6e6;
}
.timeline li:last-child { border-bottom: 1px solid #e6e6e6; }
.timeline .year { font-weight: 700; }

/* image gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .10);
}
.gallery--photos img { aspect-ratio: 4 / 3; }

/* simple link list */
.linklist { list-style: none; margin: 0 0 24px; padding: 0; }
.linklist li { padding: 14px 0; border-top: 1px solid #e6e6e6; font-size: 18px; }
.linklist li:last-child { border-bottom: 1px solid #e6e6e6; }

.section__title small { font-weight: 400; color: var(--color-muted); font-size: .6em; }

/* content entries (projects, inventions, diy) */
.entry {
  max-width: 820px;
  padding: 28px 0;
  border-top: 1px solid #e6e6e6;
}
.entry:first-of-type { border-top: 0; }
.entry h3 { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.entry h3 a { color: var(--color-text); }
.entry .meta { color: var(--color-muted); font-size: 14px; margin: 0 0 10px; }
.entry p { margin: 0 0 14px; }
.entry .more { font-weight: 600; }

/* full-width promo banner with background image */
.promo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 60px var(--gutter);
  text-align: center;
  background-size: cover;
  background-position: 50% 50%;
  color: var(--color-invert);
}
.promo::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.promo__inner { position: relative; max-width: 720px; }
.promo__inner h2 { font-size: 38px; font-weight: 800; margin: 0 0 14px; }

/* linked tiles (other projects) */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 4px;
}
.tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 320px;
  padding: 28px;
  background-size: cover;
  background-position: 50% 50%;
  color: var(--color-invert);
  font-size: 24px;
  font-weight: 600;
}
.tile::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.3); }
.tile span { position: relative; }
.tile:hover { text-decoration: none; }
.tile:hover::before { background: rgba(0,0,0,.45); }

/* fullscreen 404 page ------------------------------------------------------- */
body.not-found { background: #111; }
.error-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--header-height) var(--gutter) 80px;
  color: var(--color-invert);
  background:
    linear-gradient(180deg, rgba(207, 172, 120, .36), rgba(0, 0, 0, .90)),
    url('/assets/static.sitecdn.com/tild3938-6630-4636-a662-383963636636/2015-08-22_193902.jpg') center/cover no-repeat;
}
.error-hero__content {
  position: relative;
  width: min(720px, 100%);
  margin-left: max(0px, calc((100vw - var(--content-max)) / 2));
}
.error-hero h1 {
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0 0 20px;
}
.error-hero p {
  max-width: 460px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}
.error-hero a {
  color: var(--color-invert);
  border-bottom: 1px solid rgba(255, 255, 255, .72);
}
.error-hero a:hover { text-decoration: none; border-bottom-color: transparent; }

/* 7) Footer ----------------------------------------------------------------- */
.site-footer {
  background: var(--color-footer);
  color: #cfcfcf;
  padding: 48px var(--gutter);
  text-align: center;
  font-size: 14px;
}
.site-footer a { color: #cfcfcf; }
.site-footer__heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.social {
  display: flex;
  justify-content: center;
  gap: 22px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}
.social a { display: inline-flex; }
.social img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.site-footer__copy { color: #8a8a8a; }

/* 8) Responsive ------------------------------------------------------------- */
@media (max-width: 900px) {
  .cover {
    flex-direction: column;
    height: min(100vh, 844px);
    min-height: 760px;
  }
  .cover__col {
    min-height: 0;
    flex: 1 1 0;
    padding: 0 24px 8vh;
  }
  .cover__col--quote { padding-bottom: 8vh; }
  .cover__title { font-size: 22px; margin-bottom: 18px; }
  .cover__quote { font-size: 15px; line-height: 1.45; }

  .page-hero {
    min-height: 169px;
    padding: 72px 24px 24px;
  }

  .site-header { height: 72px; gap: 12px; }
  .site-header__logo img { width: 150px; }

  /* hamburger button */
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    cursor: pointer;
    z-index: 30;
  }
  .nav-burger span {
    display: block;
    height: 2px;
    width: 26px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }

  /* full-screen overlay menu, hidden until toggled */
  .main-nav {
    position: fixed;
    inset: 0;
    margin: 0;
    background: #121212;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 25;
  }
  .nav-toggle:checked ~ .main-nav { transform: translateX(0); }

  /* burger morphs into an X when open */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .main-nav__list {
    flex-direction: column;
    align-items: center;
    gap: 22px;
    flex-wrap: nowrap;
  }
  .main-nav__list a { font-size: 17px; color: #fff; letter-spacing: 1.5px; }

  /* submenus shown inline (no hover) on mobile */
  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    padding: 10px 0 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
  }
  .submenu a { color: #bdbdbd; padding: 5px 0; font-size: 14px; }
  .has-submenu > a::after { display: none; }
}
