* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --bg: #f6f5f0;
  --bg-alt: #efeee6;
  --ink: #14231f;
  --ink-soft: #40514a;
  --paper: #ffffff;
  --dark: #12201c;
  --dark-alt: #1b2c26;
  --emerald: #2f6f4e;
  --emerald-soft: #dceae1;
  --gold: #d9a93c;
  --line: #d8d5c9;
  --font-display: "Space Grotesk", "Noto Sans Armenian", sans-serif;
  --font-body: "Noto Sans Armenian", "Space Grotesk", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141b18;
    --bg-alt: #1b2420;
    --ink: #efefe8;
    --ink-soft: #b9c2bc;
    --paper: #1b2420;
    --line: #2c3833;
    --emerald-soft: #223d30;
  }
}
:root[data-theme="dark"] {
  --bg: #141b18;
  --bg-alt: #1b2420;
  --ink: #efefe8;
  --ink-soft: #b9c2bc;
  --paper: #1b2420;
  --line: #2c3833;
  --emerald-soft: #223d30;
}
.to-do{
  width: 470px;
}
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  scroll-behavior: smooth;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}
a {
  color: inherit;
}
/* ---------- NAV ---------- */
nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1040px;
  margin: 0 auto;
}
.logo {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.logo span {
  color: var(--emerald);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.nav-links a {
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
}
@media (max-width: 960px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .avatar {
    margin: 0 auto;
  }

  .about-text p {
    max-width: none;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 12px;
  }

  .hero {
    padding: 52px 0 68px;
  }

  .hero .role {
    max-width: none;
  }

  .code-card pre {
    font-size: 12.5px;
    padding: 16px 18px 20px;
  }

  .skill-bar-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .skill-bar-row .name {
    width: 96px;
    flex: 0 0 96px;
  }

  .skill-bar-track {
    min-width: 0;
    width: 100%;
  }

  .slider-controls {
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 18px;
  }

  .nav-inner {
    padding: 12px 16px;
  }

  .nav-links {
    gap: 10px 14px;
    font-size: 11px;
  }

  .hero h1 {
    line-height: 1.08;
  }

  .project-grid {
    min-height: 420px;
  }

  .project-card {
    width: 100%;
  }

  .contact-email {
    font-size: clamp(1rem, 4.8vw, 1.3rem);
  }

  .social-list a {
    padding: 14px 2px;
  }

  footer {
    padding-inline: 16px;
  }
}

@media (max-width: 420px) {
  .hero-eyebrow {
    font-size: 12px;
  }

  .hero .role {
    font-size: 1rem;
  }

  .section-head {
    gap: 10px;
    align-items: flex-start;
  }

  .section-num {
    font-size: 11px;
    padding: 2px 6px;
  }

  .editor-files {
    padding: 8px 0;
  }

  .file-row {
    padding: 7px 12px;
    font-size: 12px;
  }

  .editor-detail {
    padding: 22px 18px;
  }

  .skill-bar-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .skill-bar-row .name {
    width: 84px;
    flex: 0 0 84px;
    font-size: 11px;
  }

  .project-thumb {
    height: 260px;
  }

  .slider-arrows button {
    width: 32px;
    height: 32px;
  }
}

/* ---------- HERO ---------- */
.hero {
  background: var(--dark);
  color: #edefea;
  padding: 72px 0 88px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 70% 20%, black, transparent);
}
.hero-inner {
  position: relative;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.05;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hero .role {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: #a9b8b0;
  margin: 0 0 40px;
  max-width: 34ch;
}

.code-card {
  background: var(--dark-alt);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  max-width: 560px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.code-card .bar {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.code-card .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.code-card pre {
  margin: 0;
  padding: 20px 22px 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.9;
  overflow-x: auto;
  white-space: pre;
}
.tk-kw {
  color: #7fb5a0;
}
.tk-key {
  color: #edefea;
}
.tk-str {
  color: var(--gold);
}
.tk-num {
  color: #8fb8e0;
}
.tk-com {
  color: #6b7b74;
}

/* ---------- SECTION SHARED ---------- */
section {
  padding: 76px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 40px;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--emerald);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 8px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  margin: 0;
  font-weight: 600;
}

/* ---------- ABOUT ---------- */
.about {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}
.avatar {
  width: 190px;
  height: 190px;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--emerald), #1e4a34);
  color: white;
}
.my-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.about-text p {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 0 16px;
}
.about-text strong {
  color: var(--ink);
}
.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.badge {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
}
@media (max-width: 640px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .avatar {
    width: 140px;
    height: 140px;
    font-size: 2rem;
  }

  .editor {
    grid-template-columns: 1fr;
  }

  .editor-files {
    display: flex;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 10px;
    gap: 4px;
  }

  .editor-files .grp-label {
    display: none;
  }

  .file-row {
    border-left: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .file-row.active {
    border-bottom-color: var(--emerald);
  }
}

/* ---------- SKILLS (editor sidebar look) ---------- */
.editor {
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
.editor-files {
  background: var(--bg-alt);
  border-right: 1px solid var(--line);
  padding: 18px 0;
}
.editor-files .grp-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 0 18px 8px;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: default;
  border-left: 2px solid transparent;
}
.file-row.active {
  background: var(--paper);
  border-left-color: var(--emerald);
}
.file-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.editor-detail {
  padding: 30px 34px;
}
.editor-detail h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: 1.25rem;
}
.editor-detail .tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--emerald);
  margin-bottom: 16px;
  display: block;
}
.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.skill-bar-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.skill-bar-row .name {
  font-family: var(--font-mono);
  font-size: 13px;
  width: 120px;
  flex: none;
  color: var(--ink-soft);
}
.skill-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
  border-radius: 4px;
}
@media (max-width: 640px) {
  .editor {
    grid-template-columns: 1fr;
  }
  .editor-files {
    display: flex;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 10px;
    gap: 4px;
  }
  .editor-files .grp-label {
    display: none;
  }
  .file-row {
    border-left: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }
  .file-row.active {
    border-bottom-color: var(--emerald);
  }
}

/* ---------- PROJECTS ---------- */
.projects-note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--emerald-soft);
  border: 1px dashed var(--emerald);
  border-radius: 8px;
  padding: 10px 14px;
  margin: -14px 0 34px;
  display: inline-block;
}
.project-grid {
  display: grid;
  overflow: hidden;
  min-height: 500px;
  padding: 4px 2px 14px;
}
.project-card {
  grid-area: 1 / 1;
  width: min(92%, 760px);
  justify-self: center;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(30px, 0, 0) scale(0.97);
  transition:
    opacity 0.45s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}
.project-card.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  z-index: 1;
}
.project-card.is-leaving {
  transform: translate3d(-30px, 0, 0) scale(0.97);
}
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.slider-dots {
  display: flex;
  gap: 7px;
}
.slider-dots .sd {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition:
    background 0.2s,
    transform 0.2s;
}
.slider-dots .sd.on {
  background: var(--emerald);
  transform: scale(1.3);
}
.slider-arrows {
  display: flex;
  gap: 8px;
}
.slider-arrows button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    transform 0.2s,
    opacity 0.2s;
}
.slider-arrows button:hover {
  background: var(--emerald-soft);
  transform: translateY(-2px);
}
.project-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(20, 35, 31, 0.1);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.browser-bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.browser-bar .url {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-soft);
  margin-left: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-thumb {
  height: 350px;
  background: linear-gradient(135deg, var(--emerald-soft), var(--bg-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--emerald);
}
.project-body {
  padding: 22px 24px 28px;
}
.project-body h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.project-body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.project-tags {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.project-tags span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-soft);
}

/* ---------- CONTACT ---------- */
.contact {
  background: var(--dark);
  color: #edefea;
}
.contact .section-num {
  color: var(--gold);
  border-color: rgba(255, 255, 255, 0.2);
}
.contact .section-head h2 {
  color: #edefea;
}
.contact-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
}
.contact-text p {
  color: #a9b8b0;
  max-width: 46ch;
  margin: 0 0 26px;
}
.contact-email {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: #f3f0e4;
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 240, 228, 0.35);
  padding-bottom: 4px;
}
.social-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.social-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 14px;
  color: #edefea;
  transition: opacity 0.2s;
}
.social-list a:hover {
  opacity: 0.65;
}
.social-list .arrow {
  color: var(--gold);
}
@media (max-width: 700px) {
  .contact-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .slider-controls {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
  }

  .slider-arrows {
    width: 100%;
    justify-content: flex-end;
  }
}

footer {
  padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px));
  background: var(--dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #7c8b84;
}

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .social-list a {
    transition: none;
  }
}

@media (max-width: 640px) {
  .project-grid {
    min-height: 460px;
  }

  .project-card {
    width: 96%;
  }
}

@media (max-width: 360px) {
  .wrap {
    padding: 0 14px;
  }

  .nav-links {
    justify-content: space-between;
    gap: 8px 12px;
  }

  .project-body {
    padding: 18px 16px 22px;
  }

  .social-list a {
    font-size: 13px;
  }
}
