/*!
 * Advanced portfolio redesign — Mohammad Hanif Hefaz
 * Dark futuristic theme: glassmorphism, gradient glow, scroll reveals
 */

:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --surface: rgba(148, 163, 184, 0.06);
  --surface-strong: rgba(148, 163, 184, 0.1);
  --line: rgba(148, 163, 184, 0.16);
  --line-bright: rgba(148, 163, 184, 0.32);
  --text: #e6edf7;
  --muted: #8b98ad;
  --accent: #22d3ee;
  --accent-2: #818cf8;
  --accent-3: #f472b6;
  --gold: #fbbf24;
  --grad: linear-gradient(120deg, #22d3ee, #818cf8 55%, #f472b6);
  --radius: 18px;
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

* {
  box-sizing: border-box;
}

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

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

::selection {
  background: rgba(34, 211, 238, 0.35);
  color: #fff;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 8px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

a:hover,
a:focus {
  color: #7ee7f7;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ---------- Ambient background ---------- */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 70% -10%, rgba(129, 140, 248, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 110%, rgba(34, 211, 238, 0.12), transparent 60%),
    var(--bg);
}

.bg-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: orbFloat 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 480px;
  height: 480px;
  top: -140px;
  right: -100px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.55), transparent 70%);
}

.orb-2 {
  width: 420px;
  height: 420px;
  bottom: -120px;
  left: -120px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.45), transparent 70%);
  animation-delay: -6s;
}

.orb-3 {
  width: 320px;
  height: 320px;
  top: 45%;
  left: 55%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.32), transparent 70%);
  animation-delay: -12s;
}

@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, -50px) scale(1.15); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%);
  pointer-events: none;
}

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.9rem 1.5rem;
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.site-nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  padding: 0.6rem 1.5rem;
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar-brand .brand-dot {
  -webkit-text-fill-color: var(--accent);
}

.site-nav .nav-link {
  position: relative;
  color: var(--muted) !important;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem !important;
}

.site-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  color: var(--text) !important;
}

.site-nav .nav-link:hover::after,
.site-nav .nav-link.active::after {
  transform: scaleX(1);
}

.navbar-toggler {
  border-color: var(--line-bright);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(230,237,247,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
  .site-nav .navbar-collapse {
    background: rgba(11, 17, 32, 0.97);
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-top: 0.75rem;
    padding: 0.75rem;
  }
}

/* ---------- Shared section bits ---------- */
.content-section {
  position: relative;
  padding: 6.5rem 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 3rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--grad);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
}

.section-heading h2 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-sub {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 1.02rem;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .orb, .profile-ring, .cursor-blink {
    animation: none !important;
  }
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 9rem 0 5rem;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1rem;
  margin-bottom: 1.6rem;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: #9beaf7;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-section h1 {
  margin-bottom: 1.3rem;
  font-size: clamp(2.9rem, 7vw, 5.4rem);
  font-weight: 800;
}

.hero-section h1 .grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typed-wrap {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--accent);
  margin-bottom: 1.4rem;
  min-height: 1.8em;
}

.cursor-blink {
  display: inline-block;
  width: 2px;
  margin-left: 2px;
  color: var(--accent-2);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 2.2rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.2rem;
}

.btn-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.7rem;
  border: 0;
  border-radius: 12px;
  background: var(--grad);
  color: #06121f !important;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 34px rgba(34, 211, 238, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-glow:hover,
.btn-glow:focus {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(129, 140, 248, 0.5);
  color: #06121f;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.7rem;
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text) !important;
  font-weight: 600;
  font-size: 0.95rem;
  backdrop-filter: blur(8px);
}

.btn-ghost:hover,
.btn-ghost:focus {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  transform: translateY(-3px);
  color: var(--text);
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-row a,
.contact-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.contact-row a:hover {
  color: var(--accent);
}

.contact-row i {
  color: var(--accent);
}

/* Hero profile card */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.profile-panel {
  position: relative;
  width: min(400px, 100%);
}

.profile-frame {
  position: relative;
  border-radius: 24px;
  padding: 3px;
  background: var(--grad);
  box-shadow: 0 30px 80px rgba(34, 211, 238, 0.22), 0 10px 40px rgba(129, 140, 248, 0.18);
}

.profile-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 21px;
}

.profile-ring {
  position: absolute;
  inset: -26px;
  border-radius: 32px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  animation: spinSlow 26s linear infinite;
  pointer-events: none;
}

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

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  animation: floatY 5.5s ease-in-out infinite;
}

.float-card i {
  font-size: 1.15rem;
  color: var(--accent);
}

.float-card .fc-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.float-card .fc-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.float-role {
  left: -56px;
  bottom: 64px;
}

.float-score {
  right: -40px;
  top: 44px;
  animation-delay: -2.6s;
}

.float-score i {
  color: var(--gold);
}

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

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.metric-grid > div {
  padding: 1.15rem 0.9rem;
  background: rgba(11, 17, 32, 0.75);
  backdrop-filter: blur(10px);
  text-align: center;
  transition: background 0.3s ease;
}

.metric-grid > div:hover {
  background: rgba(34, 211, 238, 0.08);
}

.metric-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-grid span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.scroll-hint .mouse {
  width: 24px;
  height: 38px;
  border: 1.5px solid var(--line-bright);
  border-radius: 14px;
  position: relative;
}

.scroll-hint .mouse::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--accent);
  animation: wheel 1.8s ease-in-out infinite;
}

@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 1.6rem;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), var(--accent-3));
  border-radius: 2px;
  opacity: 0.55;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 1.9rem;
  left: calc(-2rem - 7px);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.7);
}

.timeline-card {
  position: relative;
  padding: 1.7rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.timeline-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, 0.09), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.timeline-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(34, 211, 238, 0.15);
}

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

.timeline-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem 1rem;
  margin-bottom: 0.4rem;
}

.timeline-card h3 {
  margin: 0;
  font-size: 1.45rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.07);
  white-space: nowrap;
}

.company {
  margin-bottom: 1rem;
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.timeline-card ul li {
  margin-bottom: 0.35rem;
}

.timeline-card ul li::marker {
  color: var(--accent);
}

/* ---------- Skills ---------- */
.skill-card {
  height: calc(100% - 1.5rem);
  margin-bottom: 1.5rem;
  padding: 1.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
}

.skill-card .skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: var(--accent);
  font-size: 1.25rem;
}

.skill-card:nth-child(2) .skill-icon { color: var(--accent-2); background: rgba(129, 140, 248, 0.1); border-color: rgba(129, 140, 248, 0.3); }

.skill-card h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip-list span {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.07);
  color: #c3cede;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s ease;
  cursor: default;
}

.chip-list span:hover {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
  transform: translateY(-2px);
}

.workflow-card {
  margin-top: 0.75rem;
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-left: 3px solid;
  border-image: linear-gradient(180deg, var(--accent), var(--accent-3)) 1;
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.workflow-card h3 {
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.workflow-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  columns: 2;
  column-gap: 2.5rem;
}

.workflow-card ul li {
  margin-bottom: 0.5rem;
  break-inside: avoid;
}

.workflow-card ul li::marker {
  color: var(--accent-2);
}

@media (max-width: 767.98px) {
  .workflow-card ul {
    columns: 1;
  }
}

/* ---------- Education ---------- */
.education-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}

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

.education-grid article {
  position: relative;
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.education-grid article::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.education-grid article:hover {
  transform: translateY(-6px);
  border-color: var(--line-bright);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.45);
}

.education-grid article:hover::after {
  transform: scaleX(1);
}

.education-grid .edu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: var(--accent-2);
  font-size: 1.15rem;
}

.education-grid span {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.education-grid h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.education-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Languages ---------- */
.language-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.native-language {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.7rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.09), rgba(129, 140, 248, 0.09), rgba(244, 114, 182, 0.09));
}

.native-language span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.native-language strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.language-table {
  margin: 0;
  color: var(--text);
}

.language-table thead th {
  border: 0;
  border-bottom: 1px solid var(--line) !important;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.language-table td,
.language-table th {
  padding: 0.95rem 1.7rem;
  vertical-align: middle;
  border-color: var(--line) !important;
}

.language-table tbody tr {
  transition: background 0.25s ease;
}

.language-table tbody tr:hover {
  background: rgba(34, 211, 238, 0.05);
}

.language-table tbody td:first-child {
  font-weight: 600;
  color: var(--text);
}

.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
}

.level-c1 {
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: #67e8f9;
}

.level-b2 {
  background: rgba(129, 140, 248, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.4);
  color: #a5b4fc;
}

.level-a2,
.level-a1 {
  background: rgba(244, 114, 182, 0.12);
  border: 1px solid rgba(244, 114, 182, 0.35);
  color: #f9a8d4;
}

/* ---------- Certifications ---------- */
.certification-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  max-width: 560px;
  padding: 1.7rem 1.9rem;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.08), var(--surface));
  backdrop-filter: blur(12px);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.certification-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45), 0 0 40px rgba(251, 191, 36, 0.12);
}

.certification-card i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: var(--gold);
  font-size: 1.6rem;
}

.certification-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1.4rem;
}

.certification-card p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 3.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.7);
  text-align: center;
}

.site-footer .footer-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.2rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.1rem;
}

.social-icons a:hover {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.2);
}

.site-footer .copyright {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: var(--grad);
  color: #06121f !important;
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

/* ---------- Responsive tweaks ---------- */
@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 7.5rem;
    text-align: center;
  }
  .hero-copy {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions,
  .contact-row {
    justify-content: center;
  }
  .hero-visual {
    margin-top: 3.5rem;
  }
  .float-role { left: -8px; }
  .float-score { right: -8px; }
  .scroll-hint { display: none; }
}

@media (max-width: 575.98px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .float-role { bottom: -20px; left: 0; }
  .float-score { top: -18px; right: 0; }
  .timeline { padding-left: 1.4rem; }
  .timeline-item::before { left: calc(-1.4rem - 7px); }
}
