:root {
  --bg: #081018;
  --bg-soft: #0f1924;
  --panel: #111d2a;
  --panel-2: #172534;
  --text: #dbe8f6;
  --muted: #8fa4b8;
  --line: #22384d;
  --accent: #18d4bf;
  --accent-2: #ff9f5f;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

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

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(24, 212, 191, 0.19), transparent 45%),
    radial-gradient(circle at 82% 18%, rgba(255, 159, 95, 0.16), transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
  pointer-events: none;
  z-index: -2;
  animation: backgroundShift 18s ease-in-out infinite alternate;
}

.floating-code {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.floating-code span {
  position: absolute;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  backdrop-filter: blur(1px);
  animation: floatTag linear infinite;
}

.floating-code span:nth-child(1) {
  top: 18%;
  left: 8%;
  color: rgba(127, 212, 255, 0.35);
  border: 1px solid rgba(127, 212, 255, 0.22);
  animation-duration: 17s;
}

.floating-code span:nth-child(2) {
  top: 70%;
  left: 14%;
  color: rgba(255, 159, 95, 0.35);
  border: 1px solid rgba(255, 159, 95, 0.22);
  animation-duration: 21s;
}

.floating-code span:nth-child(3) {
  top: 24%;
  right: 11%;
  color: rgba(142, 160, 255, 0.35);
  border: 1px solid rgba(142, 160, 255, 0.22);
  animation-duration: 19s;
}

.floating-code span:nth-child(4) {
  top: 80%;
  right: 18%;
  color: rgba(24, 212, 191, 0.35);
  border: 1px solid rgba(24, 212, 191, 0.22);
  animation-duration: 23s;
}

.floating-code span:nth-child(5) {
  top: 44%;
  right: 4%;
  color: rgba(154, 249, 184, 0.35);
  border: 1px solid rgba(154, 249, 184, 0.22);
  animation-duration: 25s;
}

.floating-code span:nth-child(6) {
  top: 52%;
  left: 46%;
  color: rgba(255, 199, 136, 0.35);
  border: 1px solid rgba(255, 199, 136, 0.22);
  animation-duration: 20s;
}

@keyframes floatTag {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  25% {
    transform: translate3d(15px, -20px, 0) rotate(1.5deg);
  }

  50% {
    transform: translate3d(-10px, -45px, 0) rotate(-3deg);
  }

  75% {
    transform: translate3d(12px, -22px, 0) rotate(2deg);
  }

  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

@keyframes backgroundShift {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(0, -14px, 0);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: min(var(--max-width), 94vw);
  margin: 1rem auto 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(173, 204, 235, 0.2);
  background: rgba(10, 18, 27, 0.83);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand img {
  width: 1.6rem;
  height: 1.6rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.24s ease;
  -webkit-tap-highlight-color: transparent;
}

.main-nav a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.7rem;
}

main {
  width: min(var(--max-width), 94vw);
  margin: 0 auto;
}

.section {
  padding: 5.2rem 0;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
  padding-top: 3.9rem;
}

.hero-head {
  margin-bottom: 0.5rem;
}

.intro-frame {
  margin: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  position: relative;
  min-height: 330px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.intro-frame::before {
  content: "";
  position: absolute;
  width: min(78vw, 330px);
  height: min(78vw, 330px);
  border-radius: 50%;
  bottom: 0.8rem;
  border: 1px solid rgba(24, 212, 191, 0.45);
  background: radial-gradient(circle, rgba(19, 244, 175, 0.32) 0%, rgba(19, 244, 175, 0.12) 34%, rgba(11, 20, 30, 0.05) 76%, transparent 100%);
  box-shadow: 0 0 120px rgba(24, 212, 191, 0.32);
}

.intro-frame img {
  width: min(92%, 360px);
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 24px 42px rgba(0, 0, 0, 0.35));
}

.intro-frame figcaption {
  position: absolute;
  top: -0.55rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid rgba(24, 212, 191, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  background: rgba(7, 16, 24, 0.72);
  z-index: 3;
}

.hero-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.72rem;
}

.hero-command {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  color: #6f8598;
  font-size: 1.12rem;
}

.hero-command .prompt {
  color: #7f8f9e;
}

.hero-command .cmd {
  color: #14e683;
}

.hero-name {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(2.7rem, 8.4vw, 5.1rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero-name span {
  color: #14e683;
}

.hero-tagline {
  margin: 0;
  font-size: clamp(1.1rem, 3.2vw, 2rem);
  color: #8797a8;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.hero-tagline .tag-static {
  color: #7f8d9b;
}

.hero-tagline .tag-sep {
  color: #17d7bf;
  font-weight: 700;
}

.hero-tagline .typed-role {
  color: #8ea0ff;
}

.hero-visual {
  width: min(100%, 600px);
}

.hero-code {
  width: min(100%, 770px);
}

.hero-code .terminal-card {
  border: 1px solid rgba(109, 146, 175, 0.3);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 27, 39, 0.92), rgba(9, 17, 25, 0.95));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-code .terminal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(24, 212, 191, 0.55);
  box-shadow: 0 22px 44px rgba(24, 212, 191, 0.12);
}

.hero-code .terminal-topbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(7, 14, 21, 0.95);
  border-bottom: 1px solid rgba(109, 146, 175, 0.24);
  padding: 0.72rem 0.9rem;
}

.hero-code .terminal-topbar span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
}

.hero-code .terminal-topbar span:nth-child(1) {
  background: #ff7868;
}

.hero-code .terminal-topbar span:nth-child(2) {
  background: #ffd766;
}

.hero-code .terminal-topbar span:nth-child(3) {
  background: #6dff94;
}

.hero-code .terminal-topbar p {
  margin: 0 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-code .terminal-body {
  padding: 0.88rem 1rem;
  line-height: 1.7;
  text-align: left;
}

.hero-code .terminal-body pre {
  margin: 0;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.hero-code .terminal-body pre::-webkit-scrollbar {
  height: 8px;
}

.hero-code .terminal-body pre::-webkit-scrollbar-track {
  background: rgba(109, 146, 175, 0.1);
  border-radius: 4px;
}

.hero-code .terminal-body pre::-webkit-scrollbar-thumb {
  background: rgba(24, 212, 191, 0.3);
  border-radius: 4px;
}

.hero-code .terminal-body pre::-webkit-scrollbar-thumb:hover {
  background: rgba(24, 212, 191, 0.5);
}

.hero-code .terminal-body code {
  font-size: clamp(0.9rem, 1.25vw, 1.04rem);
  line-height: 1.7;
  display: block;
  white-space: pre;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

.btn {
  text-decoration: none;
  border-radius: 10px;
  padding: 0.68rem 1rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-primary {
  color: #031014;
  background: linear-gradient(120deg, var(--accent), #4efff0);
  box-shadow: 0 10px 25px rgba(24, 212, 191, 0.27);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: rgba(24, 212, 191, 0.7);
  color: var(--accent);
}

.terminal-card {
  border: 1px solid rgba(109, 146, 175, 0.3);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 27, 39, 0.92), rgba(9, 17, 25, 0.95));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
}

.terminal-topbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(7, 14, 21, 0.95);
  border-bottom: 1px solid var(--line);
  padding: 0.72rem 0.9rem;
}

.terminal-topbar span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
}

.terminal-topbar span:nth-child(1) {
  background: #ff7868;
}

.terminal-topbar span:nth-child(2) {
  background: #ffd766;
}

.terminal-topbar span:nth-child(3) {
  background: #6dff94;
}

.terminal-topbar p {
  margin: 0 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.terminal-body {
  padding: 1.3rem;
  line-height: 1.62;
}

.terminal-body p {
  margin: 0.1rem 0;
}

.terminal-line {
  color: #dbe8f6;
}

.prompt {
  color: #62f7e6;
}

.cmd {
  color: #9fd8ff;
}

.arg {
  color: #ffc788;
}

.file {
  color: #9af9b8;
}

.entity {
  color: #b5cbdf;
}

.list-bullet {
  color: #f6bd6c;
  margin-right: 0.4rem;
}

.output,
.output-list {
  color: #a5c2d8;
  margin-left: 0.5rem;
}

.output-list {
  padding-left: 1.1rem;
  margin-top: 0.2rem;
  margin-bottom: 0.9rem;
}

.typed-role {
  color: var(--accent-2);
}

.cursor {
  color: var(--accent);
  animation: blink 0.85s step-start infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.split-section {
  display: grid;
  grid-template-columns: 0.44fr 0.56fr;
  gap: 1.4rem;
  align-items: start;
}

.profile-card,
.project,
.timeline,
.edu-card {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(18, 30, 44, 0.9), rgba(13, 22, 32, 0.94));
}

.profile-card {
  overflow: hidden;
}

.profile-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 330px;
}

.code-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.code-card .terminal-card {
  border: 1px solid rgba(109, 146, 175, 0.3);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 27, 39, 0.92), rgba(9, 17, 25, 0.95));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.code-card .terminal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(24, 212, 191, 0.55);
  box-shadow: 0 22px 44px rgba(24, 212, 191, 0.12);
}

.code-card .terminal-topbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(7, 14, 21, 0.95);
  border-bottom: 1px solid var(--line);
  padding: 0.72rem 0.9rem;
}

.code-card .terminal-topbar span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
}

.code-card .terminal-topbar span:nth-child(1) {
  background: #ff7868;
}

.code-card .terminal-topbar span:nth-child(2) {
  background: #ffd766;
}

.code-card .terminal-topbar span:nth-child(3) {
  background: #6dff94;
}

.code-card .terminal-topbar p {
  margin: 0 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.code-card .terminal-body {
  padding: 1.1rem;
  line-height: 1.65;
}

.code-card .terminal-body pre {
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
}

.code-card .terminal-body code {
  color: #bcd8f0;
  font-size: clamp(0.82rem, 2.2vw, 1.05rem);
  line-height: 1.7;
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ts-keyword {
  color: #7fd4ff;
}

.ts-variable {
  color: #ffd27b;
}

.ts-operator {
  color: #f6bd6c;
}

.ts-prop {
  color: #9ef8c6;
}

.ts-string {
  color: #f7a8ff;
}

.ts-punc {
  color: #9bb4ca;
}

.section-heading h2 {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.chip-grid {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.chip-grid span {
  border: 1px solid rgba(173, 204, 235, 0.25);
  border-radius: 999px;
  background: rgba(19, 34, 48, 0.75);
  color: #cde0ef;
  padding: 0.5rem 0.86rem;
  font-size: 0.88rem;
  transition: border-color 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  cursor: default;
}

.chip-grid span:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 212, 191, 0.15);
}

.projects-grid {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project:hover {
  transform: translateY(-3px);
  border-color: rgba(24, 212, 191, 0.55);
}

.project img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.project:hover img {
  transform: scale(1.05);
}

.project-content {
  padding: 1rem;
}

.project-content h3 {
  margin: 0;
  font-size: 1rem;
}

.project-content p {
  margin: 0.68rem 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.project-stack {
  color: var(--accent-2) !important;
  font-size: 0.83rem !important;
}

.project-content a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.86rem;
}

.project-content a:hover {
  text-decoration: underline;
}

.gallery-grid {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(18, 30, 44, 0.9), rgba(13, 22, 32, 0.94));
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  border-color: rgba(24, 212, 191, 0.55);
}

.gallery-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(7, 14, 21, 0.98), rgba(14, 24, 36, 0.95));
  border-bottom: 1px solid rgba(173, 204, 235, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.gallery-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-preview img:hover {
  transform: scale(1.05);
}

.gallery-preview-imglink {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-preview-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.25s ease, transform 0.25s ease;
  padding: 1.5rem;
}

.gallery-preview-link:hover {
  color: var(--accent);
  transform: scale(1.05);
}

.gallery-preview-link svg {
  width: 3rem;
  height: 3rem;
  fill: currentColor;
  opacity: 0.7;
  transition: opacity 0.25s ease;
}

.gallery-preview-link:hover svg {
  opacity: 1;
}

.gallery-preview-link span {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-preview-empty {
  color: #5a7a94;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery-content {
  padding: 0.85rem 1rem;
  background: rgba(7, 14, 21, 0.6);
  border-top: 1px solid rgba(109, 146, 175, 0.15);
}

.gallery-content p {
  margin: 0;
  line-height: 1.55;
  font-size: 0.84rem;
  font-family: "IBM Plex Mono", monospace;
}

.gc-prompt {
  color: #62f7e6;
}

.gc-string {
  color: #f7a8ff;
}

.education-grid {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.edu-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(160deg, rgba(18, 30, 44, 0.9), rgba(13, 22, 32, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.edu-card:hover {
  transform: translateY(-4px);
  border-color: rgba(24, 212, 191, 0.55);
  box-shadow: 0 12px 30px rgba(24, 212, 191, 0.12);
}

.edu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.edu-year {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edu-badge {
  border: 1px solid rgba(255, 159, 95, 0.5);
  color: #ffc788;
  border-radius: 999px;
  padding: 0.2rem 0.52rem;
  font-size: 0.74rem;
}

.edu-badge.is-current {
  border-color: rgba(24, 212, 191, 0.5);
  color: var(--accent);
}

.edu-card h3 {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.45;
}

.edu-school {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.edu-school a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.22s ease, transform 0.22s ease;
  display: inline-block;
}

.edu-school a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.edu-card ul {
  margin: 0.72rem 0 0;
  padding: 0 0 0 1rem;
  color: #b0c6db;
  line-height: 1.65;
  font-size: 0.88rem;
}

.contact-terminal {
  margin-top: 1.4rem;
}

.contact-terminal .terminal-card {
  border: 1px solid rgba(109, 146, 175, 0.3);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 27, 39, 0.92), rgba(9, 17, 25, 0.95));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
}

.contact-terminal .terminal-topbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(7, 14, 21, 0.95);
  border-bottom: 1px solid var(--line);
  padding: 0.72rem 0.9rem;
}

.contact-terminal .terminal-topbar span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
}

.contact-terminal .terminal-topbar span:nth-child(1) {
  background: #ff7868;
}

.contact-terminal .terminal-topbar span:nth-child(2) {
  background: #ffd766;
}

.contact-terminal .terminal-topbar span:nth-child(3) {
  background: #6dff94;
}

.contact-terminal .terminal-topbar p {
  margin: 0 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.contact-terminal .terminal-body {
  padding: 1.6rem;
}

.contact-intro {
  margin: 0 0 1.2rem 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 65ch;
}

.contact-cursor {
  color: var(--accent);
  animation: blink 0.85s step-start infinite;
  margin-left: 1px;
}

.contact-links {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.contact-links a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  width: 2.7rem;
  height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.contact-links a svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.site-footer {
  width: min(var(--max-width), 94vw);
  margin: 0 auto 2.2rem;
  border-top: 1px solid rgba(173, 204, 235, 0.16);
  padding-top: 1.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

@media (max-width: 980px) {
  .hero {
    padding-top: 3.2rem;
  }

  .split-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .education-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-name {
    font-size: clamp(2.2rem, 9vw, 4.4rem);
  }
}

@media (max-width: 760px) {
  .site-header {
    margin-top: 0.8rem;
    padding: 0.8rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    margin: 0 auto;
    width: min(94vw, 480px);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 16, 24, 0.97);
    display: grid;
    gap: 0;
    overflow: hidden;
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .main-nav a {
    padding: 0.78rem 0.95rem;
    border-bottom: 1px solid rgba(173, 204, 235, 0.12);
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .main-nav.is-open {
    opacity: 1;
    transform: scaleY(1);
    pointer-events: auto;
  }

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

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

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

  .intro-frame {
    min-height: 260px;
  }

  .profile-card img {
    min-height: 280px;
  }

  .code-card .terminal-body {
    padding: 0.9rem;
  }

  .code-card .terminal-body code {
    font-size: clamp(0.76rem, 2.2vw, 0.95rem);
  }

  .hero-code .terminal-body {
    padding: 0.75rem 0.85rem;
  }

  .hero-code .terminal-body pre {
    overflow-x: visible;
  }

  .hero-code .terminal-body code {
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .section {
    padding: 4.2rem 0;
  }

  .contact-terminal .terminal-body {
    padding: 1.3rem;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    flex: 1;
    min-width: 140px;
    text-align: center;
  }
}

@media (max-width: 540px) {
  .floating-code span:nth-child(1) {
    top: 42%;
    left: 3%;
  }

  .floating-code span:nth-child(3) {
    top: 40%;
  }

  .hero {
    padding-top: 2.4rem;
  }

  .section {
    padding: 3.2rem 0;
  }

  .hero-command {
    font-size: 0.95rem;
  }

  .hero-name {
    font-size: clamp(1.8rem, 9vw, 3rem);
  }

  .hero-tagline {
    font-size: clamp(0.95rem, 3.5vw, 1.4rem);
  }

  .intro-frame {
    min-height: 220px;
  }

  .intro-frame::before {
    width: min(85vw, 280px);
    height: min(85vw, 280px);
  }

  .intro-frame img {
    width: min(88%, 300px);
  }

  .intro-frame figcaption {
    font-size: 0.68rem;
    padding: 0.18rem 0.4rem;
  }

  .hero-code .terminal-card {
    border-radius: 12px;
  }

  .hero-code .terminal-body {
    padding: 0.7rem 0.8rem;
  }

  .hero-code .terminal-body code {
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.6rem;
  }

  .btn {
    width: 100%;
    padding: 0.72rem 1rem;
  }

  .section-heading h2 {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
  }

  .chip-grid span {
    font-size: 0.82rem;
    padding: 0.45rem 0.75rem;
  }

  .project-content {
    padding: 0.85rem;
  }

  .project-content h3 {
    font-size: 0.95rem;
  }

  .code-card .terminal-body {
    padding: 0.75rem;
  }

  .code-card .terminal-body code {
    font-size: clamp(0.72rem, 2.4vw, 0.88rem);
    line-height: 1.6;
  }

  .contact-terminal .terminal-body {
    padding: 1.1rem;
  }

  .contact-intro {
    font-size: 0.9rem;
  }

  .contact-links {
    gap: 0.6rem;
  }

  .contact-links a {
    width: 2.5rem;
    height: 2.5rem;
  }

  .contact-links a svg {
    width: 1.1rem;
    height: 1.1rem;
  }

  .edu-card {
    padding: 1rem;
  }

  .site-footer {
    margin-bottom: 1.5rem;
    font-size: 0.78rem;
  }
}

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

  .site-header {
    padding: 0.7rem;
    gap: 0.7rem;
  }

  .brand span {
    font-size: 0.9rem;
  }

  .hero-name {
    font-size: clamp(1.6rem, 10vw, 2.5rem);
  }

  .intro-frame {
    min-height: 190px;
  }

  .intro-frame::before {
    width: min(90vw, 240px);
    height: min(90vw, 240px);
  }

  .hero-code .terminal-body code {
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .code-card .terminal-body {
    padding: 0.65rem;
  }

  .code-card .terminal-body code {
    font-size: clamp(0.66rem, 2.8vw, 0.8rem);
    line-height: 1.55;
  }

  .contact-links a {
    width: 2.3rem;
    height: 2.3rem;
  }
}

@media (min-width: 1400px) {
  :root {
    --max-width: 1280px;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .section {
    padding: 6rem 0;
  }
}
