/* ============================================================
   Daniel Delahoz — Portfolio Styles
   Aesthetic: dark terminal / dev workspace
   Palette: near-black base, mint accent, cool grays
   ============================================================ */


/* --- reset & base ----------------------------------------------- */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: #0a0a0f;
  color: #e8e8ed;
  font-family: 'Sora', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

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


/* --- palette (CSS custom props) --------------------------------- */

:root {
  --dark:        #0a0a0f;
  --dark-raised: #111118;
  --surface:     #16161f;
  --surface-hi:  #1c1c28;
  --mint:        #00e5a0;
  --mint-15:     rgba(0, 229, 160, 0.15);
  --mint-30:     rgba(0, 229, 160, 0.30);
  --cyan:        #00b8d4;
  --txt:         #e8e8ed;
  --txt-dim:     #8888a0;
  --txt-faint:   #55556a;
  --rule:        #222233;
  --rule-mint:   rgba(0, 229, 160, 0.25);
  --mono:        'JetBrains Mono', monospace;
  --sans:        'Sora', sans-serif;
}


/* --- ambient background layers ---------------------------------- */

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 34, 51, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 34, 51, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: transform 0.25s ease-out;
  will-change: transform;
}


/* --- top nav ---------------------------------------------------- */

.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--rule);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo-icon { flex-shrink: 0; }
.logo-text {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--txt);
}
.logo-tld {
  font-family: var(--mono);
  font-weight: 400;
  color: var(--txt-faint);
}

.nav-items { display: flex; gap: 2rem; align-items: center; }

.nav-items a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--txt-dim);
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s;
}
.nav-items a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--mint);
  transition: width 0.3s;
}
.nav-items a:hover             { color: var(--mint); }
.nav-items a:hover::after      { width: 100%; }

/* resume CTA in nav */
.nav-cta {
  padding: 0.5rem 1.2rem !important;
  border: 1px solid var(--mint);
  border-radius: 4px;
  color: var(--mint) !important;
  transition: background 0.3s, box-shadow 0.3s !important;
}
.nav-cta::after  { display: none !important; }
.nav-cta:hover   { background: var(--mint-15); box-shadow: 0 0 20px var(--mint-30); }


/* --- shared section wrapper ------------------------------------- */

.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem;
}


/* --- section headings ------------------------------------------- */

.heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}
.heading-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--mint);
  flex-shrink: 0;
}
.heading h2  { font-size: 1.8rem; font-weight: 700; white-space: nowrap; }
.heading hr  { flex: 1; border: none; border-top: 1px solid var(--rule); }


/* --- buttons ---------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.3s, border-color 0.3s, color 0.3s, background 0.3s;
  border: none;
}
.btn.solid {
  background: var(--mint);
  color: var(--dark);
  font-weight: 600;
}
.btn.solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--mint-30), 0 0 60px rgba(0, 229, 160, 0.1);
}
.btn.outline {
  background: transparent;
  color: var(--txt);
  border: 1px solid var(--rule);
}
.btn.outline:hover { border-color: var(--mint); color: var(--mint); }


/* --- hero ------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
}

.hero-greeting {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--mint);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-summary {
  font-size: 1.1rem;
  color: var(--txt-dim);
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-availability {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--txt-faint);
}

.ping {
  width: 8px;
  height: 8px;
  background: var(--mint);
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { box-shadow: 0 0 0 0 var(--mint-30); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}


/* --- about ------------------------------------------------------ */

.about-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4rem;
  align-items: start;
}

.about-copy p {
  color: var(--txt-dim);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}
.about-copy strong { color: var(--txt); }


/* --- terminal widget -------------------------------------------- */

.terminal {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.terminal-chrome {
  padding: 0.7rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.dot       { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.red   { background: #ff5f57; }
.dot.yellow{ background: #ffbd2e; }
.dot.green { background: #28c840; }
.terminal-tab {
  margin-left: 0.5rem;
  color: var(--txt-faint);
  font-size: 0.7rem;
}

.terminal-body {
  padding: 1.2rem;
  line-height: 2;
  color: var(--txt-dim);
  white-space: pre;
  overflow-x: auto;
}
.terminal-body .ps1 { color: var(--mint); }
.terminal-body .k   { color: var(--cyan); }
.terminal-body .v   { color: var(--txt); }
.terminal-body .cmt { color: var(--txt-faint); }


/* --- skill cards ------------------------------------------------ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s, border-color 0.35s, background 0.35s;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--mint), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--rule-mint);
  background: var(--surface-hi);
}
.card:hover::before { opacity: 1; }

.card-icon { font-size: 1.5rem; display: block; margin-bottom: 1rem; }
.card h3   { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.8rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.3rem 0.6rem;
  background: var(--mint-15);
  color: var(--mint);
  border-radius: 3px;
  letter-spacing: 0.3px;
}
.tags.muted li {
  background: transparent;
  color: var(--txt-faint);
  border: 1px solid var(--rule);
}


/* --- project cards ---------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s, border-color 0.35s;
}
.project:hover { transform: translateY(-4px); border-color: var(--rule-mint); }

.project-type {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.project h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.8rem; }
.project p  { color: var(--txt-dim); font-size: 0.88rem; line-height: 1.7; margin-bottom: 1.5rem; flex: 1; }

.project .tags { margin-bottom: 1.2rem; }

.project-links       { display: flex; gap: 1rem; }
.project-links a     { font-family: var(--mono); font-size: 0.75rem; color: var(--txt-dim); transition: color 0.3s; }
.project-links a:hover { color: var(--mint); }

/* --- projects wip state ----------------------------------------- */
.projects-wip { max-width: 640px; margin: 0 auto; }
.terminal-body .cursor {
  color: var(--mint);
  animation: blink 1.2s step-start infinite;
}
@keyframes blink { 50% { opacity: 0; } }


/* --- experience timeline ---------------------------------------- */

.timeline {
  position: relative;
  padding-left: 2.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--mint), var(--rule), transparent);
}

.timeline-entry {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
}
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--mint);
  border-radius: 50%;
  background: var(--dark);
}

.timeline-entry time {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--mint);
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.company {
  display: block;
  font-size: 0.8rem;
  color: var(--txt-faint);
  margin-bottom: 0.3rem;
}
.timeline-entry h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.timeline-entry ul li {
  color: var(--txt-dim);
  font-size: 0.85rem;
  line-height: 1.7;
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.4rem;
}
.timeline-entry ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--mint);
}

/* cert badge */
.cert-badge {
  margin-top: 2rem;
  padding: 1.2rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}
.cert-badge small {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--txt-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cert-badge strong { font-size: 0.9rem; }


/* --- footer / contact ------------------------------------------- */

.footer {
  text-align: center;
  padding-bottom: 4rem;
}
.footer .heading-num { display: block; margin-bottom: 1rem; }
.footer h2  { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.footer > div > p { color: var(--txt-dim); max-width: 500px; margin: 0 auto 2rem; font-size: 0.95rem; }

.footer-resume { margin-top: 1.5rem; }

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}
.footer-nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--txt-faint);
  letter-spacing: 0.5px;
  transition: color 0.3s;
}
.footer-nav a:hover { color: var(--mint); }

.colophon {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--txt-faint);
}


/* --- entrance animations ---------------------------------------- */

.anim-up {
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.6s var(--delay, 0s) forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.show {
  opacity: 1;
  transform: none;
}


/* --- responsive ------------------------------------------------- */

@media (max-width: 768px) {
  .topbar           { padding: 0.8rem 1.2rem; }
  .nav-items        { gap: 1rem; }
  .nav-items a:not(.nav-cta) { display: none; }
  .container, .hero { padding-left: 1.2rem; padding-right: 1.2rem; }
  .about-layout     { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1          { font-size: 2.2rem; }
  .project-grid     { grid-template-columns: 1fr; }
}
