:root {
  --bg: #0a0e17;
  --bg-alt: #0d1220;
  --surface: #111827;
  --border: #1f2937;
  --text: #e6e9f0;
  --text-dim: #9aa4b8;
  --accent: #00e5ff;
  --accent-2: #7c5cff;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --container-w: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 23, 0.75);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 1.4rem; font-weight: 700;
}
.logo span { color: var(--accent); }
.nav-avatar {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.95rem; color: var(--text-dim); transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 9px 18px; border-radius: 999px; background: var(--gradient); color: #06121a !important;
  font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; flex-shrink: 0;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: transform 0.25s ease, opacity 0.25s ease; }

/* Hero */
.hero { position: relative; padding: 64px 0 88px; overflow: hidden; }
.hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 650px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.16), rgba(124, 92, 255, 0.07) 45%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }

.btn {
  display: inline-block; padding: 13px 28px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary { background: var(--gradient); color: #06121a; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 229, 255, 0.25); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Hero: split identity layout — founder / center card / automation engineer */
.hero-split { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 22px; align-items: start; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 18px;
}
.hero-badge.founder { color: var(--accent); border-color: rgba(0, 229, 255, 0.4); }
.hero-badge.engineer { color: var(--accent-2); border-color: rgba(124, 92, 255, 0.4); }

.hero-side h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); margin-bottom: 18px; }

.hero-feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 12px;
}
.hero-feature .hf-icon { font-size: 1.15rem; margin-bottom: 6px; display: block; }
.hero-feature strong { display: block; font-size: 0.92rem; margin-bottom: 3px; }
.hero-feature span { font-size: 0.8rem; color: var(--text-dim); }

.code-card { background: #0b0f19; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.code-card-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.code-dot { width: 9px; height: 9px; border-radius: 50%; }
.code-dot.r { background: #ff5f57; } .code-dot.y { background: #febc2e; } .code-dot.g { background: #28c840; }
.code-filename { margin-left: 8px; font-size: 0.72rem; color: var(--text-dim); font-family: 'SFMono-Regular', Consolas, monospace; }
.code-body {
  padding: 16px; font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.76rem; line-height: 1.75; color: #9aa4b8; overflow-x: auto; white-space: pre;
}
.code-body .kw { color: var(--accent-2); }
.code-body .fn { color: var(--accent); }
.code-body .str { color: #5eead4; }

.hero-center {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 44px 32px; text-align: center;
}
.hero-name { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 4.6vw, 2.75rem); line-height: 1.08; }
.hero-name .accent {
  display: block; background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-role {
  text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.82rem;
  color: var(--text-dim); font-weight: 600; margin-top: 16px;
}
.hero-divider { width: 52px; height: 3px; background: var(--gradient); border-radius: 2px; margin: 20px auto; }
.hero-bio { color: var(--text-dim); font-size: 0.95rem; max-width: 42ch; margin: 0 auto 28px; }
.hero-center-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-tag {
  color: var(--accent); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px;
}
.section-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 28px; }
.section-lead { color: var(--text-dim); max-width: 620px; margin-top: -14px; margin-bottom: 28px; }
.about-grid { display: grid; gap: 20px; max-width: 760px; }
.about-text { color: var(--text-dim); font-size: 1rem; max-width: 65ch; }
.about-text strong { color: var(--text); }
.about-highlights {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 24px; margin: 4px 0;
}
.about-highlights li {
  display: flex; gap: 10px; align-items: flex-start;
  color: var(--text-dim); font-size: 0.92rem; padding-left: 2px; position: relative;
}
.about-highlights li::before {
  content: ''; flex-shrink: 0; margin-top: 7px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 36px; position: relative; padding-left: 24px; border-left: 2px solid var(--border); }
.timeline-item { position: relative; }
.timeline-dot {
  position: absolute; left: -30px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--gradient); box-shadow: 0 0 0 4px var(--bg-alt);
}
.timeline-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.timeline-head h3 { font-size: 1.1rem; }
.timeline-date { color: var(--accent); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.timeline-loc { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 10px; }
.timeline-content ul { display: flex; flex-direction: column; gap: 7px; }
.timeline-content li { color: var(--text-dim); font-size: 0.92rem; padding-left: 18px; position: relative; }
.timeline-content li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}

/* Cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; transition: transform 0.25s ease, border-color 0.25s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card-icon { font-size: 1.7rem; margin-bottom: 14px; }
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.9rem; }
.card-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 600; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 2px 10px; margin-bottom: 8px;
}

/* Ventures */
.venture-card { display: flex; flex-direction: column; gap: 8px; }
.venture-tagline { color: var(--accent); font-size: 0.85rem; font-weight: 600; }
.venture-card p { margin: 2px 0 4px; }
.venture-link { font-size: 0.88rem; font-weight: 600; color: var(--accent); }

/* Press */
.press-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.press-card { display: flex; flex-direction: column; }
.press-thumb {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top;
  border-radius: 12px; border: 1px solid var(--border); margin-bottom: 16px;
}
.press-outlet {
  color: var(--accent); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
}
.press-headline { font-size: 1.02rem; margin-bottom: 6px; }
.press-date { color: var(--text-dim); font-size: 0.82rem; }

/* Awards */
.award-card { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center; }
.award-photo {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 16px; border: 1px solid var(--border);
}
.award-body h3 { font-size: 1.25rem; margin-bottom: 8px; }
.award-org { display: block; color: var(--accent); font-weight: 600; font-size: 0.88rem; margin-bottom: 14px; }
.award-body p { color: var(--text-dim); font-size: 0.95rem; max-width: 55ch; }
@media (max-width: 640px) {
  .award-card { grid-template-columns: 1fr; }
  .award-photo { max-width: 220px; margin: 0 auto; }
}

/* Flow diagrams: faithful n8n workflow recreations, stacked one below another */
.flow-stack { display: flex; flex-direction: column; gap: 28px; }
.flow-project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.flow-project-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.flow-project-head .card-tag { margin-bottom: 0; }
.flow-project-head h3 { font-size: 1.1rem; }
.flow-desc { color: var(--text-dim); font-size: 0.92rem; margin-top: 14px; max-width: 70ch; }

.n8n-canvas-wrap { overflow-x: auto; border-radius: 12px; }
.n8n-svg { display: block; height: auto; }
.n8n-canvas-bg { fill: #f4f5f7; }

.n8n-node-rect {
  fill: #ffffff;
  stroke: #d7dbe3;
  stroke-width: 1.5;
  animation: n8nFire 3.4s ease-in-out infinite;
}
.n8n-icon { font-size: 24px; text-anchor: middle; dominant-baseline: central; }
.n8n-label { font-family: var(--font-body); font-size: 12px; fill: #4b5163; text-anchor: middle; }
.n8n-path { stroke: #c4c9d4; stroke-width: 2; fill: none; stroke-linecap: round; }
.n8n-path-dashed { stroke: #c4c9d4; stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
.n8n-pulse { fill: var(--accent); }

.sticky-note-rect { fill: #fdf1c7; stroke: #eadf9e; stroke-width: 1; }
.sticky-note-title { font-family: var(--font-head); font-size: 13px; font-weight: 700; fill: #6b571a; }
.sticky-note-body { font-family: var(--font-body); font-size: 10.5px; fill: #7a6a30; }

@keyframes n8nFire {
  0%, 100% { stroke: #d7dbe3; filter: none; }
  6% { stroke: var(--accent); filter: url(#nodeGlow); }
  14% { stroke: #d7dbe3; filter: none; }
}

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px; }
.skills-group h3 { margin-bottom: 14px; font-size: 1rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-list span {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  font-size: 0.82rem; padding: 7px 14px; border-radius: 999px;
}

/* Education */
.edu-list { display: flex; flex-direction: column; gap: 4px; }
.edu-item { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.edu-item h3 { font-size: 1rem; }
.edu-item p { color: var(--text-dim); font-size: 0.88rem; margin-top: 4px; }
.edu-date { color: var(--accent); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }

/* Contact */
.contact-inner { text-align: center; max-width: 640px; }
.contact-inner .section-lead { margin-left: auto; margin-right: auto; }
.contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { text-align: center; color: var(--text-dim); font-size: 0.82rem; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .n8n-node-rect { animation: none; stroke: var(--accent); }
  .n8n-pulse { display: none; }
}

/* Responsive */
@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; background: var(--bg-alt);
    border-bottom: 1px solid var(--border); flex-direction: column; align-items: flex-start;
    gap: 0; padding: 8px 24px 24px; transform: translateY(-120%); opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; }
  .nav-links li { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-cta { display: inline-flex; margin-top: 8px; }
  .hero { padding: 40px 0 56px; }
  .hero-split { display: flex; flex-direction: column; }
  .hero-center { order: -1; margin-bottom: 8px; }
  .section { padding: 60px 0; }
}
