/* ===================================================================
   Tewodros Wubete — Portfolio
   Pure CSS, no framework. Dark theme by default with a light toggle.
   Edit the custom properties below to re-theme the whole site.
   =================================================================== */

:root {
  --bg:        #0a0e17;
  --bg-soft:   #111726;
  --bg-card:   #131a2b;
  --border:    #1f2940;
  --text:      #c8d3e8;
  --text-dim:  #8593ad;
  --heading:   #e7edf9;
  --accent:    #64ffda;
  --accent-dim: rgba(100, 255, 218, 0.1);
  --shadow:    0 10px 30px -15px rgba(2, 6, 23, 0.8);
  --radius:    14px;
  --maxw:      1440px;
  --nav-h:     72px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, monospace;
}

/* Light theme overrides */
html[data-theme="light"] {
  --bg:        #f7f9fc;
  --bg-soft:   #ffffff;
  --bg-card:   #ffffff;
  --border:    #e2e8f3;
  --text:      #45526b;
  --text-dim:  #6b7896;
  --heading:   #16203a;
  --accent:    #0ea47f;
  --accent-dim: rgba(14, 164, 127, 0.1);
  --shadow:    0 10px 30px -15px rgba(15, 23, 42, 0.2);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--bg); padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn--primary { background: var(--accent); color: #06121f; }
.btn--primary:hover { box-shadow: 0 10px 24px -10px var(--accent); }
.btn--ghost { border-color: var(--accent); color: var(--accent); }
.btn--ghost:hover { background: var(--accent-dim); }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled { border-color: var(--border); box-shadow: var(--shadow); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav__brand { font-size: 1.5rem; font-weight: 800; color: var(--heading); letter-spacing: -0.5px; }

.nav__links { display: flex; gap: 32px; }
.nav__links a {
  font-size: 0.92rem; color: var(--text-dim); font-weight: 500;
  position: relative; transition: color 0.2s ease;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--accent); transition: width 0.25s ease;
}
.nav__links a:hover { color: var(--heading); }
.nav__links a:hover::after { width: 100%; }

.nav__right { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text-dim); cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__burger span { width: 24px; height: 2px; background: var(--heading); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; padding-top: var(--nav-h); }
.hero::before {
  content: ""; position: absolute; top: -10%; right: -5%; width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-dim), transparent 70%);
  filter: blur(40px); z-index: 0; pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 980px; }
.hero__eyebrow { color: var(--accent); font-family: var(--mono); font-size: 1rem; margin-bottom: 18px; }
.hero__title { font-size: clamp(2.8rem, 8vw, 5rem); font-weight: 800; color: var(--heading); line-height: 1.05; letter-spacing: -2px; }
.hero__subtitle { font-size: clamp(2rem, 6vw, 4rem); font-weight: 800; color: var(--text-dim); line-height: 1.05; letter-spacing: -2px; margin-top: 6px; }
.hero__lead { margin-top: 26px; font-size: 1.15rem; max-width: 720px; color: var(--text-dim); }
.hero__lead strong { color: var(--accent); font-weight: 600; }
.hero__cta { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero__socials { margin-top: 48px; display: flex; gap: 22px; }
.hero__socials a { color: var(--text-dim); transition: color 0.2s ease, transform 0.2s ease; }
.hero__socials a:hover { color: var(--accent); transform: translateY(-3px); }

.hero__scroll { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); }
.hero__scroll span {
  display: block; width: 26px; height: 42px; border: 2px solid var(--text-dim); border-radius: 14px; position: relative;
}
.hero__scroll span::after {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; background: var(--accent); border-radius: 2px;
  animation: scroll 1.6s ease-in-out infinite;
}
@keyframes scroll { 0% { opacity: 0; top: 8px; } 50% { opacity: 1; } 100% { opacity: 0; top: 22px; } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section__title {
  display: flex; align-items: center; gap: 14px; font-size: clamp(1.6rem, 4vw, 2rem);
  color: var(--heading); font-weight: 700; letter-spacing: -0.5px; margin-bottom: 48px;
}
.section__title::after {
  content: ""; flex: 1; height: 1px; background: var(--border); max-width: 300px;
}
.section__num { color: var(--accent); font-family: var(--mono); font-size: 1.1rem; font-weight: 500; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 3fr 2fr; gap: 56px; align-items: start; }
.about__text p { margin-bottom: 16px; }
.about__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; margin-top: 12px; }
.about__list li { position: relative; padding-left: 22px; font-family: var(--mono); font-size: 0.88rem; }
.about__list li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

.about__photo-frame { position: relative; width: 280px; max-width: 100%; aspect-ratio: 1; margin: 0 auto; }
.about__photo-frame::after {
  content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 2px solid var(--accent);
  border-radius: var(--radius); z-index: 0; transition: inset 0.25s ease;
}
.about__photo-frame:hover::after { inset: 8px -8px -8px 8px; }
.about__photo-placeholder {
  position: relative; z-index: 1; width: 100%; height: 100%; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--bg-card), var(--bg-soft));
  border: 1px solid var(--border); display: grid; place-items: center;
  font-size: 4rem; font-weight: 800; color: var(--accent); font-family: var(--mono);
}
/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.skill-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; transition: transform 0.2s ease, border-color 0.2s ease;
}
.skill-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.skill-card h3 { color: var(--heading); margin-bottom: 16px; font-size: 1.2rem; }
.skill-card ul li { position: relative; padding-left: 22px; margin-bottom: 9px; font-size: 0.95rem; }
.skill-card ul li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.project {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.project__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.project__folder { color: var(--accent); }
.project__links { display: flex; gap: 14px; }
.project__links a { color: var(--text-dim); transition: color 0.2s ease; }
.project__links a:hover { color: var(--accent); }
.project__title { color: var(--heading); font-size: 1.3rem; margin-bottom: 12px; }
.project__title:hover { color: var(--accent); }
.project__desc { color: var(--text-dim); font-size: 0.95rem; flex: 1; }
.project__tags { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 22px; }
.project__tags li { font-family: var(--mono); font-size: 0.78rem; color: var(--text-dim); }

/* ---------- Timeline / Experience ---------- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline__item { position: relative; padding-bottom: 40px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: -32px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline__content h3 { color: var(--heading); font-size: 1.15rem; }
.timeline__company { color: var(--accent); font-weight: 500; }
.timeline__date { font-family: var(--mono); font-size: 0.82rem; color: var(--text-dim); }
.timeline__content ul { margin-top: 12px; }
.timeline__content ul li { position: relative; padding-left: 22px; margin-bottom: 8px; font-size: 0.95rem; }
.timeline__content ul li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Contact ---------- */
.section--contact { text-align: center; padding: 130px 0; }
.contact__eyebrow { font-family: var(--mono); color: var(--accent); margin-bottom: 16px; }
.contact__title { font-size: clamp(2.2rem, 6vw, 3.4rem); color: var(--heading); font-weight: 800; letter-spacing: -1px; }
.contact__text { max-width: 540px; margin: 20px auto 40px; color: var(--text-dim); font-size: 1.05rem; }
.contact__details { margin-top: 32px; display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.contact__details a { font-family: var(--mono); font-size: 0.9rem; color: var(--text-dim); transition: color 0.2s ease; }
.contact__details a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 36px 0; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer__socials { display: flex; gap: 26px; }
.footer__socials a { font-family: var(--mono); font-size: 0.85rem; color: var(--text-dim); transition: color 0.2s ease; }
.footer__socials a:hover { color: var(--accent); }
.footer__credit { font-family: var(--mono); font-size: 0.8rem; color: var(--text-dim); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.05s; }
.reveal:nth-child(3) { transition-delay: 0.1s; }
.reveal:nth-child(4) { transition-delay: 0.15s; }
.reveal:nth-child(5) { transition-delay: 0.2s; }
.reveal:nth-child(6) { transition-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about__photo-frame { margin-top: 8px; }

  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: center; gap: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: 0; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
  }
  .nav__links.open { max-height: 320px; padding: 16px 0 24px; }
  .nav__links a { padding: 14px 0; font-size: 1rem; }
  .nav__burger { display: flex; }
}

@media (max-width: 520px) {
  .section { padding: 80px 0; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .section__title::after { display: none; }
}
