/* ==========================================================================
   MOHAMED OSAMA — PREMIUM PERSONAL BRAND PORTFOLIO
   Core Design System, Master Variables, Grid & Component Imports
   ========================================================================== */

/* Google Fonts Import: Manrope (Sans) & JetBrains Mono (Tech Mono) */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* --- Modular Component Stylesheets --- */
@import url('./components/cursor.css');
@import url('./components/navbar.css');
@import url('./components/hero.css');
@import url('./components/identity.css');
@import url('./components/expertise.css');
@import url('./components/statement.css');
@import url('./components/experience.css');
@import url('./components/projects.css');
@import url('./components/certifications.css');
@import url('./components/contact.css');
@import url('./components/modal.css');
@import url('./components/footer.css');

/* --- CSS Root Variables (Strict Two-Color System) --- */
:root {
  /* Core Brand Colors */
  --bg-primary: #1A1917;         /* Warm Black */
  --accent-primary: #D8D2C5;     /* Soft Beige */

  /* Neutral Derived Variations */
  --text-primary: #D8D2C5;
  --text-secondary: rgba(216, 210, 197, 0.72);
  --text-muted: rgba(216, 210, 197, 0.44);
  --text-dim: rgba(216, 210, 197, 0.24);

  --surface-base: rgba(216, 210, 197, 0.02);
  --surface-subtle: rgba(216, 210, 197, 0.04);
  --surface-card: rgba(216, 210, 197, 0.06);
  --surface-hover: rgba(216, 210, 197, 0.10);
  --surface-elevated: #232220;

  /* Hairline Structural Lines */
  --border-subtle: rgba(216, 210, 197, 0.10);
  --border-medium: rgba(216, 210, 197, 0.22);
  --border-strong: rgba(216, 210, 197, 0.45);
  --border-focus: #D8D2C5;

  /* Inverted Theme Surfaces */
  --inv-bg: #D8D2C5;
  --inv-text: #1A1917;
  --inv-text-muted: rgba(26, 25, 23, 0.65);
  --inv-border: rgba(26, 25, 23, 0.15);

  /* Typography Stacks */
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, Menlo, Monaco, monospace;

  /* Layout & Grid Metrics */
  --max-width: 1440px;
  --gutter-desktop: clamp(2rem, 5vw, 6rem);
  --gutter-mobile: 1.25rem;
  --header-height: 84px;

  /* Transition Curves */
  --ease-precise: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 600ms;

  /* Z-Indices */
  --z-base: 1;
  --z-nav: 100;
  --z-menu: 200;
  --z-modal: 300;
  --z-cursor: 999;
}

/* --- Global Reset & Box Model --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

::selection {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
}

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

button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-precise), opacity var(--duration-fast) var(--ease-precise);
}

ul, ol {
  list-style: none;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* --- Container & 12-Column Responsive Swiss Grid --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter-desktop);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: 2rem;
}

/* --- Typography & Headings System --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}

.display-title {
  font-size: clamp(2.8rem, 6.5vw, 6.5rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.lead-text {
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-secondary);
}

.body-text {
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
}

/* Monospace & Technical Meta Details */
.font-mono {
  font-family: var(--font-mono);
}

.tech-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tech-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--accent-primary);
}

.tech-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-tag::after {
  content: "";
  height: 1px;
  width: 48px;
  background-color: var(--border-medium);
}

/* --- Section Structural Layouts --- */
.section-wrapper {
  position: relative;
  padding-block: clamp(5rem, 9vw, 9.5rem);
  border-bottom: 1px solid var(--border-subtle);
}

.section-wrapper--tight {
  padding-block: clamp(3.5rem, 6vw, 6rem);
}

/* Asymmetric Editorial Header Structure */
.editorial-header {
  margin-bottom: clamp(3rem, 5vw, 5.5rem);
  position: relative;
}

.editorial-header .header-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(1rem, 2vw, 2rem);
  align-items: end;
}

.editorial-header .tag-col {
  grid-column: 1 / 4;
}

.editorial-header .title-col {
  grid-column: 4 / 10;
}

.editorial-header .meta-col {
  grid-column: 10 / 13;
  text-align: right;
}

/* Utility Classes */
.text-accent { color: var(--accent-primary); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.bg-subtle { background-color: var(--surface-card); }
.border-box { border: 1px solid var(--border-subtle); }
.nowrap { white-space: nowrap; }

/* Animations & Motion */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn var(--duration-normal) var(--ease-precise) forwards;
}

.animate-slide-up {
  animation: slideUp var(--duration-slow) var(--ease-precise) forwards;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-precise), transform var(--duration-slow) var(--ease-precise);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Media Query: Tablet (768px - 1023px) */
@media (max-width: 1023px) {
  :root {
    --header-height: 74px;
  }
  .editorial-header .tag-col {
    grid-column: 1 / 13;
    margin-bottom: 0.75rem;
  }
  .editorial-header .title-col {
    grid-column: 1 / 13;
    margin-bottom: 1rem;
  }
  .editorial-header .meta-col {
    grid-column: 1 / 13;
    text-align: left;
  }
}

/* Media Query: Mobile (< 768px) */
@media (max-width: 767px) {
  :root {
    --gutter-desktop: 1.25rem;
    --header-height: 68px;
  }

  .grid-12 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .section-wrapper {
    padding-block: 4rem;
  }
}
