/* ========== Theme tokens ========== */

:root {
  --gold: #668894ea;
  --gold-soft: #648687;

  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Tajawal', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 1.25rem;
  --transition: 0.4s ease;
}


/* ========== Dark Theme ========== */

[data-theme="dark"] {
  --bg: rgb(11, 20, 40);
  --bg-2: #0f1d3a;

  --surface: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.10);

  --text: #d7d4cc;
  --muted: #8b95a8;

  --card-grad:
    linear-gradient(
      145deg,
      rgba(255,255,255,0.04),
      rgba(255,255,255,0.01)
    );

  --nav-bg: rgba(11,20,40,0.8);

  --shadow:
    0 10px 40px -10px rgba(0,0,0,0.5);
}


/* ========== Light Theme ========== */

[data-theme="light"] {
  --bg: #cfd9e2cb;
  --bg-2: #c0cbd8eb;

  --surface: rgba(30,58,138,0.06);
  --border: rgba(30,58,138,0.14);

  --text: #0f1e3f;
  --muted: #475569;

  --gold: #2563eb;
  --gold-soft: #3b82f6;

  --card-grad:
    linear-gradient(
      145deg,
      rgba(255,255,255,0.85),
      rgba(37,99,235,0.04)
    );

  --nav-bg: rgba(248,250,252,0.92);

  --shadow:
    0 10px 40px -10px rgba(30,58,138,0.11);
}


/* ========== Global ========== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;

  transition:
    background var(--transition),
    color var(--transition);
}

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

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

em {
  font-style: italic;
}

.gold {
  color: var(--gold);
}

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

.mono {
  font-family: var(--font-mono);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ========== Language transition ========== */

[data-ar],
[data-en] {
  transition: opacity 0.25s ease;
}


/* ========== Backdrop ========== */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.grid-floor {
  position: absolute;
  inset: 0;
  opacity: 0.08;

  background-image:
    linear-gradient(
      var(--gold) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      var(--gold) 1px,
      transparent 1px
    );

  background-size: 60px 60px;

  -webkit-mask-image:
    radial-gradient(
      ellipse at center,
      black 30%,
      transparent 80%
    );

  mask-image:
    radial-gradient(
      ellipse at center,
      black 30%,
      transparent 80%
    );
}

.matrix {
  position: absolute;
  inset: 0;
}

.matrix .col {
  position: absolute;
  top: -120%;

  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.2;

  color: var(--gold);
  opacity: 0.18;

  writing-mode: vertical-rl;

  text-shadow: 0 0 8px var(--gold);

  animation: rain linear infinite;
}

@keyframes rain {
  to {
    transform: translateY(220vh);
  }
}

.net-svg {
  position: absolute;
  top: 5%;
  left: -8%;

  width: 50vh;
  height: 50vh;

  opacity: 0.22;
}

.chart-svg {
  position: absolute;
  bottom: 8%;
  right: -2%;

  width: 35vh;
  height: 35vh;

  opacity: 0.2;
}

.circuit-svg {
  position: absolute;
  top: 45%;
  right: 8%;

  width: 35vh;
  height: 35vh;

  opacity: 0.15;
}

.trend {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;

  animation: draw 6s linear infinite;
}

@keyframes draw {
  50% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -200;
  }
}

.bar-anim {
  animation: grow 4s ease-in-out infinite;
  transform-origin: bottom;
}

@keyframes grow {
  0%,
  100% {
    transform: scaleY(0.6);
  }

  50% {
    transform: scaleY(1);
  }
}

.packet {
  animation: pulse-node 2s ease-in-out infinite;
}

@keyframes pulse-node {
  0%,
  100% {
    r: 1.2;
    opacity: 0.5;
  }

  50% {
    r: 2.2;
    opacity: 1;
  }
}


/* ========== Terminal ========== */

.terminal {
  position: absolute;
  top: 8%;
  right: 4%;

  width: 320px;
  opacity: 0.28;

  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.terminal .t-bar {
  display: flex;
  gap: 6px;

  padding: 8px 12px;

  background:
    color-mix(
      in oklab,
      var(--bg-2) 80%,
      transparent
    );

  border:
    1px solid
    color-mix(
      in oklab,
      var(--gold) 40%,
      transparent
    );

  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.terminal .t-bar span {
  width: 8px;
  height: 8px;

  border-radius: 50%;
  background: var(--gold);
}

.terminal .t-bar span:nth-child(2) {
  opacity: 0.6;
}

.terminal .t-bar span:nth-child(3) {
  opacity: 0.3;
}

.terminal .t-body {
  background:
    color-mix(
      in oklab,
      var(--bg-2) 80%,
      transparent
    );

  border:
    1px solid
    color-mix(
      in oklab,
      var(--gold) 40%,
      transparent
    );

  border-top: none;
  border-radius: 0 0 8px 8px;

  padding: 12px;

  font-family: var(--font-mono);
  font-size: 11px;

  color: var(--gold);

  min-height: 110px;
}

.terminal .t-body .line {
  opacity: 0;
  animation: type 8s linear infinite;
}

.binary {
  position: absolute;
  bottom: 15%;
  left: 3%;

  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.7;

  color: var(--gold);
  opacity: 0.18;

  animation: blink-op 3s ease-in-out infinite;
}

@keyframes blink-op {
  0%,
  100% {
    opacity: 0.1;
  }

  50% {
    opacity: 0.25;
  }
}


/* ========== Navigation ========== */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;

  background: var(--nav-bg);

  backdrop-filter: blur(14px);

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

  transition:
    background var(--transition),
    border-color var(--transition);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;

  padding: 12px 16px;

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

  gap: 12px;
  flex-wrap: wrap;

  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 36px;
  height: 36px;

  border-radius: 50%;
  outline: 1px solid var(--border);
}

.brand span {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand em {
  color: var(--gold);
  font-style: normal;
}

.nav-links {
  display: none;
  gap: 16px;
  font-size: 0.95rem;
}

.nav-links a {
  transition: color 0.2s;
}

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


/* Mobile menu */

.nav-links.open {
  display: flex;
  flex-direction: column;

  position: absolute;
  top: 100%;
  inset-inline: 0;

  padding: 16px;

  background: var(--bg);

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

  z-index: 40;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: 28px;

    font-size: 0.85rem;

    position: static;
    padding: 0;

    background: none;
    border: none;
  }

  .nav-inner {
    padding: 12px 20px;
  }

  .brand span {
    font-size: 1.05rem;
  }
}


/* ========== Hamburger ========== */

.nav-toggle {
  display: flex;
  flex-direction: column;

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

  gap: 4px;

  width: 36px;
  height: 36px;

  background: transparent;
  border: none;

  cursor: pointer;
}

.nav-toggle span {
  display: block;

  width: 20px;
  height: 2px;

  background: var(--text);

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform:
    translateY(6px)
    rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform:
    translateY(-6px)
    rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}


/* ========== Nav controls ========== */

.nav-controls {
  display: flex;
  align-items: center;

  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle {
  width: 40px;
  height: 40px;

  border-radius: 50%;

  border:
    1px solid var(--border);

  background: var(--surface);
  color: var(--gold);

  display: grid;
  place-items: center;

  cursor: pointer;

  transition: all 0.3s;

  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--gold);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .i-sun {
  display: block;
}

[data-theme="dark"] .i-moon {
  display: none;
}

[data-theme="light"] .i-sun {
  display: none;
}

[data-theme="light"] .i-moon {
  display: block;
}


/* ========== Language button ========== */

.lang-toggle {
  width: auto;
  min-width: 40px;

  padding: 0 12px;

  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;

  letter-spacing: 0.06em;

  border-radius: 999px;

  transition: all 0.3s;
}

.lang-toggle:hover {
  border-color: var(--gold);
  transform: none;
}

.lang-toggle.switching {
  opacity: 0.5;
  transform: scale(0.95);
}


/* ========== Hero ========== */

.hero {
  position: relative;

  padding: 40px 16px 60px;

  z-index: 1;
}

.hero-glow {
  position: absolute;

  top: 0;
  left: 50%;

  transform: translateX(-50%);

  width: 500px;
  height: 500px;

  max-width: 90vw;
  max-height: 90vw;

  border-radius: 50%;

  opacity: 0.3;

  filter: blur(80px);

  background:
    radial-gradient(
      circle,
      var(--gold),
      transparent 70%
    );

  pointer-events: none;
}

.hero-inner {
  position: relative;

  max-width: 1100px;
  margin: 0 auto;

  text-align: center;
}

.hero-logo {
  width: 100px;
  height: 100px;

  margin: 0 auto 24px;

  padding: 4px;

  border-radius: 50%;

  outline:
    1px solid var(--border);

  background:
    linear-gradient(
      135deg,
      var(--gold),
      transparent
    );

  animation:
    fade-up 0.8s ease;
}

.hero-logo img {
  width: 100%;
  height: 100%;

  border-radius: 50%;

  object-fit: cover;
}

@media (min-width: 768px) {
  .hero-logo {
    width: 140px;
    height: 140px;

    margin-bottom: 28px;
  }
}


/* ========== Availability tag ========== */

.tag {
  display: inline-flex;
  align-items: center;

  gap: 8px;

  padding: 6px 14px;

  border-radius: 999px;

  background: var(--surface);

  border:
    1px solid var(--border);

  font-size: 0.7rem;
  color: var(--text);
}

.tag .dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--gold);

  animation:
    pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}


/* ========== Hero Name ========== */

.hero-name {
  font-family: var(--font-serif);

  font-weight: 600;

  font-size:
    clamp(
      2.8rem,
      10vw,
      5.5rem
    );

  line-height: 1.08;

  letter-spacing: 0;

  margin-top: 20px;

  white-space: nowrap;

  text-align: center;

  width: 100%;

  overflow: visible;
}

.hero-name span {
  display: inline-block;
}


/* ========== Hero description ========== */

.hero-desc {
  max-width: 520px;

  margin: 20px auto 0;

  color: var(--muted);

  font-size: 0.9rem;
}


/* ========== Buttons ========== */

.cta {
  display: flex;

  flex-wrap: wrap;

  justify-content: center;

  gap: 10px;

  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;

  gap: 8px;

  padding: 11px 22px;

  border-radius: 999px;

  font-size: 0.85rem;
  font-weight: 500;

  transition:
    transform 0.2s,
    border-color 0.2s;

  border: none;

  cursor: pointer;
}

.btn-gold {
  background: var(--gold);
  color: #0b1428;
}

.btn-gold:hover {
  transform: scale(1.05);
}

.btn-outline {
  background: var(--surface);

  border:
    1px solid var(--border);

  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}


/* ========== About Full ========== */

.about-full {
  max-height: 0;

  overflow: hidden;

  opacity: 0;

  transition:
    max-height 0.4s ease,
    opacity 0.3s ease,
    margin-top 0.4s ease;
}

.about-full.open {
  max-height: 80px;

  overflow-y: auto;

  opacity: 1;

  margin-top: 14px;

  padding-right: 6px;
}

.about-full p {
  margin-bottom: 12px;
}

.about-full p:last-child {
  margin-bottom: 0;
}


/* Scrollbar */

.about-full.open::-webkit-scrollbar {
  width: 5px;
}

.about-full.open::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 10px;
  opacity: 0.5;
}

.about-full.open::-webkit-scrollbar-track {
  background: transparent;
}


/* About toggle */

.about-toggle-btn {
  background: transparent;

  color: var(--gold);

  border:
    1px solid var(--gold);

  padding: 8px 18px;

  border-radius: 6px;

  font-family: var(--font-sans);

  font-size: 0.85rem;

  cursor: pointer;

  margin-top: 10px;

  transition: all 0.25s ease;
}

.about-toggle-btn:hover {
  background: var(--gold);
  color: #0b1428;
}


/* ========== Sections ========== */

.section {
  position: relative;

  z-index: 1;

  padding: 50px 16px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  display: flex;
  align-items: center;

  gap: 14px;
}

.icon-box {
  width: 44px;
  height: 44px;

  border-radius: 12px;

  background: var(--bg-2);

  border:
    1px solid var(--border);

  color: var(--gold);

  display: grid;
  place-items: center;

  font-family: var(--font-mono);

  font-size: 1rem;

  flex-shrink: 0;
}

.section-title h2 {
  font-family: var(--font-serif);

  font-size:
    clamp(
      1.5rem,
      5vw,
      2.6rem
    );

  font-weight: 600;
}

.section-title.sm h2 {
  font-size: 1.3rem;
}


/* ========== Cards ========== */

.card {
  background: var(--card-grad);

  border:
    1px solid var(--border);

  border-radius: var(--radius);

  padding: 24px;

  box-shadow: var(--shadow);

  transition:
    border-color 0.3s,
    transform 0.3s;
}

.card:hover {
  border-color:
    color-mix(
      in oklab,
      var(--gold) 60%,
      var(--border)
    );

  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .card {
    padding: 18px;
  }
}


/* ========== About ========== */

.about-grid {
  display: grid;

  gap: 18px;

  margin-top: 36px;

  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns:
      2.2fr 1fr;

    gap: 20px;
  }

  .card.lg {
    font-size: 1.05rem;
  }
}

.passion {
  display: flex;

  flex-direction: column;

  justify-content: space-between;

  gap: 20px;
}

.passion .spark {
  font-size: 1.8rem;
  color: var(--gold);
}


/* ========== Passion Title ========== */

.passion-title {
  font-family: var(--font-sans);

  font-size: 1.8rem;

  margin-top: 6px;

  font-weight: 700;

  line-height: 1.4;
}


/* ========== Skills ========== */

.skills {
  margin-top: 32px;

  display: flex;

  flex-wrap: wrap;

  gap: 9px;
}

.skills span {
  padding: 7px 16px;

  border-radius: 999px;

  background: var(--surface);

  border:
    1px solid var(--border);

  font-size: 0.8rem;

  transition: all 0.25s;

  cursor: pointer;
}

.skills span:hover {
  border-color: var(--gold);

  color: var(--gold);

  transform: translateY(-2px);
}


/* ========== Education ========== */

.edu {
  margin-top: 36px;

  display: flex;

  flex-direction: column;

  gap: 18px;

  align-items: flex-start;
}

@media (min-width: 768px) {
  .edu {
    flex-direction: row;

    align-items: center;

    gap: 24px;
  }
}

.edu-icon {
  width: 64px;
  height: 64px;

  border-radius: 14px;

  background: var(--bg-2);

  border:
    1px solid var(--border);

  color: var(--gold);

  font-size: 1.8rem;

  display: grid;
  place-items: center;

  flex-shrink: 0;
}

.edu-title {
  font-family: var(--font-serif);

  font-size: 1.3rem;
}

.edu-tags {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin-top: 10px;

  font-size: 0.7rem;
}

.tag-sm {
  padding: 4px 11px;

  border-radius: 999px;

  background: var(--surface);

  border:
    1px solid var(--border);

  font-size: 0.7rem;
}

.tag-sm.filled {
  background: var(--gold);

  color: #0b1428;

  border-color: var(--gold);
}


/* ========== Grid ========== */

.grid-2 {
  margin-top: 36px;

  display: grid;

  gap: 18px;

  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns:
      1fr 1fr;

    gap: 20px;
  }
}

.grid-3 {
  margin-top: 36px;

  display: grid;

  gap: 18px;

  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .grid-3 {
    grid-template-columns:
      repeat(2, 1fr);

    gap: 18px;
  }
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns:
      repeat(3, 1fr);

    gap: 20px;
  }
}


/* ========== Certs & Projects ========== */

.cert,
.proj {
  cursor: pointer;

  transition: all 0.3s;
}

.cert:active,
.proj:active {
  transform: scale(0.98);
}

.cert .icon,
.proj .icon {
  width: 24px;
  height: 24px;

  border-radius: 8px;

  background: var(--bg-2);

  border:
    1px solid var(--border);

  color: var(--gold);

  display: grid;
  place-items: center;

  font-family: var(--font-mono);

  font-size: 0.8rem;

  margin-bottom: 10px;
}

.cert h3,
.proj h3 {
  font-family: var(--font-serif);

  font-size: 0.9rem;

  line-height: 1.2;
}

.cert-meta {
  display: flex;

  flex-direction: column;

  gap: 5px;

  margin-top: 10px;

  font-size: 0.72rem;
}

.cert-meta .issuer {
  color: var(--gold);
  font-weight: 500;
}

.cert-meta .date {
  font-family: var(--font-mono);

  font-size: 0.58rem;

  color: var(--muted);
}

.proj {
  padding: 12px;
}

.proj .icon {
  width: 22px;
  height: 22px;

  margin-bottom: 8px;

  font-size: 0.75rem;
}

.proj h3 {
  font-size: 0.82rem;
  line-height: 1.2;
}

.proj .period {
  font-family: var(--font-mono);

  font-size: 0.55rem;

  text-transform: uppercase;

  letter-spacing: 0.08em;

  color: var(--muted);

  margin-top: 2px;
}

.proj p {
  margin-top: 7px;

  font-size: 0.68rem;

  color: var(--muted);

  line-height: 1.4;
}

.proj .tags {
  display: flex;

  flex-wrap: wrap;

  gap: 4px;

  margin-top: 8px;
}

.proj .tags span {
  padding: 2px 6px;

  border-radius: 999px;

  border:
    1px solid var(--border);

  font-size: 0.52rem;
}


/* ========== Courses ========== */

.courses {
  margin-top: 36px;

  display: grid;

  gap: 11px;

  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .courses {
    grid-template-columns:
      1fr 1fr;
  }
}

@media (min-width: 900px) {
  .courses {
    grid-template-columns:
      1fr 1fr 1fr;
  }
}

.courses .item {
  display: flex;

  align-items: center;

  gap: 11px;

  padding: 13px 16px;

  border-radius: 12px;

  background: var(--card-grad);

  border:
    1px solid var(--border);

  cursor: pointer;

  transition: all 0.3s;
}

.courses .item:hover {
  border-color: var(--gold);
}

.courses .item:active {
  transform: scale(0.98);
}

.courses .item .bullet {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--gold);

  flex-shrink: 0;
}

.courses .item span:nth-child(2) {
  font-size: 0.9rem;
}


/* ========== Languages ========== */

.lang {
  margin-top: 16px;
}

.lang-row {
  display: flex;

  justify-content: space-between;

  font-size: 0.85rem;
}

.bar {
  margin-top: 8px;

  height: 2px;

  background: var(--border);

  overflow: hidden;

  border-radius: 1px;
}

.bar i {
  display: block;

  height: 100%;

  background: var(--gold);

  width: 0;

  transition:
    width 1.4s ease;
}


/* ========== Contact ========== */

.contact-card {
  background:
    linear-gradient(
      135deg,
      var(--gold),
      color-mix(
        in oklab,
        var(--gold) 80%,
        #333
      )
    );

  color: #0b1428;

  border: none;
}

[data-theme="light"] .contact-card {
  background:
    linear-gradient(
      135deg,
      #2563eb,
      #1d4ed8
    );

  color: white;
}

.contact-card .kicker {
  color: inherit;
  opacity: 0.8;
}


/* ========== Contact Title ========== */

.contact-title {
  font-family: var(--font-sans);

  font-size: 1.8rem;

  line-height: 1.5;

  margin-top: 10px;

  font-weight: 700;
}

.contact-title em {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 700;
}

.contact-info {
  margin-top: 28px;

  font-size: 0.85rem;

  display: flex;

  flex-direction: column;

  gap: 10px;
}

.contact-info a:hover {
  opacity: 0.75;
}


/* ========== Social Icons ========== */

.social-links-container {
  display: flex;

  gap: 30px;

  margin-top: 40px;

  justify-content: center;
}

.social-btn {
  display: flex;

  align-items: center;

  gap: 22px;

  padding: 8px 18px;

  background: var(--surface);

  border:
    1px solid var(--border);

  border-radius: 999px;

  transition: all var(--transition);

  cursor: pointer;

  text-decoration: none;

  color: var(--text);
}

.social-icon-box {
  width: 32px;
  height: 32px;

  background: var(--bg-2);

  border:
    1px solid var(--border);

  border-radius: 10px;

  display: grid;

  place-items: center;

  color: var(--gold);

  font-size: 1.1rem;

  transition: all var(--transition);
}

.social-text {
  font-family: var(--font-mono);

  font-size: 0.8rem;

  letter-spacing: 0.1em;

  text-transform: uppercase;

  color: var(--muted);

  transition:
    color var(--transition);
}

.social-btn:hover {
  border-color: var(--gold);

  transform: translateY(-3px);

  background: var(--card-grad);

  box-shadow: var(--shadow);
}

.social-btn:hover .social-icon-box {
  background: var(--gold);

  color: var(--bg);

  border-color: var(--gold);
}

.social-btn:hover .social-text {
  color: var(--gold);
}


/* ========== Footer ========== */

.footer {
  position: relative;

  z-index: 1;

  border-top:
    1px solid var(--border);

  padding: 28px 16px;

  text-align: center;
}

.footer img {
  width: 36px;
  height: 36px;

  border-radius: 50%;

  margin: 0 auto;

  opacity: 0.7;
}

.footer div {
  margin-top: 10px;

  font-family: var(--font-sans);

  font-size: 0.75rem;

  letter-spacing: 0;

  text-transform: none;

  color: var(--muted);

  font-weight: 500;
}

.copy-sym {
  font-size: 1em;

  vertical-align: middle;
}


/* ========== Reveal ========== */

.reveal {
  opacity: 0;

  transform: translateY(18px);

  transition:
    opacity 0.6s,
    transform 0.6s;
}

.reveal.in {
  opacity: 1;

  transform: none;
}


/* ========== Modal ========== */

.modal {
  position: fixed;

  inset: 0;

  z-index: 100;

  display: none;

  align-items: center;

  justify-content: center;

  padding: 16px;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;

  inset: 0;

  background: rgba(0,0,0,0.5);

  backdrop-filter: blur(4px);

  animation:
    fade-in 0.3s ease;
}

.modal-content {
  position: relative;

  max-width: 520px;

  width: 100%;

  background: var(--bg-2);

  border:
    1px solid var(--border);

  border-radius: var(--radius);

  padding: 32px 28px;

  box-shadow:
    0 20px 60px rgba(0,0,0,0.4);

  animation:
    slide-up 0.4s ease;

  max-height: 85vh;

  overflow-y: auto;
}

@media (max-width: 600px) {
  .modal-content {
    padding: 24px 20px;

    max-width:
      calc(100% - 20px);
  }
}

.modal-close {
  position: absolute;

  top: 16px;
  right: 16px;

  width: 36px;
  height: 36px;

  border: none;

  border-radius: 50%;

  background: var(--surface);

  color: var(--text);

  cursor: pointer;

  font-size: 1.2rem;

  transition: all 0.2s;

  display: flex;

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

  z-index: 10;
}

.modal-close:hover {
  background: var(--gold);

  color: #0b1428;
}

#modalBody h2 {
  font-family: var(--font-serif);

  font-size: 1.6rem;

  margin-bottom: 12px;

  color: var(--gold);
}

#modalBody .modal-meta {
  display: flex;

  flex-direction: column;

  gap: 8px;

  margin: 16px 0;

  padding: 16px;

  background: var(--surface);

  border:
    1px solid var(--border);

  border-radius: 12px;

  font-size: 0.9rem;
}

#modalBody .modal-meta-item {
  display: flex;

  justify-content: space-between;

  align-items: center;
}

#modalBody .modal-meta-label {
  color: var(--muted);

  font-weight: 500;
}

#modalBody p {
  margin: 16px 0;

  line-height: 1.7;

  font-size: 0.95rem;

  color: var(--muted);
}


/* ========== Certificate button ========== */

.cert-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;

  margin-top: 8px;
  padding: 4px 10px;

  border-radius: 6px;

  background: var(--gold);
  color: #0b1428;

  font-weight: 500;
  font-size: 0.7rem;

  transition: all 0.3s ease;
  border: 1px solid var(--gold);
}

[data-theme="light"] .cert-link-btn {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.cert-link-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 145, 255, 0.25);
}

[data-theme="light"] .cert-link-btn:hover {
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.2);
}

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

#modalBody .modal-tags {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin: 16px 0;
}

#modalBody .modal-tag {
  padding: 6px 14px;

  border-radius: 999px;

  background: var(--surface);

  border:
    1px solid var(--border);

  font-size: 0.8rem;
}


/* ========== Animations ========== */

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;

    transform:
      translateY(20px);
  }

  to {
    opacity: 1;

    transform: none;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;

    transform:
      translateY(20px);
  }

  to {
    opacity: 1;

    transform: none;
  }
}

@keyframes type {
  0%,
  5% {
    opacity: 0;

    transform:
      translateX(-8px);
  }

  10%,
  80% {
    opacity: 1;

    transform: none;
  }

  90%,
  100% {
    opacity: 0;
  }
}


/* ========== Mobile ========== */

@media (max-width: 600px) {

  .terminal {
    display: none;
  }

  .net-svg {
    width: 55vw;
    height: 55vw;

    top: 8%;
    left: -12%;
  }

  .chart-svg {
    width: 45vw;
    height: 45vw;
  }

  .circuit-svg {
    display: none;
  }

  .section {
    padding:
      40px 14px;
  }

  .hero {
    padding:
      32px 14px 50px;
  }

  .modal-content {
    max-height: 90vh;
  }

  .hero-name {
    white-space: nowrap;

    font-size:
      clamp(
        2rem,
        11vw,
        4rem
      );

    width: 100%;
  }

  .passion-title {
    font-family: var(--font-sans);

    font-size: 1.65rem;

    font-weight: 700;

    line-height: 1.4;
  }

  .contact-title {
    font-family: var(--font-sans);

    font-size: 1.65rem;

    line-height: 1.55;

    font-weight: 700;
  }

  .contact-title em {
    font-family: var(--font-sans);

    font-style: normal;

    font-weight: 700;
  }
}


/* ========== Small Mobile ========== */

@media (max-width: 400px) {

  .hero-name {
    font-size:
      clamp(
        1.75rem,
        10vw,
        2.3rem
      );

    white-space: nowrap;
  }

  .cta {
    gap: 8px;
  }

  .btn {
    padding:
      10px 18px;

    font-size: 0.8rem;
  }

  .tag-sm {
    padding:
      3px 9px;

    font-size: 0.65rem;
  }

  .section-title {
    gap: 10px;
  }

  .icon-box {
    width: 40px;
    height: 40px;

    font-size: 0.9rem;
  }

  .passion-title {
    font-size: 1.5rem;
  }

  .contact-title {
    font-size: 1.5rem;
  }
}
