:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe4ef;
  --line-strong: #cbd5e1;
  --blue: #2563eb;
  --teal: #0f766e;
  --orange: #ea580c;
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 42%, #edf3f8 100%),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.04) 0, rgba(15, 23, 42, 0.04) 1px, transparent 1px, transparent 88px);
  color: var(--ink);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.6;
}

a {
  color: inherit;
}

.container {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 22px 24px 88px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.lang-bar {
  display: flex;
  justify-content: flex-end;
}

.lang-toggle {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 56px;
  align-items: center;
  min-height: 640px;
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}

.profile-copy {
  max-width: 780px;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-name {
  margin: 0;
  color: #0b1220;
  font-size: 72px;
  line-height: 0.96;
  font-weight: 850;
  letter-spacing: 0;
}

.profile-summary {
  max-width: 760px;
  margin: 26px 0 28px;
  color: #475569;
  font-size: 16px;
  line-height: 1.82;
}

.profile-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-action {
  min-width: 136px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0 10px;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.profile-links a:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-1px);
}

.hero-visual {
  min-width: 0;
}

.signal-board {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.signal-board::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 44%, rgba(255, 255, 255, 0.18));
  pointer-events: none;
}

.signal-board-top,
.signal-badge {
  position: relative;
  z-index: 1;
}

.signal-board-top {
  display: flex;
  gap: 8px;
  padding: 24px;
}

.signal-board-top span,
.signal-badge {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.11);
}

.signal-board-top span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 8px 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.signal-badge {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: grid;
  min-width: 156px;
  min-height: 116px;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
  backdrop-filter: blur(14px);
}

.signal-badge span {
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.signal-badge strong {
  color: #0f172a;
  font-size: 56px;
  line-height: 0.9;
  letter-spacing: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.metric {
  min-height: 116px;
  padding: 24px 28px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  display: block;
  color: #0b1220;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.skills-section {
  padding: 54px 0 44px;
  border-bottom: 1px solid var(--line);
}

.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 30px;
}

.skill-group {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(203, 213, 225, 0.74);
}

.skill-label {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.skill-values {
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  padding: 64px 0 24px;
}

.projects-header h2,
.comments h2 {
  margin: 0;
  color: #0b1220;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0;
}

.meta-item {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
}

.meta-item strong {
  color: var(--ink);
}

.grid {
  display: grid;
  /* fluid: 1 column on phones, 2+ on wide screens */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
  gap: 22px;
}

.card {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.project-window {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin-top: 44px;
}

.project-window span {
  display: block;
  height: 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.16);
}

.project-window span:nth-child(1) {
  width: 70%;
  background: rgba(37, 99, 235, 0.7);
}

.project-window span:nth-child(2) {
  width: 92%;
}

.project-window span:nth-child(3) {
  width: 62%;
  background: rgba(15, 118, 110, 0.45);
}

.project-content {
  min-width: 0;
  padding: 26px 28px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.name {
  margin: 0;
  color: #0b1220;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-live {
  border-color: rgba(22, 163, 74, 0.3);
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
}

.status-progress {
  border-color: rgba(234, 88, 12, 0.3);
  background: rgba(234, 88, 12, 0.08);
  color: #c2410c;
}

.card-subtitle {
  margin: 8px 0 0;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.card-role {
  margin: 5px 0 12px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.desc {
  margin: 0 0 16px;
  color: #475569;
  font-size: 15px;
  line-height: 1.75;
}

.highlights {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.highlights li {
  position: relative;
  padding-left: 18px;
  color: #475569;
  font-size: 13px;
  line-height: 1.62;
}

.highlights li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.tech-tag {
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.07);
  padding: 5px 8px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.clicks {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.clicks strong {
  color: #0f172a;
}

.btn {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.btn.primary:hover {
  background: #1e293b;
}

.btn.secondary {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.86);
  color: #0f172a;
}

.btn.secondary:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.11);
}

.btn-disabled {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
}

.comments {
  margin-top: 46px;
  border-top: 1px solid var(--line);
  padding-top: 42px;
}

.comment-note {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.comment-form {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.comment-form textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 14px 16px;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

.comment-form textarea:focus,
.lang-toggle:focus {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
  border-color: var(--blue);
}

.comment-submit {
  max-width: 190px;
  border: 0;
  cursor: pointer;
}

.comment-submit:disabled {
  cursor: progress;
  opacity: 0.58;
}

.comment-list {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.comment-author {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

.comment-text {
  margin: 0 0 9px;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-date {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.comment-empty {
  color: var(--muted);
  font-size: 14px;
}

.reveal-target {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 720ms ease, transform 720ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card .float-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 680ms ease, transform 680ms ease;
  transition-delay: calc(var(--reveal-delay, 0ms) + var(--item-delay, 0ms));
}

.project-card.is-visible .float-item {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .profile {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: 0;
    padding: 58px 0 48px;
  }

  .profile-name {
    font-size: 56px;
  }

  .hero-visual {
    max-width: 620px;
  }

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

  .project-content {
    padding: 22px 24px;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 16px 16px 64px;
  }

  .topbar {
    align-items: flex-start;
  }

  .lang-toggle {
    max-width: 170px;
  }

  .profile {
    padding: 42px 0 38px;
  }

  .profile-name {
    font-size: 44px;
    line-height: 1;
  }

  .profile-summary {
    margin: 20px 0 24px;
    font-size: 14px;
    line-height: 1.76;
  }

  .profile-actions,
  .actions {
    flex-direction: column;
  }

  .profile-action,
  .btn {
    width: 100%;
    flex: none;
  }

  .profile-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .profile-links a {
    justify-content: center;
  }

  .signal-board {
    min-height: 360px;
  }

  .signal-board-top {
    flex-wrap: wrap;
    padding: 18px;
  }

  .signal-badge {
    right: 18px;
    bottom: 18px;
    min-width: 126px;
    min-height: 92px;
    padding: 12px;
  }

  .signal-badge strong {
    font-size: 42px;
  }

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

  .metric {
    min-height: 94px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .skills-section {
    padding: 40px 0 34px;
  }

  .skill-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .projects-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 46px 0 20px;
  }

  .projects-header h2,
  .comments h2 {
    font-size: 34px;
  }

  .top {
    flex-direction: column;
    align-items: flex-start;
  }

  .name {
    font-size: 24px;
  }

  .project-content {
    padding: 20px 18px;
  }

  .comment-submit {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .reveal-target,
  .project-card .float-item {
    opacity: 1;
    transform: none;
  }
}

/* === Project screenshot === */
.project-shot {
  margin: -1px -1px 0;
  border-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  overflow: hidden;
  background: #0b0d12;
  line-height: 0;
}

.project-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.45s ease;
}

.project-card:hover .project-shot img {
  transform: scale(1.02);
}

@media (max-width: 640px) {
  .project-shot img { aspect-ratio: 16 / 11; }
}
