/* ==========================================================
   Sayurov / Portfolio 2026
   Sky blue accent · white · tight vertical rhythm
   ========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

:root {
  --bg:         #FFFFFF;
  --ink:        #111413;
  --ink-soft:   #38403C;
  --ink-muted:  #757A76;
  --ink-low:    #B1B4B2;
  --rule:       #ECEEED;
  --surface:    #F5F7F6;

  --accent:        #4A8BB5;  /* sky blue mid */
  --accent-mid:    #7BAFD0;
  --accent-soft:   #E6F1F8;
  --accent-softer: #F3F8FB;
  --accent-deep:   #2C6D99;
  --accent-ink:    #1F4D70;

  --ff: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --dur:      220ms;
  --dur-slow: 420ms;
  --ease:     cubic-bezier(0.2, 0, 0, 1);

  --max:        1120px;
  --max-narrow:  720px;

  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   22px;
  --r-pill: 999px;

  --sh-card:     0 1px 2px rgba(17,20,19,0.04), 0 12px 32px rgba(17,20,19,0.06);
  --sh-pill:     0 1px 2px rgba(17,20,19,0.05), 0 6px 16px rgba(17,20,19,0.05);
  --sh-portrait: 0 4px 16px rgba(17,20,19,0.08), 0 20px 48px rgba(17,20,19,0.06);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img { display: block; max-width: 100%; height: auto; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 20px;
  top: 20px;
  z-index: 200;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
}

/* ============ PAGE ============ */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 32px 64px;
}

/* ============ HERO ============ */
.hero {
  padding-top: 16px;
  text-align: center;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 48px;
  margin-bottom: 28px;
}

.portrait-col {
  grid-column: 2;
  display: flex;
  justify-content: center;
}

.portrait-wrap {
  position: relative;
  width: 200px;
  height: 200px;
}

.portrait {
  position: relative;
  z-index: 1;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--sh-portrait);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.stats {
  grid-column: 3;
  justify-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 10px;
  background: var(--bg);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-pill);
}
.stat__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.stat__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}
.stat__value {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.stat__label {
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.2;
}

.name {
  font-size: clamp(2rem, 4.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 8px;
}

.role {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 22px;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.social {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.social:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

/* ============ SECTION TITLE ============ */
.section__title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: center;
  margin-bottom: 28px;
}

/* ============ ABOUT ============ */
.about {
  max-width: var(--max-narrow);
  margin: 48px auto 0;
  text-align: center;
}
.about__text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 600px;
  margin: 0 auto;
}
.about__text p {
  font-size: 15px;
  line-height: 1.72;
  color: var(--ink-soft);
}

/* ============ WORK ============ */
.work {
  margin-top: 72px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-mid);
  box-shadow: var(--sh-card);
}

.card__num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 2px;
}

.card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.card__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* ============ FOOT ============ */
.foot {
  background: var(--bg);
  border-top: 1px solid var(--rule);
  margin-top: 72px;
}

.foot__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 32px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}

.foot__brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.foot__tagline {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.foot__email {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 1px;
}
.foot__email:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.foot__copy {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .page { padding: 24px 20px 56px; }

  .hero { padding-top: 4px; }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
  }
  .portrait-col { grid-column: 1; }
  .stats {
    grid-column: 1;
    justify-self: center;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .portrait-wrap, .portrait { width: 160px; height: 160px; }

  .about { margin-top: 40px; }
  .work { margin-top: 56px; }

  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .foot__inner {
    grid-template-columns: 1fr;
    padding: 28px 20px 24px;
  }
}

/* ============ SCROLL REVEAL ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 620ms cubic-bezier(0.2, 0, 0, 1),
    transform 620ms cubic-bezier(0.2, 0, 0, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.cards .card:nth-child(1) { --i: 0; }
.cards .card:nth-child(2) { --i: 1; }
.cards .card:nth-child(3) { --i: 2; }
.cards .card:nth-child(4) { --i: 3; }
.cards .card:nth-child(5) { --i: 4; }
.cards .card:nth-child(6) { --i: 5; }

/* ============ FLOATING CTA ============ */
.cta-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 0 4px 14px rgba(17,20,19,0.12), 0 12px 32px rgba(17,20,19,0.10);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 300ms var(--ease),
    transform 300ms var(--ease),
    background 200ms var(--ease);
  z-index: 50;
}
.cta-float.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cta-float:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
}
.cta-float__arrow {
  font-size: 13px;
  display: inline-block;
  transition: transform 200ms var(--ease);
}
.cta-float:hover .cta-float__arrow {
  transform: translateX(3px);
}
@media (max-width: 720px) {
  .cta-float {
    bottom: 16px;
    right: 16px;
    padding: 11px 18px;
    font-size: 13px;
  }
}

/* ============ ALT MODE TRIGGER ============ */
/* .fashion-trigger intentionally unstyled — blends with surrounding text */

/* Smooth mode-switch transitions on key surfaces */
body,
.portrait,
.portrait img,
.stat,
.stat__icon,
.social,
.card,
.card__num,
.foot,
.foot__email {
  transition: background-color 500ms ease,
              color 500ms ease,
              border-color 500ms ease,
              filter 500ms ease,
              box-shadow 500ms ease;
}

/* Alt mode — pure black/white + minimal burgundy accent */
html:has(.fashion-trigger:hover) {
  --bg:            #000000;
  --ink:           #FFFFFF;
  --ink-soft:      #D6D6D6;
  --ink-muted:     #7A7A7A;
  --ink-low:       #4A4A4A;
  --rule:          #262626;
  --surface:       #0F0F0F;
  --accent:        #8B1A1A;  /* burgundy */
  --accent-mid:    #A83C52;
  --accent-soft:   rgba(139, 26, 26, 0.12);
  --accent-softer: rgba(139, 26, 26, 0.05);
  --accent-deep:   #611016;
  --accent-ink:    #A83C52;
}

html:has(.fashion-trigger:hover) body {
  background: var(--bg);
  color: var(--ink);
}

html:has(.fashion-trigger:hover) .portrait img {
  filter: grayscale(1) contrast(1.12) brightness(0.95);
}

html:has(.fashion-trigger:hover) .stat {
  background: #0A0A0A;
  box-shadow: 0 0 0 1px #262626, 0 6px 16px rgba(0,0,0,0.6);
}

html:has(.fashion-trigger:hover) .card {
  background: #0A0A0A;
}

html:has(.fashion-trigger:hover) .foot {
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .cta-float { transition: none; }
}
