/* ── Layout ────────────────────────────────────── */
body { background: var(--bg); overflow-x: hidden; }

/* ── Nav ───────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(250, 249, 252, 0.82);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1120px; margin: 0 auto;
  padding: 15px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.nav__logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em;
}
.nav__logo-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px #efeaff; flex-shrink: 0;
}
.nav__logo-cursor { color: var(--accent); }
.nav__links {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  font-size: 14.5px; font-weight: 500; color: #565470;
}
.nav__links a { transition: color 0.15s; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 12px; }

.btn-lang {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 600;
  color: #565470; background: var(--surface);
  border: 1px solid var(--accent-border); border-radius: 8px;
  padding: 7px 11px; transition: border-color 0.15s, color 0.15s;
}
.btn-lang:hover { border-color: var(--accent); color: var(--accent); }
.btn-lang__dim { opacity: 0.45; }

.btn-cv {
  font-size: 14px; font-weight: 600; color: #fff;
  background: var(--dark); border-radius: 8px;
  padding: 9px 16px; display: flex; align-items: center; gap: 7px;
  transition: transform 0.15s, background 0.15s;
}
.btn-cv:hover { background: var(--accent); }
.btn-cv__icon { font-family: var(--font-mono); font-size: 12px; }

/* ── Hero ──────────────────────────────────────── */
.hero {
  max-width: 1120px; margin: 0 auto;
  padding: 72px 28px 64px;
}
.hero__grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 56px; align-items: start;
}
.hero__badge { margin-bottom: 26px; }
.hero__name {
  font-family: var(--font-display);
  font-size: 60px; line-height: 1.02;
  letter-spacing: -0.03em; font-weight: 600; margin-bottom: 18px;
}
.hero__role {
  font-family: var(--font-mono); font-size: 16px; font-weight: 500;
  color: var(--accent); margin-bottom: 22px; letter-spacing: -0.01em;
}
.hero__bio {
  font-size: 18px; line-height: 1.6; color: var(--muted);
  max-width: 520px; margin-bottom: 30px; text-wrap: pretty;
  text-align: justify; text-align-last: left;
}
.hero__ctas {
  display: flex; gap: 13px; flex-wrap: wrap; margin-bottom: 30px;
}
.btn-primary {
  font-size: 15px; font-weight: 600; color: #fff;
  background: var(--accent); border-radius: 10px;
  padding: 13px 22px; display: flex; align-items: center; gap: 9px;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 20px -8px var(--accent);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-secondary {
  font-size: 15px; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--accent-border);
  border-radius: 10px; padding: 13px 22px;
  display: flex; align-items: center; gap: 9px;
  transition: border-color 0.15s;
}
.btn-secondary:hover { border-color: var(--text); }
.hero__stats { display: flex; gap: 34px; flex-wrap: wrap; padding-top: 6px; }
.hero__stat-value {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 600; letter-spacing: -0.02em;
}
.hero__stat-label {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--subtle); margin-top: 3px;
}
.hero__media { display: flex; flex-direction: column; gap: 18px; }
.hero__photo-wrap {
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px -34px rgba(23,21,31,0.4);
}
.hero__photo {
  width: 100%; aspect-ratio: 9 / 8;
  object-fit: cover; object-position: center 16%;
  display: block;
}

/* ── Terminal ──────────────────────────────────── */
.terminal {
  background: var(--dark); border-radius: 14px; overflow: hidden;
  border: 1px solid #2a2735; font-family: var(--font-mono);
  box-shadow: 0 24px 60px -34px rgba(23,21,31,0.5);
}
.terminal__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; border-bottom: 1px solid #2a2735;
}
.terminal__dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal__dot--red   { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }
.terminal__title { margin-left: 8px; font-size: 11.5px; color: #76728a; }
.terminal__body { padding: 16px 16px 18px; font-size: 13px; line-height: 1.75; }
.terminal__cmd   { color: #9d99b5; }
.terminal__prompt { color: var(--accent); }
.terminal__key   { color: #6d8aff; }
.terminal__val   { color: #cfccdd; }
.terminal__status { color: #22c55e; }
.terminal__cursor {
  display: inline-block; width: 7px; height: 14px;
  background: #22c55e; vertical-align: -2px;
}

/* ── Section wrapper ───────────────────────────── */
.section { max-width: 1120px; margin: 0 auto; padding: 54px 28px; }
.section__header {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 34px;
}
.section__header--lg { margin-bottom: 40px; }
.section__meta { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }

/* ── Skills ────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.skill-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px;
  transition: border-color 0.15s, transform 0.15s;
}
.skill-card:hover { border-color: var(--accent-hover); transform: translateY(-2px); }
.skill-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.skill-card__icon { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.skill-card__label {
  font-family: var(--font-display); font-size: 16.5px;
  font-weight: 600; letter-spacing: -0.01em;
}
.skill-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Experience ────────────────────────────────── */
.exp-list { display: flex; flex-direction: column; }
.exp-item { position: relative; padding: 0 0 30px 56px; }
.exp-item__line {
  position: absolute; left: 19px; top: 10px; bottom: -4px;
  width: 2px; background: var(--timeline);
}
.exp-item:last-child .exp-item__line { display: none; }
.exp-item__dot {
  position: absolute; left: 11px; top: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 2.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.exp-item__dot-inner {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.exp-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px 24px;
  transition: border-color 0.15s;
}
.exp-card:hover { border-color: var(--accent-hover); }
.exp-card__header {
  display: flex; justify-content: space-between;
  align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 4px;
}
.exp-card__role {
  font-family: var(--font-display); font-size: 19px;
  font-weight: 600; letter-spacing: -0.01em;
}
.exp-card__dates {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--subtle); white-space: nowrap;
}
.exp-card__meta {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 15px;
}
.exp-card__company { font-size: 14.5px; font-weight: 600; color: var(--accent); }
.exp-card__type {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--subtle);
  background: var(--accent-bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px;
}
.exp-card__bullets { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.exp-card__bullet { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.exp-card__bullet span:last-child { text-align: justify; text-align-last: left; }
.exp-card__arrow { color: var(--accent); font-family: var(--font-mono); flex-shrink: 0; }
.exp-card__tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* ── Projects ──────────────────────────────────── */
.projects-featured { margin-bottom: 0; }
.featured-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden;
  display: grid; grid-template-columns: 1.18fr 1fr;
  margin-bottom: 16px; transition: border-color 0.15s;
}
.featured-card:hover { border-color: var(--accent-hover); }
.featured-card__img-wrap {
  display: block; position: relative;
  background: var(--accent-bg); border-right: 1px solid var(--border);
  min-height: 300px;
}
.featured-card__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: left top;
}
.featured-card__badge {
  position: absolute; bottom: 14px; left: 14px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  color: #fff; background: rgba(23,21,31,0.82);
  backdrop-filter: blur(4px); border-radius: 8px;
  padding: 6px 11px; display: inline-flex; align-items: center; gap: 7px;
}
.featured-card__badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.3);
}
.featured-card__body {
  padding: 28px 30px; display: flex; flex-direction: column;
}
.featured-card__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.featured-card__label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent);
}
.featured-card__link {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--subtle);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 5px 9px; transition: border-color 0.15s, color 0.15s;
}
.featured-card__link:hover { border-color: var(--accent); color: var(--accent); }
.featured-card__name {
  font-family: var(--font-display); font-size: 22px;
  font-weight: 600; letter-spacing: -0.015em; line-height: 1.18;
  margin: 0 0 9px;
}
.featured-card__desc {
  font-size: 14.5px; line-height: 1.55; color: var(--muted);
  margin: 0 0 15px; text-wrap: pretty;
  text-align: justify; text-align-last: left;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.project-card:hover { border-color: var(--accent-hover); transform: translateY(-3px); }
.project-card__head {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px; margin-bottom: 11px;
}
.project-card__name {
  font-family: var(--font-display); font-size: 18.5px;
  font-weight: 600; letter-spacing: -0.01em; line-height: 1.25;
}
.project-card__link {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--subtle);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 5px 9px; white-space: nowrap; flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.project-card__link:hover { border-color: var(--accent); color: var(--accent); }
.project-card__desc {
  font-size: 14.5px; line-height: 1.55; color: var(--muted);
  margin: 0 0 15px; text-wrap: pretty;
  text-align: justify; text-align-last: left;
}
.project-card__bullets {
  display: flex; flex-direction: column; gap: 7px; margin: 0 0 18px;
}
.project-card__bullet {
  display: flex; gap: 9px; font-size: 13px; line-height: 1.45; color: #6d6a80;
}
.project-card__bullet span:last-child { text-align: justify; text-align-last: left; }
.project-card__arrow {
  color: var(--accent); font-family: var(--font-mono);
  flex-shrink: 0; font-size: 11px; line-height: 1.45;
}
.project-card__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }

/* ── Education + Languages ─────────────────────── */
.edu-lang-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; }
.edu-lang-head {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 28px;
}
.edu-list, .lang-list { display: flex; flex-direction: column; gap: 14px; }
.edu-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.edu-card__degree {
  font-family: var(--font-display); font-size: 17px;
  font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px;
}
.edu-card__school { font-size: 14px; color: var(--subtle); }
.edu-card__year {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--accent); background: #f1edff;
  border-radius: 10px; padding: 6px 12px; white-space: nowrap;
}
.lang-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 22px;
}
.lang-card__head {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 10px;
}
.lang-card__name { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.lang-card__level { font-family: var(--font-mono); font-size: 12px; color: var(--subtle); }
.lang-card__bar { height: 6px; border-radius: 99px; background: #f1eff7; overflow: hidden; }
.lang-card__fill { height: 100%; border-radius: 99px; background: var(--accent); }

/* ── Contact ───────────────────────────────────── */
.contact-section { max-width: 1120px; margin: 40px auto 0; padding: 0 28px 64px; }
.contact-box {
  background: var(--dark); border-radius: 28px;
  padding: 64px 56px; position: relative; overflow: hidden;
}
.contact-box__glow {
  position: absolute; top: -80px; right: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109,74,255,0.4), transparent 70%);
  pointer-events: none;
}
.contact-box__grid {
  position: relative; display: grid;
  grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
}
.contact-box__label { font-family: var(--font-mono); font-size: 13px; color: #9d8cff; }
.contact-box__heading {
  font-family: var(--font-display); font-size: 42px;
  line-height: 1.08; letter-spacing: -0.025em; font-weight: 600;
  color: #fff; margin: 14px 0; text-wrap: balance;
}
.contact-box__sub {
  font-size: 17px; line-height: 1.55; color: #a8a4bd;
  margin-bottom: 28px; max-width: 420px; text-wrap: pretty;
  text-align: justify; text-align-last: left;
}
.btn-email {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600;
  color: var(--dark); background: #fff; border-radius: 10px;
  padding: 14px 22px; transition: transform 0.15s;
}
.btn-email:hover { transform: translateY(-2px); }
.btn-email__icon { font-family: var(--font-mono); color: var(--accent); }
.contact-links { display: flex; flex-direction: column; gap: 11px; }
.contact-link {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 16px 18px; transition: background 0.15s, border-color 0.15s;
  color: inherit;
  min-width: 0;
}
.contact-link:hover { background: rgba(255,255,255,0.1); border-color: var(--accent); }
.contact-link__inner {
  display: flex; align-items: center; gap: 11px;
  color: #fff; font-weight: 500; font-size: 15px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.contact-link__icon { font-family: var(--font-mono); color: #9d8cff; }
.contact-link__arrow {
  font-family: var(--font-mono); font-size: 12px; color: #76728a;
  min-width: 0; overflow-wrap: anywhere; text-align: right;
}

/* ── Footer ────────────────────────────────────── */
.footer {
  max-width: 1120px; margin: 0 auto;
  padding: 26px 28px 48px;
  display: flex; justify-content: space-between;
  align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
}
.footer__copy { font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); }
.footer__top {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--muted); transition: color 0.15s;
}
.footer__top:hover { color: var(--accent); }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .hero__name { font-size: 42px; }
  .edu-lang-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-box__grid { grid-template-columns: 1fr; }
  .contact-box { padding: 40px 28px; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card__img-wrap { min-height: 220px; border-right: none; border-bottom: 1px solid var(--border); }
}
@media (min-width: 601px) and (max-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) clamp(180px, 30vw, 260px);
    gap: 28px 24px;
  }
  .hero__grid > :first-child {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .hero__media {
    display: contents;
    order: 0;
  }
  .hero__photo-wrap {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    border-radius: 18px;
  }
  .hero__photo {
    height: 100%;
    aspect-ratio: auto;
    object-position: center 18%;
  }
  .terminal {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
}
@media (max-width: 600px) {
  .nav__links { display: none; }
  .hero { padding: 44px 20px 40px; }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) clamp(96px, 32vw, 128px);
    gap: 16px 14px;
    align-items: start;
  }
  .hero__grid > :first-child {
    display: contents;
    min-width: 0;
  }
  .hero__badge,
  .hero__name,
  .hero__role {
    grid-column: 1;
  }
  .hero__badge {
    grid-row: 1;
    margin-bottom: 0;
  }
  .hero__name {
    grid-row: 2;
    font-size: 36px;
    line-height: 1.04;
    margin-bottom: 0;
  }
  .hero__role {
    grid-row: 3;
    font-size: 13.5px;
    line-height: 1.4;
    margin-bottom: 0;
  }
  .hero__bio {
    grid-column: 1 / -1;
    grid-row: 4;
    font-size: 15.5px;
    line-height: 1.55;
    margin-bottom: 0;
  }
  .hero__ctas {
    grid-column: 1 / -1;
    grid-row: 5;
    margin-bottom: 0;
  }
  .hero__stats {
    grid-column: 1 / -1;
    grid-row: 6;
  }
  .hero__media {
    display: contents;
    order: 0;
  }
  .hero__photo-wrap {
    grid-column: 2;
    grid-row: 1 / 4;
    width: 100%;
    border-radius: 16px;
  }
  .hero__photo {
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    object-position: center 18%;
  }
  .terminal {
    grid-column: 1 / -1;
    grid-row: 7;
    width: 100%;
  }
  .section { padding: 40px 20px; }
  .contact-box { padding: 32px 20px; }
  .contact-section { padding: 0 20px 48px; }
  .contact-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .contact-link__arrow {
    text-align: left;
  }
  .btn-email {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}
