/* Aibar Khairshakov — editorial portfolio. Shared visual system. */
:root {
  --paper: #f5f3ed;
  --surface: #fcfbf7;
  --ink: #202620;
  --muted: #596159;
  --accent: #315a44;
  --line: #d3d7ce;
  --soft: #e5e9df;
  --nav-height: 80px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', Arial, sans-serif;
  --mono: 'Courier New', monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding-top: var(--nav-height); background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.container { max-width: 1160px; padding-right: 24px; padding-left: 24px; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: #cddbc8; color: var(--ink); }
.accent { color: var(--accent); }
.muted, .body-copy { color: var(--muted); }
.eyebrow, .panel-kicker, .project-kind { font-family: var(--mono); font-size: .73rem; font-weight: 600; letter-spacing: .075em; color: var(--accent); text-transform: uppercase; margin-bottom: 20px; }
/* Navigation */
.navbar { min-height: var(--nav-height); padding: 13px 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.navbar-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink) !important; font-size: .95rem; letter-spacing: -.025em; line-height: 1.25; padding: 0; }
.brand-mark, .footer-mark { display: inline-grid; place-content: center; grid-auto-flow: column; background: var(--accent); color: var(--surface); width: 42px; height: 42px; font-family: var(--serif); font-size: 1.55rem; font-weight: 400; letter-spacing: -.10em; padding-right: 3px; }
.brand-mark span { color: #c2d4b7; }
.brand-name small { display: block; color: var(--muted); font-size: .72rem; font-weight: 400; letter-spacing: .01em; margin-top: 4px; }
.navbar-nav { gap: 24px; }
.navbar .nav-link { padding: 9px 0; color: var(--muted); font-size: .9rem; font-weight: 500; position: relative; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--ink); }
.navbar .nav-link.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--accent); }
.navbar-toggler { border: 1px solid var(--line); border-radius: 4px; padding: 6px 9px; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px #315a4430; }
/* Home */
.hero-section { padding-top: clamp(70px, 9vw, 125px); }
.hero-layout { padding-bottom: clamp(48px, 7vw, 85px); }
.status-dot { display: inline-block; height: 8px; width: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.hero-copy h1, .section-heading h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(3.5rem, 7vw, 6.25rem); line-height: .99; letter-spacing: -.065em; margin: 0; overflow-wrap: anywhere; }
.gradient-text, .section-heading h1 em { color: var(--accent); font-weight: 400; font-style: italic; }
.hero-role { font-size: 1.2rem; font-weight: 600; margin: 28px 0 8px; letter-spacing: -.02em; }
.hero-lead { max-width: 460px; color: var(--muted); font-size: 1.05rem; margin: 0; line-height: 1.75; }
.hero-actions { margin-top: 30px; }
.btn { font-size: .9rem; font-weight: 600; padding: 13px 20px; border-radius: 4px; line-height: 1.5; transition: background-color .18s, color .18s, border-color .18s; }
.btn-accent { background: var(--accent); border: 1px solid var(--accent); color: white; }
.btn-accent:hover, .btn-accent:focus { background: #254634; border-color: #254634; color: white; }
.btn-accent span { margin-left: 14px; }
.btn-outline-light { color: var(--ink); border: 1px solid #aeb7aa; background: transparent; }
.btn-outline-light:hover, .btn-outline-light:focus { color: var(--ink); background: var(--soft); border-color: var(--accent); }
.profile-card { max-width: 420px; margin-left: auto; min-height: 398px; background: #e1e6d9; border: 1px solid #bdc8b7; display: flex; flex-direction: column; justify-content: space-between; padding: 24px 26px; position: relative; isolation: isolate; overflow: hidden; }
.profile-card::before { content: ''; position: absolute; inset: 61px 26px 83px; border-top: 1px solid #aebcab; border-bottom: 1px solid #aebcab; z-index: -1; }
.profile-top, .hero-index { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; color: #425746; }
.avatar-placeholder { font-family: var(--serif); color: #315a44; font-size: clamp(8rem, 18vw, 14rem); letter-spacing: -.14em; line-height: .85; text-align: center; padding: 32px 22px 44px 0; font-style: italic; user-select: none; }
.avatar-placeholder span, .about-monogram span { color: #849477; }
.profile-caption { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; line-height: 1.35; }
.profile-caption strong { display: block; font-size: .95rem; font-weight: 650; }
.profile-caption small, .profile-location { display: block; color: #485b4a; font-size: .77rem; margin-top: 5px; }
.hero-index { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; color: var(--muted); text-transform: uppercase; }
.section-pad { padding-top: clamp(60px, 8vw, 100px); padding-bottom: clamp(65px, 8vw, 100px); }
.section-heading { max-width: 830px; margin-bottom: 35px; }
.section-heading h2, .cta-band h2 { font-family: var(--serif); font-size: clamp(2.3rem, 5vw, 3.65rem); font-weight: 400; letter-spacing: -.045em; line-height: 1.07; margin-bottom: 14px; }
.section-heading h1 { font-size: clamp(3rem, 6.4vw, 5.6rem); line-height: 1.04; margin-bottom: 20px; }
.section-heading > .muted { font-size: 1.05rem; max-width: 610px; margin-bottom: 0; }
.feature-card { border-top: 1px solid #aab7a8; padding: 22px 20px 8px 0; height: 100%; }
.icon-box { font: .82rem var(--mono); color: var(--accent); margin-bottom: 30px; }
.feature-card h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -.025em; margin: 0 0 12px; }
.feature-card p, .project-body p { color: var(--muted); margin: 0; line-height: 1.7; }
.cta-band { padding: 48px 0; background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-band .eyebrow { margin-bottom: 10px; }
.cta-band h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
/* Projects */
.inner-page .section-heading { padding-bottom: 30px; border-bottom: 1px solid var(--line); max-width: none; }
.project-card { height: 100%; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.project-card:hover { border-color: #889987; }
.project-art { aspect-ratio: 2 / 1; position: relative; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.project-art svg { width: 100%; height: 100%; max-height: 280px; display: block; font-family: var(--sans); }
.art-one { background: #dce6d9; }
.art-two { background: #e8dfc9; }
.art-three { background: #dce3e9; }
.art-four { background: #e8dcd5; }
.art-label { position: absolute; left: 12px; bottom: 8px; font: .63rem var(--mono); letter-spacing: .04em; color: #39453c; }
.project-body { padding: 24px; flex: 1; }
.project-body .project-kind { margin-bottom: 8px; font-size: .68rem; color: var(--accent); }
.project-body h3 { font-size: 1.35rem; font-weight: 650; letter-spacing: -.04em; margin: 0 8px 10px 0; }
.project-year { color: var(--muted); font: .75rem var(--mono); padding-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.tags span { font: .73rem var(--mono); color: var(--accent); }
.tags span + span::before { content: '/'; color: #9aab9a; margin-right: 12px; }
.project-note { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 24px; }
.project-note p { max-width: 560px; margin: 0; }
.project-note .btn { flex-shrink: 0; }
/* About */
.about-panel { background: var(--soft); padding: 28px; border: 1px solid #bdc8b7; }
.panel-kicker { margin-bottom: 0; }
.about-monogram { font: italic 8rem/.95 var(--serif); letter-spacing: -.13em; text-align: center; padding: 25px 14px 32px 0; border-bottom: 1px solid #b6c3b2; margin-bottom: 24px; color: var(--accent); }
.about-panel h3 { font-size: 1.3rem; letter-spacing: -.03em; font-weight: 650; margin-bottom: 5px; }
.about-panel p { color: var(--muted); }
.about-line { height: 1px; background: #bdc8b7; margin: 22px 0; }
.inner-page h2.h3, .inner-page h3.h4 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; letter-spacing: -.035em; }
.body-copy { line-height: 1.8; }
.skill-row { margin: 17px 0; font-size: .9rem; }
.skill-row > div:first-child { margin-bottom: 9px; gap: 12px; }
.skill-row > div:first-child span:last-child { color: var(--muted); font: .72rem var(--mono); align-self: center; }
.skill-track { height: 5px; background: #dce2d8; overflow: hidden; }
.skill-track span { display: block; height: 100%; background: #56765b; }
.custom-accordion { border-top: 1px solid var(--line); }
.custom-accordion .accordion-item { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink); }
.custom-accordion .accordion-button { background: transparent; color: var(--ink); font-weight: 600; padding: 21px 4px; box-shadow: none; border-radius: 0; }
.custom-accordion .accordion-button:not(.collapsed) { color: var(--accent); background: transparent; box-shadow: none; }
.custom-accordion .accordion-button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.custom-accordion .accordion-button::after { background-image: none; content: '+'; font: 1.5rem/1 var(--sans); color: var(--accent); text-align: center; transform: none; }
.custom-accordion .accordion-button:not(.collapsed)::after { content: '−'; transform: none; }
.accordion-body { color: var(--muted); line-height: 1.75; padding: 0 35px 22px 4px; }
/* Contact */
.contact-info { padding: 4px 12px 0 0; }
.contact-info h3, .form-heading h2 { font-family: var(--serif); font-size: 1.9rem; font-weight: 400; letter-spacing: -.04em; margin-bottom: 8px; }
.contact-detail { display: flex; align-items: flex-start; gap: 15px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.contact-detail > i { width: 26px; color: var(--accent); font-size: 1.2rem; text-align: center; }
.contact-detail small { font: .69rem var(--mono); letter-spacing: .04em; color: var(--muted); }
.contact-detail p { margin: 1px 0; font-weight: 550; overflow-wrap: anywhere; }
.example-label { color: var(--muted); font-size: .75rem; }
.note-box { margin-top: 24px; padding: 15px 16px; background: var(--soft); border-left: 3px solid #78947b; color: #425448; font-size: .85rem; line-height: 1.6; }
.contact-form { background: var(--surface); border: 1px solid var(--line); padding: clamp(22px, 4vw, 35px); }
.form-heading { border-bottom: 1px solid var(--line); margin-bottom: 24px; padding-bottom: 16px; }
.form-heading p { color: var(--muted); margin: 0; font-size: .85rem; }
.form-label { color: var(--ink); font-size: .86rem; font-weight: 600; margin-bottom: 7px; }
.form-control { background: var(--surface); border: 1px solid #b8c0b5; border-radius: 3px; color: var(--ink); font-size: .95rem; padding: 12px; min-height: 47px; }
.form-control:focus { color: var(--ink); background: white; border-color: var(--accent); box-shadow: 0 0 0 .18rem #315a4420; outline: none; }
.form-control::placeholder { color: #737b73; opacity: 1; }
textarea.form-control { resize: vertical; min-height: 132px; }
.invalid-feedback { color: #a02f32; }
.form-message { font-size: .85rem; font-weight: 600; color: var(--accent); flex: 1 1 160px; }
/* Original script sets light-theme-incompatible inline colors. Override presentation only. */
.form-message[style*="color: rgb(82, 214, 208)"], .form-message[style*="#52d6d0"] { color: #315a44 !important; }
.form-message[style*="color: rgb(255, 146, 146)"], .form-message[style*="#ff9292"] { color: #a02f32 !important; }
/* Footer and motion */
.site-footer { padding: 25px 0; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-mark { width: 30px; height: 30px; font-size: 1.15rem; }
.footer-sep { color: #8b9b88; padding: 0 5px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
/* Keep content visible if CDN scripts fail; the existing jQuery class triggers a subtle entrance. */
.reveal.visible { animation: reveal-in .45s ease-out both; }
@keyframes reveal-in { from { opacity: .55; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 991.98px) {
  :root { --nav-height: 72px; }
  .navbar-nav { gap: 2px; padding-top: 15px; }
  .navbar .nav-link { padding: 10px 0; }
  .navbar .nav-link.active::after { right: auto; width: 26px; }
  .hero-section { padding-top: 62px; }
  .profile-card { margin: 0; max-width: 560px; min-height: 345px; }
  .avatar-placeholder { font-size: 12rem; }
}
@media (max-width: 575.98px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .brand-name { font-size: .87rem; }
  .hero-copy h1 { font-size: clamp(2.75rem, 11.1vw, 4rem); }
  .section-heading h1 { font-size: clamp(2.65rem, 10.2vw, 3.7rem); }
  .hero-role { font-size: 1.07rem; }
  .hero-section { padding-top: 45px; }
  .profile-card { min-height: 310px; padding: 20px; }
  .profile-card::before { inset: 53px 20px 76px; }
  .avatar-placeholder { font-size: 10rem; padding: 25px 16px 35px 0; }
  .hero-index { flex-wrap: wrap; font-size: .62rem; }
  .hero-index span:nth-child(2) { display: none; }
  .feature-card { padding: 17px 0 6px; }
  .icon-box { margin-bottom: 15px; }
  .project-body { padding: 19px; }
  .project-note, .footer-inner { align-items: flex-start; flex-direction: column; gap: 14px; }
  .contact-info { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* Match Bootstrap's large row gutter to the narrow page margins. */
@media (max-width: 575.98px) { .row.g-5 { --bs-gutter-x: 1.5rem; } }
