/* =========================================================
   Taher Portfolio — stylesheet
   Design language: automation / node-flow (n8n inspired)
   Palette: deep ink navy + amber spark + teal data-flow
   ========================================================= */

.tp-root {
  --tp-bg: #0B1220;
  --tp-bg-soft: #0E1729;
  --tp-panel: #111C31;
  --tp-panel-2: #14213A;
  --tp-border: rgba(255, 255, 255, 0.08);
  --tp-border-soft: rgba(255, 255, 255, 0.05);
  --tp-text: #EDF1F7;
  --tp-text-muted: #92A0B8;
  --tp-text-dim: #5E6C86;
  --tp-amber: #E8A33D;
  --tp-amber-soft: rgba(232, 163, 61, 0.14);
  --tp-teal: #3ECFB0;
  --tp-teal-soft: rgba(62, 207, 176, 0.14);
  --tp-radius: 14px;
  --tp-radius-sm: 8px;
  --tp-maxw: 1160px;
  --tp-font-display: "Sora", "IBM Plex Sans", sans-serif;
  --tp-font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  all: initial;
  display: block;
  background: var(--tp-bg);
  color: var(--tp-text);
  font-family: var(--tp-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.tp-root * {
  box-sizing: border-box;
}

.tp-root h1, .tp-root h2, .tp-root h3, .tp-root h4, .tp-root p, .tp-root ul, .tp-root li {
  margin: 0;
  padding: 0;
  font-family: inherit;
  color: inherit;
}

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

.tp-root section {
  position: relative;
}

.tp-wrap {
  max-width: var(--tp-maxw);
  margin: 0 auto;
  padding: 0 28px;
}

@media (prefers-reduced-motion: reduce) {
  .tp-root * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- background texture: faint circuit dots ---------- */
.tp-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--tp-border-soft) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- top nav ---------- */
.tp-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tp-border);
}

.tp-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.tp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--tp-font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.tp-logo-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

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

.tp-nav-links a {
  font-size: 14.5px;
  color: var(--tp-text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.tp-nav-links a:hover { color: var(--tp-text); }

.tp-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--tp-amber);
  color: #1A1204 !important;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tp-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(232, 163, 61, 0.55);
}

.tp-burger {
  display: none;
  background: none;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.tp-burger span,
.tp-burger span::before,
.tp-burger span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--tp-text);
  position: relative;
  transition: transform 0.2s ease;
}
.tp-burger span::before { position: absolute; top: -6px; }
.tp-burger span::after { position: absolute; top: 6px; }

/* ---------- hero ---------- */
.tp-hero {
  padding: 92px 0 80px;
}

.tp-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.tp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--tp-teal);
  background: var(--tp-teal-soft);
  border: 1px solid rgba(62, 207, 176, 0.25);
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.tp-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tp-teal);
  box-shadow: 0 0 0 4px rgba(62, 207, 176, 0.18);
}

.tp-hero h1 {
  font-family: var(--tp-font-display);
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 12.5ch;
}

.tp-hero h1 .accent {
  color: var(--tp-amber);
}

.tp-hero-sub {
  margin-top: 20px;
  font-size: 17px;
  color: var(--tp-text-muted);
  max-width: 46ch;
}

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

.tp-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--tp-radius-sm);
  font-weight: 600;
  font-size: 14.5px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
}

.tp-btn-primary {
  background: var(--tp-amber);
  color: #1A1204;
}
.tp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(232, 163, 61, 0.55);
}

.tp-btn-ghost {
  background: transparent;
  border-color: var(--tp-border);
  color: var(--tp-text);
}
.tp-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.tp-hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.tp-hero-meta div {
  border-left: 2px solid var(--tp-border);
  padding-left: 12px;
}

.tp-hero-meta strong {
  display: block;
  font-family: var(--tp-font-display);
  font-size: 22px;
  color: var(--tp-text);
}

.tp-hero-meta span {
  font-size: 13px;
  color: var(--tp-text-dim);
}

/* ---------- hero visual: node flow + photo ---------- */
.tp-hero-visual {
  position: relative;
}

.tp-photo-frame {
  position: relative;
  width: min(360px, 100%);
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--tp-border);
  background: var(--tp-panel);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.tp-photo-frame img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(1.02);
}

.tp-flow-svg {
  position: absolute;
  inset: -18px;
  width: calc(100% + 36px);
  height: calc(100% + 36px);
  pointer-events: none;
  z-index: -1;
}

.tp-flow-svg .line {
  fill: none;
  stroke: var(--tp-border);
  stroke-width: 1.4;
}

.tp-flow-svg .node {
  fill: var(--tp-bg-soft);
  stroke: var(--tp-border);
  stroke-width: 1.4;
}

.tp-flow-svg .pulse {
  fill: var(--tp-amber);
}

.tp-pulse-anim {
  animation: tp-move-pulse 5.5s linear infinite;
  offset-rotate: 0deg;
}

@keyframes tp-move-pulse {
  0% { opacity: 0; }
  4% { opacity: 1; }
  92% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- section heads ---------- */
.tp-section {
  padding: 88px 0;
  border-top: 1px solid var(--tp-border-soft);
}

.tp-kicker {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}

.tp-kicker .num {
  font-family: var(--tp-font-display);
  font-size: 13px;
  color: var(--tp-amber);
  border: 1px solid rgba(232, 163, 61, 0.3);
  background: var(--tp-amber-soft);
  padding: 3px 9px;
  border-radius: 6px;
}

.tp-kicker .line {
  flex: 1;
  height: 1px;
  background: var(--tp-border);
}

.tp-section h2 {
  font-family: var(--tp-font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.tp-section-intro {
  color: var(--tp-text-muted);
  max-width: 62ch;
  font-size: 15.5px;
  margin-bottom: 48px;
}

/* ---------- about ---------- */
.tp-about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 52px;
  align-items: start;
}

.tp-about-photo {
  border-radius: var(--tp-radius);
  overflow: hidden;
  border: 1px solid var(--tp-border);
  position: sticky;
  top: 100px;
}

.tp-about-photo img { width: 100%; }

.tp-about-body p {
  color: var(--tp-text-muted);
  font-size: 16px;
  margin-bottom: 18px;
}

.tp-about-body strong { color: var(--tp-text); font-weight: 600; }
.tp-about-body .hl { color: var(--tp-amber); font-weight: 600; }
.tp-about-body .hl-teal { color: var(--tp-teal); font-weight: 600; }

.tp-timeline {
  margin-top: 36px;
  border-left: 2px solid var(--tp-border);
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.tp-timeline-item {
  position: relative;
}

.tp-timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tp-bg);
  border: 2px solid var(--tp-teal);
}

.tp-timeline-item .when {
  font-size: 12.5px;
  color: var(--tp-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tp-timeline-item h4 {
  font-family: var(--tp-font-display);
  font-size: 16.5px;
  font-weight: 600;
  margin: 4px 0 6px;
}

.tp-timeline-item p {
  color: var(--tp-text-muted);
  font-size: 14.5px;
}

/* ---------- skills ---------- */
.tp-skill-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 48px;
}

.tp-skill-group h3 {
  font-family: var(--tp-font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--tp-teal);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tp-border);
  margin-bottom: 16px;
}

.tp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tp-chip {
  padding: 8px 14px;
  font-size: 13.5px;
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  color: var(--tp-text-muted);
  background: var(--tp-panel);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.tp-chip:hover {
  border-color: var(--tp-amber);
  color: var(--tp-text);
}

/* ---------- projects ---------- */
.tp-project-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tp-project-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px 28px;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  background: linear-gradient(180deg, var(--tp-panel), var(--tp-bg-soft));
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tp-project-card:hover {
  border-color: rgba(232, 163, 61, 0.35);
  transform: translateX(4px);
}

.tp-project-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--tp-amber-soft);
  border: 1px solid rgba(232, 163, 61, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.tp-project-icon svg { width: 22px; height: 22px; stroke: var(--tp-amber); }

.tp-project-title {
  font-family: var(--tp-font-display);
  font-size: 17.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.tp-project-desc {
  color: var(--tp-text-muted);
  font-size: 14.5px;
  max-width: 68ch;
  margin-bottom: 12px;
}

.tp-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tp-tag {
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(62, 207, 176, 0.1);
  color: var(--tp-teal);
  border: 1px solid rgba(62, 207, 176, 0.2);
}

.tp-project-nodes {
  text-align: right;
  flex: none;
}

.tp-project-nodes strong {
  font-family: var(--tp-font-display);
  font-size: 22px;
  display: block;
  color: var(--tp-text);
}

.tp-project-nodes span {
  font-size: 11.5px;
  color: var(--tp-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- certificates ---------- */
.tp-cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.tp-cert-card {
  padding: 24px;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  background: var(--tp-panel);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.tp-cert-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tp-teal-soft);
  border: 1px solid rgba(62, 207, 176, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.tp-cert-badge svg { width: 20px; height: 20px; stroke: var(--tp-teal); }

.tp-cert-card h4 {
  font-family: var(--tp-font-display);
  font-size: 15.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tp-cert-card p {
  font-size: 13.5px;
  color: var(--tp-text-muted);
}

.tp-cert-card .cert-id {
  font-size: 11.5px;
  color: var(--tp-text-dim);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* ---------- contact ---------- */
.tp-contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 48px;
}

.tp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tp-field label {
  display: block;
  font-size: 13px;
  color: var(--tp-text-muted);
  margin-bottom: 7px;
}

.tp-field input,
.tp-field textarea {
  width: 100%;
  background: var(--tp-panel);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  padding: 12px 14px;
  color: var(--tp-text);
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.tp-field input:focus,
.tp-field textarea:focus {
  outline: none;
  border-color: var(--tp-teal);
}

.tp-field textarea { min-height: 130px; resize: vertical; }

.tp-hp { position: absolute; left: -9999px; opacity: 0; }

.tp-form-submit {
  align-self: flex-start;
  border: none;
}

.tp-form-msg {
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 8px;
  display: none;
}
.tp-form-msg.ok {
  display: block;
  background: var(--tp-teal-soft);
  color: var(--tp-teal);
  border: 1px solid rgba(62, 207, 176, 0.3);
}
.tp-form-msg.err {
  display: block;
  background: rgba(232, 90, 61, 0.12);
  color: #f08a72;
  border: 1px solid rgba(232, 90, 61, 0.3);
}

.tp-contact-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tp-contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  background: var(--tp-panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.tp-contact-link:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateX(4px);
}

.tp-contact-link .mono {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tp-font-display);
  font-weight: 700;
  font-size: 13px;
  flex: none;
}

.tp-contact-link .label { font-size: 14px; font-weight: 500; }
.tp-contact-link .sub { font-size: 12px; color: var(--tp-text-dim); }

.mono-fb { background: rgba(59, 118, 245, 0.15); color: #6d94ff; }
.mono-li { background: rgba(64, 156, 255, 0.15); color: #5fb0ff; }
.mono-wa { background: rgba(43, 199, 110, 0.15); color: #3fd67f; }
.mono-gh { background: rgba(255, 255, 255, 0.1); color: #cfd6e4; }
.mono-rd { background: rgba(255, 108, 61, 0.15); color: #ff8f65; }
.mono-em { background: var(--tp-amber-soft); color: var(--tp-amber); }

/* ---------- footer ---------- */
.tp-footer {
  padding: 40px 0;
  border-top: 1px solid var(--tp-border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.tp-footer small { color: var(--tp-text-dim); font-size: 13px; }

.tp-footer .socials {
  display: flex;
  gap: 14px;
}
.tp-footer .socials a {
  color: var(--tp-text-dim);
  font-size: 13px;
  transition: color 0.2s ease;
}
.tp-footer .socials a:hover { color: var(--tp-text); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .tp-hero-grid { grid-template-columns: 1fr; }
  .tp-hero-visual { order: -1; }
  .tp-about-grid { grid-template-columns: 1fr; }
  .tp-about-photo { position: static; max-width: 280px; }
  .tp-skill-groups { grid-template-columns: 1fr; }
  .tp-cert-grid { grid-template-columns: 1fr; }
  .tp-contact-grid { grid-template-columns: 1fr; }
  .tp-project-card { grid-template-columns: auto 1fr; }
  .tp-project-nodes { grid-column: 1 / -1; text-align: left; display: flex; gap: 6px; align-items: baseline; }
}

@media (max-width: 720px) {
  .tp-nav-links { display: none; }
  .tp-burger { display: flex; }
  .tp-nav-links.open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--tp-bg-soft);
    border-bottom: 1px solid var(--tp-border);
    flex-direction: column;
    padding: 18px 28px;
    gap: 18px;
  }
  .tp-hero { padding: 56px 0 60px; }
  .tp-section { padding: 60px 0; }
}
