/* ==========================================================
   CARLOS IRIAS — TECHNOLOGY PORTFOLIO
   ========================================================== */


/* ---------- VARIABLES ---------- */

:root {
  --bg: #070b14;
  --bg-secondary: #0a101d;
  --bg-elevated: #0d1524;
  --bg-card: rgba(15, 24, 41, 0.82);

  --text: #f3f7fc;
  --text-soft: #a7b4c6;
  --text-muted: #718096;

  --accent: #38bdf8;
  --accent-light: #7dd3fc;
  --accent-purple: #8b5cf6;
  --success: #86efac;

  --border: rgba(125, 211, 252, 0.14);
  --border-strong: rgba(125, 211, 252, 0.3);

  --container: 1180px;
}


/* ---------- RESET ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--bg);

  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  line-height: 1.65;

  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}


/* ---------- ACCESSIBILITY ---------- */

.skip-link {
  position: absolute;
  left: 20px;
  top: -100px;

  z-index: 9999;

  padding: 12px 18px;

  background: var(--accent);

  color: #03111c;

  font-weight: 700;

  text-decoration: none;

  border-radius: 8px;
}

.skip-link:focus {
  top: 20px;
}

a:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 4px;
  border-radius: 4px;
}


/* ---------- LAYOUT ---------- */

.container {
  width: min(90%, var(--container));
  margin-inline: auto;
}


/* ==========================================================
   NAVIGATION
   ========================================================== */

.nav {
  position: sticky;

  top: 0;

  z-index: 1000;

  background: rgba(7, 11, 20, 0.86);

  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-inner {
  min-height: 68px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 30px;
}

.nav-brand {
  color: var(--text);

  font-size: 22px;

  font-weight: 800;

  letter-spacing: -0.05em;

  text-decoration: none;
}

.nav-brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;

  align-items: center;

  gap: 30px;
}

.nav-links a {
  position: relative;

  color: #b6c3d4;

  font-size: 14px;

  font-weight: 600;

  text-decoration: none;

  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";

  position: absolute;

  left: 0;

  bottom: -7px;

  width: 0;

  height: 2px;

  background: var(--accent);

  transition: width 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}


/* ==========================================================
   HERO
   ========================================================== */

.hero {
  position: relative;

  min-height: calc(100vh - 68px);

  display: flex;

  align-items: center;

  overflow: hidden;

  padding: 95px 0 110px;

  background:
    radial-gradient(
      circle at 12% 25%,
      rgba(56, 189, 248, 0.14),
      transparent 29%
    ),
    radial-gradient(
      circle at 88% 70%,
      rgba(139, 92, 246, 0.12),
      transparent 30%
    ),
    var(--bg);
}

.hero::after {
  content: "";

  position: absolute;

  width: 520px;

  height: 520px;

  right: -280px;

  top: -180px;

  border-radius: 50%;

  border: 1px solid rgba(56, 189, 248, 0.1);

  box-shadow:
    0 0 100px rgba(56, 189, 248, 0.06),
    inset 0 0 100px rgba(139, 92, 246, 0.04);

  pointer-events: none;
}

.hero-grid {
  position: absolute;

  inset: 0;

  opacity: 0.13;

  background-image:
    linear-gradient(
      rgba(125, 211, 252, 0.12) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(125, 211, 252, 0.12) 1px,
      transparent 1px
    );

  background-size: 55px 55px;

  mask-image:
    linear-gradient(
      to bottom,
      black,
      transparent 90%
    );

  pointer-events: none;
}

.hero-layout {
  position: relative;

  z-index: 2;

  display: grid;

  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);

  align-items: center;

  gap: 75px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 22px;

  color: var(--accent);

  font-size: 12px;

  font-weight: 800;

  letter-spacing: 0.2em;

  text-transform: uppercase;
}

.hero h1 {
  margin: 0;

  max-width: 800px;

  color: var(--text);

  font-size: clamp(52px, 7vw, 86px);

  line-height: 0.98;

  letter-spacing: -0.055em;

  font-weight: 780;
}

.gradient-text {
  display: block;

  padding-bottom: 8px;

  background:
    linear-gradient(
      90deg,
      var(--accent),
      var(--accent-light),
      #a78bfa
    );

  background-clip: text;

  -webkit-background-clip: text;

  color: transparent;
}

.hero-specialisms {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin: 28px 0 0;

  color: #d8e4f1;

  font-size: 15px;

  font-weight: 600;
}

.hero-specialisms span {
  color: var(--accent);
}

.intro {
  max-width: 690px;

  margin: 23px 0 35px;

  color: var(--text-soft);

  font-size: 17px;

  line-height: 1.75;
}


/* ---------- BUTTONS ---------- */

.hero-buttons,
.contact-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 12px;
}

.button {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-height: 48px;

  padding: 12px 23px;

  background: var(--accent);

  color: #04131e;

  border: 1px solid var(--accent);

  border-radius: 9px;

  font-size: 14px;

  font-weight: 750;

  text-decoration: none;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.button:hover {
  background: var(--accent-light);

  border-color: var(--accent-light);

  transform: translateY(-2px);

  box-shadow:
    0 12px 30px rgba(56, 189, 248, 0.15);
}

.button-secondary {
  background: transparent;

  border-color: var(--border-strong);

  color: var(--text);
}

.button-secondary:hover {
  background: rgba(56, 189, 248, 0.08);

  color: var(--text);

  border-color: rgba(125, 211, 252, 0.55);

  box-shadow: none;
}


/* ==========================================================
   TERMINAL PANEL
   ========================================================== */

.tech-panel {
  overflow: hidden;

  border: 1px solid var(--border);

  border-radius: 16px;

  background:
    linear-gradient(
      145deg,
      rgba(15, 25, 43, 0.96),
      rgba(8, 14, 26, 0.96)
    );

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);

  transform: perspective(1000px) rotateY(-2deg);
}

.terminal-header {
  min-height: 47px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 15px;

  padding: 0 17px;

  border-bottom: 1px solid var(--border);

  background: rgba(255, 255, 255, 0.02);
}

.terminal-dots {
  display: flex;

  gap: 7px;
}

.terminal-dots span {
  width: 8px;

  height: 8px;

  display: block;

  border-radius: 50%;

  background: #536175;
}

.terminal-dots span:nth-child(2) {
  background: #64748b;
}

.terminal-dots span:nth-child(3) {
  background: var(--accent);
}

.terminal-title {
  color: #68788d;

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;

  font-size: 11px;
}

.terminal-content {
  padding: 27px;

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;

  font-size: 12px;
}

.terminal-command {
  margin: 0 0 23px;

  color: var(--accent);
}

.terminal-row {
  display: grid;

  grid-template-columns: 96px 1fr;

  gap: 15px;

  padding: 11px 0;

  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.terminal-key {
  color: #69778a;
}

.terminal-row strong {
  color: #dce8f5;

  font-weight: 500;
}

.status-open {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  color: var(--success) !important;
}

.status-dot {
  width: 7px;

  height: 7px;

  display: inline-block;

  border-radius: 50%;

  background: var(--success);

  box-shadow:
    0 0 0 4px rgba(134, 239, 172, 0.08);

  animation: pulse 2s ease-in-out infinite;
}

.terminal-ready {
  margin: 26px 0 0;

  color: var(--accent-light);
}

.cursor {
  animation: cursor-blink 1.1s step-end infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}


/* ==========================================================
   GENERAL SECTIONS
   ========================================================== */

.section {
  padding: 95px 0;
}

.section-dark {
  background: var(--bg-secondary);

  border-top: 1px solid rgba(255, 255, 255, 0.025);

  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

.section-heading {
  display: grid;

  grid-template-columns: 1fr minmax(280px, 470px);

  align-items: end;

  gap: 50px;

  margin-bottom: 45px;
}

.section-label {
  margin: 0 0 12px;

  color: var(--accent);

  font-size: 11px;

  font-weight: 800;

  letter-spacing: 0.2em;

  text-transform: uppercase;
}

.section h2 {
  margin: 0;

  color: var(--text);

  font-size: clamp(37px, 5vw, 56px);

  line-height: 1.05;

  letter-spacing: -0.045em;
}

.section-description {
  margin: 0;

  color: var(--text-soft);

  font-size: 15px;

  line-height: 1.75;
}


/* ==========================================================
   FEATURED PROJECTS
   ========================================================== */

.featured-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 20px;
}

.project-card {
  position: relative;

  display: flex;

  flex-direction: column;

  min-height: 100%;

  padding: 28px;

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      rgba(16, 25, 43, 0.98),
      rgba(10, 17, 31, 0.98)
    );

  border: 1px solid var(--border);

  border-radius: 15px;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.project-card::before {
  content: "";

  position: absolute;

  left: 0;

  top: 0;

  width: 100%;

  height: 2px;

  background:
    linear-gradient(
      90deg,
      var(--accent),
      var(--accent-purple),
      transparent 85%
    );

  opacity: 0.55;
}

.project-card:hover {
  transform: translateY(-5px);

  border-color: rgba(56, 189, 248, 0.36);

  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.23);
}

.project-top {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 25px;
}

.project-number {
  color: #617085;

  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;

  font-size: 12px;
}

.project-status {
  padding: 5px 9px;

  color: #c4b5fd;

  background: rgba(139, 92, 246, 0.08);

  border: 1px solid rgba(139, 92, 246, 0.19);

  border-radius: 6px;

  font-size: 10px;

  font-weight: 750;

  letter-spacing: 0.08em;

  text-transform: uppercase;
}

.project-status.live {
  color: var(--success);

  background: rgba(134, 239, 172, 0.05);

  border-color: rgba(134, 239, 172, 0.18);
}

.project-status.development {
  color: var(--accent-light);

  background: rgba(56, 189, 248, 0.05);

  border-color: rgba(56, 189, 248, 0.18);
}

.project-card h3,
.lab-card h3 {
  margin: 0;

  color: var(--text);

  font-size: 24px;

  letter-spacing: -0.025em;
}

.project-subtitle {
  margin: 4px 0 19px !important;

  color: var(--accent) !important;

  font-size: 12px !important;

  font-weight: 700;

  letter-spacing: 0.07em;

  text-transform: uppercase;
}

.project-card p,
.lab-card p {
  color: var(--text-soft);

  font-size: 14px;

  line-height: 1.7;
}

.tech-list {
  display: flex;

  flex-wrap: wrap;

  gap: 7px;

  margin-top: 18px;
}

.tech-list span {
  display: inline-flex;

  padding: 5px 8px;

  background: rgba(56, 189, 248, 0.06);

  color: #9adfff;

  border: 1px solid rgba(56, 189, 248, 0.13);

  border-radius: 5px;

  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;

  font-size: 10px;
}

.tech-list.small span {
  font-size: 9px;
}

.project-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 18px;

  margin-top: auto;

  padding-top: 26px;
}

.project-link {
  color: var(--accent-light);

  font-size: 13px;

  font-weight: 700;

  text-decoration: none;
}

.project-link:hover {
  color: #ffffff;
}

.project-link.muted-link {
  color: #8d9aad;
}

.project-link.muted-link:hover {
  color: var(--accent-light);
}

.project-note {
  margin-top: auto;

  padding-top: 26px;

  color: #78879a;

  font-size: 11px;

  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
}


/* ==========================================================
   LEARNING LAB
   ========================================================== */

.lab-grid {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 18px;
}

.lab-card {
  padding: 26px;

  background: rgba(255, 255, 255, 0.018);

  border: 1px solid rgba(255, 255, 255, 0.065);

  border-radius: 13px;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.lab-card:hover {
  transform: translateY(-3px);

  background: rgba(255, 255, 255, 0.025);

  border-color: var(--border-strong);
}

.lab-type {
  display: block;

  margin-bottom: 13px;

  color: #68788d;

  font-size: 9px;

  font-weight: 800;

  letter-spacing: 0.16em;
}

.lab-card h3 {
  font-size: 20px;
}


/* ==========================================================
   SKILLS
   ========================================================== */

.skills-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 18px;
}

.skill-card {
  padding: 26px;

  background: var(--bg-card);

  border: 1px solid var(--border);

  border-radius: 14px;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.skill-card:hover {
  transform: translateY(-3px);

  border-color: rgba(56, 189, 248, 0.3);
}

.skill-icon {
  min-width: 42px;

  height: 34px;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  margin-bottom: 20px;

  padding: 0 8px;

  color: var(--accent);

  background: rgba(56, 189, 248, 0.06);

  border: 1px solid rgba(56, 189, 248, 0.13);

  border-radius: 6px;

  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;

  font-size: 10px;

  font-weight: 700;
}

.skill-card h3 {
  margin: 0 0 12px;

  color: var(--text);

  font-size: 18px;
}

.skill-card p {
  margin: 0;

  color: var(--text-soft);

  font-size: 13px;

  line-height: 1.7;
}

.skill-card ul {
  margin: 18px 0 0;

  padding: 0;

  list-style: none;
}

.skill-card li {
  position: relative;

  margin: 8px 0;

  padding-left: 16px;

  color: #8d9caf;

  font-size: 12px;
}

.skill-card li::before {
  content: "›";

  position: absolute;

  left: 0;

  color: var(--accent);
}


/* ==========================================================
   ABOUT
   ========================================================== */

.about-layout {
  display: grid;

  grid-template-columns: 0.8fr 1.2fr;

  gap: 100px;
}

.about-layout h2 {
  max-width: 480px;
}

.about-copy {
  max-width: 690px;
}

.about-copy p {
  margin-top: 0;

  color: var(--text-soft);

  font-size: 15px;

  line-height: 1.8;
}

.about-copy .about-lead {
  color: #dce6f2;

  font-size: 19px;

  line-height: 1.7;
}


/* ==========================================================
   CURRENT FOCUS
   ========================================================== */

.focus-section {
  padding-top: 0;
}

.focus-banner {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 60px;

  align-items: center;

  padding: 35px;

  background:
    linear-gradient(
      120deg,
      rgba(56, 189, 248, 0.055),
      rgba(139, 92, 246, 0.04)
    );

  border: 1px solid var(--border);

  border-radius: 15px;
}

.focus-banner h2 {
  margin: 0 0 10px;

  font-size: 27px;
}

.focus-banner p {
  margin: 0;

  color: var(--text-soft);

  font-size: 14px;
}

.focus-items {
  display: flex;

  flex-wrap: wrap;

  justify-content: flex-end;

  gap: 8px;
}

.focus-items span {
  padding: 7px 10px;

  background: rgba(255, 255, 255, 0.025);

  color: #b6c4d5;

  border: 1px solid rgba(255, 255, 255, 0.065);

  border-radius: 6px;

  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;

  font-size: 10px;
}


/* ==========================================================
   CONTACT
   ========================================================== */

.contact-section {
  position: relative;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 15% 50%,
      rgba(56, 189, 248, 0.1),
      transparent 28%
    ),
    var(--bg-secondary);

  border-top: 1px solid var(--border);
}

.contact-layout {
  display: grid;

  grid-template-columns: 1fr auto;

  align-items: center;

  gap: 80px;
}

.contact-section h2 {
  font-size: clamp(45px, 6vw, 72px);
}

.contact-section p:not(.section-label) {
  max-width: 670px;

  margin: 20px 0 0;

  color: var(--text-soft);

  font-size: 15px;
}


/* ==========================================================
   FOOTER
   ========================================================== */

footer {
  padding: 27px 0;

  background: #05080f;

  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.footer-inner {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;
}

footer p {
  margin: 0;

  color: #69778a;

  font-size: 11px;
}

.footer-tech {
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
}


/* ==========================================================
   RESPONSIVE — TABLET
   ========================================================== */

@media (max-width: 1000px) {

  .hero-layout {
    grid-template-columns: 1fr;

    gap: 55px;
  }

  .hero-copy {
    max-width: 800px;
  }

  .tech-panel {
    max-width: 650px;

    transform: none;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: auto;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-layout {
    gap: 55px;
  }

}


/* ==========================================================
   RESPONSIVE — MOBILE
   ========================================================== */

@media (max-width: 700px) {

  .nav-inner {
    min-height: auto;

    padding: 13px 0;

    flex-direction: column;

    align-items: flex-start;

    gap: 10px;
  }

  .nav-links {
    width: 100%;

    justify-content: space-between;

    gap: 10px;
  }

  .nav-links a {
    font-size: 12px;
  }

  .nav-links a::after {
    display: none;
  }


  .hero {
    min-height: auto;

    padding: 70px 0 80px;
  }

  .hero-layout {
    gap: 42px;
  }

  .hero h1 {
    font-size: clamp(44px, 13vw, 65px);
  }

  .eyebrow {
    font-size: 10px;
  }

  .hero-specialisms {
    font-size: 13px;
  }

  .intro {
    font-size: 15px;
  }

  .tech-panel {
    width: 100%;
  }

  .terminal-content {
    padding: 22px 18px;

    font-size: 11px;
  }

  .terminal-row {
    grid-template-columns: 80px 1fr;
  }


  .section {
    padding: 70px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;

    align-items: start;

    gap: 20px;

    margin-bottom: 35px;
  }

  .section h2 {
    font-size: 38px;
  }


  .lab-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }


  .about-layout {
    grid-template-columns: 1fr;

    gap: 35px;
  }


  .focus-banner {
    grid-template-columns: 1fr;

    gap: 28px;

    padding: 25px;
  }

  .focus-items {
    justify-content: flex-start;
  }


  .contact-layout {
    grid-template-columns: 1fr;

    gap: 35px;
  }

  .contact-section h2 {
    font-size: 48px;
  }


  .footer-inner {
    flex-direction: column;

    align-items: flex-start;

    gap: 5px;
  }

}


/* ==========================================================
   VERY SMALL SCREENS
   ========================================================== */

@media (max-width: 420px) {

  .container {
    width: 88%;
  }

  .nav-links {
    gap: 7px;
  }

  .nav-links a {
    font-size: 11px;
  }

  .hero h1 {
    font-size: 43px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .button {
    width: 100%;
  }

  .terminal-row {
    grid-template-columns: 1fr;

    gap: 3px;
  }

  .contact-actions {
    flex-direction: column;
  }

  .contact-actions .button {
    width: 100%;
  }

}


/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;
  }

}
