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

:root {
  --bg:          #F4F2F3;
  --bg-card:     #FFFFFF;
  --bg-card2:    #ECEAEB;
  --accent:      #64766A;
  --accent-dark: #4a5a50;
  --soft:        #94A7AE;
  --soft-light:  rgba(148,167,174,0.15);
  --green-light: rgba(100,118,106,0.12);
  --text:        #2A3530;
  --text-muted:  #5D6E68;
  --border:      rgba(100,118,106,0.18);
  --border-soft: rgba(148,167,174,0.25);
  --shadow:      0 4px 24px rgba(42,53,48,0.08);
  --shadow-lg:   0 12px 48px rgba(42,53,48,0.12);
  --radius:      14px;
  --transition:  0.25s ease;
  --font:        'Inter', sans-serif;
  --font-code:   'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Section ── */
section { padding: 96px 0; }

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 10px;
}

/* ── Navbar ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  background: rgba(244,242,243,0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 3px;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent); }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 96px 24px 64px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 64px;
}
.hero-content { flex: 1; }

.hero-greeting {
  font-size: 0.82rem;
  color: var(--soft);
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.hero-name {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}
.accent { color: var(--accent); }

.hero-title {
  font-family: var(--font-code);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--soft);
  margin-bottom: 24px;
  min-height: 2em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cursor {
  color: var(--accent);
  animation: blink 0.9s infinite;
  font-weight: 300;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-bio {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 500px;
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }

.btn {
  padding: 12px 26px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary  { background: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(100,118,106,0.3); }
.btn-primary:hover  { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(100,118,106,0.35); }
.btn-outline  { border: 2px solid var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover  { background: var(--accent); color: #fff; transform: translateY(-2px); }
.btn-soft     { background: var(--soft-light); color: var(--soft); border: 1.5px solid var(--border-soft); }
.btn-soft:hover     { background: var(--soft); color: #fff; transform: translateY(-2px); }

/* Download CV icon */
.btn-download svg { flex-shrink: 0; }

.hero-socials { display: flex; gap: 14px; }
.hero-socials a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.hero-socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.hero-socials svg { width: 18px; height: 18px; }

/* ── Profile Photo ── */
.hero-visual { flex-shrink: 0; }

.photo-wrapper {
  position: relative;
  width: 340px;
}
.photo-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px dashed var(--border-soft);
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.photo-circle {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--bg-card);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* Fallback initials shown if img fails */
.photo-initials {
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -2px;
  user-select: none;
  display: none;
}
.photo-circle img[src=""] ~ .photo-initials,
.photo-circle:not(:has(img)) .photo-initials { display: block; }

.photo-badge {
  position: absolute;
  bottom: 16px;
  right: -8px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.photo-badge-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{box-shadow:0 0 0 3px rgba(34,197,94,0.2)} 50%{box-shadow:0 0 0 6px rgba(34,197,94,0.1)} }
.photo-badge-text { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }

/* ── About ── */
#about { background: var(--bg-card); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about-text p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.8; }
.about-text strong { color: var(--accent); }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; display: block; font-weight: 500; }

/* ── Skills ── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.skill-group {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}
.skill-group:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.skill-group h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--soft);
  margin-bottom: 18px;
  font-weight: 600;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}
.tag-primary   { background: rgba(100,118,106,0.12); color: var(--accent-dark); border: 1.5px solid rgba(100,118,106,0.25); }
.tag-secondary { background: rgba(148,167,174,0.15); color: #4a6b74;             border: 1.5px solid rgba(148,167,174,0.3); }
.tag-tertiary  { background: rgba(100,118,106,0.08); color: #3d5c4a;             border: 1.5px solid rgba(100,118,106,0.18); }
.tag-accent    { background: rgba(148,167,174,0.1);  color: #496570;             border: 1.5px solid rgba(148,167,174,0.22); }

/* ── Projects ── */
#projects { background: var(--bg-card); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }

.project-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.project-card.featured {
  border-color: var(--accent);
  grid-column: 1 / -1;
  background: var(--bg-card);
}
.project-badge {
  position: absolute;
  top: 18px; right: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.project-header { display: flex; align-items: center; justify-content: space-between; }
.project-icon { font-size: 2rem; }
.project-links { display: flex; gap: 10px; }
.project-links a {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  padding: 5px 13px;
  border-radius: 7px;
  font-weight: 500;
  background: var(--bg-card);
  transition: all var(--transition);
}
.project-links a:hover { color: var(--accent); border-color: var(--accent); background: var(--green-light); }
.project-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.project-card p  { color: var(--text-muted); font-size: 0.91rem; flex: 1; line-height: 1.75; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.project-tags span {
  background: var(--green-light);
  color: var(--accent-dark);
  font-size: 0.77rem;
  padding: 3px 10px;
  border-radius: 5px;
  font-family: var(--font-code);
  font-weight: 500;
  border: 1px solid rgba(100,118,106,0.2);
}

/* ── Timeline ── */
.timeline { position: relative; padding-left: 36px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-dot {
  position: absolute;
  left: -33px; top: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(100,118,106,0.25);
}
.timeline-dot-accent { background: var(--soft); box-shadow: 0 0 0 3px rgba(148,167,174,0.3); }
.timeline-content {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.timeline-content:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.timeline-meta { display: flex; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.timeline-date {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-code);
  background: var(--green-light);
  padding: 2px 10px;
  border-radius: 4px;
}
.timeline-location { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; padding: 2px 0; }
.timeline-content h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.timeline-org { color: var(--soft); font-size: 0.88rem; margin: 4px 0 10px; font-weight: 600; }
.timeline-detail { color: var(--text-muted); font-size: 0.86rem; }
.timeline-bullets { color: var(--text-muted); font-size: 0.86rem; padding-left: 18px; }
.timeline-bullets li { margin-bottom: 6px; }

/* ── Awards ── */
#awards { background: var(--bg-card); }
.awards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.award-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.award-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.award-icon { font-size: 2.2rem; flex-shrink: 0; }
.award-date { font-size: 0.77rem; color: var(--soft); font-family: var(--font-code); font-weight: 600; display: block; margin-bottom: 6px; }
.award-body h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.award-body p  { font-size: 0.86rem; color: var(--text-muted); line-height: 1.7; }
.award-body strong { color: var(--accent); }

/* ── Contact ── */
.contact-intro { color: var(--text-muted); font-size: 1rem; max-width: 540px; margin-bottom: 40px; line-height: 1.8; }
.contact-cards { display: flex; flex-wrap: wrap; gap: 18px; }
.contact-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.contact-icon {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-light);
  border-radius: 10px;
  margin-bottom: 6px;
  border: 1.5px solid rgba(100,118,106,0.2);
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-label { font-size: 0.73rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); font-weight: 600; }
.contact-value { font-size: 0.83rem; color: var(--accent); font-family: var(--font-code); word-break: break-all; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.83rem;
  background: var(--bg-card);
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 860px) {
  #hero { flex-direction: column-reverse; min-height: auto; padding-top: 120px; gap: 40px; align-items: center; text-align: center; }
  .hero-bio { margin: 0 auto 36px; }
  .hero-cta, .hero-socials { justify-content: center; }
  .photo-wrapper { width: 260px; }
  .photo-circle { width: 260px; height: 260px; }
  .about-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hamburger { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 64px 0 0 0;
    background: rgba(244,242,243,0.97);
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 999;
  }
  .nav-links.open a { font-size: 1.2rem; color: var(--text); }
  .project-card.featured { grid-column: auto; }
  .contact-cards { flex-direction: column; }
}
