/* ============================================================
   Orlando Torres — Professional Website Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --color-bg: #ffffff;
  --color-surface: #f5f5f7;
  --color-surface-2: #e8e8ed;
  --color-border: #d2d2d7;
  --color-text: #1d1d1f;
  --color-text-muted: #6e6e73;
  --color-accent: #0071e3;
  --color-accent-2: #34c759;
  --color-accent-warm: #ff9f0a;
  --color-heading: #1d1d1f;
  --color-tag-bg: #e8f0fe;
  --color-tag-text: #0055b3;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", "Monaco", "Fira Code", monospace;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  --transition: 0.2s ease;
  --max-width: 1100px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #0077ed;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p { color: var(--color-text); }

/* ---------- Layout Helpers ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 48px;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav__brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-heading);
  letter-spacing: -0.3px;
}

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

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--color-heading);
}

.nav__links a.active {
  position: relative;
}

.nav__links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* Hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 60px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.hero__eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.hero__title {
  margin-bottom: 20px;
}

.hero__title em {
  font-style: normal;
  color: var(--color-accent);
}

.hero__roles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero__role-tag {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.hero__desc {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.hero__avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 113, 227, 0.2), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn--primary:hover {
  background: #0077ed;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.25);
}

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

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

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}

.card:hover {
  border-color: rgba(0, 113, 227, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.tag--green {
  background: #d1f5d9;
  color: #1a7f37;
}

.tag--orange {
  background: #fff3d6;
  color: #9a5700;
}

.tag--purple {
  background: #ede9ff;
  color: #6a3dc7;
}

/* ---------- About Section ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about__text p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

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

.about__highlight {
  background: var(--color-surface);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
  color: var(--color-text) !important;
  font-style: italic;
}

/* ---------- Skills / Expertise ---------- */
.expertise__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.expertise-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.expertise-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.expertise-card__icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.expertise-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.expertise-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---------- Education ---------- */
.education__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.edu-card {
  display: flex;
  gap: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.edu-card:hover {
  border-color: rgba(0, 113, 227, 0.35);
  box-shadow: var(--shadow);
}

.edu-card__icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--color-surface-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.edu-card__logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.edu-card__degree {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-heading);
  margin-bottom: 4px;
}

.edu-card__school {
  color: var(--color-accent);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.edu-card__meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ---------- Projects Page ---------- */
.projects-hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 60px;
}

.projects-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

.filter-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
  font-weight: 600;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  border-color: rgba(0, 113, 227, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-card__icon {
  font-size: 2rem;
}

.project-card__status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.project-card__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

.project-card__status-dot.active {
  background: var(--color-accent-2);
  box-shadow: 0 0 8px rgba(63, 185, 80, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.project-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: 0;
}

.project-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  flex: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card__links {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.project-card__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-card__link:hover {
  color: #0077ed;
}

/* ---------- Featured Project ---------- */
.project-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
}

.project-card--featured .project-card__sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- CTA Section ---------- */
.cta {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  text-align: center;
}

.cta h2 {
  margin-bottom: 12px;
}

.cta p {
  color: var(--color-text-muted);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__brand {
  font-weight: 700;
  color: var(--color-heading);
}

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

.footer__copy {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer__social {
  display: flex;
  gap: 16px;
}

.footer__social a {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer__social a:hover {
  color: var(--color-heading);
}

/* ---------- Divider ---------- */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 0;
}

/* ---------- Utility ---------- */
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }
.font-mono { font-family: var(--font-mono); }

/* ---------- Page Transitions ---------- */
main {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__avatar {
    width: 140px;
    height: 140px;
    font-size: 3.5rem;
  }

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

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

@media (max-width: 640px) {
  .section {
    padding: 56px 0;
  }

  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 20px;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 60px;
  }

  .hero__avatar {
    display: none;
  }

  .cta {
    padding: 40px 24px;
  }
}
