:root {
  --header-height: 72px;

  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;

  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --warm: #475569;
  --soft-blue: #dbeafe;

  --border: rgba(15, 23, 42, 0.12);

  --shadow: 0 18px 48px rgba(15, 23, 42, 0.09);
  --shadow-hover: 0 28px 72px rgba(15, 23, 42, 0.14);

  --radius: 22px;
  --transition: 0.3s ease;
}

body.dark-mode {
  --bg: #070d19;
  --card: #0f1b2e;
  --text: #f8fafc;
  --muted: #94a3b8;

  --accent: #60a5fa;
  --accent-2: #3b82f6;
  --warm: #cbd5e1;
  --soft-blue: rgba(37, 99, 235, 0.22);

  --border: rgba(255, 255, 255, 0.12);

  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --shadow-hover: 0 32px 82px rgba(0, 0, 0, 0.46);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-height: 100vh;
  padding-top: var(--header-height);

  overflow-x: hidden;

  font-family: "Inter", Arial, Helvetica, sans-serif;
  line-height: 1.7;

  color: var(--text);

  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.12), transparent 28%),
    radial-gradient(
      circle at 88% 18%,
      rgba(96, 165, 250, 0.12),
      transparent 24%
    ),
    var(--bg);

  transition:
    color var(--transition),
    background var(--transition);
}

body.dark-mode {
  background:
    radial-gradient(circle at 12% 8%, rgba(59, 130, 246, 0.2), transparent 28%),
    radial-gradient(
      circle at 88% 18%,
      rgba(37, 99, 235, 0.14),
      transparent 24%
    ),
    var(--bg);
}

body.no-scroll {
  overflow: hidden;
}

body.resizing *,
body.resizing *::before,
body.resizing *::after {
  transition: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.container {
  width: min(1050px, calc(100% - 32px));
  margin-inline: auto;
}

.section {
  scroll-margin-top: calc(var(--header-height) + 28px);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;

  width: 100%;
  height: var(--header-height);

  border-bottom: 1px solid var(--border);

  background: rgba(248, 250, 252, 0.88);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  transition:
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

body.dark-mode .header {
  background: rgba(7, 17, 31, 0.88);
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.nav {
  min-height: var(--header-height);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  flex-shrink: 0;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  border-radius: 12px;
  background: var(--text);
  color: var(--card);

  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.logo-word {
  font-size: 1rem;
}

body.dark-mode .logo-mark {
  background: var(--accent);
  color: #07111f;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-btn,
.menu-btn {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--card);
  color: var(--text);

  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);

  cursor: pointer;
  font-size: 1.1rem;

  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.theme-btn:hover,
.menu-btn:hover {
  transform: translateY(-2px);
}

.menu-btn {
  display: grid;
}

.nav-menu {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  left: 16px;
  right: 16px;
  z-index: 999;

  display: grid;
  gap: 6px;

  padding: 14px;

  border: 1px solid var(--border);
  border-radius: 20px;

  background: var(--card);
  box-shadow: var(--shadow-hover);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(-14px) scale(0.98);

  transition:
    opacity var(--transition),
    visibility var(--transition),
    transform var(--transition);
}

.nav-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translateY(0) scale(1);
}

.nav-menu a {
  position: relative;

  display: block;

  padding: 12px 14px;

  border-radius: 12px;

  color: var(--muted);

  font-size: 0.95rem;
  font-weight: 800;

  transition:
    color var(--transition),
    background var(--transition);
}

.nav-menu a:hover {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.nav-menu a.active {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.12);
}

.nav-menu a.active::before {
  content: "";

  position: absolute;
  top: 50%;
  left: 6px;

  width: 4px;
  height: 45%;

  border-radius: 999px;
  background: var(--accent);

  transform: translateY(-50%);
}

@media (min-width: 801px) {
  .menu-btn {
    display: none;
  }

  .nav-menu {
    position: static;
    z-index: auto;

    display: flex;
    align-items: center;
    gap: 18px;

    margin-left: auto;
    padding: 0;

    border: none;
    border-radius: 0;

    background: transparent;
    box-shadow: none;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: none;
    transition: none;
  }

  .nav-menu a {
    position: relative;

    display: inline-flex;
    align-items: center;

    padding: 0;

    border-radius: 0;
    background: transparent;

    color: var(--muted);

    font-size: 0.93rem;
  }

  .nav-menu a::before {
    display: none;
  }

  .nav-menu a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -7px;

    width: 0;
    height: 2px;

    border-radius: 999px;
    background: var(--accent);

    transition: width var(--transition);
  }

  .nav-menu a:hover,
  .nav-menu a.active {
    color: var(--accent);
    background: transparent;
  }

  .nav-menu a:hover::after,
  .nav-menu a.active::after {
    width: 100%;
  }
}

.hero {
  min-height: calc(100vh - var(--header-height));

  display: grid;
  align-items: center;

  padding: 72px 0 86px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  align-items: center;
  gap: clamp(44px, 7vw, 96px);
}

.hero-content {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  margin-bottom: 20px;

  color: var(--muted);

  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.status-dot {
  width: 9px;
  height: 9px;

  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.1);
}

h1 {
  max-width: 720px;

  margin: 0 0 12px;

  color: var(--text);

  font-size: clamp(3.1rem, 5.4vw, 5.4rem);
  line-height: 0.93;
  letter-spacing: -0.075em;
}

.hero-intro {
  display: block;

  margin-bottom: 12px;

  color: var(--muted);

  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-name {
  display: block;
  white-space: nowrap;
}

.hero-role {
  margin-bottom: 22px;

  color: var(--accent);

  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 610px;

  margin: 0 0 30px;

  color: var(--muted);

  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-top: 20px;

  color: var(--muted);

  font-size: 0.93rem;
  font-weight: 600;
}

.hero-links a {
  transition: color var(--transition);
}

.hero-links a:hover {
  color: var(--accent);
}

.hero-visual {
  position: relative;

  width: min(100%, 470px);
  justify-self: end;
}

.identity-window {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  aspect-ratio: 0.98;

  border: 1px solid var(--border);
  border-radius: 30px;

  background:
    linear-gradient(rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    var(--card);
  background-size: 30px 30px;

  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.14);

  animation: identity-float 7s ease-in-out infinite;
}

.identity-window::before {
  content: "";

  position: absolute;
  top: 22%;
  right: -22%;
  z-index: -1;

  width: 310px;
  height: 310px;

  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.24), transparent 67%);
}

.identity-bar {
  height: 54px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 0 18px;

  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 88%, transparent);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 8px;
  height: 8px;

  border-radius: 50%;
  background: var(--muted);
  opacity: 0.32;
}

.window-path {
  color: var(--muted);

  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.identity-body {
  position: relative;
  min-height: calc(100% - 54px);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 28px 32px 82px;
  text-align: center;
}

.identity-label {
  margin-bottom: 16px;

  color: var(--muted);

  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.ka-mark {
  position: relative;

  width: clamp(146px, 18vw, 194px);
  aspect-ratio: 1;

  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: center;

  border: 1px solid rgba(37, 99, 235, 0.26);
  border-radius: 34%;

  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 48%),
    var(--card);

  box-shadow:
    inset 0 0 0 10px color-mix(in srgb, var(--card) 78%, transparent),
    0 24px 52px rgba(37, 99, 235, 0.16);

  color: var(--text);

  font-size: clamp(3.8rem, 7vw, 5.7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.18em;
}

.ka-mark::before,
.ka-mark::after {
  content: "";

  position: absolute;
  background: var(--accent);
  opacity: 0.75;
}

.ka-mark::before {
  top: 18%;
  bottom: 18%;
  left: 50%;

  width: 1px;
}

.ka-mark::after {
  top: 50%;
  left: 18%;
  right: 18%;

  height: 1px;
}

.ka-mark span:first-child {
  transform: translateX(4px);
}

.ka-mark span:last-child {
  color: var(--accent);
  transform: translateX(-4px);
}

.identity-role {
  margin-top: 18px;

  color: var(--text);

  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.identity-tags {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.identity-tags span {
  padding: 8px 13px;

  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;

  background: color-mix(in srgb, var(--card) 78%, var(--soft-blue));
  color: var(--text);

  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);

  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.visual-code {
  position: absolute;

  padding: 8px 11px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--card);
  box-shadow: var(--shadow);

  color: var(--accent);

  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.code-one {
  top: 22%;
  left: 7%;

  transform: rotate(-6deg);
}

.code-two {
  right: 6%;
  bottom: 18%;

  transform: rotate(5deg);
}

@keyframes identity-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-5px) rotate(0.35deg);
  }
}

@keyframes identity-float-mobile {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-3px) rotate(0.18deg);
  }
}

.btn {
  min-height: 46px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 12px 18px;

  border: 1px solid transparent;
  border-radius: 14px;

  font-weight: 700;

  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.btn.primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
}

.btn.primary:hover {
  background: var(--accent-2);
}

.btn.secondary {
  border-color: var(--border);

  background: var(--card);
  color: var(--text);
}

.timeline-section {
  padding: 70px 0 90px;
}

.section-head {
  margin-bottom: 42px;

  text-align: center;
}

.section-head p {
  color: var(--accent);

  font-weight: 900;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

.timeline {
  position: relative;

  display: grid;
  gap: 34px;
}

.timeline::before {
  content: "";

  position: absolute;
  top: 0;
  bottom: 0;
  left: 28px;

  width: 2px;

  background: linear-gradient(var(--accent), var(--accent-2));

  opacity: 0.6;
}

.timeline-item {
  position: relative;

  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 22px;

  scroll-margin-top: calc(var(--header-height) + 28px);
}

.timeline-dot {
  position: relative;
  z-index: 2;

  width: 58px;
  height: 58px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 50%;

  background: var(--card);
  box-shadow: var(--shadow);
}

.timeline-dot::after {
  content: "";

  width: 18px;
  height: 18px;

  border-radius: 50%;

  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.timeline-card {
  padding: 28px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: var(--card);
  box-shadow: var(--shadow);

  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.timeline-card:hover {
  border-color: rgba(37, 99, 235, 0.35);

  box-shadow: var(--shadow-hover);

  transform: translateY(-6px);
}

.label {
  display: inline-block;

  margin-bottom: 8px;

  color: var(--warm);

  font-weight: 900;
}

.timeline-card h3 {
  margin-bottom: 8px;

  font-size: 1.35rem;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  -webkit-hyphens: none;
}

.timeline-card p {
  color: var(--muted);
}

.timeline-card p + p {
  margin-top: 12px;
}

.date {
  margin-bottom: 8px;

  color: var(--accent) !important;

  font-weight: 900;
}

.tags,
.skills,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;

  margin-top: 16px;
}

.tags span,
.skills span,
.contact-links a {
  padding: 8px 12px;

  border: 1px solid var(--border);
  border-radius: 999px;

  background: rgba(37, 99, 235, 0.06);
  color: var(--muted);

  font-weight: 800;

  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.tags span:hover,
.skills span:hover,
.contact-links a:hover {
  color: var(--accent);

  border-color: rgba(37, 99, 235, 0.35);

  transform: translateY(-3px);
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 4px;

  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;

  margin-top: 22px;
}

.projects-intro-card {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 58%),
    var(--card);
}

.personal-project-card::before {
  background: linear-gradient(90deg, var(--warm), var(--accent));
}

.personal-project-card .label {
  color: var(--accent);
}

.contact-card {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent), var(--card);
}

.top-btn {
  position: fixed;
  right: 22px;
  bottom: 15px;
  z-index: 1000;

  width: 46px;
  height: 46px;

  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;

  background: rgba(37, 99, 235, 0.82);
  color: #ffffff;

  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  font-size: 1.3rem;
  cursor: pointer;

  opacity: 0;
  visibility: hidden;

  transform: translateY(12px);

  transition:
    opacity var(--transition),
    visibility var(--transition),
    transform var(--transition);
}

body.dark-mode .top-btn {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(59, 130, 246, 0.78);
}

.top-btn.show {
  opacity: 1;
  visibility: visible;

  transform: translateY(0);
}

.top-btn:hover {
  background: var(--accent);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
  transform: translateY(-3px);
}

.footer {
  padding: 24px 16px;

  border-top: 1px solid var(--border);

  color: var(--muted);

  text-align: center;
}

.reveal {
  opacity: 0;

  transform: translateY(24px);

  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.show {
  opacity: 1;

  transform: translateY(0);
}

@media (max-width: 920px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .hero-content {
    max-width: 760px;
  }

  .hero-visual {
    width: min(100%, 560px);
    justify-self: center;
  }
}

@media (max-width: 700px) {
  .logo-word {
    display: none;
  }

  .hero {
    padding-top: 58px;
  }

  .hero-inner {
    gap: 44px;
  }

  h1 {
    font-size: clamp(3rem, 11vw, 4.35rem);
  }

  .identity-window {
    border-radius: 24px;
  }
}

@media (max-width: 1080px) and (min-width: 701px) {
  .identity-body {
    padding-top: 24px;
  }

  .identity-label {
    margin-bottom: 12px;
    font-size: 0.64rem;
  }

  .ka-mark {
    width: clamp(142px, 17vw, 176px);
  }

  .identity-role {
    margin-top: 16px;
  }
}

@media (max-width: 520px) {
  .identity-window {
    aspect-ratio: 0.9;
  }

  .identity-body {
    padding-right: 18px;
    padding-left: 18px;
    padding-bottom: 84px;
  }

  .identity-label {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
  }

  .visual-code {
    font-size: 0.65rem;
  }

  .identity-tags {
    right: 12px;
    bottom: 16px;
    left: 12px;
    gap: 6px;
  }

  .identity-tags span {
    padding: 7px 10px;
    font-size: 0.7rem;
  }
}

@media (max-width: 700px) {
  .hero {
    min-height: auto;
    padding: 58px 0 64px;
  }

  .timeline::before {
    left: 23px;
  }

  .timeline-item {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
  }

  .timeline-dot {
    width: 48px;
    height: 48px;
  }

  .timeline-dot::after {
    width: 15px;
    height: 15px;
  }

  .timeline-card {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  :root {
    --header-height: 66px;
  }

  .container {
    width: calc(100% - 24px);
  }

  h1 {
    font-size: clamp(2.75rem, 12vw, 4rem);
  }

  .hero-name {
    white-space: normal;
  }

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

  .hero-actions,
  .project-links,
  .contact-links {
    flex-direction: column;
  }

  .hero-links {
    flex-wrap: wrap;
  }

  .btn,
  .project-links .btn,
  .contact-links a {
    width: 100%;
  }

  .timeline {
    gap: 26px;
  }

  .timeline-card {
    padding: 18px;

    border-radius: 18px;
  }

  .top-btn {
    right: 16px;
    bottom: 16px;

    width: 44px;
    height: 44px;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 2.9rem;
  }

  .timeline-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
  }

  .timeline-dot {
    width: 42px;
    height: 42px;
  }

  .timeline::before {
    left: 20px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 430px) {
  .hero {
    padding: 44px 0 56px;
  }

  .hero-inner {
    gap: 36px;
  }

  .hero-visual {
    width: 100%;
  }

  .identity-window {
    aspect-ratio: auto;
    min-height: 410px;
    border-radius: 22px;
  }

  .identity-bar {
    height: 50px;
    padding-inline: 15px;
  }

  .identity-body {
    min-height: 0;
    justify-content: flex-start;
    padding: 22px 16px 20px;
  }

  .identity-label {
    margin-bottom: 14px;
    font-size: 0.57rem;
    letter-spacing: 0.12em;
  }

  .ka-mark {
    width: 146px;
    font-size: 4rem;
  }

  .identity-role {
    margin-top: 16px;
  }

  .identity-tags {
    position: static;
    width: 100%;
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .identity-tags span {
    min-width: 0;
    padding: 7px 4px;
    font-size: 0.64rem;
    text-align: center;
  }

  .visual-code {
    padding: 6px 8px;
    font-size: 0.6rem;
  }

  .code-one {
    top: 27%;
    left: 5%;
  }

  .code-two {
    top: 62%;
    right: 4%;
    bottom: auto;
  }

  .timeline {
    gap: 22px;
  }

  .timeline::before {
    left: 9px;
  }

  .timeline-item {
    display: block;
    padding-left: 28px;
  }

  .timeline-dot {
    position: absolute;
    top: 18px;
    left: 0;
    width: 20px;
    height: 20px;
    box-shadow: none;
  }

  .timeline-dot::after {
    width: 8px;
    height: 8px;
  }

  .timeline-card {
    padding: 18px 16px;
  }

  .timeline-card h3 {
    font-size: 1.18rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 430px) {
  body {
    line-height: 1.65;
  }

  .container {
    width: calc(100% - 32px);
  }

  .hero {
    padding: 38px 0 46px;
  }

  .hero-inner {
    gap: 28px;
  }

  .eyebrow {
    margin-bottom: 16px;
    font-size: 0.76rem;
    line-height: 1.55;
  }

  h1 {
    margin-bottom: 10px;
    font-size: clamp(2.7rem, 14vw, 3.35rem);
    line-height: 0.98;
  }

  .hero-intro {
    margin-bottom: 8px;
    font-size: 1rem;
  }

  .hero-role {
    margin-bottom: 18px;
    font-size: 1.3rem;
  }

  .hero-text {
    margin-bottom: 24px;
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    min-height: 52px;
  }

  .hero-links {
    margin-top: 16px;
  }

  .identity-window {
    min-height: 392px;
    animation: identity-float-mobile 7s ease-in-out infinite;
  }

  .identity-body {
    padding: 20px 14px 18px;
  }

  .identity-label {
    margin-bottom: 12px;
  }

  .ka-mark {
    width: 142px;
    font-size: 3.85rem;
  }

  .identity-role {
    margin-top: 14px;
    font-size: 0.9rem;
  }

  .identity-tags {
    margin-top: 16px;
  }

  .identity-tags span {
    padding: 7px 3px;
    font-size: 0.61rem;
  }

  .code-one {
    top: 28%;
    left: 4%;
  }

  .code-two {
    top: 59%;
    right: 3%;
  }

  .timeline-section {
    padding: 48px 0 64px;
  }

  .section-head {
    margin-bottom: 30px;
  }

  .section-head p {
    margin-bottom: 4px;
  }

  .section-head h2 {
    max-width: 310px;
    margin-inline: auto;
    font-size: clamp(1.75rem, 9vw, 2.05rem);
    line-height: 1.2;
    letter-spacing: -0.04em;
    text-wrap: balance;
  }

  .timeline {
    gap: 18px;
  }

  .timeline::before,
  .timeline-dot {
    display: none;
  }

  .timeline-item {
    display: block;
    padding-left: 0;
  }

  .timeline-card {
    padding: 20px 18px;
    border-radius: 18px;
  }

  .timeline-card:hover {
    transform: none;
  }

  .timeline-card h3 {
    font-size: 1.16rem;
    line-height: 1.38;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
    -webkit-hyphens: none;
  }

  .timeline-card p {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .tags,
  .skills,
  .contact-links {
    gap: 8px;
    margin-top: 14px;
  }

  .tags span,
  .skills span,
  .contact-links a {
    padding: 7px 10px;
    font-size: 0.84rem;
  }

  .project-links {
    margin-top: 18px;
  }

  .top-btn {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .footer {
    padding: 24px 54px 68px;
    font-size: 0.9rem;
    line-height: 1.55;
  }
}

@media (max-width: 350px) {
  .container {
    width: calc(100% - 24px);
  }

  h1 {
    font-size: 2.55rem;
  }

  .identity-window {
    min-height: 378px;
  }

  .ka-mark {
    width: 134px;
    font-size: 3.6rem;
  }

  .identity-tags span {
    font-size: 0.58rem;
  }
}

.project-title {
  margin-bottom: 8px;
}

.project-title-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  transition: color var(--transition);
}

.project-title-link:hover {
  color: var(--accent);
}

.external-icon {
  color: var(--accent);
  font-size: 0.85em;

  transition: transform var(--transition);
}

.project-title-link:hover .external-icon {
  transform: translate(2px, -2px);
}

.project-gallery {
  display: grid;
  grid-template-columns: minmax(0, 3.2fr) minmax(135px, 1fr);
  align-items: start;
  gap: 14px;

  margin-top: 22px;
}

.project-shot {
  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--bg);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.project-shot img {
  display: block;

  width: 100%;
  height: auto;
}

.project-shot figcaption {
  padding: 9px 12px;

  border-top: 1px solid var(--border);

  color: var(--muted);

  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

body.dark-mode .project-shot {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

@media (max-width: 620px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-shot-mobile {
    order: -1;

    width: min(100%, 280px);
    justify-self: center;
  }
}

@media (max-width: 430px) {
  .project-gallery {
    gap: 12px;
    margin-top: 18px;
  }

  .project-shot {
    border-radius: 14px;
  }

  .project-shot-mobile {
    width: min(100%, 250px);
  }

  .project-shot figcaption {
    padding: 8px 10px;
    font-size: 0.7rem;
  }
}
