/* ==========================================================================
   Mouhamed Amine — Cybersecurity & IT Portfolio
   A dark, neon-accented visual system built with plain HTML and CSS.

   Contents
   01. Design tokens
   02. Reset & base
   03. Utilities
   04. Header / navigation
   05. Hero
   06. Terminal visual
   07. Section shell
   08. About
   09. Skills
   10. Projects
   11. Contact
   12. Footer
   13. Motion
   14. Responsive rules
   15. Reduced motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. Design tokens
   -------------------------------------------------------------------------- */
:root {
  --bg: #05090b;
  --bg-deep: #040708;
  --panel: rgba(10, 22, 23, 0.68);
  --panel-solid: #0a1516;
  --line: rgba(160, 255, 220, 0.12);
  --line-bright: rgba(0, 255, 156, 0.34);

  --green: #00ff9c;
  --green-soft: #7dffd0;
  --cyan: #38d9ff;
  --danger: #ff5b6e;
  --warning: #ffbf4b;

  --text: #eefbf6;
  --muted: #93aaa4;
  --muted-dim: #617973;

  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --container: 1160px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --header-height: 78px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   02. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  background:
    radial-gradient(circle at 10% -8%, rgba(0, 255, 156, 0.12), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgba(56, 217, 255, 0.09), transparent 30rem),
    linear-gradient(180deg, #05090b 0%, #060c0e 46%, #05090b 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A fixed technical grid sits behind the content without intercepting clicks. */
body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 255, 208, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 255, 208, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 38%, #000 10%, transparent 74%);
  mask-image: radial-gradient(ellipse at 50% 38%, #000 10%, transparent 74%);
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  color: #02120d;
  background: var(--green);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #040809;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #040809;
  border-radius: 999px;
  background: #1b3731;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a5148;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   03. Utilities
   -------------------------------------------------------------------------- */
.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 9999;
  padding: 12px 18px;
  color: #02120d;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--green);
  border-radius: 0 0 10px 10px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(100deg, var(--green) 0%, #9affdf 45%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 255, 156, 0.09), 0 0 15px rgba(0, 255, 156, 0.85);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   04. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
  background: rgba(5, 9, 11, 0.58);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 54px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--green);
  font-size: 1rem;
  background: rgba(0, 255, 156, 0.055);
  border: 1px solid rgba(0, 255, 156, 0.26);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 22px rgba(0, 255, 156, 0.08);
}

.brand-mark::after {
  position: absolute;
  inset: 6px;
  content: "";
  border: 1px solid rgba(0, 255, 156, 0.09);
  border-radius: 7px;
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand-name span {
  color: var(--green);
}

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

.nav-link {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

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

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link-contact {
  padding: 8px 15px;
  color: var(--green);
  background: rgba(0, 255, 156, 0.055);
  border: 1px solid rgba(0, 255, 156, 0.22);
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-link-contact::after {
  display: none;
}

.nav-link-contact:hover {
  color: #02120d;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(0, 255, 156, 0.24);
}

/* --------------------------------------------------------------------------
   05. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(72px, 9vw, 116px) 0 34px;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  top: -20%;
  left: 48%;
  width: 620px;
  height: 620px;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle, rgba(0, 255, 156, 0.065), transparent 66%);
  transform: translateX(-50%);
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(370px, 0.84fr);
  align-items: center;
  gap: clamp(40px, 5vw, 80px);
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 8px 13px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  background: rgba(0, 255, 156, 0.035);
  border: 1px solid rgba(0, 255, 156, 0.17);
  border-radius: 999px;
}

.hero h1 {
  max-width: 13ch;
  margin-bottom: 24px;
  font-size: clamp(2.9rem, 6vw, 5.35rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.title-dot {
  color: var(--green);
}

.hero-role {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 3.3em;
  margin-bottom: 19px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.45vw, 0.96rem);
  line-height: 1.65;
}

.terminal-prompt {
  flex: 0 0 auto;
  color: var(--green);
}

/* The visible title is revealed with a stepped clip animation: a CSS-only
   typewriter effect that still wraps naturally on narrow screens. */
.typed-role {
  display: inline-block;
  max-width: calc(100% - 36px);
  clip-path: inset(0 100% 0 0);
  animation: type-reveal 3.8s steps(52, end) 0.65s both;
}

.typed-role::after {
  display: inline-block;
  width: 2px;
  height: 1.08em;
  margin-left: 3px;
  vertical-align: -0.12em;
  content: "";
  background: var(--green);
  box-shadow: 0 0 9px rgba(0, 255, 156, 0.85);
  animation: caret-blink 0.9s step-end infinite;
}

.hero-description {
  max-width: 590px;
  margin-bottom: 31px;
  color: var(--muted);
  font-size: clamp(0.93rem, 1.2vw, 1.02rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 27px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 23px;
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s ease, border-color 0.3s ease;
}

.btn i {
  font-size: 0.82rem;
}

.btn-primary {
  color: #02120d;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 9px 28px rgba(0, 255, 156, 0.15);
}

.btn-primary::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.45) 50%, transparent 80%);
  transform: translateX(-130%);
  transition: transform 0.65s var(--ease);
}

.btn-primary:hover::after {
  transform: translateX(130%);
}

.btn-primary:hover {
  box-shadow: 0 14px 38px rgba(0, 255, 156, 0.28);
  transform: translateY(-3px);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(0, 255, 156, 0.055);
  border-color: rgba(0, 255, 156, 0.34);
  transform: translateY(-3px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  color: var(--muted);
  font-size: 0.72rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta i {
  color: var(--green);
  font-size: 0.67rem;
}

.hero-socials {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 27px;
}

.hero-socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.hero-socials a:hover {
  color: var(--green);
  background: rgba(0, 255, 156, 0.055);
  border-color: rgba(0, 255, 156, 0.28);
  transform: translateY(-2px);
}

.social-line {
  width: 34px;
  height: 1px;
  margin-left: 3px;
  background: linear-gradient(90deg, rgba(0, 255, 156, 0.35), transparent);
}

.social-caption {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   06. Terminal visual
   -------------------------------------------------------------------------- */
.hero-visual {
  position: relative;
  min-width: 0;
}

.terminal {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(11, 26, 25, 0.98), rgba(4, 10, 12, 0.99));
  border: 1px solid rgba(0, 255, 156, 0.22);
  border-radius: 18px;
  box-shadow:
    0 35px 90px rgba(0, 0, 0, 0.58),
    0 0 65px rgba(0, 255, 156, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

.hero-visual:hover .terminal {
  box-shadow:
    0 42px 100px rgba(0, 0, 0, 0.62),
    0 0 75px rgba(0, 255, 156, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg) translateY(-4px);
}

/* Slow scanning highlight adds life without affecting readability. */
.terminal::after {
  position: absolute;
  inset: -40% 0 auto;
  height: 34%;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 255, 156, 0.045), transparent);
  animation: terminal-scan 6.5s linear infinite;
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.terminal-dots {
  display: flex;
  gap: 5px;
}

.terminal-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.terminal-dots span:nth-child(1) {
  background: #ff6b72;
}

.terminal-dots span:nth-child(2) {
  background: #ffc857;
}

.terminal-dots span:nth-child(3) {
  background: var(--green);
}

.terminal-title {
  min-width: 0;
  overflow: hidden;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.terminal-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
}

.terminal-state > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.terminal-body {
  padding: 23px 21px 20px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  line-height: 1.6;
}

.terminal-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 11px;
}

.terminal-line:first-child {
  margin-top: 0;
}

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

.terminal-command {
  color: #d2e7e0;
}

.terminal-output {
  margin: 4px 0 1px 22px;
  color: var(--muted-dim);
  overflow-wrap: anywhere;
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 3px 0 0 22px;
  color: var(--green-soft);
  font-size: 0.67rem;
}

.terminal-status .status-dot {
  width: 5px;
  height: 5px;
}

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

.terminal-divider {
  height: 1px;
  margin: 20px 0 15px;
  background: linear-gradient(90deg, rgba(0, 255, 156, 0.2), transparent);
}

.terminal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.terminal-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.terminal-metric span {
  color: var(--muted-dim);
  font-size: 0.49rem;
  letter-spacing: 0.12em;
}

.terminal-metric strong {
  color: #c8ddd6;
  font-size: 0.58rem;
  font-weight: 500;
}

.terminal-metric .online {
  color: var(--green);
}

.terminal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-footer i {
  margin-right: 5px;
  color: var(--green);
}

.terminal-signal {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 9px;
}

.terminal-signal i {
  display: block;
  width: 2px;
  margin: 0;
  background: var(--green);
  border-radius: 1px;
}

.terminal-signal i:nth-child(1) {
  height: 3px;
}

.terminal-signal i:nth-child(2) {
  height: 5px;
}

.terminal-signal i:nth-child(3) {
  height: 7px;
}

.terminal-signal i:nth-child(4) {
  height: 9px;
}

.float-chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  line-height: 1.45;
  background: rgba(6, 15, 16, 0.9);
  border: 1px solid rgba(0, 255, 156, 0.18);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: float 6.5s ease-in-out infinite;
}

.float-chip i {
  color: var(--green);
  font-size: 0.95rem;
}

.float-chip strong {
  color: var(--text);
  font-weight: 500;
}

.chip-a {
  top: 66px;
  right: -19px;
}

.chip-b {
  bottom: 66px;
  left: -24px;
  border-color: rgba(56, 217, 255, 0.18);
  animation-delay: -3.2s;
}

.chip-b i {
  color: var(--cyan);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 66px);
  margin-top: 64px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.stat strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.stat span {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-left: auto;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.hero-scroll:hover {
  color: var(--green);
}

.scroll-track {
  display: flex;
  justify-content: center;
  width: 17px;
  height: 28px;
  padding-top: 5px;
  border: 1px solid rgba(0, 255, 156, 0.25);
  border-radius: 999px;
}

.scroll-track span {
  width: 3px;
  height: 5px;
  background: var(--green);
  border-radius: 999px;
  animation: scroll-dot 1.8s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   07. Section shell
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  padding: clamp(82px, 9vw, 124px) 0;
  scroll-margin-top: calc(var(--header-height) + 18px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(38px, 5vw, 58px);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-kicker span {
  color: var(--muted-dim);
  font-size: 0.61rem;
}

.section-heading h2,
.contact-intro h2 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 4.35vw, 3.55rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-heading h2 {
  max-width: 18ch;
}

.section-intro {
  max-width: 590px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   08. About
   -------------------------------------------------------------------------- */
.about {
  background: linear-gradient(180deg, transparent, rgba(0, 255, 156, 0.018) 42%, transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(330px, 0.84fr);
  align-items: start;
  gap: clamp(40px, 6vw, 84px);
}

.about-copy p {
  max-width: 68ch;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.82;
}

.about-copy .about-lead {
  margin-bottom: 21px;
  color: var(--text);
  font-size: clamp(1.08rem, 1.65vw, 1.24rem);
  line-height: 1.68;
  letter-spacing: -0.018em;
}

.about-copy strong {
  color: var(--text);
  font-weight: 600;
}

.about-points {
  display: grid;
  gap: 0;
  margin-top: 29px;
}

.about-point {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.about-point:last-child {
  padding-bottom: 0;
}

.about-point > i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 1px;
  color: var(--green);
  font-size: 0.78rem;
  background: rgba(0, 255, 156, 0.045);
  border: 1px solid rgba(0, 255, 156, 0.14);
  border-radius: 8px;
}

.about-point h3 {
  margin-bottom: 2px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.about-point p {
  margin: 0;
  color: var(--muted-dim);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* Glass profile card */
.profile-card {
  position: sticky;
  top: calc(var(--header-height) + 26px);
  overflow: hidden;
  padding: 28px;
  background: linear-gradient(150deg, rgba(12, 27, 27, 0.9), rgba(5, 13, 15, 0.94));
  border: 1px solid rgba(160, 255, 220, 0.13);
  border-radius: var(--radius-lg);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.profile-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--green), var(--cyan), transparent);
  opacity: 0.65;
}

.profile-card::after {
  position: absolute;
  top: -110px;
  right: -100px;
  width: 250px;
  height: 250px;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle, rgba(0, 255, 156, 0.11), transparent 66%);
}

.profile-scanline {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 34%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  box-shadow: 0 0 12px rgba(0, 255, 156, 0.55);
  animation: profile-scan 5.5s linear infinite;
}

.profile-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 62px;
  height: 62px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(0, 255, 156, 0.13), rgba(56, 217, 255, 0.07));
  border: 1px solid rgba(0, 255, 156, 0.3);
  border-radius: 16px;
}

.profile-avatar > i {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 13px;
  height: 13px;
  background: var(--green);
  border: 3px solid #0a1516;
  border-radius: 50%;
  box-shadow: 0 0 11px rgba(0, 255, 156, 0.9);
}

.profile-label {
  margin-bottom: 2px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.13em;
}

.profile-top h3 {
  margin-bottom: 2px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.profile-role {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.profile-divider {
  height: 1px;
  margin: 23px 0;
  background: linear-gradient(90deg, var(--line), transparent);
}

.profile-data {
  display: grid;
  gap: 13px;
  margin: 0;
}

.profile-data > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.065);
}

.profile-data > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.profile-data dt {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-data dd {
  margin: 0;
  color: var(--text);
  font-size: 0.76rem;
  text-align: right;
}

.profile-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 23px;
  padding: 11px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  background: rgba(0, 255, 156, 0.035);
  border: 1px solid rgba(0, 255, 156, 0.13);
  border-radius: 9px;
}

.profile-footer strong {
  color: var(--green);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   09. Skills
   -------------------------------------------------------------------------- */
.skills {
  background: linear-gradient(180deg, transparent, rgba(56, 217, 255, 0.018) 50%, transparent);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.skill-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 228px;
  padding: 27px 25px 23px;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(14, 29, 29, 0.7), rgba(6, 14, 16, 0.8));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform 0.4s var(--ease), border-color 0.4s ease, box-shadow 0.4s ease;
}

.skill-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.65), transparent);
  opacity: 0.55;
  transition: opacity 0.35s ease;
}

.skill-card::after {
  position: absolute;
  top: -80px;
  right: -70px;
  width: 180px;
  height: 180px;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.13), transparent 68%);
  opacity: 0.5;
  transition: opacity 0.4s ease, transform 0.5s var(--ease);
}

.skill-card:hover {
  border-color: rgba(var(--accent-rgb), 0.34);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.3), 0 0 30px rgba(var(--accent-rgb), 0.045);
  transform: translateY(-6px);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card:hover::after {
  opacity: 1;
  transform: scale(1.18);
}

.skill-index {
  position: absolute;
  top: 22px;
  right: 23px;
  color: rgba(255, 255, 255, 0.18);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.skill-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 1.15rem;
  background: rgba(var(--accent-rgb), 0.065);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 11px;
}

.skill-card h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.skill-card p {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.68;
}

.skill-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(var(--accent-rgb), 0.055);
  border: 1px solid rgba(var(--accent-rgb), 0.17);
  border-radius: 5px;
}

/* Center the seventh card in the three-column layout. */
.skill-card:last-child {
  grid-column: 2;
}

/* --------------------------------------------------------------------------
   10. Projects
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 23px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(12, 25, 26, 0.82), rgba(5, 12, 14, 0.9));
  border: 1px solid var(--line);
  border-radius: 23px;
  transition: transform 0.4s var(--ease), border-color 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
  border-color: rgba(0, 255, 156, 0.25);
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 255, 156, 0.035);
  transform: translateY(-6px);
}

.project-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 255px;
  overflow: hidden;
  background: #061011;
  border-bottom: 1px solid var(--line);
}

.preview-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 35px;
  padding: 0 14px;
  background: rgba(4, 11, 12, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.preview-dots {
  display: flex;
  gap: 5px;
}

.preview-dots i {
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.preview-dots i:nth-child(1) {
  background: #ff6b72;
}

.preview-dots i:nth-child(2) {
  background: #ffc857;
}

.preview-dots i:nth-child(3) {
  background: var(--green);
}

.preview-title {
  overflow: hidden;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.preview-badge {
  margin-left: auto;
  padding: 2px 5px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.45rem;
  letter-spacing: 0.11em;
  background: rgba(0, 255, 156, 0.04);
  border: 1px solid rgba(0, 255, 156, 0.18);
  border-radius: 3px;
}

/* SENTINEL preview */
.sentinel-preview {
  background:
    radial-gradient(circle at 75% 20%, rgba(0, 255, 156, 0.1), transparent 18rem),
    linear-gradient(145deg, #071313, #040a0b);
}

.sentinel-preview::after {
  position: absolute;
  inset: 35px 0 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 255, 156, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 156, 0.025) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
  mask-image: linear-gradient(180deg, #000, transparent 90%);
}

.soc-ui {
  position: relative;
  z-index: 1;
  display: flex;
  height: calc(100% - 35px);
}

.soc-sidebar {
  display: flex;
  flex: 0 0 45px;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  padding: 12px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.soc-logo {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 5px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  background: rgba(0, 255, 156, 0.05);
  border: 1px solid rgba(0, 255, 156, 0.28);
  border-radius: 5px;
}

.soc-nav-item {
  width: 17px;
  height: 3px;
  background: rgba(255, 255, 255, 0.11);
  border-radius: 2px;
}

.soc-nav-item.is-active {
  background: var(--green);
  box-shadow: 0 0 9px rgba(0, 255, 156, 0.7);
}

.soc-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 15px 15px 12px;
}

.soc-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.soc-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.41rem;
  letter-spacing: 0.13em;
}

.soc-heading strong {
  color: #d9eee7;
  font-size: 0.73rem;
  font-weight: 600;
}

.soc-period {
  padding: 2px 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.44rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.soc-alerts {
  display: grid;
  gap: 5px;
}

.soc-alert {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px 7px;
  overflow: hidden;
  color: #b9ccc6;
  font-family: var(--font-mono);
  font-size: 0.47rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 4px;
}

.soc-alert > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-indicator {
  flex: 0 0 auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.soc-alert.critical .alert-indicator {
  background: var(--danger);
  box-shadow: 0 0 6px var(--danger);
}

.soc-alert.warning .alert-indicator {
  background: var(--warning);
  box-shadow: 0 0 6px var(--warning);
}

.soc-alert.safe .alert-indicator {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.alert-level {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 1px 3px;
  font-size: 0.36rem;
  border-radius: 2px;
}

.soc-alert.critical .alert-level {
  color: #ff9aa5;
  background: rgba(255, 91, 110, 0.09);
  border: 1px solid rgba(255, 91, 110, 0.2);
}

.soc-alert.warning .alert-level {
  color: #ffd187;
  background: rgba(255, 191, 75, 0.08);
  border: 1px solid rgba(255, 191, 75, 0.18);
}

.soc-alert.safe .alert-level {
  color: var(--green-soft);
  background: rgba(0, 255, 156, 0.05);
  border: 1px solid rgba(0, 255, 156, 0.15);
}

.soc-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 51px;
  margin-top: auto;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.soc-chart span {
  flex: 1;
  min-width: 2px;
  background: linear-gradient(180deg, rgba(0, 255, 156, 0.85), rgba(0, 255, 156, 0.06));
  border-radius: 2px 2px 0 0;
  opacity: 0.72;
}

.soc-chart span:nth-child(1) { height: 28%; }
.soc-chart span:nth-child(2) { height: 46%; }
.soc-chart span:nth-child(3) { height: 36%; }
.soc-chart span:nth-child(4) { height: 62%; }
.soc-chart span:nth-child(5) { height: 48%; }
.soc-chart span:nth-child(6) { height: 73%; }
.soc-chart span:nth-child(7) { height: 55%; }
.soc-chart span:nth-child(8) { height: 84%; }
.soc-chart span:nth-child(9) { height: 64%; }
.soc-chart span:nth-child(10) { height: 91%; }
.soc-chart span:nth-child(11) { height: 72%; }
.soc-chart span:nth-child(12) { height: 100%; }

/* Voltiq preview */
.voltiq-preview {
  background:
    radial-gradient(circle at 87% 30%, rgba(56, 217, 255, 0.16), transparent 15rem),
    linear-gradient(135deg, #081518, #050c0e);
}

.voltiq-preview::after {
  position: absolute;
  inset: 35px 0 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(56, 217, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 217, 255, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 92%);
  mask-image: linear-gradient(180deg, #000, transparent 92%);
}

.voltiq-ui {
  position: relative;
  z-index: 1;
  height: calc(100% - 35px);
  padding: 13px 17px 15px;
  overflow: hidden;
}

.voltiq-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

.voltiq-mark {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: #041014;
  font-size: 0.65rem;
  font-weight: 900;
  background: var(--cyan);
  border-radius: 5px;
}

.voltiq-word {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.voltiq-pill {
  margin-left: auto;
  padding: 2px 5px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.4rem;
  letter-spacing: 0.1em;
  border: 1px solid rgba(56, 217, 255, 0.2);
  border-radius: 3px;
}

.voltiq-kicker {
  display: block;
  margin-top: 22px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.4rem;
  letter-spacing: 0.16em;
}

.voltiq-hero h4 {
  margin: 7px 0 15px;
  font-size: clamp(1.15rem, 2.35vw, 1.65rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.voltiq-hero h4 em {
  color: var(--cyan);
  font-style: normal;
}

.voltiq-cards {
  display: flex;
  gap: 7px;
}

.voltiq-card {
  min-width: 82px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
}

.voltiq-card > span {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.37rem;
}

.voltiq-card strong {
  display: block;
  margin: 1px 0;
  font-size: 0.58rem;
  font-weight: 600;
}

.voltiq-card small {
  color: var(--muted);
  font-size: 0.4rem;
}

.voltiq-orb {
  position: absolute;
  right: -34px;
  bottom: -38px;
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  color: rgba(56, 217, 255, 0.12);
  font-size: 3.2rem;
  font-weight: 900;
  background: radial-gradient(circle at 36% 30%, rgba(56, 217, 255, 0.35), rgba(0, 255, 156, 0.07) 45%, transparent 68%);
  border: 1px solid rgba(56, 217, 255, 0.15);
  border-radius: 50%;
  box-shadow: inset 0 0 60px rgba(56, 217, 255, 0.07);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 25px 25px 27px;
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 11px;
}

.project-category {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-category i {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 7px var(--green);
}

.project-index {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.61rem;
}

.project-body h3 {
  margin-bottom: 8px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.project-body > p {
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.72;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}

.project-tags span {
  padding: 4px 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: auto;
  padding-bottom: 2px;
  color: var(--green);
  font-size: 0.73rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 156, 0.24);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.project-link i {
  font-size: 0.62rem;
  transition: transform 0.3s var(--ease);
}

.project-link:hover {
  color: var(--green-soft);
  border-color: var(--green);
}

.project-link:hover i {
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------------------
   11. Contact
   -------------------------------------------------------------------------- */
.contact {
  padding-bottom: clamp(92px, 10vw, 138px);
}

.contact-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.9fr);
  gap: clamp(38px, 5vw, 62px);
  overflow: hidden;
  padding: clamp(31px, 5vw, 58px);
  background: linear-gradient(145deg, rgba(11, 27, 26, 0.92), rgba(5, 13, 16, 0.92));
  border: 1px solid rgba(0, 255, 156, 0.16);
  border-radius: 28px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.contact-shell::before {
  position: absolute;
  top: -160px;
  right: -130px;
  width: 390px;
  height: 390px;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle, rgba(56, 217, 255, 0.13), transparent 65%);
}

.contact-shell::after {
  position: absolute;
  bottom: -180px;
  left: -150px;
  width: 380px;
  height: 380px;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle, rgba(0, 255, 156, 0.09), transparent 66%);
}

.contact-intro,
.contact-form {
  position: relative;
  z-index: 1;
}

.contact-intro h2 {
  max-width: 10ch;
  margin-bottom: 18px;
  font-size: clamp(2.15rem, 4vw, 3.35rem);
}

.contact-intro > p {
  max-width: 48ch;
  margin-bottom: 29px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.8;
}

.contact-list {
  display: grid;
  gap: 9px;
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 11px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}

.contact-item:hover {
  background: rgba(0, 255, 156, 0.035);
  border-color: rgba(0, 255, 156, 0.28);
  transform: translateX(4px);
}

.contact-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 37px;
  height: 37px;
  color: var(--green);
  font-size: 0.85rem;
  background: rgba(0, 255, 156, 0.055);
  border: 1px solid rgba(0, 255, 156, 0.15);
  border-radius: 9px;
}

.contact-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-text > span {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-text strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.5;
}

.contact-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted-dim);
  font-size: 0.68rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.contact-item:hover .contact-arrow {
  color: var(--green);
  transform: translateX(3px);
}

.contact-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 17px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
  border-top: 1px solid var(--line);
}

.contact-status .status-dot {
  width: 5px;
  height: 5px;
}

/* Form */
.contact-form {
  padding: 23px;
  background: rgba(4, 11, 12, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.form-heading i {
  color: var(--green);
  font-size: 0.7rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 13px;
}

.form-group label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.53rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  font-size: 0.79rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  outline: none;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group textarea {
  min-height: 112px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #50645e;
}

.form-group input:focus,
.form-group textarea:focus {
  background: rgba(0, 255, 156, 0.018);
  border-color: rgba(0, 255, 156, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 255, 156, 0.07);
}

.form-submit {
  width: 100%;
  margin-top: 2px;
  border: 0;
}

.form-note {
  margin-top: 11px;
  color: var(--muted-dim);
  font-size: 0.59rem;
  line-height: 1.55;
  text-align: center;
}

.form-note i {
  margin-right: 3px;
  color: var(--green);
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 25px 0;
  background: rgba(4, 10, 11, 0.6);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.brand-footer {
  gap: 9px;
}

.brand-footer .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 0.77rem;
  border-radius: 9px;
}

.brand-footer .brand-name {
  font-size: 0.78rem;
}

.footer-inner p {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.57rem;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.back-to-top i {
  font-size: 0.55rem;
  transition: transform 0.25s ease;
}

.back-to-top:hover {
  color: var(--green);
}

.back-to-top:hover i {
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   13. Motion
   -------------------------------------------------------------------------- */
@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(0, 255, 156, 0.09), 0 0 15px rgba(0, 255, 156, 0.85);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 7px rgba(0, 255, 156, 0.03), 0 0 22px rgba(0, 255, 156, 0.95);
    opacity: 0.82;
  }
}

@keyframes type-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes caret-blink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@keyframes terminal-scan {
  0% {
    transform: translateY(-20%);
  }
  100% {
    transform: translateY(520%);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes scroll-dot {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
  }
  75% {
    opacity: 1;
    transform: translateY(7px);
  }
  100% {
    opacity: 0;
    transform: translateY(7px);
  }
}

@keyframes profile-scan {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(390%);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered entrance for the hero copy only; below-the-fold content stays
   immediately readable, which is friendlier for long pages. */
.hero-copy > * {
  animation: fade-up 0.75s var(--ease) both;
}

.hero-copy > :nth-child(1) { animation-delay: 0.04s; }
.hero-copy > :nth-child(2) { animation-delay: 0.1s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.22s; }
.hero-copy > :nth-child(5) { animation-delay: 0.28s; }
.hero-copy > :nth-child(6) { animation-delay: 0.34s; }
.hero-copy > :nth-child(7) { animation-delay: 0.4s; }
.hero-copy > :nth-child(8) { animation-delay: 0.46s; }

.hero-visual {
  animation: fade-up 0.9s var(--ease) 0.22s both;
}

.hero-stats {
  animation: fade-up 0.8s var(--ease) 0.48s both;
}

/* --------------------------------------------------------------------------
   14. Responsive rules
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.84fr);
    gap: 42px;
  }

  .float-chip {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 5.8vw, 4.75rem);
  }
}

@media (max-width: 980px) {
  .hero {
    padding-top: 64px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero h1 {
    max-width: 15ch;
  }

  .hero-visual {
    width: 100%;
    max-width: 620px;
    margin-inline: auto;
  }

  .terminal {
    transform: none;
  }

  .hero-visual:hover .terminal {
    transform: translateY(-4px);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .profile-card {
    position: relative;
    top: auto;
    max-width: 620px;
  }
}

@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-card:last-child {
    grid-column: 1 / -1;
  }

  .contact-shell {
    grid-template-columns: 1fr;
  }

  .contact-intro h2 {
    max-width: 13ch;
  }
}

@media (max-width: 760px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-preview {
    aspect-ratio: 16 / 9;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px 30px;
    margin-top: 50px;
  }

  .hero-scroll {
    display: none;
  }

  .section-heading h2 {
    max-width: 16ch;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }

  .brand-footer {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }

  .site-header {
    padding: 9px 0;
  }

  .nav {
    min-height: 50px;
  }

  .brand-name {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .nav-links {
    gap: 18px;
  }

  .nav-link {
    font-size: 0.76rem;
  }

  .nav-link-contact {
    padding: 7px 12px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 12vw, 3.7rem);
    letter-spacing: -0.055em;
  }

  .hero-role {
    min-height: 4.9em;
    font-size: 0.76rem;
  }

  .typed-role {
    max-width: calc(100% - 28px);
  }

  .hero-description {
    font-size: 0.9rem;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    min-height: 47px;
    padding: 0 18px;
    font-size: 0.8rem;
  }

  .stat strong {
    font-size: 1.25rem;
  }

  .stat span {
    font-size: 0.52rem;
  }

  .section-heading h2,
  .contact-intro h2 {
    font-size: clamp(2rem, 8.5vw, 2.7rem);
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card:last-child {
    grid-column: auto;
  }

  .skill-card {
    min-height: 0;
  }

  .profile-card {
    padding: 23px;
  }

  .profile-top {
    align-items: flex-start;
  }

  .profile-data > div {
    align-items: flex-start;
  }

  .project-body {
    padding: 22px;
  }

  .contact-shell {
    padding: 26px 21px;
    border-radius: 21px;
  }

  .contact-form {
    padding: 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 13px;
  }
}

@media (max-width: 420px) {
  .container {
    width: calc(100% - 24px);
  }

  .nav-links {
    gap: 13px;
  }

  .nav-link {
    font-size: 0.7rem;
  }

  .nav-link-contact {
    padding: 6px 10px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-meta {
    gap: 7px 13px;
    font-size: 0.66rem;
  }

  .hero-stats {
    gap: 17px 24px;
  }

  .stat {
    gap: 7px;
  }

  .hero-visual {
    margin-inline: 0;
  }

  .terminal-body {
    padding: 18px 14px 16px;
    font-size: 0.66rem;
  }

  .terminal-top {
    padding: 10px 12px;
  }

  .terminal-title {
    font-size: 0.55rem;
  }

  .terminal-state {
    font-size: 0.49rem;
  }

  .terminal-grid {
    grid-template-columns: 1fr;
  }

  .terminal-metric {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 7px 8px;
  }

  .terminal-footer {
    padding: 9px 12px;
    font-size: 0.46rem;
  }

  .profile-top {
    gap: 12px;
  }

  .profile-avatar {
    width: 52px;
    height: 52px;
    font-size: 0.85rem;
  }

  .profile-top h3 {
    font-size: 0.93rem;
  }

  .profile-role {
    font-size: 0.65rem;
  }

  .project-preview {
    min-height: 225px;
  }

  .soc-sidebar {
    display: none;
  }

  .soc-content {
    padding: 12px;
  }

  .voltiq-orb {
    width: 120px;
    height: 120px;
    font-size: 2.5rem;
  }

  .contact-item {
    gap: 10px;
  }

  .contact-text strong {
    font-size: 0.66rem;
  }

  .contact-icon {
    width: 33px;
    height: 33px;
  }

  .contact-arrow {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   15. 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;
  }

  .typed-role {
    clip-path: none;
  }

  .typed-role::after {
    display: none;
  }
}
