/* ===========================================================
   Cyril Wochok / Portfolio - styles
   =========================================================== */

:root {
  --paper: #f7f4ef;
  --ink: #16151a;
  --ink-soft: #55545c;
  --line: rgba(22, 21, 26, 0.12);
  --accent: #1c8c82;
  --card: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  --max: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Decorative wave/beach graphic in the top-right corner: a raster
   PNG (not SVG) with a real alpha channel that dissolves the art
   into transparency moving away from that corner, so it blends into
   the plain --paper color underneath rather than needing a hard
   edge. Sized generously and capped by viewport width so it reads
   as a bold corner accent on wide screens without overwhelming
   narrow ones. Lives on <body> (not a section) so it sits behind
   every section as the page's very back layer, unaffected by any
   element's own z-index/stacking. */
body {
  background-color: var(--paper);
  background-image: url("assets/img/wave-hero.png");
  background-repeat: no-repeat;
  background-position: top right;
  background-size: min(1200px, 90vw) auto;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(247, 244, 239, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.2px;
  text-decoration: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
}

.main-nav a { text-decoration: none; color: var(--ink-soft); }
.main-nav a:hover { color: var(--ink); }
.main-nav .nav-resume {
  color: var(--paper);
  background: var(--ink);
  padding: 8px 16px;
  border-radius: 100px;
}
.main-nav .nav-resume:hover { background: var(--accent); }

/* ---------------- Hero ---------------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 24px 72px;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 5.5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.5px;
  margin: 0 0 24px;
  max-width: 18ch;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 36px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); }

.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------------- Section heads ---------------- */

.section-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.section-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.3px;
  max-width: 32ch;
  margin: 0 0 56px;
}

.about .section-head h2 { margin-bottom: 28px; }

/* .section-head normally centers/pads itself as a direct child of a
   section (see .work above). Inside .about it's nested one level
   deeper - .about already centers and pads its content - so without
   this override, section-head's own max-width/margin/padding stacked
   on top of .about's, pushing the kicker and headline ~24px further
   right than .about-copy right beneath them. Zero it out here so the
   kicker/headline sit flush with the body copy's left edge. */
.about .section-head { max-width: none; margin: 0; padding: 0; }

/* ---------------- Work / case studies ---------------- */

.work { padding: 40px 0 40px; }

.case {
  max-width: var(--max);
  margin: 0 auto 96px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}

.case-media { position: sticky; top: 88px; }

.case-hero-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  /* crop from the left edge, not centered - these collages put the
     app icon/logo at the left, and a centered 4:3 crop of a wider
     source image was cutting into it */
  object-position: left center;
  border-radius: 20px;
  background: #e7e3da;
  box-shadow: 0 24px 48px -24px rgba(22, 21, 26, 0.35);
}

.case-img-contain {
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(22, 21, 26, 0.25);
}

/* Placeholder shown in place of a hero screenshot until the visitor
   clicks to load it. Screenshots live in a password-protected folder
   (client NDA work), so this avoids the browser's login prompt firing
   on page load - it only fires once someone opts in. */
.hero-img-reveal {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  background: #e7e3da;
  box-shadow: 0 24px 48px -24px rgba(22, 21, 26, 0.35);
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.hero-img-reveal svg { width: 28px; height: 28px; }
.hero-img-reveal:hover { background: #ded9cc; color: var(--ink); }

.case-eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin: 0 0 6px;
}

.case-content h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.3px;
  margin: 0 0 20px;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.case-meta strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin-bottom: 2px;
}

.case-story {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-story li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

.case-story li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.case-quote {
  margin: 0 0 28px;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
}

.case-quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 10px;
  color: var(--ink);
}

.case-quote cite {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.case-skills {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-skills li {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
}

.case-cta {
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

.case-cta:hover { color: var(--accent); border-color: var(--accent); }
.case-cta::after { content: "→"; transition: transform 0.15s ease; }
.case-cta:hover::after { transform: translateX(3px); }

/* alternate media/content sides on wide screens for visual rhythm */
.case-reverse .case-media { order: 2; }
.case-reverse .case-content { order: 1; }

/* ---------------- About ---------------- */

.about {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 120px;
}

.about-copy {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 40px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 24px 48px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.site-footer p { margin: 4px 0; }
.site-footer a { text-decoration: underline; }

/* ---------------- Modals ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 20, 22, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  overflow-y: auto;
}

.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-overlay.modal-center { align-items: center; }

.modal-panel {
  position: relative;
  background: var(--paper);
  border-radius: 20px;
  width: 100%;
  max-width: 760px;
  padding: 40px 24px 48px;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-panel { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close svg { width: 16px; height: 16px; }

.case-product-head { padding-bottom: 8px; }
.case-product-head .eyebrow { font-size: 12px; color: var(--ink-soft); margin: 0 0 6px; }
.case-product-head h2 { font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: -0.24px; margin: 0; }

.case-meta-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.case-meta-grid div { flex: 1 1 120px; }
.case-meta-grid .label { font-size: 12px; color: var(--ink-soft); margin: 0 0 2px; }
.case-meta-grid .value { font-size: 16px; font-weight: 600; letter-spacing: -0.16px; margin: 0; }

.case-block { margin: 24px 0; }
.case-block .kicker { font-size: 12px; color: var(--accent); margin: 0 0 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.case-block h3 { font-family: var(--serif); font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.case-block p { font-size: 16px; line-height: 1.6; margin: 0 0 8px; }
.case-block p:last-child { margin-bottom: 0; }
.case-block p.lede { font-weight: 700; }

.case-image {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin: 16px 0;
  background: #e5e5e5;
}

.case-image img { width: 100%; display: block; }

.view-video-btn {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(3px);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
}

.view-video-btn:hover { background: var(--ink); color: var(--paper); }

.expand-image-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.expand-image-btn:hover { background: var(--ink); color: var(--paper); }
.expand-image-btn svg { width: 17px; height: 17px; }

.image-panel {
  max-width: min(95vw, 1400px);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.image-panel .modal-close { background: rgba(0, 0, 0, 0.55); top: 16px; right: 16px; }
.image-panel .modal-close svg { color: #fff; }

.image-lightbox { display: flex; align-items: center; justify-content: center; }

.image-lightbox img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.video-panel { max-width: 900px; padding: 0; background: #000; overflow: hidden; }
.video-panel .modal-close { background: rgba(0, 0, 0, 0.6); }
.video-panel .modal-close svg { color: #fff; }

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-placeholder { color: #aaa; font-size: 14px; text-align: center; padding: 24px; }

/* ---------------- Responsive ---------------- */

@media (max-width: 860px) {
  .case {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 64px;
  }
  .case-media { position: static; order: 1 !important; }
  .case-content { order: 2 !important; }
  .case-hero-img { aspect-ratio: 16/10; }
}

@media (max-width: 560px) {
  .site-header { padding: 14px 16px; }
  .main-nav { gap: 14px; }
  .main-nav a:not(.nav-resume) { display: none; }
  .hero { padding: 56px 16px 48px; }
  .section-head, .case, .about { padding-left: 16px; padding-right: 16px; }
  .about .section-head { padding-left: 0; padding-right: 0; }
  .case-content h3 { font-size: 25px; }
  /* smaller/subtler on phones so it doesn't crowd the hero text */
  body { background-size: 92vw auto; }
}

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