/* =========================================
   Kostya Suspitsyn — kostya0x.com
   Hand-built from Framer original
   Fonts: Geist Mono + Geist (Google Fonts)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500&display=swap');

/* — Reset — */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

/* — Tokens — */
:root {
  --bg:            #fff;
  --text:          #000;
  --text-body:     var(--text);
  --text-muted:    #666;
  --text-dim:      #999;
  --border:        #e5e5e5;
  --link:               #FF6817;
  --link-hover:         #FF6817;
  --link-underline:     #d0d0d0;
  --link-underline-hover: #888;
  --font-sans:     'Geist', Arial, sans-serif;
  --content-width: 1000px;
  --text-width:    512px;
  --page-pad:      24px;
  --gap-xs:        8px;
  --gap-sm:        12px;
  --gap-md:        24px;
  --gap-lg:        40px;
  --gap-xl:        64px;
  --gap-2xl:       112px;
  --radius:        6px;
  --ease-gentle:   cubic-bezier(0.33, 1, 0.68, 1);

  /* Component tokens */
  --term-bg:            #E9E9E9;
  --term-accent-color:  #F75600;
  --term-accent-bg:     #FFE9DE;
  --cta-bg:             #FAFAFA;
  --cta-border:         #E7E7E7;
  --cta-heading-color:  #000;
  --cta-desc-color:     #858585;
}

/* — Base — */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--link-underline);
  font-weight: 500;
  transition: color 0.3s var(--ease-gentle), text-decoration-color 0.3s var(--ease-gentle);
}
a:hover {
  color: var(--text);
  text-decoration-color: var(--link-underline-hover);
}

/* — Body copy (Inter) — headings, nav, titles & tags stay mono — */
.hero-body,
.contact-prose,
.page-desc,
.project-desc,
.about-block-text,
.cta-desc {
  font-family: var(--font-sans);
}

/* — Layout — */
.page-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* About page: nav stays global width, body returns to the narrow column */
.about-body {
  max-width: var(--text-width);
  margin: 0 auto;
}

/* — Navigation — */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
}
/* Becomes a flex lockup only when the avatar is present */
.nav-name:has(.nav-avatar) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-name:hover { text-decoration-color: var(--link-underline-hover); }

/* On the About page the brand links home — give it a hover affordance */
.page-about .nav-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  filter: grayscale(100%);
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.2);
}

.nav-links {
  display: flex;
  gap: var(--gap-md);
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}
.nav-links a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--link-underline-hover); }
.nav-links a.active { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--link-underline-hover); }

/* — Hero (left-aligned intro above the video) — */
.nav--home { border-bottom: none; }

.hero {
  display: flex;
  flex-direction: column;
}

/* Menu shares the narrow text column (both pages) */
.nav--home {
  width: min(var(--text-width), 100%);
  margin-inline: auto;
}

.hero-inner {
  padding: var(--gap-xl) 0 72px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: var(--text-width);
  margin-inline: auto;
}

.hero-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  filter: grayscale(100%);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.2);
}

.hero-copy {
  max-width: var(--text-width);
  margin: 0;
  text-align: left;
  text-wrap: pretty;
  font-family: var(--font-sans);
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-muted);
}

.hero-strong {
  color: var(--text);
  font-weight: 500;
}

.hero-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 6px;
  margin-top: 8px;
  font-size: 14px;
}

.hero-socials a {
  color: var(--text-muted);
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
}

.hero-socials a:hover {
  color: var(--text);
  text-decoration-color: var(--link-underline-hover);
}

.hero-socials a:not(:last-child)::after {
  content: "·";
  display: inline-block;
  margin: 0 10px;
  color: var(--text-dim);
  pointer-events: none;
}

/* — Contact prose — */
.contact-prose {
  margin-top: var(--gap-md);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}

/* — Social icons — */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 52px;
}

.social-icons a {
  display: inline-flex;
}

.social-icons img {
  display: block;
  width: 40px;
  height: 40px;
  transition: transform 0.2s ease-in-out;
}

.social-icons a:hover img {
  transform: scale(1.05);
}

/* — Italic term — */
.term {
  font-style: normal;
  font-weight: 450;
  background: var(--term-bg);
}

.term-accent {
  font-style: normal;
  font-weight: 600;
  color: var(--term-accent-color);
  background: var(--term-accent-bg);
}

/* — Section divider — */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* — Home snippets — */
.snippets-section {
  padding: 0 0 var(--gap-xl);
}

.snippets-label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 8px;
  margin-bottom: 0;
}

.snippets-label a {
  color: var(--text);
}

.snippets-video {
  overflow: hidden;
}

.snippets-video video {
  width: 100%;
  display: block;
}

/* — Craft Page — */
.craft-intro {
  padding: var(--gap-xl) 0 var(--gap-xl);
}

.page-heading {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: var(--gap-md);
}

.page-desc {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
}

/* — Project sections — */
.project {
  display: flex;
  flex-direction: column;
  padding: var(--gap-xl) 0;
  border-top: 1px solid var(--border);
}

.project-header {
  margin-bottom: var(--gap-lg);
  width: min(var(--text-width), 100%);
  margin-inline: auto;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-icon {
  flex-shrink: 0;
  display: block;
  width: 44px;
  height: 44px;
  color: var(--border);
}

.project-meta-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.project-title {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}

.project-tagline {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

.project-year {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.project-desc {
  order: 1; /* render below the project's images */
  margin-top: var(--gap-lg);
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
  max-width: var(--text-width);
  margin-inline: auto;
}

.project-desc + .project-desc {
  margin-top: var(--gap-md);
}

/* Two-column description — columns align with the image grid below */
.project-desc-grid {
  order: 1; /* render below the project's images */
  margin-top: var(--gap-lg);
  margin-inline: auto;
  max-width: var(--text-width);
  display: grid;
  grid-template-columns: 1fr;
  row-gap: var(--gap-md);
}

.project-desc-grid .project-desc {
  order: 0;
  margin-top: 0;
  max-width: none;
}

/* — Image layouts — */
.img-single {
  margin-bottom: 4px;
}

.img-single img {
  width: 100%;
}

.img-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 4px;
}

.img-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 4px;
}

.img-grid-2 img,
.img-grid-3 img {
  width: 100%;
}

.gif-black-wrap {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}

.gif-black-wrap img {
  width: 30%;
  height: auto;
}

.gif-black-wrap--xl img {
  width: 90%;
}

.gif-black-wrap--lg img {
  width: 70%;
}

.img-caption {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: var(--gap-lg);
}


/* — About page — */
.about-intro {
  padding: var(--gap-xl) 0 0;
}

.about-sections {
  padding-bottom: 0;
}

.about-block {
  padding: var(--gap-lg) 0;
  border-top: 1px solid var(--border);
}

.about-block-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: var(--gap-md);
}

.about-block-text {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
}

.about-block-text p + p {
  margin-top: var(--gap-sm);
}

/* — CTA Footer — */
.cta {
  max-width: var(--text-width);
  margin-inline: auto;
  padding: 32px;
  background: var(--cta-bg);
  border: 1px solid var(--cta-border);
  margin-bottom: var(--gap-2xl);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.cta-heading {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  color: var(--cta-heading-color);
  margin-bottom: 8px;
}

.cta-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--cta-desc-color);
  max-width: 480px;
  margin-bottom: 24px;
}

.cta-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-links img {
  display: block;
  width: 40px;
  height: 40px;
  transition: transform 0.2s ease-in-out;
}

.cta-links a:hover img {
  transform: scale(1.05);
}

/* — Site footer — */
.site-footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--gap-md) var(--page-pad) 0;
  font-size: 12px;
}

/* — Body copy color — softer than headings in dark mode to reduce eye strain — */
.hero-body,
.contact-prose,
.page-desc,
.project-desc,
.about-block-text {
  color: var(--text-body);
}

/* ——— Themes ——— */

[data-theme="dark"] {
  --bg:                 #121212;
  --text:               #F0F0F0;
  --text-body:          #AAAAAA;
  --text-muted:         #909090;
  --text-dim:           #5C5C5C;
  --border:             #303030;
  --link:               #FF6817;
  --link-hover:         #FF6817;
  --link-underline:     #484848;
  --link-underline-hover: #909090;
  --term-bg:            #282828;
  --term-accent-bg:     #2C1506;
  --cta-bg:             #1E1E1E;
  --cta-border:         #303030;
  --cta-heading-color:  #F0F0F0;
  --cta-desc-color:     #909090;
}


/* ——— Theme Picker ——— */

.theme-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  line-height: 1;
  opacity: 0.55;
  transition: opacity 0.3s var(--ease-gentle), color 0.3s var(--ease-gentle);
}

.theme-btn:hover {
  opacity: 1;
}

.theme-btn svg {
  transition: transform 0.2s ease-in-out;
}

[data-theme="dark"] .theme-btn svg {
  transform: rotate(180deg);
}

/* ——— Responsive ——— */

/* Mobile: <810px */
@media (max-width: 809px) {
  :root {
    --content-width: 100%;
    --gap-2xl: 72px;
  }

  .hero-copy { font-size: 18px; }
  .hero-inner { padding: var(--gap-xl) 0 var(--gap-xl); }

  .project-desc { max-width: none; }

  .img-grid-2,
  .img-grid-3 { grid-template-columns: 1fr; }

}

