/*
 * MIT License
 *
 * Copyright (c) 2026 Valerii M.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

:root {
  --ink: #171713;
  --paper: #f0eee8;
  --lime: #d8ff52;
  --orange: #ff5938;
  --line: rgba(23, 23, 19, 0.2);
  --portrait-bg: #d6d3cb;
  --portrait-line: rgba(23, 23, 19, 0.28);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #f1efe8;
  --paper: #11110f;
  --line: rgba(241, 239, 232, 0.2);
  --portrait-bg: #24241f;
  --portrait-line: rgba(241, 239, 232, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
  transition: background-color 300ms ease, color 300ms ease;
}
a { color: inherit; text-decoration: none; }
.cursor-glow {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(216, 255, 82, 0.23);
  filter: blur(10px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}
.site-header {
  position: relative;
  z-index: 20;
  height: 96px;
  padding: 0 4vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.08em; }
.brand span { color: var(--orange); }
nav { display: flex; gap: 2.4rem; font-size: 0.82rem; font-weight: 600; }
nav a, footer a { transition: opacity 180ms ease; }
nav a:hover, footer a:hover { opacity: 0.5; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 1.3rem; }
.availability { font-family: "DM Mono", monospace; font-size: 0.72rem; text-transform: uppercase; }
.availability span { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #48a637; animation: pulse 2s infinite; }
.theme-toggle { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease, transform 200ms ease; }
.theme-toggle:hover { background: var(--ink); color: var(--paper); transform: rotate(12deg); }
.theme-toggle svg { grid-area: 1 / 1; width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: opacity 180ms ease, transform 240ms ease; }
.moon-icon { opacity: 0; transform: rotate(-45deg) scale(0.7); }
[data-theme="dark"] .sun-icon { opacity: 0; transform: rotate(45deg) scale(0.7); }
[data-theme="dark"] .moon-icon { opacity: 1; transform: none; }
.menu-toggle { display: none; }

.hero {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  border-bottom: 1px solid var(--line);
}
.hero-copy { padding: clamp(4rem, 8vw, 8rem) 4vw 3rem; display: flex; flex-direction: column; }
.eyebrow, .section-index, .project-info p {
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 {
  max-width: 930px;
  margin: 1.5rem 0 4rem;
  font-size: clamp(3.8rem, 7.3vw, 8.3rem);
  line-height: 0.91;
  letter-spacing: -0.072em;
  font-weight: 600;
}
h1 em { color: var(--orange); font-family: Georgia, serif; font-weight: 400; }
.hero-bottom { margin-top: auto; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.hero-bottom p { max-width: 410px; margin: 0; font-size: 1.05rem; line-height: 1.65; }
.circle-link { flex: 0 0 78px; height: 78px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; transition: 220ms ease; }
.circle-link svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.circle-link:hover { background: var(--ink); color: var(--paper); transform: rotate(-25deg); }
.portrait-wrap { position: relative; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; padding-top: clamp(3.5rem, 7vw, 7rem); background: var(--portrait-bg); border-left: 1px solid var(--line); transition: background-color 300ms ease; }
.portrait-wrap::before { content: ""; width: min(52%, 310px); aspect-ratio: 1; position: absolute; border: 1px solid var(--portrait-line); border-radius: 50%; transform: translate(9%, -8%) scale(1.14); }
.portrait-frame { position: relative; width: min(48%, 280px); aspect-ratio: 1; overflow: hidden; border-radius: 50%; box-shadow: 0 18px 50px rgba(23, 23, 19, 0.18); }
.portrait-frame::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.13), transparent 58%); }
.portrait-frame img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 44%; filter: saturate(0.68) contrast(0.92) brightness(1.08) blur(0.35px); transform: scale(1.015); transition: transform 800ms cubic-bezier(.2,.7,.2,1); }
.portrait-wrap:hover img { transform: scale(1.025); }
.portrait-label { position: absolute; left: 2rem; bottom: 2rem; z-index: 2; color: white; font-family: "DM Mono", monospace; font-size: 0.65rem; line-height: 1.6; text-transform: uppercase; }
.orbit-text { position: absolute; z-index: 2; width: 110px; right: -20px; top: 18px; overflow: visible; animation: rotate 16s linear infinite; }
.orbit-text text { fill: var(--lime); font: 500 11px "DM Mono", monospace; letter-spacing: 2px; }

.statement { padding: 8rem 4vw; display: grid; grid-template-columns: 1fr 3fr; border-bottom: 1px solid var(--line); }
.statement-copy > p { max-width: 1050px; margin: -0.15em 0 5rem; font-size: clamp(2rem, 4.3vw, 5rem); line-height: 1.12; letter-spacing: -0.055em; }
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.services span { padding: 1.2rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.services span:nth-child(odd) { margin-right: 2rem; }

.experience { padding: 8rem 4vw; border-bottom: 1px solid var(--line); }
.experience .section-heading { align-items: start; }
.experience .section-heading h2 { max-width: 850px; font-size: clamp(3.5rem, 7vw, 7.5rem); line-height: 0.92; letter-spacing: -0.065em; font-weight: 600; }
.timeline { margin-left: 25%; border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 1fr 3fr; gap: 2rem; padding: 2.6rem 0; border-bottom: 1px solid var(--line); }
.timeline-date, .company { font-family: "DM Mono", monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }
.timeline-item h3 { margin: 0; font-size: clamp(1.7rem, 3vw, 3rem); letter-spacing: -0.045em; font-weight: 600; }
.timeline-item .company { margin: 0.5rem 0 1.5rem; color: var(--orange); }
.timeline-item div > p:last-child { max-width: 720px; margin-bottom: 0; color: rgba(23, 23, 19, 0.66); line-height: 1.7; }

.work { padding: 8rem 4vw; background: var(--ink); color: var(--paper); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 5rem; }
.section-heading h2 { margin: 0; font-size: clamp(3.5rem, 7vw, 8rem); letter-spacing: -0.065em; line-height: 0.9; font-weight: 600; }
.project { border-top: 1px solid rgba(240, 238, 232, 0.22); }
.project:last-child { border-bottom: 1px solid rgba(240, 238, 232, 0.22); }
.project > a { min-height: 250px; display: grid; grid-template-columns: 60px 300px 1fr 50px; gap: 2rem; align-items: center; padding: 2rem 0; }
.project-number { align-self: start; font: 0.7rem "DM Mono", monospace; }
.project-art { --ink: #171713; height: 185px; position: relative; overflow: hidden; transition: transform 300ms ease; }
.project:hover .project-art { transform: rotate(-1.5deg) scale(1.02); }
.art-one { background: var(--orange); padding: 1.5rem; color: var(--ink); font-weight: 800; font-size: 1.6rem; line-height: 0.9; letter-spacing: -0.08em; }
.art-two { background: var(--lime); display: flex; align-items: center; justify-content: center; }
.art-two i { width: 82px; height: 82px; border: 3px solid var(--ink); border-radius: 50%; margin: -12px; mix-blend-mode: multiply; }
.art-two i:nth-child(2) { border-radius: 0; transform: rotate(45deg); }
.art-three { background: #5d61c9; padding: 1.5rem; color: white; display: flex; align-items: end; justify-content: space-between; font: 700 1.4rem/0.95 "Manrope", sans-serif; letter-spacing: -0.06em; }
.art-three div { width: 100px; height: 100px; border: 1px solid white; border-radius: 50%; box-shadow: 25px -20px 0 -1px #5d61c9, 25px -20px 0 0 white; }
.project-info h3 { margin: 0.5rem 0 1rem; font-size: clamp(2rem, 4vw, 4rem); line-height: 1; letter-spacing: -0.055em; font-weight: 500; }
.project-info > span { color: rgba(240, 238, 232, 0.58); font-size: 0.82rem; }
.project-arrow { font-size: 2rem; transition: transform 200ms ease; }
.project:hover .project-arrow { transform: translate(6px, -6px); }

[data-theme="dark"] .work { background: #080807; color: #f0eee8; }
[data-theme="dark"] .timeline-item div > p:last-child,
[data-theme="dark"] .toolkit-group p { color: rgba(241, 239, 232, 0.64); }
[data-theme="dark"] .portrait-frame img { filter: saturate(0.62) contrast(0.9) brightness(1.12) blur(0.35px); }

.toolkit { padding: 8rem 4vw; display: grid; grid-template-columns: 1fr 3fr; border-bottom: 1px solid var(--line); }
.toolkit-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2rem; }
.toolkit-group { padding: 1.5rem 0 3rem; border-top: 1px solid var(--line); }
.toolkit-group h3 { margin: 0 0 1.5rem; font-size: 1.4rem; letter-spacing: -0.04em; }
.toolkit-group p { margin: 0; color: rgba(23, 23, 19, 0.64); font-size: 0.87rem; line-height: 1.8; }
.certification { grid-column: 1 / -1; margin-top: 3rem; padding: 2.5rem; display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; background: var(--orange); }
.certification span, .certification p { font: 0.68rem "DM Mono", monospace; text-transform: uppercase; }
.certification strong { font-size: clamp(1.5rem, 3vw, 3rem); letter-spacing: -0.05em; }
.certification p { text-align: right; }

.contact { --ink: #171713; --paper: #f0eee8; min-height: 80vh; padding: 7rem 4vw 2rem; display: flex; flex-direction: column; background: var(--lime); color: var(--ink); }
.contact-content { margin: 5rem 0 7rem; }
.contact-content p { margin: 0 0 1rem; font: 0.8rem "DM Mono", monospace; text-transform: uppercase; }
.contact-content h2 { margin: 0 0 5rem; font-size: clamp(3.8rem, 10vw, 11rem); font-weight: 600; line-height: 0.95; letter-spacing: -0.075em; }
#contact-form { max-width: 980px; margin-left: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
#contact-form label { display: block; margin-bottom: 2rem; }
#contact-form label span { display: block; margin-bottom: 0.75rem; font: 0.68rem "DM Mono", monospace; text-transform: uppercase; letter-spacing: 0.06em; }
#contact-form input, #contact-form textarea { width: 100%; padding: 0.8rem 0; border: 0; border-bottom: 1px solid rgba(23, 23, 19, 0.55); border-radius: 0; outline: none; background: transparent; color: var(--ink); font: 500 1.15rem "Manrope", sans-serif; resize: vertical; transition: border-color 180ms ease; }
#contact-form input::placeholder, #contact-form textarea::placeholder { color: rgba(23, 23, 19, 0.4); }
#contact-form input:focus, #contact-form textarea:focus { border-color: var(--orange); }
#contact-form .form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-actions { min-height: 64px; display: flex; align-items: center; gap: 2rem; }
.form-actions button { padding: 1rem 1.3rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 0.78rem "Manrope", sans-serif; text-transform: uppercase; cursor: pointer; transition: 200ms ease; }
.form-actions button span { margin-left: 1.5rem; font-size: 1rem; }
.form-actions button:hover { background: var(--orange); border-color: var(--orange); }
.form-actions button:disabled { cursor: wait; opacity: 0.55; }
#form-status { margin: 0; text-transform: none; line-height: 1.5; }
#form-status.error { color: #a32212; }
footer { padding-top: 2rem; display: flex; justify-content: space-between; gap: 2rem; align-items: center; border-top: 1px solid var(--ink); font: 0.68rem "DM Mono", monospace; text-transform: uppercase; }
footer div { display: flex; gap: 1.5rem; }

.reveal { opacity: 0; transform: translateY(35px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: none; }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.35; } }

@media (max-width: 900px) {
  .site-header { height: 76px; display: grid; grid-template-columns: 1fr auto auto; gap: 0.75rem; }
  .availability { display: none; }
  .header-actions { order: 2; gap: 0.6rem; }
  .menu-toggle { order: 3; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); font: 0.75rem "DM Mono", monospace; text-transform: uppercase; }
  .menu-toggle i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
  nav { position: absolute; left: 0; top: 76px; width: 100%; padding: 2rem 4vw; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; transform: translateY(-120%); opacity: 0; transition: 250ms ease; z-index: -1; }
  nav.open { transform: none; opacity: 1; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { min-height: 650px; padding-top: 5rem; }
  .portrait-wrap { height: 390px; min-height: 0; padding-top: 3.5rem; border-left: 0; border-top: 1px solid var(--line); }
  .portrait-frame { width: min(48vw, 230px); }
  .portrait-wrap::before { width: min(52vw, 250px); }
  .statement { grid-template-columns: 1fr; gap: 3rem; padding: 6rem 4vw; }
  .timeline { margin-left: 0; }
  .toolkit { grid-template-columns: 1fr; gap: 3rem; }
  .project > a { grid-template-columns: 35px 180px 1fr 30px; gap: 1rem; }
  .project-art { height: 140px; }
}

@media (max-width: 620px) {
  h1 { font-size: clamp(3.35rem, 17vw, 5rem); }
  .hero-copy { min-height: 620px; }
  .circle-link { flex-basis: 62px; height: 62px; }
  .statement-copy > p { margin-bottom: 3rem; }
  .services { grid-template-columns: 1fr; }
  .services span:nth-child(odd) { margin-right: 0; }
  .experience { padding: 6rem 4vw; }
  .experience .section-heading { display: block; }
  .experience .section-heading h2 { margin-top: 2rem; }
  .timeline-item { grid-template-columns: 1fr; gap: 1rem; }
  .toolkit { padding: 6rem 4vw; }
  .toolkit-content { grid-template-columns: 1fr; }
  .certification { grid-column: auto; grid-template-columns: 1fr; gap: 1rem; padding: 2rem; }
  .certification p { text-align: left; }
  .work { padding-top: 6rem; }
  .section-heading { display: block; }
  .section-heading h2 { margin-top: 2rem; }
  .project > a { grid-template-columns: 25px 1fr 30px; padding: 1.5rem 0 2.2rem; }
  .project-art { grid-column: 2 / 4; width: 100%; height: 190px; }
  .project-info { grid-column: 2 / 3; }
  .project-number { grid-row: 1; }
  .project-arrow { grid-column: 3; }
  .project-info h3 { font-size: 2.4rem; }
  .contact { min-height: 70vh; padding-top: 5rem; }
  .contact-content { margin: 4rem 0 5rem; }
  .contact-content h2 { margin-bottom: 3.5rem; font-size: 18vw; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  footer { align-items: flex-start; flex-wrap: wrap; }
  footer div { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}
