
/*
Theme Name: Corey Gaspar
Theme URI: https://coreygaspar.com
Author: Corey Gaspar
Description: Custom terminal-inspired personal website.
Version: 1.0
*/


/* =========================================
   1. FONTS & ROOT VARIABLES
========================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Backgrounds */
  --cg-bg: #101722;
  --cg-bg-deep: #0b111b;
  --cg-panel: #151f2d;
  --cg-panel-light: #1b2838;

  /* Borders */
  --cg-border: #354357;
  --cg-border-soft: #293648;

  /* Text */
  --cg-text: #d9e0e9;
  --cg-muted: #8492a6;
  --cg-dim: #58677b;

  /* Accent colors */
  --cg-blue: #91b8df;
  --cg-cyan: #83c5d2;
  --cg-lavender: #b5a9d6;
  --cg-yellow: #d8c38b;
  --cg-green: #94c6a6;
  --cg-red: #c98f98;

  /* Typography */
  --cg-font: 'IBM Plex Mono', monospace;
}


/* =========================================
   2. GLOBAL RESET & BASE STYLES
========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}

body {
  margin: 0;
  padding: 0;
  background: var(--cg-bg);
  color: var(--cg-text);
  font-family: var(--cg-font);
  font-size: 13px;
  line-height: 1.7;
}

body,
button,
input,
textarea {
  font-family: var(--cg-font);
}

button,
input,
textarea {
  font-size: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}


/* =========================================
   3. WORDPRESS THEME OVERRIDES
========================================= */

.wp-site-blocks {
  margin: 0 !important;
  padding: 0 !important;
}

.wp-block-post-content,
.entry-content,
.wp-block-group {
  margin-top: 0 !important;
  padding: 0 !important;
}

.wp-block-html {
  margin: 0 !important;
}

header.wp-block-template-part,
footer.wp-block-template-part {
  display: none;
}

body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
body .is-layout-constrained > .alignwide {
  max-width: none;
}


/* =========================================
   4. SITE BACKGROUND
========================================= */

.cg-site {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--cg-bg);
  color: var(--cg-text);
}

.cg-site::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-image:
    linear-gradient(
      rgba(145, 184, 223, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(145, 184, 223, 0.025) 1px,
      transparent 1px
    );

  background-size: 32px 32px;
  opacity: 0.7;
}

.cg-site::after {
  content: "";
  position: absolute;
  top: -300px;
  right: -250px;
  z-index: -1;
  width: 700px;
  height: 700px;
  pointer-events: none;

  background: radial-gradient(
    circle,
    rgba(79, 112, 151, 0.09),
    transparent 70%
  );
}


/* =========================================
   5. HEADER & NAVIGATION
========================================= */

.cg-topbar {
  position: relative;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  min-height: 76px;
  padding: 0 65px;

  background: rgba(11, 17, 27, 0.92);
  border-bottom: 1px solid var(--cg-border);
}

.cg-brand {
  display: flex;
  align-items: center;
  gap: 12px;

  color: var(--cg-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.4px;
  white-space: nowrap;
}

.cg-brand-icon {
  color: var(--cg-cyan);
  font-size: 12px;
  font-weight: 600;
}

.cg-muted {
  color: var(--cg-muted);
}

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

.cg-nav a {
  position: relative;

  color: var(--cg-muted);
  font-size: 10px;
  letter-spacing: 0.5px;

  transition: color 0.2s ease;
}

.cg-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;

  width: 0;
  height: 1px;

  background: var(--cg-cyan);
  transition: width 0.25s ease;
}

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

.cg-nav a:hover::after {
  width: 100%;
}


/* =========================================
   6. SYSTEM STATUS
========================================= */

.cg-system-status {
  display: flex;
  align-items: center;
  gap: 9px;

  color: var(--cg-green);
  font-size: 9px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.cg-status-dot {
  display: inline-block;
  flex-shrink: 0;

  width: 7px;
  height: 7px;

  border-radius: 50%;
  background: var(--cg-green);
  box-shadow: 0 0 9px rgba(148, 198, 166, 0.45);

  animation: cg-status-pulse 2.5s ease-in-out infinite;
}

@keyframes cg-status-pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 9px rgba(148, 198, 166, 0.4);
  }

  50% {
    opacity: 0.55;
    box-shadow: 0 0 3px rgba(148, 198, 166, 0.2);
  }
}


/* =========================================
   7. HERO SECTION
========================================= */

.cg-hero {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 0 25px;
}

.cg-hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 22px 65px;

  color: var(--cg-dim);
  font-size: 9px;
  letter-spacing: 1px;

  border-bottom: 1px solid var(--cg-border-soft);
}


/* HERO MAIN LAYOUT */

.cg-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.8fr);
  align-items: center;
  gap: 80px;

  padding: 90px 65px 85px;
}


/* HERO INTRODUCTION */

.cg-hero-intro {
  max-width: 720px;
  animation: cg-fade-up 0.8s ease both;
}

.cg-section-label {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 38px;

  color: var(--cg-muted);
  font-size: 10px;
  letter-spacing: 1.5px;
}

.cg-label-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 27px;
  height: 25px;

  color: var(--cg-cyan);
  background: rgba(131, 197, 210, 0.08);
  border: 1px solid rgba(131, 197, 210, 0.3);

  font-size: 9px;
}

.cg-terminal-prompt {
  margin: 0 0 17px;

  color: var(--cg-cyan);
  font-size: 11px;
  letter-spacing: 0.2px;
}

.cg-terminal-prompt span {
  color: var(--cg-green);
}

.cg-hero-intro h1 {
  margin: 0;

  color: var(--cg-text);
  font-size: clamp(37px, 5.2vw, 67px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -3px;
}

.cg-accent {
  color: var(--cg-cyan);
}

.cg-name {
  color: var(--cg-blue);
}

.cg-hero-description {
  max-width: 580px;
  margin: 27px 0 32px;

  color: var(--cg-muted);
  font-size: 12px;
  line-height: 2.1;
}


/* HERO LINKS */

.cg-hero-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
}

.cg-link-primary {
  display: inline-flex;
  align-items: center;
  gap: 15px;

  padding: 12px 17px;

  color: var(--cg-bg-deep);
  background: var(--cg-blue);
  border: 1px solid var(--cg-blue);

  font-size: 10px;
  font-weight: 600;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.cg-link-primary:hover {
  color: var(--cg-text);
  background: transparent;
  transform: translateY(-2px);
}

.cg-link-primary span {
  font-size: 15px;
}

.cg-link-secondary {
  color: var(--cg-muted);
  font-size: 10px;
  transition: color 0.2s ease;
}

.cg-link-secondary:hover {
  color: var(--cg-cyan);
}


/* HERO PROFILE PANEL */

.cg-profile-panel {
  position: relative;
  width: 100%;

  background: var(--cg-panel);
  border: 1px solid var(--cg-border);

  box-shadow:
    0 15px 45px rgba(0, 0, 0, 0.15),
    inset 0 1px rgba(255, 255, 255, 0.015);

  animation: cg-fade-up 0.8s 0.15s ease both;
}

.cg-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 15px 19px;

  color: var(--cg-cyan);
  background: var(--cg-panel-light);
  border-bottom: 1px solid var(--cg-border);

  font-size: 9px;
  letter-spacing: 1px;
}

.cg-panel-index {
  color: var(--cg-dim);
}

.cg-profile-content {
  padding: 9px 19px;
}

.cg-profile-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;

  padding: 15px 0;

  color: var(--cg-text);
  border-bottom: 1px solid var(--cg-border-soft);

  font-size: 10px;
}

.cg-profile-row:last-child {
  border-bottom: none;
}

.cg-field {
  flex-shrink: 0;

  color: var(--cg-muted);
  font-size: 9px;
  letter-spacing: 0.8px;
}

.cg-status-text {
  color: var(--cg-green);
  text-align: right;
}

.cg-panel-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;

  padding: 11px 19px;

  color: var(--cg-dim);
  background: var(--cg-bg-deep);
  border-top: 1px solid var(--cg-border);

  font-size: 8px;
  letter-spacing: 0.7px;
}


/* HERO TERMINAL WINDOW */

.cg-terminal {
  margin: 0 65px 45px;
  overflow: hidden;

  background: var(--cg-bg-deep);
  border: 1px solid var(--cg-border);

  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.13),
    inset 0 0 25px rgba(0, 0, 0, 0.2);

  animation: cg-fade-up 0.8s 0.3s ease both;
}

/* Terminal title bar */

.cg-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 12px 17px;

  background: var(--cg-panel-light);
  border-bottom: 1px solid var(--cg-border);
}

.cg-terminal-title {
  color: var(--cg-blue);
  font-size: 10px;
  letter-spacing: 1px;
}

.cg-terminal-symbol {
  margin-right: 9px;
  color: var(--cg-lavender);
}

.cg-terminal-controls {
  display: flex;
  gap: 7px;

  font-size: 8px;
}

.cg-terminal-controls span:nth-child(1) {
  color: var(--cg-green);
}

.cg-terminal-controls span:nth-child(2) {
  color: var(--cg-yellow);
}

.cg-terminal-controls span:nth-child(3) {
  color: var(--cg-red);
}

/* Terminal screen */

.cg-terminal-screen {
  min-height: 220px;
  padding: 22px 25px;

  background: var(--cg-bg-deep);

  color: var(--cg-text);
  font-size: 11px;
  line-height: 1.9;
}

.cg-terminal-output {
  display: flex;
  flex-direction: column;
  gap: 3px;

  overflow-wrap: anywhere;
}

.cg-terminal-line {
  min-height: 20px;
  white-space: pre-wrap;
}

.cg-terminal-muted {
  color: var(--cg-muted);
}

.cg-terminal-success {
  color: var(--cg-green);
}

.cg-terminal-info {
  color: var(--cg-cyan);
}

.cg-terminal-highlight {
  color: var(--cg-lavender);
}

.cg-terminal-warning {
  color: var(--cg-yellow);
}

/* Terminal cursor */

.cg-static-cursor {
  display: inline-block;

  width: 7px;
  height: 13px;

  margin-left: 3px;
  vertical-align: middle;

  background: var(--cg-blue);

  animation: cg-cursor-blink 1s steps(2, start) infinite;
}

@keyframes cg-cursor-blink {
  to {
    visibility: hidden;
  }
}

/* Terminal footer */

.cg-terminal-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;

  padding: 9px 17px;

  color: var(--cg-muted);
  background: var(--cg-panel);
  border-top: 1px solid var(--cg-border);

  font-size: 8px;
  letter-spacing: 0.8px;
}


/* HERO BOTTOM STATUS BAR */

.cg-hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  margin: 0 65px;
  padding: 17px 0;

  color: var(--cg-dim);
  border-top: 1px solid var(--cg-border);

  font-size: 8px;
  letter-spacing: 0.8px;
}

.cg-hero-bottom > span:last-child {
  display: flex;
  align-items: center;
  gap: 9px;
}


/* =========================================
   8. ABOUT ME & IN THE NEWS
========================================= */

.cg-content-section {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 55px 65px 85px;

  scroll-margin-top: 30px;
}

.cg-content-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 28px;
  padding-bottom: 18px;

  border-bottom: 1px solid var(--cg-border);
}

.cg-section-number {
  display: block;
  margin-bottom: 9px;

  color: var(--cg-cyan);
  font-size: 9px;
  letter-spacing: 1.5px;
}

.cg-content-heading h2 {
  margin: 0;

  color: var(--cg-text);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -1px;
}

.cg-heading-file {
  color: var(--cg-dim);
  font-size: 9px;
  letter-spacing: 1px;
}


/* ABOUT & NEWS LAYOUT */

.cg-about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  align-items: start;
  gap: 25px;
}

.cg-about-column,
.cg-news-column {
  display: flex;
  flex-direction: column;
  gap: 22px;

  min-width: 0;
}


/* SHARED TERMINAL PANELS */

.cg-terminal-panel {
  min-width: 0;
  overflow: hidden;

  background: var(--cg-panel);
  border: 1px solid var(--cg-border);

  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  transition: border-color 0.25s ease;
}

.cg-terminal-panel:hover {
  border-color: #4b6079;
}

.cg-terminal-panel .cg-panel-heading {
  min-height: 43px;
}

.cg-panel-symbol {
  margin-right: 8px;
  color: var(--cg-lavender);
}

.cg-terminal-content {
  padding: 23px;
}

.cg-command-line {
  margin-bottom: 19px;

  color: var(--cg-green);
  font-size: 10px;

  overflow-wrap: anywhere;
}

.cg-content-title {
  margin: 0 0 20px;

  color: var(--cg-text);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.7px;
}

.cg-terminal-content p {
  margin: 0 0 17px;

  color: var(--cg-muted);
  font-size: 11px;
  line-height: 2;
}

.cg-terminal-content p:last-child {
  margin-bottom: 0;
}


/* TECHNICAL PROFILE */

.cg-about-details .cg-terminal-content {
  padding-top: 20px;
  padding-bottom: 22px;
}

.cg-detail-group {
  margin-top: 23px;
}

.cg-detail-label {
  display: block;
  margin-bottom: 12px;

  color: var(--cg-cyan);
  font-size: 9px;
  letter-spacing: 1px;
}

.cg-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  cursor: default;
}

.cg-skill-list span {
  display: inline-block;
  padding: 6px 10px;

  color: var(--cg-text);
  background: var(--cg-panel-light);
  border: 1px solid var(--cg-border-soft);

  font-size: 9px;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;

  transition: all 0.2s ease;
}

.cg-skill-list span:hover {
  color: var(--cg-cyan);
  background: #202f40;
  border-color: var(--cg-cyan);
}

.cg-certification-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cg-certification-list li {
  position: relative;
  padding: 9px 0 9px 17px;

  color: var(--cg-muted);
  border-bottom: 1px solid var(--cg-border-soft);

  font-size: 10px;
  line-height: 1.7;
}

.cg-certification-list li:last-child {
  border-bottom: none;
}

.cg-certification-list li::before {
  content: ">";
  position: absolute;
  left: 0;

  color: var(--cg-lavender);
}


/* PROFESSIONAL EXPERIENCE */

.cg-experience-item h3 {
  margin: 0 0 5px;

  color: var(--cg-text);
  font-size: 14px;
  font-weight: 500;
}

.cg-experience-organization {
  display: block;
  margin-bottom: 13px;

  color: var(--cg-blue);
  font-size: 10px;
}

.cg-experience-item p {
  margin-bottom: 0;
}

.cg-experience-divider {
  height: 1px;
  margin: 23px 0;

  background: var(--cg-border-soft);
}


/* IN THE NEWS */

.cg-news-panel {
  position: sticky;
  top: 25px;
}

.cg-news-intro {
  margin-bottom: 25px !important;
}

.cg-news-entry {
  padding: 20px 0;
  border-top: 1px solid var(--cg-border-soft);
}

.cg-news-publication {
  display: block;
  margin-bottom: 10px;

  color: var(--cg-cyan);
  font-size: 9px;
  letter-spacing: 1px;
}

.cg-news-entry h3 {
  margin: 0 0 15px;

  color: var(--cg-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.8;
}

.cg-news-entry h3 a {
  color: var(--cg-text);
  transition: color 0.2s ease;
}

.cg-news-entry h3 a:hover {
  color: var(--cg-blue);
}

.cg-news-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: var(--cg-muted);
  font-size: 9px;
  letter-spacing: 0.7px;

  transition: color 0.2s ease;
}

.cg-news-link:hover {
  color: var(--cg-cyan);
}

.cg-news-link span {
  color: var(--cg-blue);
  font-size: 13px;
}

.cg-news-terminal-note {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-top: 12px;
  padding-top: 15px;

  color: var(--cg-dim);
  border-top: 1px dashed var(--cg-border);

  font-size: 9px;
  letter-spacing: 0.7px;
}

.cg-news-prompt {
  color: var(--cg-green);
}


/* =========================================
   9. AWARDS ARCHIVE
========================================= */

.cg-awards-section {
  position: relative;
}

.cg-awards-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 25px;
}

.cg-awards-intro p {
  max-width: 700px;
  margin: 0;

  color: var(--cg-muted);
  font-size: 11px;
  line-height: 1.9;
}

.cg-awards-count {
  flex-shrink: 0;

  color: var(--cg-green);
  font-size: 9px;
  letter-spacing: 0.8px;
}

.cg-awards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}


/* AWARD WINDOWS */

.cg-award-window {
  min-width: 0;
  overflow: hidden;

  background: var(--cg-panel);
  border: 1px solid var(--cg-border);

  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);

  transition:
    border-color 0.25s ease,
    transform 0.25s ease;
}

.cg-award-window:hover {
  border-color: #526982;
  transform: translateY(-3px);
}

.cg-award-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  min-height: 43px;
  padding: 11px 15px;

  color: var(--cg-blue);
  background: var(--cg-panel-light);
  border-bottom: 1px solid var(--cg-border);

  font-size: 9px;
  letter-spacing: 0.6px;
}

.cg-award-window-index {
  flex-shrink: 0;
  color: var(--cg-dim);
}


/* AWARD VIDEO PREVIEWS */

.cg-award-preview {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 210px;
  padding: 20px;
  overflow: hidden;

  color: var(--cg-text);
  background-color: #111c2a;
  border: 0;
  border-bottom: 1px solid var(--cg-border);

  cursor: pointer;
  font-family: var(--cg-font);
  text-align: center;
}

.cg-award-preview::before,
.cg-award-preview::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cg-award-preview::before {
  inset: 0;

  background-image:
    linear-gradient(rgba(145, 184, 223, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(145, 184, 223, 0.045) 1px, transparent 1px);

  background-size: 22px 22px;
}

.cg-award-preview::after {
  inset: 0;

  background: radial-gradient(
    ellipse at center,
    rgba(91, 132, 174, 0.2),
    transparent 70%
  );

  transition: opacity 0.25s ease;
}

.cg-award-preview:hover::after {
  opacity: 1;
}

/* Individual preview backgrounds */

.cg-award-preview-graduation {
  background: linear-gradient(135deg, #172c43, #101722 65%, #24334a);
}

.cg-award-preview-award {
  background: linear-gradient(135deg, #29263c, #111722 65%, #26344a);
}

.cg-award-preview-merit {
  background: linear-gradient(135deg, #18333b, #101722 65%, #25394a);
}

.cg-award-preview-math {
  background: linear-gradient(135deg, #333044, #101722 65%, #26334a);
}

/* Preview overlay */

.cg-award-preview-overlay {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;

  color: var(--cg-cyan);
  font-size: 9px;
  letter-spacing: 1.2px;

  transition: transform 0.25s ease;
}

.cg-award-preview:hover .cg-award-preview-overlay {
  transform: scale(1.06);
}

/* Play button */

.cg-award-play {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 53px;
  height: 53px;
  padding-left: 4px;

  color: var(--cg-bg-deep);
  background: var(--cg-blue);
  border: 1px solid var(--cg-blue);
  border-radius: 50%;

  font-size: 17px;

  box-shadow: 0 0 25px rgba(145, 184, 223, 0.2);
  transition: all 0.25s ease;
}

.cg-award-preview:hover .cg-award-play {
  color: var(--cg-text);
  background: transparent;
  box-shadow: 0 0 30px rgba(145, 184, 223, 0.3);
}

.cg-award-preview-label {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 12px;

  color: rgba(217, 224, 233, 0.5);
  font-size: 8px;
  letter-spacing: 1px;
}


/* AWARD INFORMATION */

.cg-award-info {
  padding: 20px;
}

.cg-award-category {
  display: block;
  margin-bottom: 9px;

  color: var(--cg-cyan);
  font-size: 8px;
  letter-spacing: 1.2px;
}

.cg-award-info h3 {
  margin: 0 0 10px;

  color: var(--cg-text);
  font-size: 15px;
  font-weight: 500;
}

.cg-award-info p {
  min-height: 42px;
  margin: 0;

  color: var(--cg-muted);
  font-size: 10px;
  line-height: 1.9;
}

.cg-award-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;

  margin-top: 19px;
  padding-top: 12px;

  color: var(--cg-dim);
  border-top: 1px solid var(--cg-border-soft);

  font-size: 8px;
  letter-spacing: 0.7px;
}

.cg-awards-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;

  margin-top: 25px;
  padding: 15px 0;

  color: var(--cg-dim);
  border-top: 1px solid var(--cg-border);

  font-size: 8px;
  letter-spacing: 0.8px;
}


/* =========================================
   10. CONNECTION MANAGER
========================================= */

/* APPLICATION WINDOW */

.cg-connection-app {
  width: 100%;
  overflow: hidden;

  background: #111b29;
  border: 1px solid #43536a;

  box-shadow:
    0 0 0 1px rgba(7, 13, 22, 0.8),
    0 15px 45px rgba(0, 0, 0, 0.24);
}


/* TITLE BAR */

.cg-connection-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 44px;
  padding: 0 14px;

  color: #e1e9f2;
  background: linear-gradient(
    180deg,
    #34465f 0%,
    #26374e 48%,
    #1d2c40 100%
  );
  border-bottom: 1px solid #526780;

  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
}

.cg-connection-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cg-connection-icon {
  color: #a9c9e9;
  font-size: 14px;
  font-weight: 700;
}

.cg-connection-window-controls {
  display: flex;
  gap: 5px;
}

.cg-connection-window-controls span {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 22px;
  height: 19px;

  color: #dce5ef;
  background: #34465c;
  border: 1px solid #657990;

  font-size: 11px;
}


/* MENU BAR */

.cg-connection-menubar {
  display: flex;
  align-items: center;
  gap: 25px;

  min-height: 34px;
  padding: 0 17px;

  color: #aab8c9;
  background: #182536;
  border-bottom: 1px solid #344459;

  font-size: 10px;
  letter-spacing: 0.7px;
}

.cg-connection-menubar span:not(.cg-connection-version) {
  cursor: default;
}

.cg-connection-version {
  margin-left: auto;

  color: #687b92;
  font-size: 9px;
}


/* MAIN APPLICATION LAYOUT */

.cg-connection-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);

  min-height: 440px;
}


/* SIDEBAR */

.cg-connection-sidebar {
  display: flex;
  flex-direction: column;

  padding: 23px 14px;

  background: #131e2d;
  border-right: 1px solid #344459;
}

.cg-connection-sidebar-heading {
  margin-bottom: 16px;

  color: #74879e;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
}


/* SIDEBAR COPY BUTTONS */

.cg-connection-sidebar-item {
  position: relative;

  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  margin-bottom: 7px;
  padding: 13px 11px;

  appearance: none;
  -webkit-appearance: none;

  color: #dce5ef;
  background: #1c2b3e;
  border: 1px solid #354a64;
  border-radius: 0;

  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: left;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Hover state */

.cg-connection-sidebar-item:hover {
  color: #c7e4ff;
  background: #263b54;
  border-color: #80b9e9;

  box-shadow:
    0 0 5px rgba(100, 170, 230, 0.35),
    0 0 14px rgba(100, 170, 230, 0.18),
    inset 0 0 10px rgba(100, 170, 230, 0.08);

  transform: translateX(3px);
}

.cg-connection-sidebar-item:hover .cg-connection-sidebar-icon {
  color: #c7e4ff;
  background: #304966;
  border-color: #80b9e9;
  box-shadow: 0 0 9px rgba(100, 170, 230, 0.2);
}

.cg-connection-sidebar-item:hover strong {
  color: #d9ebfc;
}

.cg-connection-sidebar-item:hover small {
  color: #a9c8e5;
}

/* Active and focus states */

.cg-connection-sidebar-item:active {
  background: #1d3046;
  transform: translateX(1px);
  box-shadow: inset 0 0 8px rgba(100, 170, 230, 0.12);
}

.cg-connection-sidebar-item:focus-visible {
  outline: 2px solid #91b8df;
  outline-offset: 3px;
}

/* Copied state */

.cg-connection-sidebar-item.is-copied {
  color: var(--cg-green);
  background: #172b2b;
  border-color: #83c5a0;

  box-shadow: 0 0 10px rgba(148, 198, 166, 0.12);

  animation: cg-copy-blip 0.25s ease;
}

.cg-connection-sidebar-item.is-copied .cg-connection-sidebar-icon {
  color: #94c6a6;
  background: #203c39;
  border-color: #83c5a0;
  box-shadow: 0 0 8px rgba(148, 198, 166, 0.15);
}

.cg-connection-sidebar-item.is-copied strong,
.cg-connection-sidebar-item.is-copied small {
  color: var(--cg-green);
}

/* Prevent child elements from interfering with button clicks */

.cg-connection-sidebar-item strong,
.cg-connection-sidebar-item small,
.cg-connection-sidebar-icon {
  pointer-events: none;
}


/* SIDEBAR ICON */

.cg-connection-sidebar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  width: 30px;
  height: 30px;

  color: #9ec4e8;
  background: #293d56;
  border: 1px solid #435c79;

  font-size: 15px;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}


/* SIDEBAR TEXT */

.cg-connection-sidebar-item strong {
  display: block;
  margin-bottom: 4px;

  color: #dce5ef;
  font-size: 11px;
  font-weight: 600;

  transition: color 0.2s ease;
}

.cg-connection-sidebar-item small {
  display: block;

  color: #8192a8;
  font-size: 9px;

  transition: color 0.2s ease;
}


/* SIDEBAR INFORMATION */

.cg-connection-sidebar-info {
  margin-top: auto;
  padding-top: 24px;

  border-top: 1px solid #2d3d51;
}

.cg-connection-sidebar-info .cg-connection-sidebar-heading {
  margin-bottom: 13px;
}

.cg-connection-sidebar-info p {
  margin: 8px 0;

  color: #8091a7;
  font-size: 9px;
  letter-spacing: 0.3px;
}


/* CONNECTION STATUS INDICATOR */

.cg-status-indicator {
  display: inline-block;

  width: 7px;
  height: 7px;
  margin-right: 6px;

  vertical-align: middle;

  background: #83c5a0;
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(131, 197, 160, 0.5);
}


/* MAIN CONTENT */

.cg-connection-main {
  padding: 36px 38px;

  background:
    linear-gradient(rgba(105, 133, 164, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 133, 164, 0.025) 1px, transparent 1px),
    #101a28;

  background-size: 25px 25px;
}

.cg-connection-welcome {
  max-width: 650px;
  margin-bottom: 32px;
}

.cg-connection-eyebrow {
  display: block;
  margin-bottom: 12px;

  color: #83b9d0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.cg-connection-welcome h3 {
  margin: 0 0 12px;

  color: #e0e7f0;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: -1px;
}

.cg-connection-welcome p {
  max-width: 570px;
  margin: 0;

  color: #91a0b3;
  font-size: 12px;
  line-height: 1.9;
}


/* CONTACT OPTIONS */

.cg-connection-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cg-connection-option {
  display: flex;
  flex-direction: column;
  min-width: 0;

  padding: 20px;

  background: linear-gradient(145deg, #1a293b, #152233);
  border: 1px solid #394d65;

  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.cg-connection-option:hover {
  background: linear-gradient(145deg, #20334a, #18283b);
  border-color: #6687a9;
  transform: translateY(-2px);
}


/* CONTACT OPTION HEADERS */

.cg-connection-option-header {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 18px;
}

.cg-connection-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  width: 43px;
  height: 43px;

  color: #b3d0ed;
  background: #263b53;
  border: 1px solid #536b86;

  font-size: 15px;
  font-weight: 600;
}

.cg-email-icon {
  color: #c4b6e3;
  background: #3b3546;
  border-color: #665d79;

  font-size: 20px;
}

.cg-connection-label {
  display: block;
  margin-bottom: 5px;

  color: #8296ad;
  font-size: 8px;
  letter-spacing: 1px;
}

.cg-connection-option h4 {
  margin: 0;

  color: #e1e8f0;
  font-size: 17px;
  font-weight: 500;
}

.cg-connection-external {
  margin-left: auto;
  padding: 5px 7px;

  color: #92abc5;
  border: 1px solid #40546c;

  font-size: 8px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}


/* CONTACT OPTION DESCRIPTION */

.cg-connection-option > p {
  min-height: 48px;
  margin: 0 0 17px;

  color: #91a0b3;
  font-size: 11px;
  line-height: 1.8;
}


/* CLICK-TO-COPY ADDRESS FIELDS */

button.cg-connection-address {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  width: 100%;
  margin-bottom: 15px;
  padding: 11px 12px;

  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;

  color: #91b8df;
  background: #101a27;
  border: 1px solid #2e4056;

  font-family: inherit;
  font-size: 10px;
  line-height: inherit;
  text-align: left;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

button.cg-connection-address > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

button.cg-connection-address:hover {
  background: #19283a;
  border-color: #6687a9;
  box-shadow: inset 0 0 10px rgba(100, 170, 230, 0.06);
}

button.cg-connection-address:active {
  transform: translateY(1px);
}

button.cg-connection-address:focus-visible {
  outline: 2px solid #91b8df;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(145, 184, 223, 0.12);
}

/* Copy feedback label */

.cg-copy-feedback {
  flex-shrink: 0;

  color: #71869e;
  font-size: 8px;
  letter-spacing: 0.5px;

  transition: color 0.2s ease;
}

button.cg-connection-address:hover .cg-copy-feedback {
  color: #91b8df;
}

/* Copied state */

button.cg-connection-address.is-copied {
  background: #172b2b;
  border-color: #83c5a0;
  box-shadow: 0 0 10px rgba(148, 198, 166, 0.1);
}

button.cg-connection-address.is-copied .cg-copy-feedback {
  color: #94c6a6;
  animation: cg-copy-blip 0.25s ease;
}


/* CONTACT ACTION BUTTONS */

.cg-connection-button {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  margin-top: auto;
  padding: 12px 14px;

  color: #e3edf7;
  background: linear-gradient(180deg, #344e6c, #293f59);
  border: 1px solid #5c7899;

  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-decoration: none;

  transition: all 0.2s ease;
}

.cg-connection-button:hover {
  color: #ffffff;
  background: linear-gradient(180deg, #426587, #344e6c);
  border-color: #8eb5d9;
  text-decoration: none;
}

.cg-connection-button span:last-child {
  font-size: 15px;
}

.cg-email-button {
  background: linear-gradient(180deg, #48415e, #37324c);
  border-color: #74698f;
}

.cg-email-button:hover {
  background: linear-gradient(180deg, #5b5278, #48415e);
  border-color: #a99bc9;
}


/* CONNECTION STATUS BAR */

.cg-connection-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  min-height: 32px;
  padding: 0 13px;

  color: #8292a7;
  background: #182536;
  border-top: 1px solid #344459;

  font-size: 8px;
  letter-spacing: 0.5px;
}

.cg-connection-statusbar .cg-status-indicator {
  width: 6px;
  height: 6px;
}


/* =========================================
   11. VIDEO PLAYER MODAL
========================================= */

.cg-video-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 25px;
}

.cg-video-modal.is-open {
  display: flex;
}

.cg-video-modal-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(4, 8, 14, 0.88);
  backdrop-filter: blur(7px);
}

.cg-video-window {
  position: relative;
  z-index: 1;

  width: min(100%, 1000px);
  overflow: hidden;

  background: var(--cg-bg-deep);
  border: 1px solid var(--cg-border);

  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.55);

  animation: cg-fade-up 0.25s ease both;
}

.cg-video-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  min-height: 48px;
  padding: 10px 17px;

  color: var(--cg-blue);
  background: var(--cg-panel-light);
  border-bottom: 1px solid var(--cg-border);

  font-size: 10px;
  letter-spacing: 0.8px;
}

.cg-video-close {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  color: var(--cg-muted);
  background: transparent;
  border: 1px solid var(--cg-border);

  cursor: pointer;
  font-family: var(--cg-font);
  font-size: 19px;
  line-height: 1;

  transition: all 0.2s ease;
}

.cg-video-close:hover {
  color: var(--cg-red);
  border-color: var(--cg-red);
}

.cg-video-player {
  padding: 15px;
  background: #080d14;
}

.cg-video-player video {
  display: block;

  width: 100%;
  max-height: 70vh;

  background: #000;
}

.cg-video-window-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;

  padding: 11px 17px;

  color: var(--cg-dim);
  background: var(--cg-panel);
  border-top: 1px solid var(--cg-border);

  font-size: 8px;
  letter-spacing: 0.8px;
}


/* =========================================
   12. COPY NOTIFICATION
========================================= */

.cg-copy-toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 100000;

  display: flex;
  align-items: center;
  gap: 11px;

  max-width: calc(100vw - 32px);
  padding: 13px 17px;

  color: var(--cg-text);
  background: var(--cg-panel);
  border: 1px solid var(--cg-border);
  border-left: 3px solid var(--cg-green);

  font-family: var(--cg-font);
  font-size: 10px;
  letter-spacing: 0.7px;

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(10px);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}

.cg-copy-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cg-copy-toast-indicator {
  flex-shrink: 0;

  width: 7px;
  height: 7px;

  background: var(--cg-green);
  box-shadow: 0 0 8px rgba(148, 198, 166, 0.5);
}

.cg-copy-toast-message {
  white-space: nowrap;
}

.cg-copy-toast.is-error {
  border-left-color: var(--cg-red);
}

.cg-copy-toast.is-error .cg-copy-toast-indicator {
  background: var(--cg-red);
  box-shadow: 0 0 8px rgba(201, 143, 152, 0.5);
}


/* =========================================
   13. ANIMATIONS
========================================= */

@keyframes cg-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cg-copy-blip {
  0% {
    opacity: 0;
    transform: translateY(3px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================
   14. RESPONSIVE LAYOUTS
========================================= */

/* TABLETS — MAIN SITE */

@media (max-width: 1000px) {

  .cg-topbar {
    padding: 0 40px;
  }

  .cg-nav {
    gap: 18px;
  }

  .cg-hero-meta {
    padding: 20px 40px;
  }

  .cg-hero-main {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.8fr);
    gap: 40px;
    padding: 75px 40px;
  }

  .cg-hero-intro h1 {
    font-size: clamp(37px, 5vw, 55px);
  }

  .cg-terminal {
    margin: 0 40px 40px;
  }

  .cg-hero-bottom {
    margin: 0 40px;
  }

  .cg-content-section {
    padding: 45px 40px 70px;
  }

  .cg-about-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.8fr);
    gap: 18px;
  }

  .cg-terminal-content {
    padding: 19px;
  }

}


/* CONNECTION MANAGER — TABLET */

@media (max-width: 900px) {

  .cg-connection-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .cg-connection-main {
    padding: 28px 24px;
  }

  .cg-connection-options {
    grid-template-columns: 1fr;
  }

  .cg-connection-option > p {
    min-height: auto;
  }

}


/* MOBILE — MAIN SITE */

@media (max-width: 700px) {

  /* Header */

  .cg-topbar {
    min-height: auto;
    padding: 20px;
    flex-wrap: wrap;
    gap: 18px;
  }

  .cg-brand {
    font-size: 12px;
  }

  .cg-nav {
    order: 3;

    width: 100%;

    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 15px 22px;
  }

  .cg-nav a {
    font-size: 9px;
  }

  .cg-system-status {
    margin-left: auto;
  }


  /* Hero */

  .cg-hero-meta {
    gap: 10px;
    padding: 17px 20px;
    font-size: 7px;
  }

  .cg-hero-main {
    grid-template-columns: 1fr;
    gap: 45px;
    padding: 55px 20px 45px;
  }

  .cg-section-label {
    margin-bottom: 30px;
  }

  .cg-hero-intro h1 {
    font-size: clamp(36px, 10vw, 53px);
    letter-spacing: -2px;
  }

  .cg-hero-description {
    font-size: 11px;
  }

  .cg-profile-panel {
    max-width: none;
  }

  .cg-profile-row {
    font-size: 9px;
  }


  /* Terminal */

  .cg-terminal {
    margin: 0 20px 30px;
  }

  .cg-terminal-screen {
    min-height: 210px;
    padding: 17px 14px;
    font-size: 10px;
  }

  .cg-terminal-title {
    font-size: 8px;
  }

  .cg-terminal-footer {
    flex-wrap: wrap;
    font-size: 7px;
  }


  /* Hero footer */

  .cg-hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;

    margin: 0 20px;
    padding: 17px 0;
  }


  /* About and news */

  .cg-content-section {
    padding: 40px 20px 60px;
  }

  .cg-content-heading {
    align-items: flex-start;
  }

  .cg-content-heading h2 {
    font-size: 24px;
  }

  .cg-heading-file {
    padding-top: 17px;
    font-size: 7px;
  }

  .cg-about-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .cg-news-panel {
    position: static;
  }

  .cg-terminal-content {
    padding: 18px;
  }

  .cg-terminal-content p {
    font-size: 10px;
    line-height: 1.9;
  }


  /* Awards */

  .cg-awards-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .cg-awards-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cg-award-preview {
    min-height: 190px;
  }

  .cg-awards-footer {
    flex-direction: column;
    gap: 8px;
  }


  /* Video modal */

  .cg-video-modal {
    padding: 12px;
  }

  .cg-video-player {
    padding: 8px;
  }

  .cg-video-window-footer {
    font-size: 7px;
  }

}


/* CONNECTION MANAGER — MOBILE */

@media (max-width: 650px) {

  .cg-connection-layout {
    grid-template-columns: 1fr;
  }

  .cg-connection-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;

    padding: 15px;

    border-right: none;
    border-bottom: 1px solid #344459;
  }

  .cg-connection-sidebar-heading {
    grid-column: 1 / -1;
    margin-bottom: 3px;
  }

  .cg-connection-sidebar-item {
    margin: 0;
  }

  .cg-connection-sidebar-info {
    grid-column: 1 / -1;

    margin-top: 8px;
    padding-top: 12px;
  }

  .cg-connection-sidebar-info p {
    display: inline-block;
    margin-right: 15px;
  }

  .cg-connection-main {
    padding: 27px 18px;
  }

  .cg-connection-statusbar {
    flex-wrap: wrap;
    padding: 9px 12px;
  }

  .cg-connection-version {
    display: none;
  }

}


/* SMALL MOBILE */

@media (max-width: 400px) {

  /* Hero */

  .cg-hero-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .cg-hero-links {
    gap: 18px;
  }

  .cg-profile-row {
    flex-direction: column;
    gap: 5px;
  }

  .cg-status-text {
    text-align: left;
  }

  .cg-panel-footer {
    flex-direction: column;
    gap: 5px;
  }


  /* About and news */

  .cg-content-heading {
    flex-direction: column;
    gap: 5px;
  }

  .cg-heading-file {
    padding-top: 0;
  }

  .cg-terminal-content {
    padding: 15px;
  }

  .cg-content-title {
    font-size: 19px;
  }


  /* Connection Manager */

  .cg-connection-menubar {
    gap: 13px;
    font-size: 9px;
  }

  .cg-connection-option {
    padding: 15px;
  }

  .cg-connection-external {
    font-size: 7px;
  }


  /* Copy notification */

  .cg-copy-toast {
    right: 12px;
    bottom: 12px;
    padding: 11px 13px;
    font-size: 9px;
  }

}


/* =========================================
   15. ACCESSIBILITY — REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}
