:root {
  /* Colors */
  --bg-main: #05070c;
  --bg-panel: #0b1220;
  --bg-panel-soft: #0e1624;

  --border: #1f2a3a;

  --neon-cyan: #00f6ff;
  --neon-pink: #ff3cac;
  --neon-purple: #8b5cf6;

  --text-main: #d1d5db;
  --text-muted: #9ca3af;
  --text-soft: #c7d2fe;

  /* Fonts */
  --font-main: 'Inter', sans-serif;
  --font-accent: 'Orbitron', sans-serif;
}

/* RESET / BASE */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, #03050a, var(--bg-main));
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.65;
}

/* LAYOUT */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 20px 80px;
}

/* HEADINGS */
h1, h2, h3 {
  font-family: var(--font-accent);
  letter-spacing: 0.5px;
}

h1 {
  font-size: 34px;
  color: var(--neon-cyan);
  margin: 0 0 10px;
}

h2 {
  font-size: 22px;
  color: var(--neon-pink);
  margin-bottom: 16px;
}

h3 {
  font-size: 18px;
  color: var(--neon-purple);
  margin-bottom: 10px;
}

/* TEXT */
p {
  margin: 0 0 12px;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 15px;
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* SECTIONS */
section {
  margin-bottom: 45px;
}

/* PANELS */
.panel {
  background: linear-gradient(
    180deg,
    var(--bg-panel),
    var(--bg-panel-soft)
  );
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 26px;
}

/* LISTS */
ul {
  padding-left: 20px;
  margin: 10px 0 0;
}

li {
  margin-bottom: 6px;
}

/* CODE */
code {
  background: #020617;
  color: var(--neon-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 90%;
}

/* HEADER / HERO */
.hero {
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

/* TERMINAL */
.terminal {
  background: #020617;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 45px;
  font-family: monospace;
  font-size: 14px;
}

.terminal-line {
  color: var(--neon-cyan);
  margin-bottom: 4px;
}

.terminal-output {
  color: #a5f3fc;
  margin-bottom: 10px;
}

/* PROJECT LIST */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-list a {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  background: #020617;
  border: 1px solid var(--border);
  transition: background 0.2s ease, transform 0.15s ease;
}

.project-list a:hover {
  background: #020617;
  transform: translateX(4px);
}

/* DETAILS / SPOILERS */
details {
  margin-top: 14px;
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--neon-cyan);
  list-style: none;
}

summary::marker {
  display: none;
}

summary::before {
  content: "▸ ";
  color: var(--neon-cyan);
}

details[open] summary::before {
  content: "▾ ";
}

/* CONTACTS */
.contacts ul {
  list-style: none;
  padding-left: 0;
}

.contacts li {
  margin-bottom: 8px;
}

/* FOOTER */
footer {
  margin-top: 70px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  .container {
    padding: 35px 16px 60px;
  }
}

/* MANIFESTO / ACCENT BLOCK */
.manifesto {
  margin-top: 24px;
  padding: 18px 22px 18px 26px;
  background: linear-gradient(
    135deg,
    rgba(0, 246, 255, 0.06),
    rgba(139, 92, 246, 0.04)
  );
  border-left: 3px solid var(--neon-cyan);
  border-radius: 6px;
}

.manifesto-line {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-soft);
  margin: 0 0 6px;
}

.manifesto-line span {
  color: var(--neon-cyan);
  font-family: var(--font-accent);
  letter-spacing: 0.5px;
}

.manifesto-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* SOFT GLOW (менее агрессивный, чем .glow) */
.glow-soft {
  box-shadow:
    0 0 20px rgba(0, 246, 255, 0.12),
    inset 0 0 20px rgba(0, 246, 255, 0.03);
}

.manifesto {
  animation: subtlePulse 4s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% { border-left-color: var(--neon-cyan); }
  50% { border-left-color: var(--neon-purple); }
}


/* TIMELINE */
.timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 40px 0 30px;
  padding-top: 30px;
}

.timeline-line {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  cursor: pointer;
  text-align: center;
  min-width: 80px;
  transition: transform 0.2s ease;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 2px solid var(--border);
  transition: all 0.25s ease;
  z-index: 2;
}

.timeline-item:hover::before {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0,246,255,0.6);
}

.timeline-item.active::before {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 16px rgba(0,246,255,0.9);
}

.timeline-item .year {
  display: block;
  font-family: var(--font-accent);
  color: var(--text-muted);
  font-size: 14px;
}

.timeline-item .title {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
}

.timeline-item:hover .year,
.timeline-item:hover .title,
.timeline-item.active .year,
.timeline-item.active .title {
  color: var(--neon-cyan);
}

.timeline-item.active {
  transform: translateY(-4px);
}

/* CONTENT */
.timeline-content {
  min-height: 180px;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.modal.active {
  display: block;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-window {
  position: relative;
  width: 90%;
  max-width: 1100px;
  height: 90%;
  margin: 5vh auto;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.modal-window iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg-main);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 10;
  background: none;
  border: none;
  color: var(--neon-cyan);
  font-size: 20px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--neon-pink);
}

/* DETAILS BUTTON */
.details-btn {
  margin-top: 14px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--neon-cyan);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.details-btn:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0,246,255,0.4);
}

/* =========================
   CUSTOM SCROLLBAR
   ========================= */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(
          180deg,
          #0a0f1e,
          #0d1326
  );
  border-left: 1px solid rgba(255,255,255,0.04);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
          180deg,
          var(--neon-cyan),
          var(--neon-purple)
  );
  border-radius: 8px;
  border: 2px solid #0a0f1e;
  box-shadow:
          0 0 8px rgba(0,246,255,0.6),
          inset 0 0 6px rgba(0,0,0,0.4);
}

::-webkit-scrollbar-thumb:hover {
  box-shadow:
          0 0 12px rgba(0,246,255,0.9),
          inset 0 0 6px rgba(0,0,0,0.5);
}

/* Углы (для textarea, iframe и т.п.) */
::-webkit-scrollbar-corner {
  background: #0a0f1e;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--neon-cyan) #0a0f1e;
}

.modal-window ::-webkit-scrollbar {
  width: 8px;
}

.modal-window ::-webkit-scrollbar-thumb {
  background: linear-gradient(
          180deg,
          rgba(0,246,255,0.8),
          rgba(139,92,246,0.8)
  );
}

/* When inside iframe (optional): slightly tighter spacing */
body {
  --modal-tight: 1;
}

.project-media {
  display: flex;
  gap: 12px;
  margin: 16px 0 20px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.project-media img {
  max-height: 180px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0f1e;
  box-shadow:
          0 0 12px rgba(0,0,0,0.6),
          inset 0 0 0 1px rgba(255,255,255,0.03);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-media img:hover {
  transform: scale(1.03);
  box-shadow:
          0 0 18px rgba(0,246,255,0.4),
          inset 0 0 0 1px rgba(255,255,255,0.06);
}


.container-modal {
  max-width: 100%;
  margin: 0 auto;
  padding: 0px 20px 0px;
}


/* OPEN APP BUTTON */
.open-app-btn {
  font-size: 13px;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--neon-cyan);
  background: rgba(10, 15, 30, 0.8);
  text-decoration: none;
  backdrop-filter: blur(4px);
  margin-bottom: 20px;
  display: inline-block;
}

.open-app-btn:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0,246,255,0.4);
}


@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 16px; }

  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 768px) {

  .timeline {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 24px;
    margin-top: 20px;
  }

  .timeline-line {
    top: 0;
    bottom: 0;
    left: 10px;
    width: 2px;
    height: auto;
  }

  .timeline-item {
    text-align: left;
    margin-bottom: 18px;
    padding-left: 18px;
    transform: none !important;
  }

  .timeline-item::before {
    top: 6px;
    left: 10px;
    transform: translateX(-50%);
  }

  .timeline-item .year {
    font-size: 13px;
  }

  .timeline-item .title {
    font-size: 14px;
    margin-top: 2px;
  }
}
@media (max-width: 768px) {

  .modal-window {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .modal-toolbar {
    top: 6px;
    left: 6px;
    right: 6px;
  }

  .open-app-btn {
    font-size: 11px;
    padding: 6px 8px;
  }

  .modal-close {
    font-size: 22px;
    padding: 6px;
  }

  .modal-window iframe {
    padding-top: 46px;
  }
}
@media (max-width: 768px) {

  .project-media {
    gap: 10px;
    padding-bottom: 10px;
  }

  .project-media img {
    max-height: 140px;
    min-width: 220px;
  }
}
@media (max-width: 768px) {

  .timeline-content {
    margin-top: 20px;
    padding: 14px;
  }

  .timeline-content ul {
    padding-left: 18px;
  }

  .details-btn {
    width: 100%;
    text-align: center;
  }
}

/* =========================
   CONTACTS
   ========================= */

.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(
          135deg,
          rgba(10, 15, 30, 0.9),
          rgba(10, 15, 30, 0.6)
  );
  text-decoration: none;
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contact-item:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0,246,255,0.35);
  transform: translateY(-2px);
}

.contact-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-value {
  font-family: var(--font-accent);
  color: var(--neon-cyan);
  font-size: 14px;
}

/* subtle focus for accessibility */
.contact-item:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}
@media (max-width: 768px) {
  .contact-item {
    padding: 16px;
  }

  .contact-value {
    font-size: 13px;
  }
}


/* CONTACTS with COPY */

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.contact-link {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

/* COPY BUTTON */
.copy-btn {
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(10, 15, 30, 0.6);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0,246,255,0.4);
}

.copy-btn.copied {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 12px rgba(0,255,140,0.6);
}
@media (max-width: 768px) {
  .copy-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}
