
/* =========================================
   AHMED ELTAHER PORTFOLIO
   Main Design System
========================================= */

:root {
  --bg: #030b16;
  --bg-secondary: #061222;
  --surface: #071526;
  --surface-hover: #0a1c31;
  --border: #163451;
  --border-bright: #087cff;
  --text: #f3f7ff;
  --text-secondary: #c0cee3;
  --muted: #8198b8;
  --blue: #168bff;
  --blue-light: #40aaff;
  --cyan: #00d9ff;
  --purple: #8956ff;
  --shadow-blue: 0 0 24px rgba(0, 126, 255, 0.12);
  --container: 1160px;
  --header-height: 66px;
  --radius: 8px;
  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

body {
  position: relative;
  overflow-x: hidden;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  line-height: 1.7;
}

body,
button,
input,
textarea {
  font-family: "Cairo", sans-serif;
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 48% 20%,
      rgba(0, 86, 180, 0.08),
      transparent 48%
    ),
    linear-gradient(180deg, #030c18 0%, #020a14 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  cursor: pointer;
}

button,
input {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

::selection {
  color: white;
  background: #087cff;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.section {
  position: relative;
}

section[id] {
  scroll-margin-top: 80px;
}

/* =========================================
   BACKGROUND EFFECTS
========================================= */

.background-effects {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.1;
}

.glow-one {
  top: 130px;
  left: -220px;
  background: #007bff;
}

.glow-two {
  top: 550px;
  right: -260px;
  background: #3211bb;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(37, 117, 200, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 117, 200, 0.12) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

/* =========================================
   HEADER
========================================= */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid rgba(42, 83, 123, 0.32);
  background: rgba(3, 12, 24, 0.94);
  backdrop-filter: blur(18px);
}

.header-container {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  direction: ltr;
}

.brand-mark {
  display: inline-block;
  color: var(--blue-light);
  font-family: "Inter", sans-serif;
  font-size: 34px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -5px;
  line-height: 1;
  text-shadow: 0 0 20px rgba(0, 133, 255, 0.3);
  transform: skewX(-8deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.brand-copy strong {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 10px;
  white-space: nowrap;
}

.main-navigation {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  gap: 30px;
  direction: ltr;
}

.nav-link {
  position: relative;
  display: flex;
  height: 100%;
  align-items: center;
  color: #dbe5f5;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  transition: color var(--transition);
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue-light);
}

.nav-link.active::after,
.nav-link:hover::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 16px;
}

.language-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #dbe5f5;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  transition: color var(--transition);
}

.language-toggle:hover,
.theme-toggle:hover {
  color: var(--blue-light);
}

.theme-toggle {
  width: 24px;
  height: 30px;
  font-size: 14px;
}

.mobile-menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--blue-light);
  font-size: 16px;
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: 24px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border-color: #238dff;
  background: linear-gradient(115deg, #279cff, #1266f2);
  color: white;
  box-shadow: 0 5px 18px rgba(0, 112, 255, 0.17);
}

.button-primary:hover {
  background: linear-gradient(115deg, #40b3ff, #1680ff);
  box-shadow: 0 0 24px rgba(0, 126, 255, 0.28);
}

.button-outline {
  border-color: var(--blue);
  background: transparent;
  color: #edf6ff;
}

.button-outline:hover {
  background: rgba(0, 123, 255, 0.1);
  box-shadow: 0 0 18px rgba(0, 123, 255, 0.13);
}

.button-cv {
  min-height: 34px;
  padding: 6px 17px;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  white-space: nowrap;
}

/* =========================================
   HERO
========================================= */

.hero-section {
  padding-top: 18px;
  padding-bottom: 25px;
}

.hero-grid {
  display: grid;
  min-height: 300px;
  grid-template-columns: 0.96fr 1.04fr;
  align-items: center;
  gap: 28px;
  direction: ltr;
}

.hero-content {
  min-width: 0;
  direction: ltr;
}

.hero-greeting {
  margin-bottom: -6px;
  color: #bdcce1;
  font-family: "Inter", sans-serif;
  font-size: clamp(20px, 2.1vw, 27px);
  line-height: 1.5;
}

.hero-content h1 {
  margin-bottom: 4px;
  color: #f7f9ff;
  font-family: "Inter", sans-serif;
  font-size: clamp(35px, 4.4vw, 52px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.16;
  white-space: nowrap;
}

.gradient-text {
  color: #2495ff;
  background: linear-gradient(100deg, #168bff 0%, #50a9ff 80%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin-top: 8px;
  color: #f0f5ff;
  font-family: "Inter", sans-serif;
  font-size: clamp(12px, 1.3vw, 15px);
  font-weight: 500;
  line-height: 1.7;
}

.hero-description {
  max-width: 470px;
  margin-top: 13px;
  color: #b8c9e0;
  font-size: 12px;
  line-height: 1.95;
  direction: rtl;
  text-align: left;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 17px;
}

.hero-buttons .button {
  min-width: 135px;
}

.hero-buttons .button-primary {
  min-width: 155px;
}

.button-arrow {
  font-size: 10px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.social-link {
  display: flex;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(54, 88, 125, 0.18);
  border-radius: 50%;
  background: rgba(10, 28, 48, 0.8);
  color: #e8f2ff;
  font-size: 18px;
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--blue);
  background: rgba(0, 117, 255, 0.14);
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.17);
  transform: translateY(-3px);
}

.linkedin {
  color: #36a3ff;
}

.whatsapp {
  color: #00df98;
}

.email {
  color: #e6eeff;
}

.location {
  color: #b4d0f9;
}

.social-location {
  margin-left: 1px;
  color: #b7c8df;
  font-size: 11px;
  direction: rtl;
}

.hero-visual {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 315px;
  grid-template-columns: minmax(0, 1fr) 0.57fr;
  align-items: center;
  gap: 15px;
  direction: ltr;
}

.portrait-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 275px;
  overflow: hidden;
  border: 1.5px solid var(--blue);
  border-radius: 17px 8px 18px 16px;
  background: #101c2c;
  box-shadow:
    0 0 0 1px rgba(0, 140, 255, 0.12),
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 18px rgba(0, 125, 255, 0.12);
  clip-path: polygon(0 8%, 100% 0, 100% 100%, 13% 100%);
  transform: rotate(-3deg);
}

.hero-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transform: rotate(3deg) scale(1.08);
}

.signature-panel {
  position: relative;
  z-index: 2;
  min-width: 0;
  align-self: stretch;
  padding-top: 15px;
}

.signature-name {
  color: #dbeaff;
  font-family: "Inter", cursive;
  font-size: clamp(27px, 3vw, 40px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
  transform: rotate(-10deg);
}

.signature-tagline {
  margin-top: 22px;
  color: #91b8e9;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

.signature-tagline span {
  margin-inline: 4px;
  color: var(--blue-light);
}

.code-snippet {
  margin-top: 29px;
  color: #85b4e8;
  font-family: monospace;
  font-size: clamp(7px, 0.8vw, 9px);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.code-snippet p:nth-child(2),
.code-snippet p:nth-child(4),
.code-snippet p:nth-child(6) {
  color: #82d8cb;
}

.hero-geometric-shape {
  position: absolute;
  border: 1px solid rgba(0, 121, 255, 0.35);
  pointer-events: none;
}

.shape-one {
  right: 45%;
  bottom: 45px;
  width: 70px;
  height: 100px;
  border-right: 0;
  border-bottom: 0;
  transform: rotate(35deg);
}

.shape-two {
  top: 55%;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-right: 0;
  border-bottom: 12px solid transparent;
  border-left: 18px solid rgba(0, 121, 255, 0.35);
  background: transparent;
  transform: rotate(35deg);
}

/* =========================================
   STATISTICS
========================================= */

.stats-bar {
  display: grid;
  min-height: 68px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  margin-top: 10px;
  border: 1px solid rgba(36, 78, 122, 0.5);
  border-radius: 8px;
  background: rgba(5, 18, 33, 0.75);
}

.stat-item {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
}

.stat-item:not(:last-child)::after {
  position: absolute;
  top: 14px;
  right: 0;
  width: 1px;
  height: 30px;
  content: "";
  background: #18324e;
}

.stat-icon {
  display: flex;
  width: 29px;
  height: 29px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #42aaff, #0868f0);
  color: white;
  font-size: 15px;
  box-shadow: 0 0 14px rgba(0, 123, 255, 0.16);
}

.stat-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.5;
}

.stat-content strong {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.stat-content span {
  color: #a2b7d4;
  font-size: 9px;
  white-space: nowrap;
}

/* =========================================
   SECTION HEADINGS
========================================= */

.section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.heading-line {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 3px;
  flex-shrink: 0;
  border-radius: 4px;
  background: var(--blue);
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.7);
}

.section-heading h2 {
  color: #f2f6ff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
}

.section-description {
  margin-top: 3px;
  color: #8ea5c5;
  font-size: 10px;
  line-height: 1.8;
}

/* =========================================
   ABOUT
========================================= */

.about-section {
  padding-top: 13px;
  padding-bottom: 24px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.12fr 1.12fr 0.65fr;
  align-items: stretch;
  gap: 26px;
}

.about-content {
  min-width: 0;
}

.about-description {
  margin-top: 7px;
  color: #c2d0e4;
  font-size: 11px;
  line-height: 1.95;
  text-align: right;
}

.personal-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 12px;
  margin-top: 15px;
}

.info-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.info-icon {
  display: flex;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #102b48, #091a2c);
  color: #71baff;
  font-size: 13px;
}

.info-item > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.65;
}

.info-label {
  color: #93a9c8;
  font-size: 10px;
}

.info-item strong,
.info-item a {
  overflow-wrap: anywhere;
  color: #dfeaff;
  font-size: 10px;
  font-weight: 500;
}

.info-item a:hover {
  color: var(--blue-light);
}

.cv-download {
  min-height: 34px;
  margin-top: 16px;
  border-radius: 8px;
  padding: 6px 20px;
}

/* =========================================
   EXPERIENCE TIMELINE
========================================= */

.experience-content {
  min-width: 0;
  padding-inline-start: 22px;
  border-inline-start: 1px solid rgba(44, 84, 128, 0.42);
}

.timeline {
  position: relative;
  margin-top: 16px;
  padding-inline-start: 17px;
}

.timeline::before {
  position: absolute;
  top: 5px;
  bottom: 7px;
  left: 5px;
  width: 1px;
  content: "";
  background: linear-gradient(
    to bottom,
    #176ec4,
    rgba(38, 106, 170, 0.3)
  );
}

.timeline-item {
  position: relative;
  padding-bottom: 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  top: 5px;
  left: -22px;
  width: 10px;
  height: 10px;
  border: 1px solid #268fff;
  border-radius: 4px;
  background: #1176ff;
  box-shadow: 0 0 10px rgba(0, 117, 255, 0.35);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.timeline-header h3 {
  color: #f0f5ff;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.timeline-header > span {
  flex-shrink: 0;
  color: #89a6ca;
  font-size: 9px;
  white-space: nowrap;
}

.timeline-type {
  margin-top: 1px;
  color: #9cb5d5;
  font-family: "Inter", sans-serif;
  font-size: 10px;
}

.timeline-description {
  margin-top: 5px;
  color: #b6c7df;
  font-size: 10px;
  line-height: 1.8;
}

/* =========================================
   QUOTE CARD
========================================= */

.quote-card {
  position: relative;
  min-height: 240px;
  align-self: stretch;
  overflow: hidden;
  border: 1px solid #213f79;
  border-radius: 5px;
  background: #101b42;
}

.quote-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.quote-overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  padding: 25px 18px;
  background: linear-gradient(
    to bottom,
    rgba(8, 19, 54, 0.91) 0%,
    rgba(8, 19, 54, 0.6) 38%,
    rgba(8, 19, 54, 0.08) 100%
  );
}

.quote-card blockquote {
  color: #f1f5ff;
  font-family: "Inter", sans-serif;
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 700;
  line-height: 1.55;
}

/* =========================================
   SERVICES
========================================= */

.services-section {
  padding-top: 16px;
  padding-bottom: 16px;
  border-top: 1px solid rgba(35, 72, 108, 0.45);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.service-card {
  min-width: 0;
  min-height: 130px;
  padding: 13px 9px;
  border: 1px solid #183653;
  border-radius: 8px;
  background: linear-gradient(
    150deg,
    rgba(7, 22, 40, 0.95),
    rgba(4, 14, 27, 0.95)
  );
  text-align: center;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.service-card:hover {
  border-color: #167ce1;
  background: #091b30;
  box-shadow: 0 8px 24px rgba(0, 91, 190, 0.1);
  transform: translateY(-4px);
}

.service-icon {
  display: flex;
  width: 41px;
  height: 41px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  border-radius: 11px;
  background: rgba(0, 109, 255, 0.16);
  color: #259cff;
  font-size: 22px;
}

.icon-blue {
  color: #278eff;
  background: rgba(0, 108, 255, 0.18);
}

.icon-teal {
  color: #13e0ce;
  background: rgba(0, 210, 185, 0.13);
}

.icon-purple {
  color: #ba7aff;
  background: rgba(154, 62, 255, 0.16);
}

.icon-cyan {
  color: #34b9ff;
  background: rgba(20, 156, 255, 0.15);
}

.icon-pink {
  color: #e75bfa;
  background: rgba(199, 44, 255, 0.16);
}

.icon-gold {
  color: #ffd04d;
  background: rgba(245, 167, 0, 0.17);
}

.service-card h3 {
  margin-bottom: 6px;
  color: #eaf2ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
}

.service-card p {
  color: #9fb4d0;
  font-size: 9px;
  line-height: 1.9;
}

/* =========================================
   SKILLS
========================================= */

.skills-section {
  padding-top: 8px;
  padding-bottom: 18px;
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(17, minmax(0, 1fr));
  gap: 0;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #173450;
  border-radius: 7px;
  background: rgba(5, 18, 33, 0.8);
}

.skill-item {
  display: flex;
  min-width: 0;
  min-height: 65px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 3px;
  border-inline-start: 1px solid rgba(30, 60, 91, 0.5);
  transition: background var(--transition);
}

.skill-item:hover {
  background: rgba(16, 48, 82, 0.65);
}

.skill-item > i {
  font-size: 25px;
  line-height: 1.2;
}

.skill-item > span:last-child {
  color: #dce8f8;
  font-family: "Inter", sans-serif;
  font-size: 8px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.skill-html {
  color: #ff663e;
}

.skill-css {
  color: #3189ff;
}

.skill-js {
  color: #f7d94c;
}

.skill-ts {
  color: #3994ed;
  font-family: "Inter", sans-serif;
  font-size: 23px;
  font-weight: 800;
}

.skill-react {
  color: #42dcff;
}

.skill-next {
  display: flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid #8996ab;
  border-radius: 50%;
  color: #e6edfa;
  font-family: "Inter", sans-serif;
  font-size: 11px;
}

.skill-vue {
  color: #42bd91;
}

.skill-node {
  color: #68cb79;
}

.skill-express {
  display: flex;
  width: 29px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid #a0aabd;
  border-radius: 4px;
  color: #e2e8f5;
  font-family: "Inter", sans-serif;
  font-size: 9px;
}

.skill-mongo {
  color: #55ce91;
}

.skill-postgres {
  color: #71a6d5;
}

.skill-mysql {
  color: #56c6ec;
}

.skill-git {
  color: #ff6245;
}

.skill-github {
  color: #eaf2ff;
}

.skill-docker {
  color: #22b8ff;
}

.skill-vscode {
  display: flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  color: #43baff;
  font-size: 22px;
}

.skill-figma {
  color: #ff6485;
}

/* =========================================
   PROJECTS
========================================= */

.projects-section {
  padding-top: 3px;
  padding-bottom: 20px;
}

.projects-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.projects-all-button {
  flex-shrink: 0;
  min-height: 34px;
  padding: 7px 15px;
  font-size: 10px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 13px;
  margin-top: 10px;
}

.project-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #1c466e;
  border-radius: 6px;
  background: linear-gradient(150deg, #07182a, #04101e);
  transition:
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.project-card:hover {
  border-color: #178bff;
  box-shadow: 0 7px 22px rgba(0, 109, 255, 0.13);
  transform: translateY(-3px);
}

.project-image-link {
  position: relative;
  display: block;
  height: 74px;
  overflow: hidden;
  background: #0c2136;
}

.project-image-link::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    to top,
    rgba(2, 12, 24, 0.16),
    transparent 65%
  );
}

.project-image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image-link img {
  transform: scale(1.06);
}

.project-open {
  position: absolute;
  z-index: 1;
  right: 8px;
  bottom: 7px;
  display: flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid #298fff;
  border-radius: 50%;
  background: rgba(3, 23, 44, 0.93);
  color: #cfe6ff;
  font-size: 10px;
  transition: background var(--transition);
}

.project-card:hover .project-open {
  background: #087cff;
}

.project-info {
  padding: 7px 9px 8px;
}

.project-info h3 {
  overflow: hidden;
  color: #edf4ff;
  font-family: "Inter", sans-serif;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-info > p {
  overflow: hidden;
  color: #94accb;
  font-family: "Inter", sans-serif;
  font-size: 9px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.project-tags span {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  background: #102d4c;
  color: #b8d5f8;
  font-family: "Inter", sans-serif;
  font-size: 7px;
  line-height: 1.5;
}

/* =========================================
   CONTACT
========================================= */

.contact-section {
  padding: 15px 0;
  border-top: 1px solid rgba(35, 72, 108, 0.45);
  background: rgba(4, 14, 26, 0.65);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 0.9fr auto;
  align-items: center;
  gap: 30px;
}

.footer-brand .brand-mark {
  font-size: 35px;
}

.contact-intro > p {
  margin-top: 9px;
  color: #96b3d9;
  font-size: 10px;
}

.contact-intro > small {
  display: block;
  margin-top: 3px;
  color: #8da5c4;
  font-size: 9px;
}

.contact-details h3 {
  margin-bottom: 5px;
  color: #edf4ff;
  font-family: "Inter", sans-serif;
  font-size: 11px;
}

.contact-details > a {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
  color: #a5bedc;
  font-family: "Inter", sans-serif;
  font-size: 9px;
  overflow-wrap: anywhere;
}

.contact-details > a i {
  width: 14px;
  color: #c9e3ff;
  text-align: center;
}

.contact-details > a:hover {
  color: var(--blue-light);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.footer-socials a {
  color: #b4cbe7;
  font-size: 12px;
  transition: color var(--transition);
}

.footer-socials a:hover {
  color: var(--blue-light);
}

.contact-cta {
  display: flex;
  justify-content: flex-end;
}

.contact-cta .button {
  white-space: nowrap;
}

/* =========================================
   FOOTER
========================================= */

.site-footer {
  padding: 9px 0;
  border-top: 1px solid rgba(35, 72, 108, 0.45);
  background: rgba(3, 11, 21, 0.85);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.footer-bottom p {
  color: #8ca4c4;
  font-size: 9px;
}

.footer-bottom p:last-child {
  text-align: end;
}

/* =========================================
   BACK TO TOP
========================================= */

.back-to-top {
  position: fixed;
  z-index: 90;
  right: 20px;
  bottom: 20px;
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid #167ce1;
  border-radius: 50%;
  background: #07192c;
  color: #64b8ff;
  box-shadow: 0 0 18px rgba(0, 123, 255, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #0a3970;
}

/* =========================================
   LIGHT THEME
========================================= */

body.light-theme {
  --bg: #f1f6fc;
  --bg-secondary: #e8f0fa;
  --surface: #ffffff;
  --surface-hover: #edf5ff;
  --border: #c7d9ee;
  --text: #10233d;
  --text-secondary: #405874;
  --muted: #617a98;
  color: var(--text);
  background: #f1f6fc;
}

body.light-theme::before {
  background:
    radial-gradient(ellipse at 48% 20%, #d7eaff, transparent 48%),
    linear-gradient(180deg, #f7faff, #eaf2fb);
}

body.light-theme .site-header,
body.light-theme .contact-section,
body.light-theme .site-footer {
  background: rgba(244, 248, 255, 0.96);
}

body.light-theme .nav-link,
body.light-theme .header-actions button,
body.light-theme .theme-toggle {
  color: #19324f;
}

body.light-theme .brand-copy strong,
body.light-theme .hero-content h1,
body.light-theme .hero-subtitle,
body.light-theme .section-heading h2,
body.light-theme .service-card h3,
body.light-theme .timeline-header h3,
body.light-theme .project-info h3,
body.light-theme .stat-content strong {
  color: #112742;
}

body.light-theme .hero-greeting,
body.light-theme .hero-description,
body.light-theme .about-description,
body.light-theme .timeline-description,
body.light-theme .service-card p,
body.light-theme .section-description,
body.light-theme .info-item strong,
body.light-theme .info-item a {
  color: #435b77;
}

body.light-theme .stats-bar,
body.light-theme .service-card,
body.light-theme .skills-list,
body.light-theme .project-card {
  background: rgba(255, 255, 255, 0.85);
}

body.light-theme .stat-content span,
body.light-theme .timeline-type,
body.light-theme .timeline-header > span,
body.light-theme .project-info > p {
  color: #617895;
}

body.light-theme .button-outline {
  color: #0c5eb9;
}

body.light-theme .skill-item > span:last-child {
  color: #243c59;
}

body.light-theme .footer-bottom p,
body.light-theme .contact-intro > p,
body.light-theme .contact-intro > small,
body.light-theme .contact-details > a {
  color: #536c89;
}

/* =========================================
   ENGLISH LANGUAGE DIRECTION
========================================= */

body.english-mode {
  direction: ltr;
  font-family: "Inter", sans-serif;
}

body.english-mode .about-description,
body.english-mode .hero-description {
  direction: ltr;
  text-align: left;
}

body.english-mode .personal-info {
  direction: ltr;
}

body.english-mode .info-item > div {
  text-align: left;
}

body.english-mode .timeline {
  direction: ltr;
}

body.english-mode .experience-content {
  border-inline-start: 1px solid rgba(44, 84, 128, 0.42);
}

body.english-mode .timeline-marker {
  left: -22px;
  right: auto;
}

body.english-mode .timeline::before {
  left: 5px;
  right: auto;
}

body.english-mode .section-heading {
  direction: ltr;
}

/* =========================================
   RESPONSIVE: LAPTOP
========================================= */

@media (max-width: 1100px) {
  :root {
    --container: 100%;
  }

  .container {
    width: calc(100% - 48px);
  }

  .main-navigation {
    gap: 18px;
  }

  .header-container {
    gap: 14px;
  }

  .header-actions {
    gap: 11px;
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .quote-card {
    display: none;
  }

  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .skills-list {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* =========================================
   RESPONSIVE: TABLET
========================================= */

@media (max-width: 760px) {
  :root {
    --header-height: 62px;
  }

  .container {
    width: calc(100% - 32px);
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    font-size: 29px;
  }

  .brand-copy strong {
    font-size: 11px;
  }

  .brand-copy small {
    font-size: 9px;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 3;
  }

  .main-navigation {
    position: absolute;
    top: calc(100% + 1px);
    right: 16px;
    left: 16px;
    display: flex;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #061426;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
  }

  .main-navigation.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
  }

  .nav-link:hover,
  .nav-link.active {
    background: rgba(0, 126, 255, 0.08);
  }

  .nav-link::after {
    display: none;
  }

  .header-actions {
    margin-left: auto;
    gap: 12px;
  }

  .button-cv {
    display: none;
  }

  .hero-section {
    padding-top: 24px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-content {
    order: 2;
  }

  .hero-visual {
    order: 1;
    width: min(100%, 480px);
    min-height: 285px;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr) 0.58fr;
  }

  .portrait-frame {
    height: 265px;
  }

  .hero-content h1 {
    font-size: clamp(36px, 8vw, 48px);
    white-space: normal;
  }

  .hero-description {
    max-width: 100%;
    font-size: 13px;
    text-align: right;
  }

  .hero-subtitle {
    font-size: 13px;
  }

  .hero-buttons {
    gap: 10px;
  }

  .social-links {
    gap: 10px;
  }

  .stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 25px;
  }

  .stat-item:nth-child(2)::after {
    display: none;
  }

  .stat-item:nth-child(-n + 2) {
    border-bottom: 1px solid #18324e;
  }

  .stat-item {
    min-height: 65px;
  }

  .about-section {
    padding-top: 18px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .experience-content {
    padding-inline-start: 0;
    border-inline-start: 0;
  }

  .timeline {
    margin-inline-start: 4px;
  }

  .quote-card {
    display: block;
    min-height: 250px;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .service-card {
    min-height: 140px;
    padding: 15px 12px;
  }

  .skills-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .skill-item {
    min-height: 72px;
  }

  .projects-heading-row {
    align-items: flex-start;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .project-image-link {
    height: clamp(90px, 22vw, 145px);
  }

  .project-info {
    padding: 9px;
  }

  .project-info h3 {
    font-size: 11px;
  }

  .project-info > p {
    font-size: 10px;
  }

  .project-tags span {
    font-size: 8px;
  }

  .contact-container {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }

  .contact-cta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .footer-bottom p:last-child {
    text-align: start;
  }
}

/* =========================================
   RESPONSIVE: SMALL MOBILE
========================================= */

@media (max-width: 420px) {
  .container {
    width: calc(100% - 26px);
  }

  .header-container {
    gap: 8px;
  }

  .brand-copy small {
    font-size: 8px;
  }

  .header-actions {
    gap: 9px;
  }

  .language-toggle {
    gap: 4px;
  }

  .hero-visual {
    min-height: 230px;
    gap: 10px;
  }

  .portrait-frame {
    height: 220px;
  }

  .signature-panel {
    padding-top: 16px;
  }

  .signature-name {
    font-size: 26px;
  }

  .signature-tagline {
    margin-top: 15px;
    font-size: 8px;
  }

  .code-snippet {
    margin-top: 19px;
    font-size: 6px;
  }

  .hero-greeting {
    font-size: 21px;
  }

  .hero-content h1 {
    font-size: 35px;
    letter-spacing: -1.5px;
  }

  .hero-subtitle {
    font-size: 11px;
  }

  .hero-description {
    font-size: 11px;
  }

  .hero-buttons .button {
    min-width: 0;
    padding-inline: 14px;
    font-size: 10px;
  }

  .social-links {
    gap: 8px;
  }

  .social-link {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .stat-item {
    gap: 8px;
    padding: 8px 5px;
  }

  .stat-content strong {
    font-size: 14px;
  }

  .stat-content span {
    font-size: 8px;
  }

  .stat-icon {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .personal-info {
    gap: 13px 8px;
  }

  .info-icon {
    width: 30px;
    height: 30px;
  }

  .info-item strong,
  .info-item a {
    font-size: 9px;
  }

  .section-heading h2 {
    font-size: 15px;
  }

  .section-description {
    font-size: 9px;
  }

  .service-card {
    min-height: 135px;
    padding: 12px 7px;
  }

  .service-card h3 {
    font-size: 10px;
  }

  .service-card p {
    font-size: 9px;
  }

  .skills-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .projects-heading-row {
    flex-direction: column;
    gap: 10px;
  }

  .projects-grid {
    gap: 9px;
  }

  .project-image-link {
    height: 82px;
  }

  .project-info h3 {
    font-size: 9px;
  }

  .project-info > p {
    font-size: 8px;
  }

  .project-tags span {
    padding-inline: 5px;
    font-size: 7px;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .contact-cta {
    grid-column: auto;
  }
}

/* =========================================
   ACCESSIBILITY & MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
