/* ============================================================
   Spider-Verse Cyberpunk Security Theme
   Mohamed Fazil Rahman Z
   ============================================================ */

:root {
  --bg: #050505;
  --bg-soft: #0d0507;
  --bg-elevated: #14070a;
  --primary-red: #dc2626;
  --accent-red: #f97316;
  --text: #f5f5f5;
  --text-muted: #d1d5db;
  --text-dim: #9ca3af;
  --border-red: rgba(220, 38, 38, 0.34);
  --border-soft: rgba(245, 245, 245, 0.08);
  --glass: rgba(20, 7, 10, 0.72);
  --glass-strong: rgba(12, 4, 6, 0.88);
  --shadow-red: 0 20px 60px rgba(220, 38, 38, 0.18), 0 0 28px rgba(249, 115, 22, 0.08);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.38);
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Oswald', 'Inter', sans-serif;
  --font-code: 'Source Code Pro', monospace;
  --nav-height: 72px;
  --container-max: 1400px;
  --container-pad: 40px;
  --section-pad: clamp(4.5rem, 7vw, 7rem);
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 12%, rgba(220, 38, 38, 0.18), transparent 34rem),
    radial-gradient(circle at 82% 22%, rgba(249, 115, 22, 0.12), transparent 36rem),
    linear-gradient(135deg, #050505, #0d0507 48%, #030101);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(220, 38, 38, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 115, 22, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, transparent 0%, rgba(10, 3, 5, 0.48) 62%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(to bottom, rgba(5, 5, 5, 0.1), rgba(5, 5, 5, 0.76));
}

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

ul {
  list-style: none;
}

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

section {
  width: 100%;
  overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(220, 38, 38, 0.65);
  border-radius: 999px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(5, 5, 5, 0.78);
  border-bottom: 1px solid rgba(220, 38, 38, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(5, 5, 5, 0.95);
  border-bottom-color: var(--border-red);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}

.nav-container,
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.nav-container {
  width: 100%;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo-text {
  transition: opacity var(--transition), color var(--transition);
}

.spider-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-red);
  border-radius: 50%;
  color: var(--accent-red);
  background: rgba(220, 38, 38, 0.1);
}

.nav-logo:hover .logo-text {
  color: var(--accent-red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.nav-link {
  position: relative;
  display: inline-flex;
  padding: 0.35rem 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-red), var(--accent-red));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}

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

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

.hamburger {
  display: none;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--border-red);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.1);
  cursor: pointer;
}

.hamburger span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero-section {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 2rem) 0 3.5rem;
  background:
    radial-gradient(circle at 78% 18%, rgba(220, 38, 38, 0.2), transparent 28rem),
    radial-gradient(circle at 18% 80%, rgba(249, 115, 22, 0.12), transparent 24rem),
    linear-gradient(145deg, rgba(5, 5, 5, 0.26) 0%, rgba(13, 5, 7, 0.5) 54%, rgba(3, 1, 1, 0.68) 100%);
}

.site-network-canvas,
.grid-overlay,
.cyber-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.site-network-canvas {
  position: fixed;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  opacity: 1;
}

.grid-overlay {
  z-index: 2;
  background-image:
    linear-gradient(rgba(220, 38, 38, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 115, 22, 0.052) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: 0.32;
}

.cyber-vignette {
  z-index: 3;
  background:
    linear-gradient(to bottom, rgba(5, 5, 5, 0.05), rgba(5, 5, 5, 0.66)),
    radial-gradient(circle at center, transparent 0%, rgba(5, 0, 1, 0.38) 72%);
}

.hero-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  text-align: center;
}

.available-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-red);
  border-radius: 999px;
  background: rgba(20, 7, 10, 0.68);
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5);
  animation: pulse-green 1.8s ease infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(249, 115, 22, 0); }
}

.hero-name-wrap {
  animation: fade-up 0.8s ease both;
}

.hero-eyebrow {
  margin-bottom: 0.7rem;
  color: var(--accent-red);
  font-family: var(--font-code);
  font-size: clamp(0.74rem, 1.2vw, 0.88rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-name {
  position: relative;
  max-width: min(100%, 13ch);
  margin: 0 auto 0.7rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: none;
  text-shadow:
    0 0 26px rgba(220, 38, 38, 0.38),
    0 0 18px rgba(249, 115, 22, 0.16),
    0 2px 0 rgba(0, 0, 0, 0.55);
  text-wrap: balance;
  animation: title-glitch 7s steps(1) infinite;
}

.hero-name span {
  position: relative;
  display: block;
}

.hero-name span::before,
.hero-name span::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.hero-name span::before {
  color: rgba(249, 115, 22, 0.62);
  transform: translate(2px, 0);
}

.hero-name span::after {
  color: rgba(220, 38, 38, 0.58);
  transform: translate(-2px, 0);
}

@keyframes title-glitch {
  0%, 89%, 100% { transform: translate(0); }
  90% { transform: translate(1px, -1px); }
  91% { transform: translate(-1px, 1px); }
  92% { transform: translate(0); }
}

.hero-name:hover span::before,
.hero-name:hover span::after {
  opacity: 0.42;
}

.hero-role,
.hero-subrole {
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-subrole {
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 600;
}

.hero-quote-wrap {
  position: relative;
  max-width: 840px;
  margin: clamp(1.5rem, 3vw, 2rem) auto;
  padding: 1.15rem 1.5rem;
  border: 1px solid var(--border-red);
  border-radius: 8px;
  background: rgba(20, 7, 10, 0.68);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  animation: fade-in 0.8s ease 0.12s both;
}

.quote-mark {
  position: absolute;
  top: -0.3rem;
  left: 1rem;
  color: rgba(249, 115, 22, 0.45);
  font-family: Georgia, serif;
  font-size: 3rem;
  line-height: 1;
}

.quote-mark.close {
  top: auto;
  right: 1rem;
  bottom: -1.2rem;
  left: auto;
}

.hero-quote {
  color: var(--text-muted);
  font-size: clamp(0.92rem, 1.2vw, 1rem);
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}

.stat-item {
  min-width: 180px;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border-red);
  border-radius: 8px;
  background: rgba(20, 7, 10, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stat-number,
.stat-plus {
  color: var(--accent-red);
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-dim);
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  min-height: 72px;
  background: linear-gradient(to bottom, transparent, var(--border-red), transparent);
}

.hero-btns,
.hero-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero-btns {
  margin-bottom: 1rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.78rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-red), var(--accent-red));
  color: var(--text);
  box-shadow: 0 14px 32px rgba(220, 38, 38, 0.24);
}

.btn-secondary,
.btn-resume {
  border-color: var(--border-red);
  background: rgba(20, 7, 10, 0.7);
  color: var(--text);
}

.btn:hover,
.hero-socials a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-red);
}

.hero-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 126px;
  padding: 0.62rem 0.95rem;
  border: 1px solid rgba(245, 245, 245, 0.12);
  border-radius: 8px;
  background: rgba(20, 7, 10, 0.58);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  transition: transform var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.hero-socials a:hover {
  border-color: var(--border-red);
  color: var(--text);
}

.hero-web-corners {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.web-corner {
  position: absolute;
  width: clamp(140px, 14vw, 220px);
  height: clamp(140px, 14vw, 220px);
  opacity: 0.22;
}

.web-corner.top-left {
  top: var(--nav-height);
  left: 0;
}

.scroll-hint {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateX(-50%);
  color: rgba(245, 245, 245, 0.42);
  font-family: var(--font-code);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.scroll-line {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--primary-red), transparent);
  animation: line-pulse 1.6s ease infinite;
}

@keyframes line-pulse {
  0%, 100% { opacity: 0.25; transform: scaleX(0.8); }
  50% { opacity: 1; transform: scaleX(1); }
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-pad) 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.78), rgba(6, 17, 31, 0.84));
}

.section:nth-of-type(odd) {
  background: linear-gradient(180deg, rgba(6, 17, 31, 0.78), rgba(2, 6, 23, 0.86));
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: min(100%, var(--container-max));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--border-red), transparent);
}

.chapter-header {
  max-width: 760px;
  margin: 0 auto clamp(2.25rem, 4vw, 3.5rem);
  text-align: center;
}

.chapter-num {
  display: inline-flex;
  margin-bottom: 0.9rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border-red);
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.08);
  color: var(--accent-red);
  font-family: var(--font-code);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(220, 38, 38, 0.18);
}

.title-underline {
  width: 92px;
  height: 2px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--primary-red), var(--accent-red), transparent);
  transition: width var(--transition);
}

.chapter-header:hover .title-underline {
  width: 132px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

/* Shared card language */
.profile-panel,
.about-metric,
.skill-group,
.timeline-card,
.project-card,
.edu-card,
.activities-wrap,
.devops-banner,
.contact-panel,
.activity-item {
  border: 1px solid var(--border-red);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.tilt-card {
  transform-style: flat;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.tilt-card:hover {
  transform: translateY(-8px);
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow: var(--shadow-red);
}

/* About */
.about-section {
  background-image:
    radial-gradient(circle at 15% 18%, rgba(220, 38, 38, 0.08), transparent 26rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.84), rgba(6, 17, 31, 0.86));
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(420px, 1.05fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: stretch;
}

.profile-panel {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  align-items: center;
}

.profile-image-wrap {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid rgba(249, 115, 22, 0.42);
  border-radius: 8px;
  background: var(--bg);
}

.profile-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: inset 0 0 38px rgba(220, 38, 38, 0.12);
  pointer-events: none;
}

.profile-image {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center 25%;
  filter: saturate(0.92) contrast(1.04);
}

.about-greeting {
  color: var(--text);
  font-size: clamp(1.6rem, 2.6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.profile-role {
  margin: 0.45rem 0 1rem;
  color: var(--accent-red);
  font-family: var(--font-code);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.about-desc + .about-desc {
  margin-top: 0.9rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.about-metric {
  position: relative;
  min-height: 190px;
  padding: 1.35rem;
  overflow: hidden;
}

.about-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-red), transparent);
}

.metric-label {
  display: block;
  margin-bottom: 0.85rem;
  color: var(--accent-red);
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-metric strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

/* Skills */
.skills-section {
  background-image:
    linear-gradient(rgba(220, 38, 38, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 115, 22, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
}

.skill-group {
  min-height: 100%;
  padding: 1.35rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.skill-group:hover {
  transform: translateY(-8px);
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow: var(--shadow-red);
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.skill-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-red);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent-red);
}

.skill-icon.red,
.skill-icon.gold,
.skill-icon.blue {
  color: var(--accent-red);
  border-color: var(--border-red);
  background: rgba(220, 38, 38, 0.1);
}

.skill-group h3 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.skill-tags,
.ability-tags,
.exp-tech,
.project-tech,
.devops-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.web-tag,
.tag,
.tech-pill,
.tech-bubble,
.devops-tag,
.role-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.34rem 0.65rem;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.08);
  color: var(--text-muted);
  font-family: var(--font-code);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.web-tag.red-tag,
.web-tag.gold-tag,
.web-tag.blue-tag,
.tech-pill.red-pill,
.tech-bubble.gold-bubble,
.role-tag.blue-role,
.role-tag.gold-role {
  border-color: rgba(220, 38, 38, 0.25);
  color: var(--text-muted);
  background: rgba(220, 38, 38, 0.08);
}

/* Experience */
.experience-section {
  background:
    radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.09), transparent 26rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.84), rgba(6, 17, 31, 0.86));
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 26px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border-red), transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 1rem;
}

.timeline-line {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-red);
  border-radius: 50%;
  background: #050505;
  color: var(--accent-red);
  box-shadow: 0 0 26px rgba(220, 38, 38, 0.16);
}

.timeline-dot span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.timeline-card {
  padding: clamp(1.25rem, 2.4vw, 2rem);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  transform: translateY(-8px);
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow: var(--shadow-red);
}

.timeline-badge,
.edu-year-badge {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border-red);
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent-red);
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.exp-title {
  color: var(--text);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.25;
}

.security-tag {
  display: inline-flex;
  margin-left: 0.5rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border-red);
  border-radius: 999px;
  color: var(--accent-red);
  font-family: var(--font-code);
  font-size: 0.68rem;
  vertical-align: middle;
}

.exp-company {
  margin: 0.35rem 0 1rem;
  color: var(--text-dim);
}

.exp-company i {
  color: var(--accent-red);
  margin-right: 0.45rem;
}

.exp-desc,
.exp-list {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.exp-subtitle {
  margin: 1rem 0 0.5rem;
  color: var(--accent-red);
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exp-list {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.1rem;
  list-style: disc;
}

.exp-list li::marker {
  color: var(--accent-red);
}

/* Projects */
.projects-section {
  background-image:
    radial-gradient(circle at 10% 20%, rgba(220, 38, 38, 0.08), transparent 24rem),
    linear-gradient(rgba(220, 38, 38, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 115, 22, 0.035) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
  align-items: stretch;
}

.project-card {
  position: relative;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 1.5rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-red), transparent);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(249, 115, 22, 0.68);
  box-shadow: 0 20px 70px rgba(220, 38, 38, 0.2);
}

.project-scan-line {
  position: absolute;
  top: 0;
  left: -80%;
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-scan-line {
  opacity: 1;
  animation: scan 2.8s linear infinite;
}

@keyframes scan {
  0% { left: -80%; top: 0; }
  50% { left: 110%; top: 52%; }
  100% { left: -80%; top: 100%; }
}

.project-number {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  color: rgba(245, 245, 245, 0.05);
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
}

.project-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 1px solid var(--border-red);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent-red);
  font-size: 1.3rem;
}

.project-icon.gold-icon {
  color: var(--accent-red);
}

.project-title {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.25;
}

.project-subtitle {
  margin: 0.4rem 0 1rem;
  color: var(--accent-red);
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-desc {
  margin-bottom: 0.9rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.72;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
}

.project-action-word {
  color: rgba(245, 245, 245, 0.28);
  font-family: var(--font-code);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.project-link {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-red);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent-red);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.project-link:hover,
.project-link.gold-link:hover {
  background: var(--primary-red);
  color: var(--text);
  transform: translateY(-2px);
}

.project-link.gold-link {
  color: var(--accent-red);
  border-color: var(--border-red);
}

/* Education */
.education-section {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.84), rgba(6, 17, 31, 0.86));
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
  margin-bottom: 1.35rem;
}

.edu-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 1.5rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.edu-card:hover,
.activity-item:hover {
  transform: translateY(-8px);
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow: var(--shadow-red);
}

.edu-year-badge.blue-badge {
  color: var(--accent-red);
  background: rgba(220, 38, 38, 0.1);
}

.edu-icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 1px solid var(--border-red);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent-red);
  font-size: 1.35rem;
}

.edu-icon.blue-icon {
  color: var(--accent-red);
}

.edu-degree {
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.35;
}

.edu-spec {
  margin-top: 0.45rem;
  color: var(--text-muted);
}

.edu-decoration {
  position: absolute;
  right: 1rem;
  bottom: 0.8rem;
  color: rgba(220, 38, 38, 0.09);
  font-size: 3rem;
}

.activities-wrap,
.devops-banner {
  padding: 1.5rem;
  margin-top: 1.35rem;
}

.activities-title,
.devops-banner h3 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.activities-title i,
.devops-banner h3 i {
  color: var(--accent-red);
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  box-shadow: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.activity-item i {
  color: var(--accent-red);
  margin-top: 0.2rem;
}

.activity-item strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.activity-desc {
  display: block;
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.devops-banner {
  text-align: center;
}

.devops-banner h3 {
  justify-content: center;
}

.devops-tags {
  justify-content: center;
}

/* Contact */
.contact-section {
  background:
    radial-gradient(circle at 50% 0%, rgba(220, 38, 38, 0.12), transparent 26rem),
    linear-gradient(180deg, rgba(6, 17, 31, 0.84), rgba(2, 6, 23, 0.9));
}

.contact-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.contact-lead {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  color: var(--text);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.contact-details {
  display: grid;
  gap: 1rem;
}

.contact-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(245, 245, 245, 0.08);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.45);
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.contact-item:hover {
  transform: translateY(-4px);
  border-color: var(--border-red);
  background: rgba(220, 38, 38, 0.08);
  box-shadow: var(--shadow-red);
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-red);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent-red);
}

.contact-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--accent-red);
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-value {
  display: block;
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--bg);
  border-top: 1px solid var(--border-red);
}

.footer-web {
  height: 36px;
  opacity: 0.22;
}

.footer-web svg {
  width: 100%;
  height: 100%;
}

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2.5rem var(--container-pad);
  text-align: center;
}

.footer-logo {
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.spider-icon.large {
  width: 38px;
  height: 38px;
}

.footer-quote {
  color: var(--text-muted);
  font-style: italic;
}

.footer-copy {
  margin: 0.8rem 0 1.2rem;
  color: var(--text-dim);
  font-family: var(--font-code);
  font-size: 0.72rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem 1.6rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent-red);
}

/* Responsive */
@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .about-grid,
  .edu-grid,
  .activities-grid {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    grid-template-columns: minmax(180px, 280px) 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --container-pad: 24px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: -100%;
    width: min(340px, 100vw);
    height: calc(100svh - var(--nav-height));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    border-left: 1px solid var(--border-red);
    background: rgba(5, 5, 5, 0.97);
    transition: right var(--transition);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    padding: 1rem;
    border-bottom: 1px solid rgba(245, 245, 245, 0.08);
  }

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

  .hero-name {
    max-width: 100%;
  }

  .hero-stats {
    gap: 0.75rem;
  }

  .stat-divider {
    display: none;
  }

  .skills-grid,
  .projects-grid,
  .about-highlights {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  :root {
    --container-pad: 20px;
  }

  .hero-section {
    padding-bottom: 2.5rem;
  }

  .hero-name {
    font-size: clamp(2.45rem, 12vw, 3.4rem);
    line-height: 1;
    text-wrap: normal;
  }

  .hero-role,
  .hero-subrole {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    line-height: 1.45;
  }

  .hero-subrole {
    margin-top: 0.25rem;
  }

  .hero-eyebrow {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
  }

  .hero-quote-wrap {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
  }

  .hero-quote {
    overflow-wrap: anywhere;
  }

  .hero-stats,
  .hero-btns,
  .hero-socials {
    flex-direction: column;
  }

  .stat-item,
  .btn,
  .hero-socials a {
    width: min(100%, 320px);
  }

  .profile-panel {
    grid-template-columns: 1fr;
  }

  .profile-image-wrap,
  .profile-image {
    min-height: 360px;
  }

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

  .contact-item-icon {
    width: 44px;
    height: 44px;
  }

  .footer-logo {
    flex-direction: column;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 420px) {
  .hero-name {
    font-size: 2.4rem;
  }

  .project-card {
    min-height: auto;
  }
}

@media (max-height: 820px) and (min-width: 900px) {
  .hero-section {
    padding-top: calc(var(--nav-height) + 1rem);
    padding-bottom: 2rem;
  }

  .hero-name {
    font-size: clamp(3rem, 7vw, 5.25rem);
  }

  .hero-quote-wrap {
    margin: 1.1rem auto;
    padding: 0.95rem 1.2rem;
  }

  .stat-item {
    padding: 0.8rem 1rem;
  }

  .scroll-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
