/* ==========================================================================
   gdhami.net — landing / "coming soon"
   Khaled Gadhami · CV & language certifications
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Both schemes are handled below. Declaring them keeps the browser from
     auto-darkening the light palette, and keeps scrollbars in step. */
  color-scheme: dark light;

  /* Palette — dark is the default look */
  --bg:            #0a0e17;
  --bg-glow-a:     rgba(212, 175, 106, 0.16);
  --bg-glow-b:     rgba(64, 110, 190, 0.18);

  --ink:           #e9edf6;
  --ink-muted:     #98a4bb;
  --ink-faint:     #7a86a0;

  --accent:        #d4af6a;
  --accent-soft:   rgba(212, 175, 106, 0.13);

  --surface:       rgba(255, 255, 255, 0.028);
  --surface-hover: rgba(255, 255, 255, 0.055);
  --line:          rgba(255, 255, 255, 0.09);
  --line-strong:   rgba(255, 255, 255, 0.16);

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Rhythm */
  --measure: 60ch;
  --radius:  14px;
  --gutter:  clamp(1.25rem, 5vw, 3.5rem);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:            #f7f6f3;
    --bg-glow-a:     rgba(196, 152, 66, 0.20);
    --bg-glow-b:     rgba(64, 110, 190, 0.14);

    --ink:           #151a23;
    --ink-muted:     #545f77;
    --ink-faint:     #666f83;

    --accent:        #8f6a1f;
    --accent-soft:   rgba(143, 106, 31, 0.10);

    --surface:       rgba(255, 255, 255, 0.72);
    --surface-hover: rgba(255, 255, 255, 0.95);
    --line:          rgba(16, 20, 28, 0.10);
    --line-strong:   rgba(16, 20, 28, 0.20);
  }
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(0.98rem, 0.93rem + 0.25vw, 1.06rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. Ambient background
   -------------------------------------------------------------------------- */

.aurora {
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42vw 42vw at 22% 18%, var(--bg-glow-a), transparent 68%),
    radial-gradient(46vw 46vw at 82% 78%, var(--bg-glow-b), transparent 66%);
  filter: blur(18px);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

/* --------------------------------------------------------------------------
   4. Page shell
   -------------------------------------------------------------------------- */

.shell {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 6vh, 4rem);
  min-height: 100svh;
  max-width: 62rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vh, 2.75rem) var(--gutter) clamp(1.5rem, 4vh, 2.5rem);
}

/* --- Masthead ------------------------------------------------------------ */

.masthead {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.monogram {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.monogram:hover { border-color: var(--accent); background-color: var(--accent-soft); }

.domain {
  color: var(--ink-faint);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --- Stage --------------------------------------------------------------- */

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.35rem;
  padding-block: clamp(1rem, 4vh, 2.5rem);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.34rem 0.85rem 0.34rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status__dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background-color: currentColor;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 var(--accent-soft); }
  50%      { opacity: 0.5; box-shadow: 0 0 0 0.35rem transparent; }
}

.name {
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.6rem + 5vw, 5rem);
  font-weight: 400;
  font-variation-settings: "opsz" 96;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.lede {
  max-width: var(--measure);
  color: var(--ink-muted);
  font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.18rem);
  text-wrap: pretty;
}

/* --- Progress hint ------------------------------------------------------- */

.progress {
  position: relative;
  width: min(100%, 22rem);
  height: 3px;
  margin-block: 0.35rem;
  border-radius: 999px;
  background-color: var(--line-strong);
  overflow: hidden;
}

.progress__bar {
  position: absolute;
  inset-block: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: sweep 3.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes sweep {
  from { transform: translateX(-110%); }
  to   { transform: translateX(285%); }
}

/* --- Cards --------------------------------------------------------------- */

.cards {
  display: grid;
  gap: 0.9rem;
  width: 100%;
  margin-top: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.card:hover {
  border-color: var(--line-strong);
  background-color: var(--surface-hover);
  transform: translateY(-2px);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  font-variation-settings: "opsz" 24;
  letter-spacing: -0.008em;
}

.card__text {
  margin-top: 0.3rem;
  margin-bottom: 0.9rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* `margin-top: auto` pins the meta row to the card floor, so the rules
   line up across cards even when the descriptions differ in length. */
.card__meta {
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* --- Links --------------------------------------------------------------- */

.link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, opacity 0.25s ease;
}

.link:hover { border-bottom-color: currentColor; }

/* --- Footer -------------------------------------------------------------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.82rem;
}

.footer__nav {
  display: flex;
  gap: 1.4rem;
}

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

/* --------------------------------------------------------------------------
   5. Preferences
   -------------------------------------------------------------------------- */

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

  .progress__bar {
    width: 38%;
    transform: none;
  }
}
