/* ==========================================================================
   sections.css — hero, signal chain, ecosystem, architecture, projects,
   stack, infrastructure, contact, footer
   ========================================================================== */

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100svh, 940px);
  padding-block: calc(var(--nav-h) + clamp(2.5rem, 1.5rem + 5vw, 5rem)) clamp(3rem, 2rem + 4vw, 5.5rem);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: 3.5rem; }
}

.hero__title { margin-block: 1.1rem 1.3rem; }

.hero__title .accent {
  background: linear-gradient(105deg, #67e8f9 10%, #22d3ee 45%, #f0a63c 108%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Domain line under the H1 — the positioning statement */
.hero__domains {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin-bottom: 1.4rem;
  font-family: var(--font-display);
  font-size: clamp(0.98rem, 0.9rem + 0.45vw, 1.22rem);
  font-weight: 500;
  color: var(--text-2);
}

.hero__domains li { display: flex; align-items: center; gap: 0.85rem; }

/* Separator leads the item rather than trailing it: when the line wraps, the
   dot moves to the start of the new line instead of dangling at the end of
   the previous one. */
.hero__domains li:not(:first-child)::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex: none;
}

.hero__lede { max-width: 60ch; margin-bottom: 1.9rem; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2.4rem;
}

@media (max-width: 420px) {
  .hero__cta { display: grid; grid-template-columns: 1fr 1fr; }
  .hero__cta .btn { width: 100%; padding-inline: 0.75rem; font-size: 0.85rem; }
}

/* --- hero metrics ------------------------------------------------------ */

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.metric {
  padding: 0.95rem 1.05rem;
  background: var(--panel);
}

.metric__value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
}

.metric__value .unit { color: var(--accent); }

.metric__label {
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.45;
}

/* ==========================================================================
   SIGNAL CHAIN — the hero visual.
   Built from real DOM nodes (not baked SVG) so every label is translatable
   and the whole thing reflows on small screens.
   ========================================================================== */

.chain {
  position: relative;
  padding: clamp(1.1rem, 0.85rem + 1vw, 1.6rem);
  border-radius: var(--r-xl);
}

.chain__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1.05rem;
  border-bottom: 1px solid var(--line);
}

.chain__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}

.chain__list { display: grid; gap: 0.42rem; }

.chain__node {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.62rem 0.8rem;
  background: rgba(9, 14, 23, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease-out);
}

.chain__node:hover {
  transform: translateX(3px);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(13, 22, 35, 0.85);
}

.chain__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(34, 211, 238, 0.22);
  color: var(--accent);
}

.chain__icon svg { width: 16px; height: 16px; }

.chain__name {
  font-family: var(--font-display);
  font-size: 0.925rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}

.chain__meta {
  font-family: var(--font-mono);
  font-size: 0.685rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 0.1rem;
}

.chain__proto {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.75;
  white-space: nowrap;
}

/* The connector between two nodes, with a packet travelling down it. */
.chain__link {
  position: relative;
  height: 16px;
  margin-inline-start: 1.7rem;
  border-inline-start: 1px dashed var(--line-strong);
}

.chain__link::after {
  content: "";
  position: absolute;
  inset-inline-start: -3px;
  top: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px 1px var(--accent);
  animation: packet 3.4s var(--ease) infinite;
  animation-delay: var(--d, 0s);
  opacity: 0;
}

@keyframes packet {
  0%   { opacity: 0; transform: translateY(0); }
  12%  { opacity: 1; }
  78%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(20px); }
}

/* Energy-coloured tail end of the chain (application layer) */
.chain__node--out .chain__icon {
  background: rgba(240, 166, 60, 0.1);
  border-color: rgba(240, 166, 60, 0.26);
  color: var(--accent-2);
}

.chain__node--out .chain__proto { color: var(--accent-2); }

.chain__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.05rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ==========================================================================
   ENGINEERING ECOSYSTEM — layered rack
   ========================================================================== */

.stack-rack { display: grid; gap: 0.55rem; }

.layer {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(0.9rem, 0.6rem + 1.2vw, 1.6rem);
  padding: clamp(1rem, 0.8rem + 0.7vw, 1.35rem);
  background:
    linear-gradient(100deg, var(--glass), transparent 40%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease-out);
}

.layer:hover,
.layer:focus-within {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--layer-color, var(--accent)) 45%, transparent);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--layer-color, var(--accent)) 9%, transparent), transparent 45%),
    var(--panel-2);
}

/* Left rail: index + coloured spine.
   Flex column (not grid) so the spine's flex:1 can absorb the leftover
   height and run the full depth of the layer card. */
.layer__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 2.2rem;
}

.layer__index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--layer-color, var(--accent));
}

.layer__spine {
  width: 2px;
  flex: 1 1 auto;
  min-height: 1.5rem;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--layer-color, var(--accent)), transparent);
  opacity: 0.5;
  transition: opacity 0.3s var(--ease);
}

.layer:hover .layer__spine { opacity: 1; }

.layer__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.14rem);
  font-weight: 600;
  color: #fff;
}

.layer__role {
  margin-block: 0.2rem 0.7rem;
  font-size: 0.885rem;
  line-height: 1.58;
  color: var(--text-2);
  max-width: 78ch;
}

.layer .chip {
  border-color: color-mix(in srgb, var(--layer-color, var(--accent)) 26%, var(--line));
}

.layer:hover .chip {
  color: var(--text);
  border-color: color-mix(in srgb, var(--layer-color, var(--accent)) 42%, transparent);
}

@media (max-width: 560px) {
  .layer { grid-template-columns: 1fr; gap: 0.55rem; }
  .layer__rail { flex-direction: row; align-items: center; justify-content: flex-start; gap: 0.6rem; }
  .layer__spine { width: 100%; height: 2px; min-height: 0; background: linear-gradient(90deg, var(--layer-color, var(--accent)), transparent); }
  .layer:hover { transform: none; }
}

/* ==========================================================================
   ARCHITECTURE — "From Field Device to Cloud"
   Two panes: a clickable stage spine + a detail readout.
   ========================================================================== */

.arch {
  display: grid;
  gap: clamp(1rem, 0.7rem + 1.4vw, 1.6rem);
  align-items: start;
}

@media (min-width: 900px) {
  .arch { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
}

.arch__spine {
  display: grid;
  gap: 0;
  padding: clamp(0.9rem, 0.7rem + 0.7vw, 1.25rem);
  border-radius: var(--r-lg);
}

.arch__stage {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  text-align: start;
  color: var(--text-2);
  transition: background-color 0.28s var(--ease), border-color 0.28s var(--ease), color 0.28s var(--ease);
}

.arch__stage:hover { background: var(--glass); color: var(--text); }

.arch__stage.is-active {
  background: rgba(34, 211, 238, 0.075);
  border-color: rgba(34, 211, 238, 0.34);
  color: #fff;
}

.arch__node {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(10, 16, 26, 0.9);
  border: 1px solid var(--line-strong);
  color: var(--stage-color, var(--accent));
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease), transform 0.28s var(--ease-out);
}

.arch__node svg { width: 17px; height: 17px; }

.arch__stage.is-active .arch__node,
.arch__stage:hover .arch__node {
  border-color: color-mix(in srgb, var(--stage-color, var(--accent)) 55%, transparent);
  box-shadow: 0 0 22px -6px var(--stage-color, var(--accent));
  transform: scale(1.05);
}

.arch__name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: inherit;
  line-height: 1.25;
}

.arch__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.12rem;
}

/* Connector between stage buttons, with a flowing packet */
.arch__wire {
  position: relative;
  height: 18px;
  margin-inline-start: 1.95rem;
  border-inline-start: 1px dashed var(--line-strong);
  pointer-events: none;
}

.arch__wire::after {
  content: "";
  position: absolute;
  inset-inline-start: -3px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 1px var(--accent);
  opacity: 0;
  animation: packet 3.8s linear infinite;
  animation-delay: var(--d, 0s);
}

/* --- detail readout ---------------------------------------------------- */

.arch__detail {
  position: relative;
  padding: clamp(1.25rem, 1rem + 1vw, 1.85rem);
  border-radius: var(--r-lg);
  min-height: 100%;
}

@media (min-width: 900px) {
  .arch__detail { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
}

.arch__detail-in { animation: detail-in 0.4s var(--ease-out) both; }

@keyframes detail-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.arch__detail h3 { margin-block: 0.6rem 0.55rem; }

.arch__detail-text {
  font-size: 0.95rem;
  line-height: 1.68;
  color: var(--text-2);
  margin-bottom: 1.15rem;
}

.arch__detail-label {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.arch__io {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
  padding: 0.85rem 1rem;
  background: rgba(5, 8, 14, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

@media (min-width: 520px) { .arch__io { grid-template-columns: 1fr 1fr; } }

.arch__io dt {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.arch__io dd { color: var(--text); margin: 0; }

/* ==========================================================================
   PROJECTS
   ========================================================================== */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: clamp(1.5rem, 1.2rem + 1vw, 2.2rem);
}

.filter {
  padding: 0.48rem 1rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-2);
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease), background-color 0.22s var(--ease), transform 0.22s var(--ease-out);
}

.filter:hover { color: #fff; transform: translateY(-1px); border-color: var(--line-strong); }

.filter.is-active {
  color: #041318;
  background: linear-gradient(135deg, #2ee0f5, #0aa5c4);
  border-color: transparent;
  box-shadow: 0 8px 22px -12px rgba(34, 211, 238, 0.9);
}

.filter__n { opacity: 0.65; margin-inline-start: 0.35rem; font-size: 0.9em; }

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: clamp(1rem, 0.8rem + 0.9vw, 1.5rem);
}

/* Filter transition: JS toggles .is-hidden, CSS handles the fade-out. */
.project-item {
  animation: card-in 0.45s var(--ease-out) both;
  animation-delay: var(--i, 0ms);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.projects__empty {
  grid-column: 1 / -1;
  padding: 3.5rem 1rem;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Category accent — set per card via --cat on .card */
.card--project { --accent-cat: var(--cat, var(--accent)); }
.card--project .card__eyebrow { color: var(--accent-cat); }
.card--project .frame__tag { color: var(--accent-cat); }

.card--project:hover {
  border-color: color-mix(in srgb, var(--accent-cat) 40%, transparent);
  box-shadow: var(--shadow), 0 0 46px -20px color-mix(in srgb, var(--accent-cat) 65%, transparent);
}

.card--project:hover .frame img { transform: scale(1.03); }

.card--flagship .card__eyebrow::after {
  content: "";
  flex: none;
}

.flag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.16rem 0.5rem;
  border-radius: 99px;
  background: rgba(240, 166, 60, 0.12);
  border: 1px solid rgba(240, 166, 60, 0.35);
  color: var(--accent-2);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--accent-cat, var(--accent));
  transition: gap 0.24s var(--ease-out);
}

.card--project:hover .card__more { gap: 0.6rem; }
.card__more svg { width: 12px; height: 12px; }

/* --- project detail (inside modal) ------------------------------------- */

.pd__hero {
  position: relative;
  padding: clamp(1.4rem, 1rem + 2vw, 2.4rem) clamp(1.25rem, 0.9rem + 2vw, 2.4rem) clamp(1.1rem, 0.9rem + 1vw, 1.6rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 130% at 100% 0%, color-mix(in srgb, var(--cat, var(--accent)) 13%, transparent), transparent 62%),
    var(--panel);
}

.pd__hero h2 { margin-block: 0.7rem 0.65rem; font-size: clamp(1.45rem, 1.15rem + 1.5vw, 2.1rem); }
.pd__hero .kicker { color: var(--cat, var(--accent)); }
.pd__hero .kicker::before { background: linear-gradient(90deg, transparent, var(--cat, var(--accent))); }

.pd__tagline { max-width: 68ch; color: var(--text-2); font-size: 1rem; line-height: 1.68; margin-bottom: 1.1rem; }

.pd__body {
  display: grid;
  gap: clamp(1.4rem, 1.1rem + 1.4vw, 2.2rem);
  padding: clamp(1.4rem, 1rem + 2vw, 2.2rem) clamp(1.25rem, 0.9rem + 2vw, 2.4rem) clamp(2rem, 1.5rem + 2vw, 2.8rem);
}

@media (min-width: 860px) {
  .pd__body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
  .pd__main { grid-column: 1; }
  .pd__side { grid-column: 2; grid-row: 1; }
}

.pd__block + .pd__block { margin-top: clamp(1.3rem, 1rem + 1vw, 1.9rem); }

.pd__block h4 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cat, var(--accent));
}

.pd__block h4::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.pd__p { color: var(--text-2); font-size: 0.94rem; line-height: 1.7; }
.pd__p + .pd__p { margin-top: 0.7rem; }

.pd__side .panel { padding: 1.1rem 1.2rem; }
.pd__side .panel + .panel { margin-top: 1rem; }

/* Architecture pipeline rendered inside the detail view */
.pipe { display: grid; gap: 0; }

.pipe__step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  background: rgba(5, 8, 14, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: 0.85rem;
  color: var(--text);
}

.pipe__n {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--cat, var(--accent)) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat, var(--accent)) 32%, transparent);
  color: var(--cat, var(--accent));
  font-family: var(--font-mono);
  font-size: 0.66rem;
  flex: none;
}

.pipe__arrow {
  display: grid;
  place-items: center;
  height: 15px;
  margin-inline-start: 1.42rem;
  color: var(--line-strong);
}

.pipe__arrow svg { width: 11px; height: 11px; }

.pd__shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 0.7rem;
}

.pd__shot {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease-out);
}

.pd__shot:hover { border-color: rgba(34, 211, 238, 0.45); transform: translateY(-2px); }
.pd__shot .frame { border-bottom: 0; border-radius: var(--r-sm); }

/* ==========================================================================
   TECH STACK
   ========================================================================== */

.skills { display: grid; gap: clamp(1rem, 0.8rem + 0.8vw, 1.4rem); }

@media (min-width: 700px) { .skills { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .skills { grid-template-columns: repeat(3, 1fr); } }

.skillgroup { padding: clamp(1.15rem, 0.95rem + 0.7vw, 1.5rem); }

.skillgroup__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid var(--line);
}

.skillgroup__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--g-color, var(--accent)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--g-color, var(--accent)) 30%, transparent);
  color: var(--g-color, var(--accent));
  flex: none;
}

.skillgroup__icon svg { width: 16px; height: 16px; }

.skillgroup__title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.skillgroup .chip:hover {
  color: var(--g-color, var(--accent));
  border-color: color-mix(in srgb, var(--g-color, var(--accent)) 45%, transparent);
  background: color-mix(in srgb, var(--g-color, var(--accent)) 9%, transparent);
}

/* ==========================================================================
   INFRASTRUCTURE
   ========================================================================== */

.infra {
  display: grid;
  gap: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  align-items: start;
}

@media (min-width: 940px) { .infra { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }

.infra__panel { padding: clamp(1.25rem, 1rem + 1vw, 1.8rem); }

.infra__panel h3 { margin-block: 0.7rem 0.6rem; font-size: 1.22rem; }

.infra__note {
  margin-top: 1.1rem;
  padding: 0.8rem 0.95rem;
  background: rgba(240, 166, 60, 0.06);
  border: 1px solid rgba(240, 166, 60, 0.22);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-2);
}

.infra__note strong { color: var(--accent-2); }

.infra__ops { display: grid; gap: 0.5rem; }

.op {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.95rem;
  background: rgba(9, 14, 23, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.op:hover { border-color: rgba(34, 211, 238, 0.32); background: rgba(13, 20, 32, 0.8); }

.op__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--accent);
  flex: none;
}

.op__icon svg { width: 15px; height: 15px; }
.op__name { font-size: 0.9rem; font-weight: 500; color: var(--text); line-height: 1.35; }
.op__meta { font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); margin-top: 0.1rem; }

.op__state {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ok);
  white-space: nowrap;
}

/* ==========================================================================
   EXPERIENCE / ABOUT extras
   ========================================================================== */

.about {
  display: grid;
  gap: clamp(1.5rem, 1.1rem + 1.6vw, 2.6rem);
  align-items: start;
}

@media (min-width: 940px) { .about { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); } }

.about__p { color: var(--text-2); font-size: 1rem; line-height: 1.75; }
.about__p + .about__p { margin-top: 0.95rem; }

.facts { padding: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); }
.facts__list { display: grid; gap: 0.9rem; }

.fact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.fact__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.09);
  border: 1px solid rgba(34, 211, 238, 0.22);
  color: var(--accent);
  flex: none;
}

.fact__icon svg { width: 15px; height: 15px; }
.fact__k { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.fact__v { font-size: 0.92rem; color: var(--text); line-height: 1.45; }

.xp { padding: clamp(1.25rem, 1rem + 1.1vw, 1.9rem); }

.xp__cols { display: grid; gap: clamp(1.1rem, 0.9rem + 1vw, 1.8rem); margin-top: 1.2rem; }
@media (min-width: 780px) { .xp__cols { grid-template-columns: 1fr 1fr; } }

.xp__colhead {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.xp__colhead svg { width: 14px; height: 14px; flex: none; }
.xp__colhead--energy { color: var(--accent-2); }

.edu {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  align-items: center;
  padding: clamp(1.15rem, 0.95rem + 0.8vw, 1.5rem);
}

.edu__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(139, 125, 250, 0.18), rgba(139, 125, 250, 0.04));
  border: 1px solid rgba(139, 125, 250, 0.3);
  color: var(--violet);
  flex: none;
}

.edu__icon svg { width: 21px; height: 21px; }

/* ==========================================================================
   CONTACT + FOOTER
   ========================================================================== */

.contact {
  display: grid;
  gap: clamp(1.4rem, 1rem + 1.6vw, 2.2rem);
  align-items: start;
}

@media (min-width: 940px) { .contact { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }

.channels { display: grid; gap: 0.6rem; }

.channel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.05rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease-out), background-color 0.25s;
}

.channel:hover {
  color: var(--text);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--ch, var(--accent)) 45%, transparent);
  background: var(--panel-2);
}

.channel__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ch, var(--accent)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--ch, var(--accent)) 28%, transparent);
  color: var(--ch, var(--accent));
  flex: none;
}

.channel__icon svg { width: 17px; height: 17px; }
.channel__k { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
.channel__v { font-size: 0.93rem; color: var(--text); overflow-wrap: anywhere; line-height: 1.4; }
.channel__go { color: var(--muted); transition: transform 0.25s var(--ease-out), color 0.25s; }
.channel__go svg { width: 14px; height: 14px; }
.channel:hover .channel__go { color: var(--ch, var(--accent)); transform: translateX(3px); }

html[dir="rtl"] .channel:hover .channel__go { transform: translateX(-3px); }

.form-panel { padding: clamp(1.25rem, 1rem + 1.1vw, 1.9rem); }

.form-grid { display: grid; gap: 0.9rem; }
@media (min-width: 560px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 0.3rem;
}

.footer {
  position: relative;
  padding-block: clamp(2.2rem, 1.8rem + 1.6vw, 3.2rem);
  border-top: 1px solid var(--line);
  background: rgba(4, 6, 11, 0.6);
}

.footer__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.footer__links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }

.footer__links a {
  font-size: 0.845rem;
  color: var(--text-2);
}

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

.footer__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--muted);
}

.to-top {
  position: fixed;
  z-index: 90;
  inset-block-end: clamp(1rem, 3vw, 1.75rem);
  inset-inline-end: clamp(1rem, 3vw, 1.75rem);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: rgba(10, 15, 24, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease-out), visibility 0.3s, color 0.2s, border-color 0.2s;
}

.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent); border-color: rgba(34, 211, 238, 0.5); }
.to-top svg { width: 15px; height: 15px; }

/* ==========================================================================
   SCHEMATIC — generated architecture diagrams (js/ui/schematic.js)
   ========================================================================== */

.sch {
  width: 100%;
  height: 100%;
  color: var(--sch, var(--accent));
  overflow: visible;
}

.sch__grid { color: var(--sch, var(--accent)); }

.sch__node {
  fill: rgba(10, 16, 26, 0.85);
  stroke: color-mix(in srgb, var(--sch, var(--accent)) 34%, transparent);
  stroke-width: 1.1;
}

.sch__node--hot {
  fill: color-mix(in srgb, var(--sch, var(--accent)) 12%, rgba(10, 16, 26, 0.9));
  stroke: color-mix(in srgb, var(--sch, var(--accent)) 70%, transparent);
  stroke-width: 1.4;
}

.sch__wire {
  fill: none;
  stroke: color-mix(in srgb, var(--sch, var(--accent)) 22%, transparent);
  stroke-width: 1.1;
}

/* Flowing packets: a dashed overlay marching along each wire. */
.sch__trace {
  fill: none;
  stroke: var(--sch, var(--accent));
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 3 15;
  animation: sch-flow 2.6s linear infinite;
  animation-delay: var(--d, 0s);
  opacity: 0.9;
}

@keyframes sch-flow { to { stroke-dashoffset: -36; } }

.sch__dot {
  fill: var(--sch, var(--accent));
  opacity: 0.55;
}

.sch__dot--hot {
  opacity: 1;
  filter: drop-shadow(0 0 5px var(--sch, var(--accent)));
}

.sch__label,
.sch__cap,
.sch__stamp {
  font-family: var(--font-mono);
  fill: var(--sch, var(--accent));
}

.sch__label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-anchor: middle;
  dominant-baseline: central;
}

.sch__label--sm { font-size: 10px; }

.sch__cap {
  font-size: 10px;
  letter-spacing: 1px;
  text-anchor: middle;
  fill: var(--muted);
}

.sch__stamp {
  font-size: 10.5px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  opacity: 0.55;
}

/* Schematics sit flush in the frame and lift slightly with the card. */
.frame--sch { padding: 0; }
.frame--sch .sch { transition: transform 0.55s var(--ease-out); }
.card--project:hover .frame--sch .sch { transform: scale(1.025); }
