/* Components: cards, buttons, tags, timeline */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--metal-dark), var(--gunmetal));
  box-shadow: var(--shadow-struct);
  cursor: pointer;
  user-select: none;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 180ms ease-out;
  overflow: hidden;
}

/* Metallic Sheen Effect */
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: skewX(-25deg);
  transition: 0.5s;
}

.btn:hover::before {
  left: 150%;
}

.btn:hover {
  border-color: var(--op-blue);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.3), inset 0 0 10px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(180deg, var(--op-blue-dim), var(--gunmetal));
  border-color: var(--op-blue);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--op-blue), var(--op-blue-dim));
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  box-shadow: none;
  text-shadow: none;
}

.btn-icon {
  transition: transform 0.2s ease;
}

.btn:hover .btn-icon {
  transform: translateX(4px);
}

/* Card Bevels */
.card {
  position: relative;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: var(--space-5);
  box-shadow: var(--shadow-struct);
}

/* Corner Accents */
.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  background: 
    linear-gradient(to right, var(--op-blue) 2px, transparent 2px) top left,
    linear-gradient(to bottom, var(--op-blue) 2px, transparent 2px) top left,
    linear-gradient(to left, var(--op-blue) 2px, transparent 2px) bottom right,
    linear-gradient(to top, var(--op-blue) 2px, transparent 2px) bottom right;
  background-size: 10px 10px;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.5;
}

@supports (clip-path: polygon(0 0)) {
  .card {
    clip-path: polygon(
      0 var(--bevel),
      var(--bevel) 0,
      100% 0,
      100% calc(100% - var(--bevel)),
      calc(100% - var(--bevel)) 100%,
      0 100%
    );
  }
}

/* Linux Terminal Style */
.terminal-card {
  background: #0c0c0c;
  border: 1px solid #333;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-family: var(--font-mono);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background: #1a1a1a; /* Ubuntu-like dark bar */
  padding: 8px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #333;
  justify-content: center; /* Center the title */
  position: relative;
}

/* Hide Mac dots */
.terminal-controls {
  display: none;
}

.terminal-title {
  color: #ccc;
  font-size: 0.8rem;
  opacity: 0.8;
}

.terminal-body {
  padding: 20px;
  color: #00ff00; /* Classic terminal green */
  font-size: 0.9rem;
  line-height: 1.5;
  min-height: 200px;
}


.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(520px 200px at 10% 0%, rgba(10, 75, 255, 0.14), transparent 55%),
    radial-gradient(520px 220px at 95% 18%, rgba(139, 0, 0, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 0.7;
}

.card:hover {
  border-color: rgba(10, 75, 255, 0.30);
}

#beyond-academics .card,
#community-service .card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#beyond-academics .card:hover,
#community-service .card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 75, 255, 0.30);
}

.card-title {
  font-size: var(--fs-card-title);
  line-height: 1.2;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.prose {
  color: var(--muted);
  font-size: var(--fs-body-lg);
}

.prose p {
  margin: 0;
}

.prose p + p {
  margin-top: 12px;
}

.bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.bullets li::marker {
  color: rgba(10, 75, 255, 0.92);
}

.bullets li {
  letter-spacing: 0.02em;
}

.metric {
  padding: 14px 14px;
  border-radius: 0;
  border: 1px solid rgba(186, 199, 220, 0.16);
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.54), rgba(10, 12, 18, 0.26));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(10, 75, 255, 0.75), rgba(186, 199, 220, 0.22), rgba(139, 0, 0, 0.65));
  opacity: 0.9;
}

.metric-value {
  font-size: var(--step-2);
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric-label {
  margin-top: 6px;
  color: var(--subtle);
  font-size: var(--step--1);
}

/* (Old terminal styles removed to avoid conflict with new Linux theme) */

.terminal-line {
  display: flex;
  margin-bottom: 0.25rem;
  min-height: 1.5em; /* Prevent layout shift */
}

.terminal-line.no-gap {
  margin-bottom: -0.1rem; /* Slightly overlap to ensure no gap */
}

.terminal-line.no-gap-top {
  margin-top: 0;
}

.terminal-prompt {
  color: rgba(10, 75, 255, 0.92);
  margin-right: 0.75rem;
  user-select: none;
}

.terminal-cmd {
  color: var(--text);
  font-weight: 500;
}

.terminal-cmd--primary {
  color: rgba(10, 75, 255, 0.98);
}

.terminal-output {
  color: var(--muted);
  white-space: pre-wrap; /* Allow wrapping */
}

.terminal-log {
  white-space: pre-wrap;
  font-weight: 500;
}
.terminal-log.log-info {
  color: rgba(10, 75, 255, 0.95);
}
.terminal-log.log-ok {
  color: rgba(142, 255, 166, 0.95);
}
.terminal-log.log-warn {
  color: rgba(255, 207, 90, 0.95);
}

.reveal {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

.progress-track {
  width: 100%;
  max-width: 240px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0;
  overflow: hidden;
  margin-top: 10px;
  margin-left: 12px;
}
.progress-fill {
  width: 0%;
  height: 100%;
  background: rgba(142, 255, 166, 0.95);
  transition: width 500ms ease;
}
.success-banner {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid rgba(142, 255, 166, 0.6);
  border-radius: 0;
  background: rgba(142, 255, 166, 0.06);
  color: rgba(142, 255, 166, 0.95);
  font-weight: 600;
}

.terminal-cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background: rgba(10, 75, 255, 0.62);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.about-card {
  padding: 24px 28px;
}

.about-card + .about-card {
  position: relative;
}

.about-card + .about-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(10, 75, 255, 0.55), rgba(186, 199, 220, 0.14), rgba(139, 0, 0, 0.50));
  opacity: 0.7;
}

.toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.segmented {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 0;
  border: 1px solid rgba(186, 199, 220, 0.16);
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.56), rgba(10, 12, 18, 0.30));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.segmented-btn {
  padding: 10px 12px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.segmented-btn:hover {
  color: var(--text);
  box-shadow: var(--glow-blue);
}

.segmented-btn.is-active {
  background: linear-gradient(180deg, rgba(139, 0, 0, 0.20), rgba(139, 0, 0, 0.08));
  color: rgba(242, 248, 255, 0.96);
  box-shadow: var(--glow-red);
}

.project-card {
  padding: 16px 16px;
  display: grid;
  gap: 12px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 75, 255, 0.34);
}

.project-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(186, 199, 220, 0.14);
}

.project-top > * {
  min-width: 0;
}

.project-title {
  font-size: var(--fs-card-title);
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.project-desc {
  color: var(--muted);
  font-size: var(--fs-body-lg);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 0;
  border: 1px solid rgba(186, 199, 220, 0.16);
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.44), rgba(10, 12, 18, 0.20));
  white-space: nowrap;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: rgba(186, 199, 220, 0.40);
}

.pill.is-completed .pill-dot {
  background: rgba(10, 75, 255, 0.92);
}

.pill.is-in-progress .pill-dot {
  background: rgba(139, 0, 0, 0.92);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  padding: 7px 10px;
  border-radius: 0;
  border: 1px solid rgba(186, 199, 220, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(10, 12, 18, 0.10));
  color: rgba(255, 255, 255, 0.82);
}

.tag-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--op-blue);
  background: linear-gradient(180deg, var(--op-blue-dim), var(--gunmetal));
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease,
    color 180ms ease;
}

.project-link:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 75, 255, 0.8);
  background: linear-gradient(180deg, var(--op-blue), var(--op-blue-dim));
  box-shadow: var(--glow-blue);
  color: rgba(242, 248, 255, 0.96);
}

#projects-grid .project-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
}

#projects-grid .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#projects-grid .project-desc {
  color: var(--muted);
  font-size: var(--step--1);
}

#projects-grid .project-stack {
  padding-top: 4px;
  border-top: 1px solid rgba(186, 199, 220, 0.14);
}

#projects-grid .project-stack .tag {
  font-size: 0.78rem;
  opacity: 0.88;
}

#projects-grid .project-links {
  margin-top: 8px;
}

.btn-project {
  width: 100%;
  justify-content: space-between;
  padding-inline: 18px;
}

.btn-project::after {
  content: "↗";
  font-size: 0.8rem;
  opacity: 0.9;
}

#projects-grid .view-btn {
  margin-top: auto;
}

.timeline-item {
  position: relative;
  padding: 16px 16px;
  display: grid;
  gap: 8px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(10, 75, 255, 0.75), rgba(139, 0, 0, 0.55));
  opacity: 0.8;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timeline-title {
  font-size: var(--fs-card-title);
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.timeline-date {
  color: var(--subtle);
  font-size: var(--fs-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timeline-desc {
  color: var(--muted);
}

.skills-card {
  padding: var(--space-5);
}

.skills-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(10, 75, 255, 0.75), rgba(186, 199, 220, 0.18), rgba(139, 0, 0, 0.65));
  opacity: 0.85;
  pointer-events: none;
}

.skills-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

#beyond-academics .beyond-card {
  padding: var(--space-4);
}

#community-service .community-card {
  padding: var(--space-4);
  background: rgba(15, 23, 42, 0.5);
}

#community-service .card:hover::before {
  opacity: 0.4;
}

/* Card Footer Notes & External Links */
.card-footer-note {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(186, 199, 220, 0.08);
  display: flex;
  align-items: center;
}

.external-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--subtle);
  font-size: var(--fs-meta);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
  font-weight: 500;
}

.external-link:hover {
  color: rgba(10, 75, 255, 0.95);
  transform: translateX(4px);
}

.external-link svg {
  opacity: 0.6;
  transition: opacity 180ms ease;
}

.external-link:hover svg {
  opacity: 1;
}

.card-image-container {
  width: 100%;
  position: relative;
  border-top-left-radius: var(--bevel);
  border-top-right-radius: var(--bevel);
  overflow: hidden;
  margin-bottom: 12px;
}

.card-images {
  max-height: 140px;
  overflow: hidden;
  transition: max-height 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-images img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: 50% 30%; /* bias toward upper area */
  border-radius: 12px;
  margin-bottom: 12px;
  transform: scale(1.06);
  opacity: 0.9;
  filter: brightness(0.75) contrast(1.05);
  transition:
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.4s ease,
    opacity 0.4s ease;
}

.card.active .card-images {
  max-height: 2000px;
}

.card.active .card-images img {
  transform: scale(1);
  opacity: 1;
  filter: brightness(1);
}

.card:hover .card-images img {
  filter: brightness(0.95) contrast(1.08);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0.6)
  );
  opacity: 0.3;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover .image-overlay {
  opacity: 0.4;
}

.card.active .image-overlay {
  opacity: 0.2;
}

#community-service .community-card.active {
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.25);
}

.skills-kicker {
  color: var(--subtle);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.skills-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Technical Skills Section */
#technical-skills .section-header {
  margin-bottom: 32px;
}

#technical-skills .section-title {
  text-transform: none;
  letter-spacing: 0.12em;
}

#technical-skills .tech-skills-grid {
  display: grid;
  gap: 18px;
}

#technical-skills .tech-skill-card {
  padding: 18px 18px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)),
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.18), transparent 55%);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  position: relative;
  overflow: hidden;
  transition:
    transform 200ms ease-out,
    box-shadow 200ms ease-out,
    border-color 200ms ease-out,
    background 220ms ease-out;
}

#technical-skills .tech-skill-card::after {
  content: "";
  position: absolute;
  left: -40%;
  right: -40%;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.0), rgba(37, 99, 235, 0.7), rgba(230, 46, 46, 0.0));
  opacity: 0;
  transform: translate3d(-20%, 0, 0);
  transition:
    opacity 220ms ease-out,
    transform 260ms ease-out;
  pointer-events: none;
}

#technical-skills .tech-skill-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(37, 99, 235, 0.5);
  border-color: rgba(37, 99, 235, 0.75);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.78)),
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.24), transparent 60%);
}

#technical-skills .tech-skill-card:hover::after {
  opacity: 1;
  transform: translate3d(20%, 0, 0);
}

#technical-skills .tech-skill-heading {
  font-size: var(--step-0);
  letter-spacing: 0.08em;
  text-transform: none;
  margin-bottom: 12px;
}

#technical-skills .tech-skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: var(--step--1);
  color: var(--muted);
}

#technical-skills .tech-skill-list li {
  position: relative;
  padding-left: 14px;
  transition: color 160ms ease-out;
}

#technical-skills .tech-skill-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, rgba(148, 163, 184, 0.9), rgba(37, 99, 235, 0.6));
  opacity: 0.75;
  transform: translate3d(0, -50%, 0);
}

#technical-skills .tech-skill-list li::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.6), transparent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  opacity: 0;
  transition:
    transform 160ms ease-out,
    opacity 160ms ease-out;
}

#technical-skills .tech-skill-list li:hover {
  color: #e5edf9;
}

#technical-skills .tech-skill-list li:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

@media (min-width: 768px) {
  #technical-skills .tech-skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "languages web"
      "backend cs"
      "tools tools";
    gap: 20px;
  }

  #technical-skills .tech-skill-card--languages {
    grid-area: languages;
  }

  #technical-skills .tech-skill-card--web {
    grid-area: web;
  }

  #technical-skills .tech-skill-card--backend {
    grid-area: backend;
  }

  #technical-skills .tech-skill-card--cs {
    grid-area: cs;
  }

  #technical-skills .tech-skill-card--tools {
    grid-area: tools;
  }
}

.kv {
  margin: 0;
  display: grid;
  gap: 12px;
}

.kv-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid rgba(186, 199, 220, 0.14);
}

.kv-row:last-child {
  border-bottom: 0;
}

.kv dt {
  color: var(--subtle);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.kv dd {
  margin: 0;
  word-break: break-word;
}

@media (max-width: 420px) {
  .kv-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* --- Contact Hub Redesign --- */
.contact-hub {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(5, 7, 10, 0.98));
  border: 1px solid rgba(37, 99, 235, 0.25);
  box-shadow: 
    0 20px 50px -10px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(10, 75, 255, 0.05) inset;
  overflow: hidden;
  clip-path: polygon(
    0 var(--bevel),
    var(--bevel) 0,
    100% 0,
    100% calc(100% - var(--bevel)),
    calc(100% - var(--bevel)) 100%,
    0 100%
  );
  margin-top: 12px;
}

.contact-hub::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.hub-status-bar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: rgba(10, 75, 255, 0.06);
  border-bottom: 1px solid rgba(37, 99, 235, 0.2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--op-blue);
  text-transform: uppercase;
}

.hub-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 6px; height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.6; transform: scale(0.9); }
}

.hub-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .hub-content {
    grid-template-columns: 1.2fr 1fr;
  }
}

.hub-main, .hub-details {
  padding: 32px 28px;
}

.hub-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .hub-main {
    border-right: 1px solid rgba(37, 99, 235, 0.15);
    padding-right: 48px;
  }
  .hub-details {
    padding-left: 48px;
  }
}

.hub-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.hub-desc {
  color: rgba(186, 199, 220, 0.8);
  line-height: 1.6;
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.contact-hub .kv-row {
  border-color: rgba(37, 99, 235, 0.12);
  padding: 14px 0;
}

.contact-hub .kv dt {
  color: var(--op-blue);
  opacity: 0.8;
  font-size: 0.75rem;
}

.contact-hub .kv dd {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.contact-hub .kv a {
  position: relative;
  display: inline-block;
  color: rgba(255, 255, 255, 0.95);
  transition: all 0.2s ease;
}

.contact-hub .kv a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--op-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.contact-hub .kv a:hover {
  color: var(--op-blue-light);
  text-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

.contact-hub .kv a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 0;
  border: 1px solid rgba(186, 199, 220, 0.14);
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.44), rgba(10, 12, 18, 0.22));
  color: var(--muted);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.to-top:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(10, 75, 255, 0.10), rgba(10, 12, 18, 0.18));
  color: rgba(255, 255, 255, 0.86);
}

.notfound-card {
  padding: clamp(18px, 4vw, 28px);
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.notfound-code {
  font-size: clamp(1rem, 0.8rem + 2vw, 1.4rem);
  letter-spacing: 0.2em;
  color: rgba(10, 75, 255, 0.92);
}

.notfound-title {
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.notfound-hint {
  margin-top: 6px;
  color: var(--subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.project-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 9, 20, 0.88);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.project-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.project-modal {
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-struct);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.project-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(186, 199, 220, 0.16);
  display: flex;
  align-items: center; /* Center align items vertically */
  justify-content: flex-start; /* Align items to the start (left) */
  gap: 14px;
  padding-right: 50px; /* Make space for the close button on the right */
}

.project-modal-title {
  font-size: var(--step-2);
  line-height: 1.1;
  letter-spacing: 0.16em;
}

.project-modal-body {
  padding: 18px 22px 10px;
  overflow-y: auto;
  display: grid;
  gap: 18px;
}

.project-modal-section {
  display: grid;
  gap: 8px;
}

.project-modal-heading {
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--subtle);
}

.project-modal-text {
  color: var(--muted);
  font-size: var(--step-0);
}

.project-modal-label {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.project-modal-answer {
  display: block;
  margin-top: 2px;
}

.project-modal-footer {
  padding: 10px 22px 18px;
  border-top: 1px solid rgba(186, 199, 220, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.project-modal-note {
  color: var(--subtle);
  font-size: var(--step--1);
}

.project-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(186, 199, 220, 0.26);
  background: rgba(15, 23, 42, 0.96);
  color: rgba(242, 248, 255, 0.9);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  z-index: 10;
}

.project-modal-close:hover {
  background: rgba(10, 75, 255, 0.16);
  border-color: rgba(10, 75, 255, 0.6);
  box-shadow: var(--glow-blue);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .project-modal {
    max-width: 100%;
  }

  .project-modal-header,
  .project-modal-body,
  .project-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}
