/* ============================================================
   adimaaita.com — custom styles
   Tailwind handles 95% of styling via utilities; this file
   defines component-style classes, the reveal-on-scroll
   animation, and a few decorative backgrounds.
   ============================================================ */

:root {
  --ink: #1a1a1a;
  --ink-pure: #000000;
  --royal: #0D47A1;
  --royal-2: #1565C0;
  --cyan: #00BCD4;
  --cyan-2: #26C6DA;
  --mist: #F5F5F5;
  --line: #E0E0E0;
}

html {
  scroll-behavior: smooth;
  /* offset for fixed header when jumping to anchors */
  scroll-padding-top: 4rem;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ───────── Navigation ───────── */
.nav-link {
  position: relative;
  color: rgba(255,255,255,0.85);
  transition: color 200ms ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--cyan);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 250ms ease;
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.mobile-link {
  display: block;
  padding: 0.75rem 0.25rem;
  color: rgba(255,255,255,0.9);
  border-radius: 0.375rem;
  transition: background-color 200ms ease, color 200ms ease;
}
.mobile-link:hover,
.mobile-link:focus-visible {
  background: rgba(255,255,255,0.06);
  color: var(--cyan);
}

/* Add subtle shadow under the nav when the page is scrolled */
#site-header.is-scrolled {
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}

/* ───────── Buttons ───────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;
  background: var(--royal);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.btn-primary:hover {
  background: var(--royal-2);
  box-shadow: 0 8px 24px rgba(13, 71, 161, 0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;
  background: transparent;
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.25);
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}
.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0,188,212,0.06);
}
.btn-ghost:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ───────── Hero decoration ───────── */
.hero-bg {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(13,71,161,0.55), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(0,188,212,0.25), transparent 60%),
    linear-gradient(180deg, #000 0%, #0a0a0a 100%);
}
.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 75%);
}

/* Slow bounce for scroll cue */
@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}
.animate-bounce-slow { animation: bounce-slow 2s ease-in-out infinite; }

/* ───────── Hero portrait ─────────
   Bare image, no frame. A soft radial mask fades the edges into
   the hero's dark background so the photo doesn't read as a box. */
.hero-portrait-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.hero-portrait {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 100% 95% at 50% 45%, #000 55%, transparent 95%);
          mask-image: radial-gradient(ellipse 100% 95% at 50% 45%, #000 55%, transparent 95%);
  filter: contrast(1.04);
  transition: transform 600ms cubic-bezier(0.2,0.7,0.2,1);
}
.hero-portrait-wrap:hover .hero-portrait {
  transform: translateY(-3px);
}

@media (max-width: 1023px) {
  .hero-portrait-wrap {
    max-width: 280px;
    margin-bottom: 1rem;
  }
}

/* ───────── Metric cards (About) ───────── */
.metric-card {
  position: relative;
  padding: 1.25rem 1.25rem 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}
.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  border-color: rgba(13,71,161,0.25);
}
.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(13,71,161,0.08);
  color: var(--royal);
  margin-bottom: 0.85rem;
}
.metric-icon svg { width: 1.25rem; height: 1.25rem; }
.metric-value {
  font-size: 1.875rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.metric-label {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(26,26,26,0.65);
}

/* ───────── Footer ───────── */
.footer-link {
  color: rgba(255,255,255,0.70);
  transition: color 180ms ease;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--cyan);
}

/* ───────── Reveal on scroll ───────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease, transform 700ms ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ───────── Focus visibility (global fallback) ───────── */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================================
   PHASE 2 — Timeline, Expertise grid, Project cards
   ============================================================ */

/* ───────── Timeline (Experience) ───────── */
.timeline {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 1.25rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(13,71,161,0.15) 0%, rgba(13,71,161,0.35) 50%, rgba(13,71,161,0.15) 100%);
  border-radius: 9999px;
}
.timeline-item {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 2rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--royal);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px #F5F5F5, 0 4px 12px rgba(13,71,161,0.25);
  z-index: 1;
}
.timeline-marker svg { width: 1.1rem; height: 1.1rem; }

.timeline-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  padding: 1.25rem 1.5rem 1.4rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 250ms ease, transform 250ms ease, border-color 250ms ease;
}
.timeline-card:hover {
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  border-color: rgba(13,71,161,0.25);
  transform: translateY(-2px);
}
.timeline-date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--royal);
}
.timeline-role {
  margin-top: 0.4rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.3;
}
.timeline-company {
  margin-top: 0.2rem;
  font-size: 0.9rem;
  color: rgba(26,26,26,0.65);
}
.timeline-highlights {
  margin-top: 0.85rem;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.timeline-highlights li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(26,26,26,0.78);
}
.timeline-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--cyan);
}

/* Alternating layout on md+ */
@media (min-width: 768px) {
  .timeline::before { left: 50%; transform: translateX(-50%); }

  .timeline-item {
    width: 50%;
    padding-left: 0;
    padding-right: 3rem;
    margin-bottom: 2.5rem;
  }
  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 3rem;
  }

  .timeline-item:nth-child(odd) .timeline-marker {
    left: auto;
    right: -1.25rem;
  }
  .timeline-item:nth-child(even) .timeline-marker {
    left: -1.25rem;
  }
}

/* ───────── Expertise grid ───────── */
.expertise-card {
  position: relative;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.75rem 1.75rem 1.85rem;
  transition: box-shadow 280ms ease, transform 280ms ease, border-color 280ms ease, background 280ms ease;
}
.expertise-card:hover {
  background: #fff;
  border-color: rgba(13,71,161,0.25);
  box-shadow: 0 14px 36px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}
.expertise-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, var(--royal) 0%, var(--royal-2) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(13,71,161,0.28);
  margin-bottom: 1.1rem;
}
.expertise-icon svg { width: 1.4rem; height: 1.4rem; }
.expertise-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.25;
}
.expertise-blurb {
  margin-top: 0.45rem;
  font-size: 0.92rem;
  color: rgba(26,26,26,0.65);
  line-height: 1.55;
}
.expertise-skills {
  margin-top: 1rem;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.expertise-skills li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(26,26,26,0.78);
}
.expertise-skills li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--cyan);
}

/* ───────── Project cards ───────── */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.5rem 1.5rem 1.6rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 280ms ease, transform 280ms ease, border-color 280ms ease;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--royal), var(--cyan-2));
  opacity: 0;
  transition: opacity 280ms ease;
}
.project-card:hover {
  box-shadow: 0 16px 36px rgba(0,0,0,0.10);
  border-color: rgba(13,71,161,0.25);
  transform: translateY(-3px);
}
.project-card:hover::before { opacity: 1; }

.project-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: rgba(13,71,161,0.08);
  color: var(--royal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.95rem;
}
.project-icon svg { width: 1.15rem; height: 1.15rem; }

.project-meta {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--royal);
  margin-bottom: 0.35rem;
}
.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.3;
}
.project-org {
  font-size: 0.85rem;
  color: rgba(26,26,26,0.6);
  margin-top: 0.15rem;
}
.project-desc {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(26,26,26,0.75);
}
.project-tags {
  margin-top: auto;
  padding-top: 1rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.project-tags li {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: var(--mist-2);
  color: rgba(26,26,26,0.7);
  transition: background 200ms ease, color 200ms ease;
}
.project-card:hover .project-tags li {
  background: rgba(0,188,212,0.12);
  color: var(--royal);
}

/* ============================================================
   PHASE 3 — Contact form, contact info, back-to-top
   ============================================================ */

/* ───────── Contact form ───────── */
.cf {
  display: grid;
  gap: 1.1rem;
}
.cf-row { display: flex; flex-direction: column; }

.cf-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.cf-required { color: var(--royal); font-weight: 700; margin-left: 0.15rem; }

.cf input,
.cf select,
.cf textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  line-height: 1.4;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
  appearance: none;
  -webkit-appearance: none;
}
.cf input::placeholder,
.cf textarea::placeholder { color: rgba(26,26,26,0.4); }

.cf input:hover,
.cf select:hover,
.cf textarea:hover { border-color: rgba(13,71,161,0.4); }

.cf input:focus,
.cf select:focus,
.cf textarea:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(13,71,161,0.15);
}

.cf input[aria-invalid="true"],
.cf select[aria-invalid="true"],
.cf textarea[aria-invalid="true"] {
  border-color: #d63333;
  background: rgba(214,51,51,0.04);
}
.cf input[aria-invalid="true"]:focus,
.cf select[aria-invalid="true"]:focus,
.cf textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(214,51,51,0.18);
}

.cf textarea {
  resize: vertical;
  min-height: 9rem;
}

/* Custom-caret select */
.cf-select-wrap {
  position: relative;
  display: block;
}
.cf-select-wrap select {
  padding-right: 2.5rem;
  cursor: pointer;
}
.cf-select-caret {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  color: rgba(26,26,26,0.55);
  transform: translateY(-50%);
}

.cf-error {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #d63333;
  min-height: 1rem;
  line-height: 1.3;
}

.cf-honeypot {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin-top: 0.5rem;
}
.cf-hint {
  font-size: 0.8rem;
  color: rgba(26,26,26,0.55);
}

/* Submit-button state */
#cf-submit[data-loading="true"] { opacity: 0.7; cursor: progress; }
#cf-submit[data-loading="true"] .cf-submit-arrow { display: none; }
#cf-submit[data-loading="true"] .cf-submit-spinner {
  display: inline-block;
  animation: cf-spin 0.9s linear infinite;
}
@keyframes cf-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Status banner */
.cf-status {
  margin-top: 1.1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  display: none;
  border: 1px solid transparent;
}
.cf-status[data-state="sending"] {
  display: block;
  background: rgba(13,71,161,0.06);
  border-color: rgba(13,71,161,0.18);
  color: var(--royal);
}
.cf-status[data-state="success"] {
  display: block;
  background: rgba(34,160,90,0.10);
  border-color: rgba(34,160,90,0.25);
  color: #1f7a47;
}
.cf-status[data-state="error"] {
  display: block;
  background: rgba(214,51,51,0.08);
  border-color: rgba(214,51,51,0.22);
  color: #b22d2d;
}

/* ───────── Contact info aside ───────── */
.contact-info {
  padding: 1.75rem;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.contact-info h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(26,26,26,0.6);
  margin-bottom: 1.25rem;
}
.contact-list {
  display: grid;
  gap: 1.1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.contact-icon {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.625rem;
  background: rgba(13,71,161,0.08);
  color: var(--royal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, color 200ms ease;
}
.contact-icon svg { width: 1.1rem; height: 1.1rem; }
.contact-list li:hover .contact-icon {
  background: var(--royal);
  color: #fff;
}
.contact-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26,26,26,0.55);
}
.contact-value {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  word-break: break-word;
  transition: color 180ms ease;
}
a.contact-value:hover,
a.contact-value:focus-visible { color: var(--royal); }

/* ───────── Back-to-top button ───────── */
#back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: var(--royal);
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(13,71,161,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 280ms ease, transform 280ms ease, background 200ms ease;
  z-index: 40;
}
#back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#back-to-top:hover  { background: var(--royal-2); }
#back-to-top:active { transform: translateY(1px); }
#back-to-top svg    { width: 1.05rem; height: 1.05rem; }

@media (min-width: 768px) {
  #back-to-top {
    right: 1.75rem;
    bottom: 1.75rem;
    width: 3rem;
    height: 3rem;
  }
}
