:root {
  --bg: #070e1a;
  --bg-2: #0b1424;
  --text: #e8eef5;
  --text-secondary: #b0bfcf;
  --muted: #7d93a8;
  --line: rgba(87, 216, 191, 0.12);
  --accent: #57d8bf;
  --accent-dim: rgba(87, 216, 191, 0.15);
  --card: rgba(10, 18, 32, 0.85);
  --card-border: rgba(87, 216, 191, 0.12);
  --mono: 'DM Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── BACKGROUND ── */
#fx-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
#fx-bg canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.overlay-grid {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(rgba(87, 216, 191, 0.08) 0.7px, transparent 0.7px);
  background-size: 32px 32px;
  opacity: 0.25;
}

/* ── NAV ── */
.topbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 30;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 14, 26, 0.92);
  backdrop-filter: blur(12px);
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.topbar nav {
  display: flex;
  gap: 2.2vw;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

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

/* ── MAIN ── */
main {
  position: relative;
  z-index: 5;
  padding-top: 64px;
}

/* ── HERO ── */
.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(260px, 42vh, 500px);
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(7, 14, 26, 0.04) 18%,
    rgba(7, 14, 26, 0.22) 40%,
    rgba(7, 14, 26, 0.60) 62%,
    rgba(7, 14, 26, 0.88) 80%,
    #070e1a 95%
  );
}

.hero-left,
.hero-right {
  padding: 7rem 5vw 4rem;
  position: relative;
  z-index: 1;
}

.hero-left {
  border-right: 1px solid var(--line);
}

.hero-note {
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.hero-note::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  margin: 1.5rem 0 1.5rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(3.3rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-desc {
  max-width: 42ch;
  min-height: 9rem; /* reserves space for 2-line tagline so CTA doesn't jitter */
}
.hero-desc-text {
  border-left: 2px solid var(--accent);
  padding-left: 1.1rem;
}
.hero-copy {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}
.hero-tagline {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.6;
  margin-top: 0.3rem;
}
.hero-tagline .cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.7s steps(2) infinite;
}
@keyframes blink { 0% { opacity: 1; } 100% { opacity: 0; } }

.hero-cta {
  display: flex;
  gap: 0.95rem;
  margin-top: 3rem;
}

.btn {
  border: 1px solid var(--card-border);
  padding: 0.75rem 1.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  border-radius: 8px;
  transition: all 0.25s;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-dim);
}

.btn.main {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.btn.main:hover {
  background: #6be8cf;
  box-shadow: 0 4px 24px rgba(87, 216, 191, 0.3);
}

.hero-right {
  display: grid;
  align-content: center;
  gap: 1.8rem;
  transform: translateY(-44px);
}

.hero-orb {
  width: min(500px, 100%);
  height: 290px;
  justify-self: start;
  margin-left: -18px;
}
.hero-earth {
  border-radius: 999px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  -ms-touch-action: none;
}
.hero-earth:active { cursor: grabbing; }
.hero-earth canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; pointer-events: none; }
.hero-orb-fallback {
  border-radius: 999px;
  border: 1px solid rgba(87, 216, 191, 0.3);
  background: radial-gradient(circle at 36% 30%, rgba(87, 216, 191, 0.2), rgba(8, 20, 36, 0.8) 60%);
  box-shadow: 0 0 50px rgba(87, 216, 191, 0.1);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}
.hero-orb-fallback:active { cursor: grabbing; }
.hero-orb-fallback canvas { width: 100%; height: 100%; display: block; }

.hero-meta {
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

.hero-meta .big {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--accent);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero-meta .small {
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── SECTIONS ── */
section {
  padding: 5rem 5vw;
  border-bottom: 1px solid var(--line);
}

#about {
  margin-top: -120px;
  padding-top: calc(5rem + 120px);
  position: relative;
  z-index: 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}

.section-index {
  color: var(--accent);
  font-family: var(--mono);
  letter-spacing: 0.1em;
  font-size: 0.76rem;
}

.section-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
}

/* ── CARDS & PANELS ── */
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

.about-card,
.panel {
  border: 1px solid var(--card-border);
  background: var(--card);
  padding: 1.8rem;
  border-radius: 14px;
}

.about-card p { color: var(--text-secondary); line-height: 1.7; }

.edu-timeline {
  padding: 0.5rem 0;
}
.edu-entry {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
}
.edu-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.35rem;
}
.edu-body {
  flex: 1;
}
.edu-period {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}
.edu-degree {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.edu-school {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}
.edu-desc {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.65;
  margin: 0;
}

/* ── ROLE CARDS ── */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.2rem;
}

.role-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.8rem 1.4rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.role-card:hover {
  border-color: rgba(87, 216, 191, 0.4);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(87, 216, 191, 0.1);
}

.role-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.role-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.role-sub {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── ABOUT LAYOUT ── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 1.5rem;
}
.about-quote {
  font-family: var(--sans);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  padding-left: 0;
  border: none;
}
.about-bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}
.about-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--accent);
  background: var(--card);
}
.about-right {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.about-info-block {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--card-border);
}
.about-info-block:first-child {
  padding-top: 0;
}
.about-info-block:last-child {
  border-bottom: none;
}
.about-info-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}
.about-info-value {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}
.about-info-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
}
.about-link-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.25s, color 0.25s;
}
.about-link-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── ABOUT EXPERIENCE CARDS ── */
.about-exp-grid {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.about-exp-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.1rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  transform-style: preserve-3d;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.about-exp-card:hover {
  border-color: rgba(87, 216, 191, 0.35);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32), 0 0 24px rgba(87, 216, 191, 0.08);
}

.about-exp-card .js-tilt-glare {
  border-radius: 14px;
}

.about-exp-geo {
  height: 120px;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(87, 216, 191, 0.22);
  background:
    radial-gradient(120px 80px at 28% 28%, rgba(102, 229, 210, 0.20), rgba(6, 17, 32, 0.06) 60%),
    radial-gradient(180px 120px at 70% 80%, rgba(68, 130, 203, 0.16), rgba(5, 13, 24, 0.16) 68%),
    linear-gradient(135deg, rgba(87, 216, 191, 0.05) 0%, rgba(8, 20, 38, 0.7) 58%, rgba(5, 12, 24, 0.95) 100%);
  box-shadow: inset 0 0 28px rgba(87, 216, 191, 0.08);
  position: relative;
  overflow: hidden;
}

.about-exp-geo::before {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 999px;
  border: 1px solid rgba(120, 240, 222, 0.28);
  opacity: 0.8;
}

.about-exp-geo::after {
  content: '';
  position: absolute;
  width: 58%;
  height: 58%;
  top: 21%;
  left: 21%;
  border-radius: 12px;
  border: 1px solid rgba(120, 240, 222, 0.34);
  transform: rotate(22deg);
  box-shadow: 0 0 20px rgba(92, 214, 194, 0.20);
}

.about-exp-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(87, 216, 191, 0.38));
  z-index: 2;
  transform: translateZ(28px);
  color: rgba(138, 242, 225, 0.92);
}

.about-exp-icon svg {
  width: 46px;
  height: 46px;
  opacity: 0.95;
}

.about-exp-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 0.24rem;
}

.about-exp-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.about-exp-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.68;
}

/* ── LIFE ── */
.life-header {
  margin-bottom: 3rem;
}

.life-title {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.life-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2.4rem;
  align-items: start;
}

.life-main {
  border-right: 1px solid var(--line);
  padding-right: 2.2rem;
}

.life-quote {
  margin: 0 0 1.7rem;
  font-family: var(--sans);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.34;
  color: rgba(182, 198, 216, 0.62);
}

.life-quote span {
  display: inline-block;
  margin-top: 0.2rem;
}

.life-main p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.72;
  max-width: 64ch;
}

.life-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.74fr);
  gap: 0;
  border: 1px solid rgba(87, 216, 191, 0.1);
  border-left: 0;
  border-right: 0;
}

.life-side-block {
  padding: 0.2rem 1.5rem 0.8rem;
}

.life-side-block + .life-side-block {
  border-left: 1px solid var(--line);
}

.life-side-title {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.life-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.life-list li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.56;
}

.life-bullet {
  color: rgba(87, 216, 191, 0.78);
  font-size: 0.88rem;
  line-height: 1.35;
}

.life-motto {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.life-motto-quote {
  margin: 0.2rem 0 0.4rem;
  padding-left: 0.85rem;
  border-left: 3px solid rgba(87, 216, 191, 0.88);
  font-family: var(--sans);
  font-style: italic;
  color: rgba(180, 195, 212, 0.76);
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.48;
}

.life-motto-author {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.life-motto-role {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── SKILLS ── */
.skills-spheres {
  margin-top: 3rem;
}
.skills-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}
.skills-row + .skills-row {
  margin-top: 1.8rem;
}

.skill-sphere-item {
  background: none;
  border: none;
  padding: 0;
  text-align: center;
  transition: transform 0.3s;
}
.skill-sphere-item:hover {
  transform: translateY(-4px);
}

.skill-sphere-canvas {
  width: 80px;
  height: 80px;
  margin: 0 auto 0.4rem;
  position: relative;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -ms-touch-action: none;
}
.skill-sphere-canvas:active { cursor: grabbing; }
.skill-sphere-canvas canvas { width: 100%; height: 100%; display: block; touch-action: none; pointer-events: none; }

.skill-sphere-name {
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.project-card {
  background: var(--card);
  padding: 2rem 1.8rem;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  transition: border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
}
.project-card:hover {
  border-color: rgba(87, 216, 191, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 30px rgba(87, 216, 191, 0.08);
}
.project-card .js-tilt-glare {
  border-radius: 14px;
}

.proj-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.project-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 0 0.8rem;
  line-height: 1.35;
}
.project-title em {
  font-weight: 400;
  color: var(--text-secondary);
}
.project-desc {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.proj-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.25s;
}
.proj-link:hover { opacity: 0.7; }

/* scroll-in animation */
.proj-hidden {
  opacity: 0;
  translate: 0 70px;
}
.proj-visible {
  opacity: 1;
  translate: 0 0;
  transition: opacity 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              translate 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── CONTACT ── */
.contact-card {
  max-width: 1220px;
  margin: 0 auto;
}

.contact-card-inner {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1.7rem;
  align-items: stretch;
}

.contact-left {
  border: 1px solid rgba(87, 216, 191, 0.11);
  border-radius: 14px;
  padding: 1.8rem 1.6rem 1.5rem;
  background: rgba(9, 16, 30, 0.82);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}

.contact-header {
  margin-bottom: 1.6rem;
}

.contact-kicker {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.45rem;
}

.contact-heading {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  color: var(--text);
}

.contact-socials {
  display: flex;
  justify-content: flex-start;
  gap: 0.7rem;
  margin: 0;
}

.social-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(87, 216, 191, 0.04);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.3s;
}

.social-icon:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(87, 216, 191, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(87, 216, 191, 0.15);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.form-group--grow {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.15rem;
}

.form-group--grow textarea {
  flex: 1;
}

.form-label {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.82rem 1rem;
  border: 1px solid rgba(87, 216, 191, 0.14);
  border-radius: 10px;
  background: rgba(7, 14, 26, 0.55);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s, background 0.25s;
  box-sizing: border-box;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(170, 185, 210, 0.5);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  background: rgba(7, 14, 26, 0.75);
}

.contact-form textarea {
  resize: none;
  min-height: 90px;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.2rem;
}

.contact-send-btn {
  padding: 0.72rem 2rem;
  border-radius: 10px;
  border: 1px solid rgba(87, 216, 191, 0.22);
  background: rgba(15, 25, 48, 0.9);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}

.contact-send-btn:hover {
  background: rgba(87, 216, 191, 0.12);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-send-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.transformer-panel {
  border: 1px solid rgba(87, 216, 191, 0.15);
  border-radius: 14px;
  padding: 1.2rem;
  background:
    radial-gradient(130% 110% at 18% 14%, rgba(87, 216, 191, 0.08), transparent 55%),
    linear-gradient(160deg, rgba(9, 16, 30, 0.92), rgba(8, 14, 26, 0.9));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.tf-head {
  margin-bottom: 0.9rem;
}

.tf-kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.tf-head h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
}

.tf-stream {
  min-height: 88px;
  border: 1px solid rgba(87, 216, 191, 0.14);
  border-radius: 10px;
  background: rgba(8, 16, 28, 0.72);
  padding: 0.8rem;
  margin-top: 0.9rem;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.72;
}

.tf-token {
  display: inline-block;
  margin-right: 0.34rem;
  margin-bottom: 0.25rem;
  padding: 0.12rem 0.34rem;
  border-radius: 5px;
  border: 1px solid rgba(87, 216, 191, 0.18);
  background: rgba(87, 216, 191, 0.06);
  animation: tfPop 0.32s ease-out;
}

/* <BOS> is injected by the prompt, visually distinct from generated tokens */
.tf-token--bos {
  border-color: rgba(138, 196, 255, 0.35);
  background: rgba(85, 150, 255, 0.08);
  color: rgba(138, 196, 255, 0.85);
  font-style: italic;
}

@keyframes tfPop {
  from { opacity: 0; transform: translateY(7px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tf-net-wrap {
  border: 1px solid rgba(87, 216, 191, 0.14);
  border-radius: 10px;
  background: rgba(8, 16, 28, 0.72);
  overflow: hidden;
  height: 430px;
}

#tf-net {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--line);
  padding: 2.2rem 5vw;
}

.footer-mini {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.footer-avatar {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(87, 216, 191, 0.2);
}

.footer-meta {
  display: grid;
  gap: 0.2rem;
}

.footer-name {
  font-family: var(--sans);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text);
}

.footer-email {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-email:hover {
  color: var(--accent);
}

.footer-copy {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 1080px) {
  .topbar nav { gap: 1rem; }
  .hero { grid-template-columns: 1fr; }
  .hero-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-orb { justify-self: start; }
  .hero-right { transform: translateY(-20px); }
  .two-col { grid-template-columns: 1fr; }
  .skills-spheres { display: block; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-exp-grid { grid-template-columns: 1fr; }
  .life-layout { grid-template-columns: 1fr; gap: 2rem; }
  .life-main { border-right: 0; padding-right: 0; }
  .life-side { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
  .contact-layout { grid-template-columns: 1fr; }
  .transformer-panel { order: -1; }
  .skills-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem 0.8rem;
  }
  .skills-row .skill-sphere-item {
    flex: 0 0 calc(50% - 0.4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .skills-row + .skills-row { margin-top: 1.2rem; }
}

@media (max-width: 760px) {
  #about {
    margin-top: 0;
    padding-top: 5rem;
  }
  .about-layout { grid-template-columns: 1fr; gap: 2rem; }
  .about-exp-grid { grid-template-columns: 1fr; gap: 1rem; }
  .about-exp-card { min-height: 260px; }
  .life-side { grid-template-columns: 1fr; border-top: 1px solid var(--line); }
  .life-side-block { padding: 1.2rem 0; }
  .life-side-block + .life-side-block { border-left: 0; border-top: 1px solid var(--line); }
  .life-quote { font-size: clamp(1.3rem, 7vw, 1.7rem); }
  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
  }
  .topbar nav {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.2rem;
  }
  main { padding-top: 86px; }
  .hero-left,
  .hero-right,
  section { padding-inline: 1rem; }
  .hero-right {
    transform: none;
    padding-top: 2rem;
  }
  .hero-orb {
    width: 100%;
    height: 230px;
    margin-left: 0;
  }
  .hero-meta {
    padding-top: 1.1rem;
  }
  .hero-meta .big {
    font-size: clamp(1.5rem, 9vw, 2rem);
    line-height: 1.16;
  }
  .hero-meta .small {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }
  .hero-title { font-size: clamp(2.6rem, 14vw, 3.8rem); }
  .hero-copy { font-size: 0.96rem; }
  .hero-cta { flex-wrap: wrap; }
  .skills-spheres {
    margin-top: 2rem;
  }
  .skills-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 0.7rem;
  }
  .skills-row .skill-sphere-item {
    flex: 0 0 calc(50% - 0.35rem);
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .skills-row + .skills-row { margin-top: 1rem; }
  .skill-sphere-canvas { width: 80px; height: 80px; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-card-inner { padding: 0; }
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 0.95rem;
  }
  .transformer-panel { order: -1; }
  .contact-left,
  .transformer-panel { padding: 0.9rem; }
  .contact-tagline {
    font-size: 1.45rem;
    margin-bottom: 0.8rem;
  }
  .contact-socials {
    gap: 0.65rem;
    margin-bottom: 0.9rem;
  }
  .social-icon {
    width: 42px;
    height: 42px;
  }
  .transformer-panel {
    border-radius: 12px;
  }
  .tf-head h3 {
    font-size: 1rem;
    line-height: 1.35;
  }
  .tf-net-wrap {
    height: 250px;
    border-radius: 8px;
  }
  .tf-stream {
    min-height: 72px;
    font-size: 0.83rem;
    line-height: 1.6;
    padding: 0.62rem;
    margin-top: 0.65rem;
  }
  .contact-form {
    gap: 0.72rem;
  }
  .contact-form input,
  .contact-form textarea {
    padding: 0.72rem 0.86rem;
    font-size: 0.86rem;
  }
  .contact-form textarea {
    min-height: 92px;
  }
  footer { padding: 1.5rem 1rem; }
  .footer-mini {
    align-items: flex-start;
    gap: 0.8rem;
  }
  .footer-avatar { width: 56px; height: 56px; }
  .footer-name { font-size: 1.02rem; }
  .footer-email,
  .footer-copy {
    font-size: 0.83rem;
    line-height: 1.45;
    word-break: break-word;
  }
}
