/* ============================================================
   Dmytro Kucher — Portfolio stylesheet (shared across all pages)
   ============================================================ */

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

:root {
  --orange: #1A1A1A; /* orange disabled — using black */
  --black: #1A1A1A;
  --gray: #555555;
  --light-gray: #888888;
  --lighter-gray: #BBBBBB;
  --border: #E8E8E8;
  --bg: #FFFFFF;
  --max-width: 960px;
  --reading-width: 680px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { font-size: 16px; scroll-behavior: auto; }

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── NAV ── */
nav.top-nav {
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav.top-nav .nav-left {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
}

nav.top-nav .nav-left a {
  color: var(--black);
  text-decoration: none;
}

nav.top-nav .nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  transition: opacity 0.15s;
}

nav.top-nav .nav-back .arrow {
  display: inline-block;
  transition: transform 0.15s var(--ease-out);
}

nav.top-nav .nav-back:hover .arrow {
  transform: translateX(-2px);
}

nav.top-nav .nav-right {
  display: flex;
  align-items: center;
}

nav.top-nav a {
  font-size: 13px;
  font-weight: 400;
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
  letter-spacing: 0.01em;
  transition: opacity 0.15s;
}

nav.top-nav .nav-right a:hover { opacity: 0.65; }
nav.top-nav .nav-left a:hover { opacity: 0.65; }

.nav-sep {
  color: var(--lighter-gray);
  margin: 0 12px;
  font-size: 13px;
}

/* ── WRAPPER ── */
.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.wrapper-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── HERO (index only) ── */
.hero {
  padding-top: 40px;
  padding-bottom: 80px;
}

.hero h1 {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 10px;
}

.hero .subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--light-gray);
  margin-bottom: 56px;
}

.hero .lead {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--black);
  max-width: var(--reading-width);
  margin-bottom: 28px;
}

.hero .body-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--gray);
  max-width: 660px;
  margin-bottom: 20px;
}

/* ── TIMELINE ── */
.timeline-section { padding-bottom: 80px; }
.role-block { margin-bottom: 112px; position: relative; }

.role-meta {
  border-top: 1px solid #E0E0E0;
  padding-top: 32px;
  margin-bottom: 64px;
  position: relative;
}

.role-meta .employer {
  font-size: 36px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 10px;
}

.role-meta .role-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 2px;
}

.role-meta .role-location,
.role-meta .role-dates {
  font-size: 14px;
  font-weight: 400;
  color: var(--light-gray);
}

/* ── ENTRY (timeline) ── */
.entry { margin-bottom: 64px; }
.entry:last-child { margin-bottom: 0; }

.entry-visual {
  width: 100%;
  max-width: var(--reading-width);
  aspect-ratio: 16/9;
  background: #C8C8C8;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

.entry-visual img,
.entry-visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.entry-visual .placeholder-label {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.entry-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.entry-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray);
  max-width: 640px;
  margin-bottom: 18px;
}

.entry-credit {
  font-size: 11px;
  color: var(--lighter-gray);
  margin-top: -12px;
  margin-bottom: 16px;
}

.entry-credit a {
  color: var(--lighter-gray);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── CASE STUDY LINK BUTTON (secondary) ── */
.btn-case-study {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--black);
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid var(--black);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}

.btn-case-study:hover {
  background: var(--black);
  color: #fff;
}

.btn-case-study .arrow {
  display: inline-block;
  transition: transform 0.15s var(--ease-out);
}

.btn-case-study:hover .arrow {
  transform: translateX(2px);
}

/* ── CASE STUDY PAGE ── */
.case-study-page {
  padding-top: 40px;
  padding-bottom: 80px;
}

.cs-title-block {
  margin-bottom: 56px;
}

.cs-title-block h1 {
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 12px;
  max-width: var(--reading-width);
}

.cs-title-block .cs-subtitle {
  font-size: 16px;
  color: var(--light-gray);
  line-height: 1.5;
  max-width: var(--reading-width);
}

.cs-section {
  margin-bottom: 56px;
  max-width: var(--reading-width);
}

.cs-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

.cs-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 10px;
  margin-top: 28px;
  letter-spacing: -0.01em;
}

.cs-section h3:first-of-type {
  margin-top: 8px;
}

.cs-section p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray);
  margin-bottom: 16px;
}

.cs-visual {
  width: 100%;
  max-width: var(--reading-width);
  aspect-ratio: 16/9;
  background: #E8E8E8;
  border-radius: 4px;
  margin: 32px 0;
  position: relative;
}

.cs-visual .placeholder-label {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-size: 12px;
  color: rgba(0,0,0,0.3);
}

/* Back to timeline link */
.back-to-timeline {
  margin-top: 64px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid var(--black);
  border-radius: 4px;
  transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}

.back-link:hover {
  background: var(--black);
  color: #fff;
}

.back-link .arrow {
  display: inline-block;
  transition: transform 0.15s var(--ease-out);
}

.back-link:hover .arrow {
  transform: translateX(-2px);
}

/* ── PATENTS ── */
.patents-section {
  border-top: 1px solid #EBEBEB;
  padding: 80px 0;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}

.patents-intro {
  font-size: 15px;
  color: var(--light-gray);
  margin-bottom: 36px;
}

.patent-list {
  list-style: disc;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.patent-list li::marker { color: var(--gray); }

.patent-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.patent-desc {
  font-size: 15px;
  color: var(--gray);
}

.patent-num {
  font-size: 12px;
  color: var(--lighter-gray);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid #EBEBEB;
  padding: 40px 0 60px;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

footer a {
  font-size: 14px;
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 400;
  transition: opacity 0.15s;
}

footer a:hover { opacity: 0.65; }

.footer-sep { color: var(--lighter-gray); font-size: 14px; }

.footer-copy {
  margin-left: auto;
  font-size: 13px;
  color: var(--lighter-gray);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav.top-nav { padding: 18px 20px; }
  .wrapper, .wrapper-narrow { padding: 0 20px; }
  .role-meta .employer { font-size: 28px; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: 38px; }
  .hero .lead { font-size: 18px; }
  .case-study-page { padding-top: 24px; }
  .cs-title-block h1 { font-size: 32px; }
  .cs-section p { font-size: 14px; }
  .footer-copy { margin-left: 0; width: 100%; }
}
