/* ===== Design Tokens (dark is the default) ===== */
:root {
  --bg: #0f1219;
  --bg-elevated: #161a24;
  --text: #edeff5;
  --muted: #929cb2;
  --accent: #ff9d3d;
  --accent-soft: rgba(255, 157, 61, 0.14);
  --border: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.5);
  --success: #2fd66c;
  --success-soft: rgba(47, 214, 108, 0.16);

  /* fixed "code widget" palette — terminal/yaml surfaces stay dark
     regardless of page theme, matching the always-dark editor cards */
  --code-bg: #10131c;
  --code-bg-alt: #171b27;
  --code-text: #edeff5;
  --code-muted: #8890a4;
  --code-accent: #ffb020;
  --code-accent-2: #57c7ff;
  --code-success: #2fd66c;
  --code-border: rgba(255, 255, 255, 0.1);

  --font-body: 'Inter', sans-serif;
  --font-heading: 'Poppins', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-height: 72px;
  --radius: 12px;
  --transition: 0.3s ease;
}

/* Light theme override */
:root[data-theme='light'] {
  --bg: #e9ecf1;
  --bg-elevated: #f7f8fb;
  --text: #131a2b;
  --muted: #5b6478;
  --accent: #c2410c;
  --accent-soft: rgba(194, 65, 12, 0.1);
  --border: rgba(19, 26, 43, 0.12);
  --shadow: rgba(19, 26, 43, 0.12);
  --success: #1f9d52;
  --success-soft: rgba(31, 157, 82, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 2000;
  transition: width 0.1s ease-out;
}

/* ===== Preloader (deploy boot sequence) — always dark, transient ===== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: var(--code-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-terminal {
  width: 100%;
  max-width: 560px;
  font-family: var(--font-mono);
}

.preloader-cmd {
  color: var(--code-text);
  font-size: 0.95rem;
  margin-bottom: 20px;
  word-break: break-word;
}
.preloader-cmd .accent { color: var(--code-accent); }

.preloader-stages { margin-bottom: 20px; }
.preloader-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--code-muted);
  font-size: 0.85rem;
  padding: 6px 0;
  opacity: 0.4;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.preloader-stage i {
  font-size: 0.8rem;
  color: var(--code-muted);
  animation: spin 1s linear infinite;
}
.preloader-stage.done {
  opacity: 1;
  color: var(--code-text);
}
.preloader-stage.done i {
  animation: none;
  color: var(--code-accent);
}
.preloader-stage.done i::before { content: '\f00c'; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.preloader-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.preloader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--code-accent), var(--code-accent-2));
  transition: width 0.2s ease-out;
}

.preloader-percent {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--code-accent);
  text-align: right;
}

/* ===== Restrained blueprint background ===== */
.blueprint-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.9;
  pointer-events: none;
}

/* ===== Navbar (standard top bar) ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 42%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}
.navbar.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px var(--shadow);
}

.nav-container {
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  white-space: nowrap;
}

.nav-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: -0.03em;
  transition: transform var(--transition), background var(--transition);
}
.nav-logo:hover .nav-mark {
  transform: rotate(-6deg) scale(1.06);
  background: var(--accent);
  color: var(--bg-elevated);
}

.nav-logo-text {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.nav-logo-text > span:first-child {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}

.nav-logo-role {
  position: relative;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  font-family: var(--font-body);
  padding-left: 12px;
}
.nav-logo-role::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 14px;
  background: var(--border);
}

@media (max-width: 640px) {
  .nav-logo-role { display: none; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  position: relative;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color var(--transition);
}
.nav-link:hover,
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--success);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--success-soft);
  border: 1px solid var(--success);
  white-space: nowrap;
}
.nav-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success-soft);
  animation: blink 1.8s ease-in-out infinite;
}

@media (max-width: 900px) {
  .nav-status { display: none; }
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--muted);
  transition: color var(--transition), transform var(--transition);
}
.theme-toggle:hover { color: var(--accent); transform: rotate(20deg); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 10px 20px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px var(--accent-soft);
}

@media (max-width: 640px) {
  .nav-cta { display: none; }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  z-index: 1001;
}
.hamburger span {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 50px var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }
  .nav-link.active::after { display: none; }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .hamburger { display: flex; }
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: calc(var(--nav-height) + 40px) 24px 60px;
}

.hero-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero-eyebrow-rule {
  width: 26px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.hero-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.4vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.hero-name::after {
  content: '';
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 84px;
  height: 6px;
  background: var(--accent);
}
.hero-name-cursor { display: none; }

.hero-desc {
  margin-top: 28px;
  max-width: 560px;
  font-size: 1.05rem;
  color: var(--muted);
}
.hero-desc strong { color: var(--text); font-weight: 600; }

.hero-buttons {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-facts {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.hero-facts span { color: var(--text); }
.hero-facts .fact-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
  box-shadow: 0 0 6px var(--accent-soft);
  animation: blink 1.8s ease-in-out infinite;
}

.hero-ticker {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.ticker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-soft);
  animation: blink 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.ticker-text-wrap {
  position: relative;
  display: inline-block;
  overflow: hidden;
  height: 1.3em;
  vertical-align: middle;
}
.hero-ticker-text { display: inline-block; }
.hero-ticker-text.swap-out { animation: roleSlideOut 0.3s ease forwards; }
.hero-ticker-text.swap-in { animation: roleSlideIn 0.3s ease forwards; }

@keyframes roleSlideOut { to { transform: translateY(-120%); opacity: 0; } }
@keyframes roleSlideIn {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px var(--accent-soft);
}

.btn-outline {
  border: 1.5px solid var(--text);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 7px;
}
.btn-small:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Sections ===== */
.section { padding: 120px 0; position: relative; }

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 18px;
}
.section-eyebrow-rule {
  width: 26px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 720px;
}

.section-lede {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1rem;
  max-width: 560px;
}

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Code widgets (always-dark editor cards) ===== */
.code-card {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px var(--shadow);
}
.code-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  background: var(--code-bg-alt);
  border-bottom: 1px solid var(--code-border);
}
.code-card-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--code-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: start;
}

.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(20%);
}

.fact-table {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
}
.fact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
}
.fact-row:last-child { border-bottom: none; }
.fact-key { color: var(--muted); text-transform: lowercase; }
.fact-val { color: var(--text); text-align: right; }
.fact-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-weight: 600;
}
.fact-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success-soft);
  animation: blink 1.8s ease-in-out infinite;
}

.about-lead {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--muted);
  margin-bottom: 28px;
}
.about-lead strong { color: var(--text); }

.about-content p { color: var(--muted); margin-bottom: 16px; }
.about-content strong { color: var(--text); }

/* Stack.yaml */
.stack-yaml { margin: 28px 0 8px; }
.stack-yaml-body {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 12px;
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
}
.yaml-row { display: contents; }
.yaml-key { color: var(--code-accent-2); white-space: nowrap; }
.yaml-val { color: var(--code-text); word-break: break-word; }
.yaml-status { font-weight: 700; display: inline-flex; align-items: center; color: var(--code-success); }
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--code-success);
  box-shadow: 0 0 8px var(--code-success);
  animation: blink 1.8s ease-in-out infinite;
}

@media (max-width: 560px) {
  .stack-yaml-body { grid-template-columns: 1fr; row-gap: 4px; }
  .yaml-row { display: block; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px dashed var(--code-border); }
  .yaml-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
  .yaml-key { display: block; margin-bottom: 2px; }
}

.stats-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px 18px;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition);
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.stat-icon { display: block; font-size: 1.2rem; color: var(--accent); margin-bottom: 10px; }
.stat-number { display: block; font-family: var(--font-mono); font-size: 1.7rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.78rem; color: var(--muted); }

/* ===== About subsections (Skills / How I Work) ===== */
.about-sub { margin-top: 88px; padding-top: 56px; border-top: 1px solid var(--border); }

.about-sub-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin-bottom: 8px;
}
.about-sub-lede {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 32px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.skill-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.skill-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 16px 36px var(--shadow); }

/* The one deliberately-featured card — Azure, called out as the primary
   cloud platform. Every other skill card stays plain by design so this
   reads as an intentional highlight, not a stray accent. */
.skill-card-featured {
  background: linear-gradient(160deg, var(--accent-soft), var(--bg-elevated) 55%);
  border: 1.5px solid var(--accent);
  box-shadow: 0 16px 40px var(--accent-soft);
}
@media (min-width: 700px) {
  .skill-card-featured { grid-column: span 2; }
}

.skill-primary-badge {
  position: absolute;
  top: -11px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bg-elevated);
  background: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px var(--accent-soft);
}
.skill-primary-badge i { font-size: 0.7rem; }

.skill-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.skill-header i { font-size: 1.3rem; color: var(--accent); }
.skill-header h3 { font-family: var(--font-heading); font-size: 1.05rem; }

.skill-boot {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.75;
  margin-bottom: 10px;
}

.skill-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-icons span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.skill-icons span:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.skill-icons i.colored { font-size: 0.95rem; }

/* ===== How I Work (Principles) — restrained numbered list ===== */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
}
.principle-card {
  padding: 26px 22px 26px 0;
  border-bottom: 1px solid var(--border);
}
.principle-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 14px;
}
.principle-card h3 { font-family: var(--font-heading); font-size: 1.02rem; margin-bottom: 8px; }
.principle-card p { color: var(--muted); font-size: 0.88rem; }

/* ===== Work (career timeline) ===== */
.timeline-list {
  position: relative;
  max-width: 820px;
  padding-left: 78px;
}
.timeline-list::before {
  content: '';
  position: absolute;
  left: 39px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.timeline-entry { position: relative; margin-bottom: 48px; }
.timeline-entry:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -78px;
  top: 0;
  width: 60px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--bg);
  border: 1.5px solid var(--accent);
  border-radius: 6px;
}
.timeline-marker-edu { color: var(--muted); border-color: var(--muted); }

.timeline-entry h3 { font-family: var(--font-heading); font-size: 1.15rem; margin-bottom: 4px; }
.timeline-meta {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-bottom: 14px;
}
.timeline-entry ul { color: var(--muted); font-size: 0.92rem; }
.timeline-entry li { margin-bottom: 6px; padding-left: 18px; position: relative; }
.timeline-entry li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }

@media (max-width: 560px) {
  .timeline-list { padding-left: 56px; }
  .timeline-list::before { left: 27px; }
  .timeline-marker { left: -56px; width: 46px; font-size: 0.68rem; }
}

/* ===== Proof (credentials card grid) ===== */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 720px;
}
.proof-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.proof-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 16px 36px var(--shadow); }

.proof-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border-radius: 10px;
  background: var(--accent-soft);
  margin-bottom: 16px;
}
.proof-issuer {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.proof-card h3 { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 4px; }
.proof-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  padding: 0;
  perspective: 1200px;
}

.project-flip {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}
.project-flip:hover { transform: translateY(-6px); }
.project-flip.flipped { transform: rotateY(180deg); }
.project-flip.flipped:hover { transform: rotateY(180deg) translateY(-6px); }

.project-face {
  backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
}

.project-face-front {
  position: relative;
  height: 100%;
  min-height: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.project-face-front:hover { border-color: var(--accent); box-shadow: 0 16px 40px var(--shadow); }

.project-status {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
}
.status-blip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-soft);
  animation: blink 1.8s ease-in-out infinite;
}
.status-text { display: inline-block; }
.status-text.swap-out { animation: roleSlideOut 0.3s ease forwards; }
.status-text.swap-in { animation: roleSlideIn 0.3s ease forwards; }

.project-card h3 { font-family: var(--font-heading); margin: 30px 0 12px; font-size: 1.1rem; }
.project-face-front > p { color: var(--muted); margin-bottom: 12px; font-size: 0.9rem; flex-grow: 1; }

.run-pipeline-btn {
  margin-top: 16px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.run-pipeline-btn:hover { transform: translateY(-2px); }

.project-face-back {
  position: absolute;
  inset: 0;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.deploy-close {
  margin-left: auto;
  color: var(--code-muted);
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s ease;
}
.deploy-close:hover { color: var(--code-accent); }

.deploy-log {
  flex: 1;
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.9;
  color: var(--code-text);
  overflow-y: auto;
}
.deploy-log .log-line { opacity: 0; animation: fadeInUp 0.3s ease forwards; }
.deploy-log .log-arrow { color: var(--code-accent-2); margin-right: 6px; }
.deploy-log .log-done { color: var(--code-accent); font-weight: 700; margin-left: 6px; }
.deploy-log .log-final { color: var(--code-accent); font-weight: 700; }
.deploy-log .log-cursor { display: inline-block; color: var(--code-accent); animation: blink 1s step-end infinite; }

.tech-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.tech-badges span {
  font-size: 0.74rem;
  padding: 4px 11px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }

.yaml-form-body { padding: 26px 26px 6px; font-family: var(--font-mono); }

.yaml-field {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: start;
  gap: 4px 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--code-border);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.yaml-field:focus-within { background: rgba(255, 255, 255, 0.06); transform: translateY(-2px); border-color: var(--code-accent); }
.yaml-field.invalid { border-color: rgba(255, 95, 86, 0.6); background: rgba(255, 95, 86, 0.06); }

.yaml-key { color: var(--code-accent-2); font-size: 0.9rem; padding: 8px 4px; white-space: nowrap; }
.yaml-pipe { color: var(--code-accent); }
.yaml-input-wrap { min-width: 0; }

.yaml-divider {
  display: flex;
  align-items: center;
  margin: 18px 8px 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--code-border);
  color: var(--code-muted);
  font-size: 0.78rem;
}
.yaml-divider span::before { content: '// '; color: var(--code-accent); }

.yaml-field-social { align-items: center; margin-bottom: 20px; }
.yaml-field-social .social-links { padding-top: 0; }

.yaml-input {
  width: 100%;
  background: none;
  border: none;
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 8px 4px;
  resize: vertical;
}
.yaml-input::placeholder { color: var(--code-muted); opacity: 0.7; }
.yaml-input:focus { outline: none; }
.yaml-textarea { line-height: 1.6; }

.error-msg { display: block; color: #ff8a7a; font-size: 0.78rem; margin: -2px 0 10px 8px; min-height: 1em; }

.yaml-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 52px);
  margin: 12px 26px 26px;
  padding: 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--code-bg);
  background: var(--code-accent);
  border-radius: 999px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.yaml-submit:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 255, 159, 0.3); }

.social-links { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.social-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--code-bg-alt);
  border: 1px solid var(--code-border);
  font-size: 1.05rem;
  color: var(--code-muted);
  transition: transform 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.social-icon:hover { color: var(--code-accent); border-color: var(--code-accent); transform: translateY(-4px); }

.social-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 6px);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--code-accent);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.social-icon:hover .social-tooltip { opacity: 1; transform: translate(-50%, 0); }

/* ===== Footer ===== */
.footer { padding: 32px 0; border-top: 1px solid var(--border); }
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.footer-content p { color: var(--muted); }
.footer-content .accent { font-family: var(--font-body); font-weight: 600; }

.back-to-top {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), border-color var(--transition);
}
.back-to-top:hover { transform: translateY(-4px); border-color: var(--accent); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--code-bg);
  border: 1px solid var(--code-accent);
  color: var(--code-text);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: 0 10px 30px var(--shadow);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 3000;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink { 50% { opacity: 0.25; } }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 260px; margin: 0 auto; }
  .fact-table { max-width: 260px; margin: 18px auto 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .section { padding: 80px 0; }
  .hero-buttons { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
