:root {
  --bg: #0b0d0c;
  --surface: #141715;
  --border: #232823;
  --text: #e6e8e3;
  --muted: #8f978f;
  --accent: #7fb69e;
  --accent-dim: #5c8a77;
  --warm: #c98a5c;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  line-height: 1.7;
  font-size: 15px;
  position: relative;
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.012) 0px,
    rgba(255,255,255,0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 100;
}

header, main, footer {
  max-width: 680px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* HEADER */
header {
  padding-top: 48px;
  padding-bottom: 40px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 12px;
}

.prompt-tag {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.prompt-tag::before {
  content: '';
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  overflow: hidden;
}

.lang-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-right: 1px solid var(--border);
}

.lang-btn:last-child { border-right: none; }

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.is-active {
  color: var(--bg);
  background: var(--accent);
}

h1.name {
  font-size: clamp(38px, 9vw, 58px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  display: inline-flex;
}

h1.name .char {
  opacity: 0;
  animation: reveal 0.03s ease forwards;
}

@keyframes reveal {
  to { opacity: 1; }
}

.tagline {
  margin-top: 10px;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* MAIN / SECTIONS */
main {
  padding-bottom: 24px;
}

section {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

section:first-of-type {
  border-top: 1px solid var(--border);
}

h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag {
  font-size: 11px;
  color: var(--bg);
  background: var(--accent-dim);
  padding: 2px 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

p {
  color: var(--text);
  font-size: 14.5px;
  margin-bottom: 12px;
  max-width: 60ch;
}

p:last-child { margin-bottom: 0; }

/* PROFILE */
.profile-section {
  display: flex;
  align-items: center;
  gap: 28px;
  border-top: none;
  padding-top: 0;
  padding-bottom: 40px;
  flex-wrap: wrap;
}

.profile-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 1px solid var(--border);
  filter: grayscale(35%) contrast(1.05);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.meta-line {
  display: flex;
  gap: 10px;
}

.meta-key {
  color: var(--muted);
  min-width: 52px;
}

.meta-key::before {
  content: '';
}

.meta-val {
  color: var(--text);
}

.meta-key::after {
  content: ':';
}

/* SKILLS */
.skill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-list li {
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 11px;
}

/* EDUCATION */
dl {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

dt {
  font-size: 14.5px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 3px;
}

dd {
  font-size: 13.5px;
  color: var(--muted);
}

/* LINKS */
.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-list a {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.15s ease;
}

.link-list li:last-child a {
  border-bottom: none;
}

.link-list a:hover {
  padding-left: 8px;
}

.link-key {
  color: var(--muted);
  font-size: 13px;
  min-width: 70px;
}

.link-list a:hover .link-key {
  color: var(--warm);
}

.link-val {
  color: var(--accent);
  font-size: 14px;
}

/* FOOTER */
footer {
  padding-top: 24px;
  padding-bottom: 48px;
  border-top: 1px solid var(--border);
}

footer p {
  color: var(--muted);
  font-size: 12px;
}

/* FOCUS */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  h1.name .char {
    opacity: 1;
    animation: none;
  }
  .link-list a { transition: none; }
}

/* LANG SWITCH TRANSITION */
header, main {
  transition: opacity 0.18s ease;
  opacity: 1;
}

header.fade-out, main.fade-out {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  header, main { transition: none; }
}

/* RESPONSIVE */
@media (max-width: 560px) {
  .profile-section {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-top {
    flex-direction: row;
  }
}
