/* =========================================================
   PORTFOLIO — STYLESHEET
   Author:  Mohammed Taher Abdullah
   Stack:   Pure CSS — no frameworks
   Design:  Dark theme, bento grid, warm accent
   ========================================================= */


/* ----- RESET & BASE ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Palette */
  --bg:           #09090b;
  --bg-alt:       #111114;
  --surface:      #18181b;
  --surface-hover: #222226;
  --border:       rgba(255, 255, 255, 0.06);
  --text:         #e4e4e7;
  --text-muted:   #a1a1aa;
  --accent:       #e09f3e;
  --accent-soft:  rgba(224, 159, 62, 0.12);
  --accent-glow:  rgba(224, 159, 62, 0.2);

  /* Typography */
  --font-body:    'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  /* Layout */
  --max-w:        1140px;
  --gap:          1.25rem;
  --radius:       14px;
  --radius-sm:    8px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Text selection */
::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.85; }

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

/* Subtle noise grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ----- LAYOUT UTILITIES ----- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.text-accent {
  color: var(--accent);
}


/* =========================================================
   NAVIGATION
   ========================================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

#navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.logo-dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  opacity: 1;
}

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

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1001;
}

.hamburger .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 2rem 60px;
  position: relative;
  overflow: hidden;
}

/* Animated gradient orbs */
.hero-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
  animation: orb-float 12s ease-in-out infinite alternate;
}

.hero-orb {
  background: var(--accent);
  top: -10%;
  right: -5%;
}

.hero-orb--secondary {
  background: #3b82f6;
  bottom: -15%;
  left: -10%;
  width: 400px;
  height: 400px;
  animation-delay: -6s;
  opacity: 0.15;
}

@keyframes orb-float {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 30px) scale(1.1); }
}

.hero-content {
  max-width: var(--max-w);
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 2.25rem;
}

/* Buttons */
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  opacity: 1;
}

/* Metrics ribbon */
.hero-metrics {
  display: flex;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.metric-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.metric-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.metric-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%      { opacity: 0.3; transform: scaleY(0.6); }
}


/* =========================================================
   SECTION HEADERS
   ========================================================= */
.section-header {
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}


/* =========================================================
   BENTO GRID
   ========================================================= */
.bento-grid {
  display: grid;
  gap: var(--gap);
}

.bento-about {
  grid-template-columns: repeat(3, 1fr);
}

/* Wide card spans 2 columns */
.bento-card--wide {
  grid-column: span 2;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.3s ease, transform 0.25s ease;
}

.bento-card:hover {
  border-color: rgba(224, 159, 62, 0.2);
  transform: translateY(-3px);
}

.bento-card--accent {
  background: var(--accent-soft);
  border-color: rgba(224, 159, 62, 0.15);
}

.bento-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.bento-card p:last-child { margin-bottom: 0; }

.bento-icon {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.bento-card h3 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.bento-big {
  font-size: 1.4rem !important;
  font-weight: 600;
  color: var(--text) !important;
}

.bento-sub {
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
}

.lang-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.5rem;
}

.lang-tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
}


/* =========================================================
   EXPERIENCE TIMELINE
   ========================================================= */
.exp-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.exp-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s ease;
}

.exp-card:hover {
  border-color: rgba(224, 159, 62, 0.2);
}

.exp-date {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  padding-top: 4px;
}

.exp-role {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.exp-company {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.exp-list li {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  padding-left: 1.25rem;
  position: relative;
}

.exp-list li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.6;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exp-tags span {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
  letter-spacing: 0.02em;
}


/* =========================================================
   SKILLS — BENTO VARIANT
   ========================================================= */
.bento-skills {
  grid-template-columns: repeat(3, 1fr);
}

.skill-card {
  display: flex;
  flex-direction: column;
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.skill-icon {
  font-size: 1.4rem;
}

.skill-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  margin-bottom: 0;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-pills span {
  font-size: 0.78rem;
  font-weight: 400;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.skill-pills span:hover {
  border-color: var(--accent);
  color: var(--accent);
}


/* =========================================================
   PROJECTS
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.25s ease;
}

.project-card:hover {
  border-color: rgba(224, 159, 62, 0.2);
  transform: translateY(-4px);
}

/* Featured card spans full width */
.project-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
}

.project-thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg);
}

.project-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  position: relative;
}

.project-visual--gradient {
  background: linear-gradient(135deg, #1a2a3a 0%, #0f2040 50%, #182838 100%);
}

.project-visual--dark {
  background: linear-gradient(135deg, #151520, #1a1a2e);
}

.project-emoji {
  font-size: 3.5rem;
}

.project-status {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(76, 175, 80, 0.15);
  color: #81c784;
  border-radius: 100px;
  letter-spacing: 0.04em;
}

.project-info {
  padding: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.project-tags span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 100px;
}

.project-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.project-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.project-role {
  font-size: 0.85rem !important;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.project-link svg {
  transition: transform 0.2s;
}

.project-link:hover svg {
  transform: translate(2px, -2px);
}


/* =========================================================
   EDUCATION
   ========================================================= */
.edu-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.edu-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s;
}

.edu-card:hover {
  border-color: rgba(224, 159, 62, 0.2);
}

.edu-date {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  padding-top: 4px;
}

.edu-right h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.edu-school {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.edu-courses {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}


/* =========================================================
   CONTACT
   ========================================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.2s;
}

.contact-item:hover { color: var(--accent); opacity: 1; }

.contact-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

.contact-socials {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
  opacity: 1;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form button {
  align-self: flex-start;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}


/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* =========================================================
   REVEAL ANIMATION
   Elements fade up on scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for hero elements */
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.45s; }
.reveal[data-delay="5"] { transition-delay: 0.6s; }


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */
@media (max-width: 900px) {
  .bento-about {
    grid-template-columns: 1fr 1fr;
  }

  .bento-card--wide {
    grid-column: 1 / -1;
  }

  .bento-skills {
    grid-template-columns: 1fr 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card--featured {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .exp-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .edu-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .hero-metrics {
    gap: 1.25rem;
  }

  .metric-divider {
    display: none;
  }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */
@media (max-width: 600px) {
  .section { padding: 60px 0; }

  .container { padding: 0 1.25rem; }

  /* Mobile nav */
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 9, 11, 0.97);
    backdrop-filter: blur(20px);
    padding: 2rem;
    gap: 1.5rem;
  }

  .nav-links.open { display: flex; }

  .hamburger { display: flex; }

  /* Hero */
  .hero {
    padding: 100px 1.25rem 50px;
    min-height: auto;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-metrics {
    flex-direction: column;
    gap: 1rem;
  }

  .scroll-indicator { display: none; }

  /* Grids */
  .bento-about { grid-template-columns: 1fr; }
  .bento-card--wide { grid-column: span 1; }
  .bento-skills { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  /* Hero actions stack */
  .hero-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }
}
