/* ==========================================================================
   1. FONTS LOADING (LOCAL @FONT-FACE)
   ========================================================================== */

@font-face {
  font-family: "Work Sans";
  src: url("./Fonts/WorkSans-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("./Fonts/WorkSans-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./Fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./Fonts/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   2. CUSTOM VARIABLES & THEME SYSTEM (LIGHT/DARK DESIGN TOKENS)
   ========================================================================== */

:root {
  /* Hex Palette Colors */
  --rich-black: #050C18;
  --yinmn-blue: #294E90;
  --chefchaouen-blue: #3C91ED;
  --maya-blue: #7EBDE9;
  --white-smoke: #F3F3F3;

  /* Theme Tokens - Light Mode (Default) */
  --background: var(--white-smoke);
  --foreground: var(--rich-black);
  
  --card: #FFFFFF;
  --card-foreground: var(--rich-black);
  --popover: #FFFFFF;
  --popover-foreground: var(--rich-black);
  
  --surface: #FFFFFF;
  --surface-2: #E8ECEF;
  --surface-3: #DDE2E6;
  
  --border: rgba(5, 12, 24, 0.12);
  --border-strong: rgba(5, 12, 24, 0.25);
  --input: rgba(5, 12, 24, 0.12);
  
  --muted: #4B5563; /* High contrast dark gray for accessible body */
  --muted-foreground: #6B7280;
  
  --primary: var(--yinmn-blue); /* Strong Blue for buttons, technical highlights */
  --primary-foreground: var(--white-smoke);
  --secondary: var(--chefchaouen-blue);
  --secondary-foreground: #FFFFFF;
  
  --accent: var(--chefchaouen-blue);
  --accent-foreground: #FFFFFF;
  --accent-soft: var(--maya-blue);
  
  --ring: var(--yinmn-blue);
  --radius: 0.375rem;
  
  /* Transitions Mapping */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-micro: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Fonts System */
  --font-sans: "Work Sans", ui-sans-serif, sans-serif, system-ui;
  --font-serif: "Inter", ui-serif, serif, system-ui;
  --font-mono: "Inter", ui-monospace, monospace;
  
  /* Shadows System */
  --shadow-2xs: 0 1px 2px rgba(5, 12, 24, 0.05);
  --shadow-xs: 0 2px 4px rgba(5, 12, 24, 0.05);
  --shadow-sm: 0 4px 8px rgba(5, 12, 24, 0.06);
  --shadow: 0 10px 25px -10px rgba(5, 12, 24, 0.1);
  --shadow-md: 0 12px 30px -10px rgba(5, 12, 24, 0.12);
  --shadow-lg: 0 20px 40px -15px rgba(5, 12, 24, 0.15);
  --shadow-xl: 0 25px 50px -20px rgba(5, 12, 24, 0.2);
  --shadow-2xl: 0 35px 60px -25px rgba(5, 12, 24, 0.25);
  
  --spacing: 0.25rem;
}

.dark {
  /* Theme Tokens - Dark Mode */
  --background: var(--rich-black);
  --foreground: var(--white-smoke);
  
  --card: #0D1525;
  --card-foreground: var(--white-smoke);
  --popover: #0D1525;
  --popover-foreground: var(--white-smoke);
  
  --surface: #0D1525;
  --surface-2: #162032;
  --surface-3: #222D42;
  
  --border: rgba(243, 243, 243, 0.12);
  --border-strong: rgba(243, 243, 243, 0.25);
  --input: rgba(243, 243, 243, 0.15);
  
  --muted: #A0AEC0; /* Slate silver body for high contrast on black */
  --muted-foreground: #718096;
  
  --primary: var(--chefchaouen-blue); /* Vibrant Blue on Dark */
  --primary-foreground: var(--rich-black);
  --secondary: var(--yinmn-blue);
  --secondary-foreground: var(--white-smoke);
  
  --accent: var(--maya-blue); /* Ice blue accent for highlights on black */
  --accent-foreground: var(--rich-black);
  --accent-soft: var(--chefchaouen-blue);
  
  --ring: var(--maya-blue);
  
  --shadow-2xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-xs: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 16px 36px -12px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 24px 48px -18px rgba(0, 0, 0, 0.75);
  --shadow-xl: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  --shadow-2xl: 0 40px 80px -25px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   4. RESET & MODERN BASELINE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-serif); /* Inter for robust technical specs */
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.22s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 4px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.primary-link:focus-visible,
.secondary-link:focus-visible,
.feature-link:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}


/* Custom technical scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background-color: var(--background);
}
::-webkit-scrollbar-thumb {
  background-color: var(--border-strong);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent);
}

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

/* ==========================================================================
   5. BASE TYPOGRAPHY (SANS & SERIF SEMANTIC RULES)
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--foreground);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.8rem, 8vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.3rem); }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--muted);
  font-size: clamp(0.92rem, 1.2vw, 1rem);
  line-height: 1.7;
}

.eyebrow {
  font-family: var(--font-sans);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: inline-block;
}

/* ==========================================================================
   6. HEADER, BRAND & NAV COMPONENTS
   ========================================================================== */

.site-header {
  width: min(1280px, 100% - 3rem);
  margin: 0 auto;
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.brand {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  line-height: 1;
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.brand::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition-smooth);
}

.brand:hover::after {
  width: 100%;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  font-family: var(--font-sans);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
  transition: var(--transition-micro);
  text-decoration: none;
}

.nav a:hover, 
.nav a.active {
  color: var(--foreground);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--accent);
  transition: var(--transition-smooth);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem 0;
  }
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
  }
}

/* ==========================================================================
   7. HERO, PAGE HERO & TECHNICAL METRICS
   ========================================================================== */

.hero {
  padding: clamp(3.5rem, 9vw, 7.5rem) 0 3rem;
  max-width: 900px;
}

.hero h1 {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-text {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 65ch;
}

.hero-actions,
.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

.page-hero {
  padding: clamp(3rem, 7vw, 5.5rem) 0 2.25rem;
  max-width: 900px;
}

.page-hero h1 {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.page-hero p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 72ch;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 5rem;
}

.metrics article {
  padding: 1.75rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.25s ease;
}

.metrics article:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.metrics span {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
}

.metrics strong {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.4;
}

@media (max-width: 868px) {
  .metrics {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Active status indicator */
.status-beacon {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  background-color: rgba(60, 145, 237, 0.08);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(60, 145, 237, 0.2);
  width: fit-content;
  margin-bottom: 0.5rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  border-radius: 50%;
  animation: status-pulse 2s infinite ease-in-out;
}

@keyframes status-pulse {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}

/* ==========================================================================
   8. SECTION, GRID & CARDS SYSTEMS
   ========================================================================== */

.section {
  margin-top: 5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--border);
}

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

.section-heading h2 {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

/* Project Grids and Cards */
.project-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.75rem;
}

.project-grid .project-card:first-child {
  grid-column: span 2;
  min-height: 260px;
}

.project-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.project-card::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  z-index: 10;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-smooth);
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  background-color: var(--surface-2);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card .project-type {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.project-card h3 {
  margin-bottom: 0.85rem;
  font-size: 1.45rem;
}

.project-card p {
  font-size: 0.95rem;
  line-height: 1.625;
  margin-bottom: 1.75rem;
}

.project-card .text-link,
.gallery-card .text-link {
  margin-top: auto;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--foreground);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-card:hover .text-link,
.gallery-card:hover .text-link {
  color: var(--accent);
}

/* Gallery Grids and Cards (CAD / 3D Layout) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition-smooth);
}

.gallery-card::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--accent);
  z-index: 10;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.gallery-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  background-color: var(--surface-2);
}

.gallery-card:hover::before {
  width: 100%;
}

.gallery-card h3 {
  font-size: 1.2rem;
  margin: 0.85rem 0 0.5rem;
}

.gallery-card p {
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* Media placeholder block for renders */
.media-placeholder {
  min-height: 240px;
  background-color: var(--surface-2);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: border-color 0.22s ease, background-color 0.22s ease;
}

.media-placeholder.compact {
  min-height: 180px;
  margin: 0 0 1.25rem;
}

.media-placeholder:hover {
  border-color: var(--accent);
  background-color: var(--surface-3);
  color: var(--foreground);
}

@media (max-width: 900px) {
  .project-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .project-grid .project-card:first-child {
    grid-column: auto;
  }
}

/* ==========================================================================
   9. SPLIT SECTIONS, COMPONENT BLOCKS & LINKS
   ========================================================================== */

.split-section {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: center;
}

.feature-link {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 160px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.feature-link::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--accent);
  z-index: 10;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-link:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  background-color: var(--surface-2);
}

.feature-link:hover::before {
  width: 100%;
}

.feature-link span {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

.feature-link strong {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--foreground);
  line-height: 1.3;
}

.content-block {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}

.content-block h2 {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

.content-block p + p {
  margin-top: 1.15rem;
}

/* Link Actions (Primary and Secondary Accent Buttons) */
.primary-link, 
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.6rem;
  min-height: 42px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.2s ease, 
              border-color 0.2s ease, 
              color 0.2s ease;
  text-decoration: none;
}

.primary-link {
  background-color: var(--primary); /* YinMn Blue on Light, Chefchaouen Blue on Dark */
  color: var(--primary-foreground);
  border: 1px solid var(--primary);
}

.primary-link:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.secondary-link {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border-strong);
}

.secondary-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .split-section {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .feature-link {
    min-height: auto;
    padding: 1.75rem;
  }
}

/* ==========================================================================
   10. DETAILED ENGINEERING LAYOUT (STICKY PANELS & SPECS)
   ========================================================================== */

.project-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.project-panel {
  position: sticky;
  top: 2.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.project-panel .panel-title {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: block;
}

.facts-list div {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.facts-list div:first-child {
  border-top: none;
  padding-top: 0;
}

.facts-list dt {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
}

.facts-list dd {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--foreground);
  margin-top: 0.35rem;
  font-weight: 600;
}

.clean-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.clean-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.clean-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}

@media (max-width: 900px) {
  .project-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .project-panel {
    position: static;
  }
}

/* ==========================================================================
   11. ABOUT ME & CURRICULUM LAYOUT
   ========================================================================== */

.about-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 2.75rem;
  align-items: start;
  padding-bottom: 5rem;
}

.profile-card {
  position: sticky;
  top: 2.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.profile-mark {
  aspect-ratio: 1;
  width: 80px;
  margin-bottom: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background-color: var(--yinmn-blue);
  color: var(--white-smoke);
  font-family: var(--font-sans);
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.profile-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.profile-card p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.profile-links {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.profile-links a,
.profile-links span {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  display: block;
}

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

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.info-grid article {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface-2);
}

.info-grid span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
}

.info-grid strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--foreground);
  font-size: 0.95rem;
  line-height: 1.4;
}

.skill-groups,
.course-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.skill-group,
.course-group {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface-2);
}

.skill-group h3,
.course-group h3 {
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.clean-list.compact {
  gap: 0.5rem;
}

.clean-list.compact li {
  font-size: 0.88rem;
}

/* Timeline of experiences */
.timeline {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.timeline article {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface);
  box-shadow: var(--shadow);
}

.timeline article.featured {
  border-color: var(--accent);
  background-color: var(--surface-2);
}

.timeline span {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
}

.timeline h3 {
  font-size: 1.2rem;
  margin: 0.5rem 0 0.25rem;
}

.timeline-meta {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.timeline article p + ul {
  margin-top: 1rem;
}

/* Courses & Certificates list details */
details.course-details {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface-2);
}

details.course-details summary {
  padding: 1.25rem;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  outline: none;
}

details.course-details .course-columns {
  padding: 0 1.25rem 1.25rem;
  columns: 2;
  column-gap: 2rem;
  list-style: none;
}

details.course-details li {
  break-inside: avoid;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  position: relative;
  padding-left: 1rem;
}

details.course-details li::before {
  content: "▪";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Languages technical chips */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin-top: 1.25rem;
}

.tag-list li {
  border: 1px solid var(--border);
  border-radius: 9999px;
  background-color: var(--surface-2);
  color: var(--foreground);
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .profile-card {
    position: static;
  }
  .info-grid,
  .skill-groups,
  .course-groups {
    grid-template-columns: 1fr;
  }
  details.course-details .course-columns {
    columns: 1;
  }
}

/* ==========================================================================
   12. 3D STORE HERO & ORDER FORM COMPONENTS
   ========================================================================== */

.store-hero {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2.25rem;
  margin-bottom: 3.5rem;
  box-shadow: var(--shadow);
  max-width: 100%;
}

.store-hero h1 {
  margin-bottom: 1rem;
}

.order-form {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 600px;
  margin: 3.5rem auto 0;
}

.order-form h3 {
  font-size: 1.45rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

.order-form fieldset {
  border: none;
}

.order-form label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  margin-bottom: 0.45rem;
}

.order-form input,
.order-form select,
.order-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease;
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(60, 145, 237, 0.15);
}

.order-form .primary-link {
  width: 100%;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   13. FOOTER
   ========================================================================== */

.footer {
  margin-top: 6rem;
  padding: 2.25rem 0 3.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

.footer-link {
  margin-left: 1.5rem;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .footer {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }
  .footer-link {
    display: inline-block;
    margin: 0 0.75rem;
  }
}

/* ==========================================================================
   14. CAD CHECKLIST & TECHNICAL DOCUMENTATION
   ========================================================================== */

.cad-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.cad-checklist article {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--surface-2);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.cad-checklist article::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--accent);
  z-index: 10;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cad-checklist article:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  background-color: var(--surface-3);
}

.cad-checklist article:hover::before {
  width: 100%;
}

.cad-checklist h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--foreground);
}

.cad-checklist p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

@media (max-width: 768px) {
  .cad-checklist {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ==========================================================================
   15. PROJECT CASE STUDY SUBPAGES
   ========================================================================== */

.project-main {
  width: min(1280px, 100% - 3rem);
  margin: 0 auto;
  padding-bottom: 5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
  transform: translateX(-4px);
}

.project-hero {
  padding: 2.5rem 0 2rem;
  max-width: 900px;
}

.project-hero h1 {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.project-hero p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 72ch;
}