/* ============================================================
   Abdia Elema — portfolio styles
   Fonts: IBM Plex Sans (UI) + IBM Plex Mono (labels, tags)
   ============================================================ */

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

:root {
  --bg:     #091e2e;
  --bg2:    #0d2d42;
  --bg3:    #113450;
  --border: rgba(201,161,42,0.18);
  --text:   #f5ede0;
  --muted:  #a0b8c8;
  --gold:   #c9a12a;
  --gold2:  #e8c96a;
  --cyan:   #5ba8c4;
  --green:  #7ec8a0;
  --grad1:  linear-gradient(135deg, #c9a12a, #e8c96a);

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.02em; }

.grad-text {
  background: var(--grad1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 6%;
  background: rgba(9,30,46,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
}
.nav-logo::after { content: '.'; color: var(--gold); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  font-family: var(--font-mono);
  padding: .5rem 1.3rem; border-radius: 6px; font-size: .82rem; font-weight: 600;
  background: var(--grad1); color: #091e2e; text-decoration: none; transition: opacity .2s;
}
.nav-cta:hover { opacity: .85; }

/* ===== HERO ===== */
#hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 5rem 6% 0;
  position: relative; overflow: hidden;
}
.hero-orb { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; }
.orb1 { width: 600px; height: 600px; background: rgba(201,161,42,.12); top: -100px; right: -100px; }
.orb2 { width: 400px; height: 400px; background: rgba(13,45,66,.8); bottom: 0; left: -80px; }
.orb3 { width: 300px; height: 300px; background: rgba(91,168,196,.08); top: 40%; left: 50%; }

.hero-tag {
  font-family: var(--font-mono);
  display: inline-flex; align-items: center; gap: .55rem;
  background: rgba(201,161,42,.12); border: 1px solid rgba(201,161,42,.35);
  color: var(--gold2); border-radius: 6px; padding: .4rem 1rem;
  font-size: .75rem; font-weight: 500; letter-spacing: .05em;
  margin-bottom: 1.6rem; text-transform: uppercase;
}
.hero-tag::before {
  content: ''; width: 7px; height: 7px; background: var(--green);
  border-radius: 50%; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }

h1 {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  line-height: 1.06;
  max-width: 800px; margin-bottom: 1.5rem;
}
h1 .accent {
  background: var(--grad1); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.18rem); color: var(--muted);
  max-width: 520px; line-height: 1.7; margin-bottom: 2.4rem;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  font-family: var(--font-mono);
  padding: .85rem 1.9rem; border-radius: 6px; font-size: .9rem; font-weight: 600;
  background: var(--grad1); color: #091e2e; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 0 30px rgba(201,161,42,.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(201,161,42,.38); }
.btn-secondary {
  font-family: var(--font-mono);
  padding: .85rem 1.9rem; border-radius: 6px; font-size: .9rem; font-weight: 600;
  background: transparent; color: var(--text); text-decoration: none;
  border: 1.5px solid rgba(255,255,255,.18); transition: border-color .2s, background .2s;
}
.btn-secondary:hover { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.05); }

.hero-stats { display: flex; gap: 3rem; margin-top: 4rem; }
.stat-num {
  font-family: var(--font-mono);
  font-size: 1.8rem; font-weight: 600;
  background: var(--grad1); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: .72rem; color: var(--muted); margin-top: .3rem;
  text-transform: uppercase; letter-spacing: .08em;
}

/* ===== SECTIONS ===== */
section { padding: 6.5rem 6%; }
.section-label {
  font-family: var(--font-mono);
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 1rem; }
.section-desc { color: var(--muted); font-size: 1rem; line-height: 1.7; max-width: 560px; margin-bottom: 3.2rem; }

.divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .3; margin: 0 6%;
}

/* ===== ABOUT ===== */
#about { background: var(--bg2); }
.about-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 5rem; align-items: center; }
.about-img-wrap { position: relative; }
.about-avatar {
  width: 100%; max-width: 380px; aspect-ratio: 1;
  border-radius: 16px; background: var(--bg3);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-glow {
  position: absolute; width: 300px; height: 300px;
  background: rgba(201,161,42,.28); border-radius: 50%; filter: blur(80px);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.about-text h2 { margin-bottom: .6rem; }
.about-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1.2rem; font-size: .95rem; }
.about-pills { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.pill {
  font-family: var(--font-mono);
  padding: .38rem .95rem; border-radius: 6px; font-size: .76rem; font-weight: 500;
  border: 1px solid var(--border); color: var(--muted);
  transition: border-color .2s, color .2s;
}
.pill:hover { border-color: var(--gold); color: var(--gold2); }

/* ===== EXPERIENCE ===== */
#experience { background: var(--bg); }
.exp-list { display: flex; flex-direction: column; gap: 1.4rem; }
.exp-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.9rem 2.3rem; display: grid; grid-template-columns: auto 1fr auto;
  gap: 1.5rem; align-items: flex-start; transition: border-color .3s, transform .3s;
}
.exp-card:hover { border-color: rgba(201,161,42,.4); transform: translateX(4px); }
.exp-icon {
  font-family: var(--font-mono);
  width: 50px; height: 50px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 600; letter-spacing: .02em;
  flex-shrink: 0;
}
.mono-gold  { background: rgba(201,161,42,.14); color: var(--gold2); border: 1px solid rgba(201,161,42,.3); }
.mono-cyan  { background: rgba(91,168,196,.12); color: var(--cyan); border: 1px solid rgba(91,168,196,.3); }
.mono-green { background: rgba(126,200,160,.12); color: var(--green); border: 1px solid rgba(126,200,160,.3); }
.mono-muted { background: rgba(160,184,200,.1); color: var(--muted); border: 1px solid rgba(160,184,200,.25); }

.exp-body h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.exp-company { color: var(--gold); font-size: .87rem; font-weight: 600; margin-bottom: .55rem; }
.exp-desc { color: var(--muted); font-size: .88rem; line-height: 1.7; }
.exp-date {
  font-family: var(--font-mono);
  white-space: nowrap; font-size: .76rem; font-weight: 500; color: var(--muted);
  background: var(--bg3); padding: .35rem .85rem; border-radius: 6px;
  border: 1px solid var(--border);
}

/* ===== PROJECTS ===== */
#projects { background: var(--bg2); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.project-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 14px;
  display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  overflow: hidden;
}
.project-card:hover {
  border-color: rgba(201,161,42,.5); transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

/* --- screenshot thumbnail --- */
.project-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.project-thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  display: block; transition: transform .4s ease;
}
.project-card:hover .project-thumb img { transform: scale(1.04); }
/* fallback when no screenshot exists yet */
.project-thumb.no-img::after {
  content: attr(data-initial);
  font-family: var(--font-mono);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 600; letter-spacing: .05em;
  color: rgba(232,201,106,.35);
  background: linear-gradient(135deg, rgba(201,161,42,.08), rgba(13,45,66,.6));
}

.project-body { padding: 1.6rem 1.8rem 1.8rem; display: flex; flex-direction: column; gap: .9rem; flex: 1; }
.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.project-title { font-size: 1.08rem; }
.project-status {
  font-family: var(--font-mono);
  flex-shrink: 0; font-size: .66rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; padding: .28rem .7rem; border-radius: 6px;
}
.status-live { background: rgba(126,200,160,.15); color: var(--green); border: 1px solid rgba(126,200,160,.4); }
.status-progress { background: rgba(201,161,42,.13); color: var(--gold2); border: 1px solid rgba(201,161,42,.4); }
.status-internal { background: rgba(160,184,200,.1); color: var(--muted); border: 1px solid rgba(160,184,200,.3); }

.project-desc { color: var(--muted); font-size: .87rem; line-height: 1.7; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag {
  font-family: var(--font-mono);
  font-size: .7rem; font-weight: 500; padding: .26rem .7rem; border-radius: 6px;
  background: rgba(201,161,42,.12); color: var(--gold2);
  border: 1px solid rgba(201,161,42,.22);
}
.project-links { display: flex; gap: .7rem; margin-top: .3rem; }
.link-btn {
  font-family: var(--font-mono);
  font-size: .78rem; font-weight: 600; padding: .45rem 1rem; border-radius: 6px;
  text-decoration: none; border: 1px solid var(--border); color: var(--muted);
  transition: all .2s;
}
.link-btn:hover { border-color: var(--gold); color: var(--gold2); }
.link-btn.primary { background: var(--grad1); color: #091e2e; border: none; }
.link-btn.primary:hover { opacity: .85; }
.link-btn.disabled { opacity: .55; cursor: default; pointer-events: none; }

/* ===== SKILLS ===== */
#skills { background: var(--bg); }
.skills-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.skill-group {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 1.9rem;
  transition: border-color .3s;
}
.skill-group:hover { border-color: rgba(201,161,42,.3); }
.skill-group-title {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.t-gold { color: var(--gold); }
.t-cyan { color: var(--cyan); }
.t-green { color: var(--green); }
.skill-tags { display: flex; flex-wrap: wrap; gap: .55rem; }
.skill-tag {
  font-size: .84rem; font-weight: 500; padding: .42rem .95rem; border-radius: 6px;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  transition: border-color .2s, transform .2s;
}
.skill-tag:hover { border-color: var(--gold); transform: translateY(-1px); }

/* ===== CREDENTIALS ===== */
#certs { background: var(--bg2); }
.certs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.cert-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.5rem 1.7rem;
  transition: border-color .3s, transform .3s;
}
.cert-card:hover { border-color: rgba(201,161,42,.4); transform: translateY(-2px); }
.cert-name { font-size: .93rem; font-weight: 600; margin-bottom: .3rem; }
.cert-issuer { font-size: .8rem; color: var(--muted); }
.cert-year {
  font-family: var(--font-mono);
  margin-top: .6rem; font-size: .72rem; font-weight: 500;
  color: var(--gold2); background: rgba(201,161,42,.13);
  padding: .2rem .65rem; border-radius: 6px; display: inline-block;
}

/* ===== CONTACT ===== */
#contact { background: var(--bg); }
.contact-inner { max-width: 720px; text-align: center; margin: 0 auto; }
.contact-inner h2 { font-size: clamp(1.9rem, 5vw, 3.2rem); }
.contact-inner .section-desc { margin: 1rem auto 3rem; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 3.2rem; }
.contact-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem 1.7rem; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--border); color: var(--text); font-weight: 500; font-size: .88rem;
  background: var(--bg2); transition: all .25s;
}
.contact-link:hover {
  border-color: var(--gold); color: var(--gold2); transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,161,42,.18);
}
.contact-link svg { width: 19px; height: 19px; fill: currentColor; }

.contact-form {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 2.4rem;
  text-align: left;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .5rem; }
.form-group label {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.form-group input, .form-group textarea {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
  padding: .85rem 1.05rem; color: var(--text); font-family: var(--font-sans); font-size: .9rem;
  outline: none; transition: border-color .2s; resize: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--gold); }
.form-submit {
  font-family: var(--font-mono);
  width: 100%; margin-top: 1.2rem; padding: .95rem; border-radius: 8px;
  background: var(--grad1); color: #091e2e; font-size: .95rem; font-weight: 600;
  border: none; cursor: pointer; transition: opacity .2s, transform .2s;
}
.form-submit:hover { opacity: .88; transform: translateY(-1px); }

/* ===== FOOTER ===== */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  text-align: center; padding: 2.4rem 6%;
  color: var(--muted); font-size: .84rem;
}
footer span {
  background: var(--grad1); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent; font-weight: 600;
}

/* ===== ANIMATION ===== */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .exp-card { grid-template-columns: auto 1fr; }
  .exp-date { grid-column: 1 / -1; justify-self: start; }
  nav .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== FORM STATUS MESSAGE ===== */
.form-status {
  margin-top: 1rem;
  font-size: .88rem;
  font-weight: 500;
  text-align: center;
  min-height: 1.2em;
}
.form-status.success { color: var(--green); }
.form-status.error { color: #e08080; }
.form-submit:disabled { opacity: .6; cursor: wait; transform: none; }
