/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  --primary:      #1B3A5C;
  --primary-dark: #122840;
  --accent:       #C19A3A;
  --accent-dark:  #A07E2A;
  --parchment:    #F8F4EC;
  --text-dark:    #1A1A2E;
  --text-muted:   #6B7280;
  --border:       rgba(0, 0, 0, 0.08);
}

/* ============================================================
   GLOBAL
   ============================================================ */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
}

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

a:hover { color: var(--accent-dark); }

/* ============================================================
   SHARED SECTION ELEMENTS
   ============================================================ */
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.subsection-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#mainNav {
  background-color: transparent;
  transition: background-color 0.3s, padding 0.3s, box-shadow 0.3s;
  padding: 1.5rem 0;
}

#mainNav.scrolled {
  background-color: var(--primary);
  padding: 0.75rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

#mainNav .navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #fff !important;
}

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

#mainNav .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s;
}

#mainNav .nav-link:hover { color: var(--accent) !important; }

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2A5080 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 0 4rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

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

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 520px;
  margin-bottom: 1.75rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-credential {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(193, 154, 58, 0.45);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
}

.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.75rem;
  border-radius: 4px;
  transition: background-color 0.2s, transform 0.15s;
}

.btn-accent:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline-light {
  font-weight: 600;
  padding: 0.7rem 1.75rem;
  border-radius: 4px;
}

.hero-portrait {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

@media (max-width: 992px) {
  .hero-portrait { width: 220px; height: 220px; }
  .hero-tagline  { max-width: 100%; }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2.2s ease-in-out infinite;
}

.hero-scroll-hint a {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.25rem;
  transition: color 0.2s;
}

.hero-scroll-hint a:hover { color: var(--accent); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0);     }
  50%       { transform: translateX(-50%) translateY(-8px); }
}

/* ============================================================
   ABOUT
   ============================================================ */
.section-about { background: #fff; }

.section-about p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.section-about a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
}

.spec-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--parchment);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
  border-left: 3px solid var(--accent);
  height: 100%;
}

.spec-icon {
  color: var(--accent);
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* ============================================================
   SERVICES
   ============================================================ */
.section-services { background: var(--parchment); }

.service-card {
  background: #fff;
  border-radius: 8px;
  padding: 2rem 1.75rem;
  height: 100%;
  border-top: 3px solid var(--accent);
  box-shadow: 0 2px 12px var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
}

.service-icon {
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-card h4 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.service-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.section-portfolio { background: #fff; }

.portfolio-card {
  border-radius: 8px;
  border: 1px solid var(--border);
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.portfolio-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portfolio-lang {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.portfolio-lang.python  { background: #EEF2FF; color: #3730A3; }
.portfolio-lang.book    { background: #FEF9EC; color: #92400E; }
.portfolio-lang.jupyter { background: #FFF7ED; color: #C2410C; }
.portfolio-lang.desktop { background: #F0FDF4; color: #166534; }

.portfolio-card-body h5 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.portfolio-card-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.portfolio-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
  align-self: flex-start;
}

.portfolio-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.portfolio-card.featured {
  border-color: var(--accent);
  border-width: 2px;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.portfolio-tags span {
  background: var(--parchment);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.portfolio-skills {
  background: var(--parchment);
  border-radius: 8px;
  padding: 2rem;
  height: 100%;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.skill-tag {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
}

.experience-summary {
  background: var(--parchment);
  border-radius: 8px;
  padding: 2.5rem;
}

.experience-lede {
  margin-bottom: 1.75rem;
  color: var(--text-muted);
}

.experience-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  border-left: 2px solid var(--border);
}

.experience-list > li {
  position: relative;
  padding: 0 0 1.5rem 1.5rem;
}

.experience-list > li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.experience-list > li:last-child {
  padding-bottom: 0;
}

.experience-role {
  font-size: 0.95rem;
  color: var(--primary);
}

.experience-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.15rem 0 0.45rem;
}

.experience-list p {
  font-size: 0.9rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

/* ============================================================
   CONTACT
   ============================================================ */
.section-contact { background: var(--primary); }

.section-contact .section-title { color: #fff; }
.section-contact .section-divider { background: var(--accent); }

.social-contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 0.82rem;
  transition: color 0.2s, transform 0.2s, border-color 0.2s;
  padding: 1.25rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-contact-link:hover {
  color: var(--accent) !important;
  transform: translateY(-3px);
  border-color: rgba(193, 154, 58, 0.5);
}

.social-contact-link i { font-size: 1.6rem; }

.social-contact-link-inline {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.social-contact-link-inline:hover { color: var(--accent); }

/* Contact form */
.contact-form { margin-bottom: 3rem; }

.contact-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.contact-input {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.contact-input::placeholder { color: rgba(255, 255, 255, 0.3); }

.contact-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}

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

.contact-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-alert {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.contact-alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.contact-alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.contact-input.is-invalid {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.08);
}

.contact-error {
  margin-top: 0.35rem;
  font-size: 0.825rem;
  color: #fca5a5;
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
}

footer a { color: var(--accent); }
footer a:hover { color: var(--accent-dark); }
