/* ── Variables ── */
:root {
  --navy:       #0d2137;
  --navy-dark:  #081628;
  --navy-mid:   #152d47;
  --white:      #ffffff;
  --gray:       #f9f7f2;
  --gold:       #c9a84c;
  --gold-light: #d9bc72;
  --text:       #2c3e50;
  --text-muted: #7a8ea3;
  --border:     #dde3ec;
  --max-w:      960px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: Georgia, 'Times New Roman', serif;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  background: var(--gold);
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

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

/* ── Navbar ── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--navy);
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  text-decoration: none;
}

.logo-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  font-weight: normal;
  color: var(--gold);
  letter-spacing: 0.2em;
  transition: color 0.2s ease;
}

.nav-logo:hover .logo-text {
  color: var(--gold-light);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--gold);
}

/* ── Hero ── */
#hero {
  background: var(--navy);
  padding-top: 64px;
  position: relative;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 90px 24px 80px;
  display: flex;
  align-items: center;
  gap: 64px;
}

.hero-photo img {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  border: 4px solid var(--gold);
  display: block;
  flex-shrink: 0;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-eyebrow {
  color: var(--gold);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 0.5rem;
  font-weight: normal;
  letter-spacing: -0.02em;
}

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

.hero-scroll span {
  display: block;
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50% { transform: translateX(-50%) translateY(7px); opacity: 0.7; }
}

.hero-title {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.hero-location {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}


/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
  border: 1.5px solid var(--gold);
}

.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
}

/* ── About ── */
#about {
  background: var(--white);
}

.about-body p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.85;
  max-width: 680px;
  margin-bottom: 1.25rem;
}

.about-body strong {
  color: var(--navy);
  font-weight: 600;
}

.about-meta {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.meta-item {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text);
}

.meta-label {
  color: var(--gold);
  font-weight: 600;
  min-width: 110px;
  flex-shrink: 0;
}

/* ── Skills ── */
#skills {
  background: var(--gray);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2.5rem;
}

.skill-group h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

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

.skill-tags span {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s;
}

.skill-tags span:hover {
  border-color: var(--gold);
}

/* ── Experience / Education ── */
#experience {
  background: var(--white);
}

.section-sub {
  margin-top: 3.5rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline-company {
  padding-left: 1.5rem;
  border-left: 2px solid var(--gold);
}

.timeline-company-header {
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  margin-bottom: 0.875rem;
}

.timeline-company-header h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--navy);
}

.badge {
  background: var(--gray);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.timeline-roles {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.timeline-role {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 7px;
  flex-shrink: 0;
}

.timeline-content strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.4;
}

.timeline-date {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ── Contact ── */
#contact {
  background: var(--navy);
}

#contact h2 {
  color: var(--white);
}

#contact h2::after {
  background: var(--gold);
}

#contact > .container > p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.75;
}

.contact-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Footer ── */
footer {
  background: var(--navy-dark);
  text-align: center;
  padding: 1.25rem 24px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

/* ── Hamburger (hidden on desktop) ── */
.nav-toggle { display: none; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 17px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-burger span {
  display: block;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1px;
  transition: transform 0.28s ease, opacity 0.28s ease;
  transform-origin: center;
}

.nav-toggle:checked + .nav-burger span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle:checked + .nav-burger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle:checked + .nav-burger span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ── MacBook 16" / large desktop (≥1200px) ── */
@media (min-width: 1200px) {
  :root { --max-w: 1080px; }

  .hero-inner {
    padding: 100px 32px 90px;
    gap: 72px;
  }

  .container {
    padding: 88px 32px;
  }

  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .contact-links .btn {
    min-width: 200px;
    text-align: center;
  }

}

/* ── Large screens / TV (≥1600px) ── */
@media (min-width: 1600px) {
  :root { --max-w: 1400px; }

  .hero-inner {
    padding: 120px 48px 110px;
    gap: 90px;
  }

  .container {
    padding: 100px 48px;
  }

  .hero-photo img {
    width: 200px;
    height: 200px;
  }
}

/* ── Wide monitor / TV (≥1920px) ── */
@media (min-width: 1920px) {
  :root { --max-w: 1600px; }

}

/* ── Tablet (≤900px) ── */
@media (max-width: 900px) {
  .container {
    padding: 64px 32px;
  }

  .hero-inner {
    padding: 72px 32px 64px;
    gap: 40px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* ── Tablet mid (≤768px) ── */
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Mobile (≤640px) ── */
@media (max-width: 640px) {
  /* Hamburger visible */
  .nav-burger {
    display: flex;
  }

  /* Nav dropdown */
  .nav-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy-dark);
    border-top: 2px solid rgba(201, 168, 76, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    z-index: 99;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 1rem 24px;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  /* Hero — keep side-by-side on mobile, just smaller photo */
  .hero-inner {
    align-items: center;
    gap: 1.25rem;
    padding: 48px 20px 56px;
  }

  .hero-photo img {
    width: 90px;
    height: 90px;
    border-width: 3px;
  }

  .hero-title {
    font-size: 0.9rem;
  }

  /* Buttons full-width, slightly smaller */
  .hero-cta,
  .contact-links {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }

  .hero-cta .btn {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
  }

  /* Sections */
  .container {
    padding: 52px 20px;
  }

  /* Skills */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  /* Education / Experience institution names */
  .timeline-company-header h3 {
    font-size: 1rem;
  }

  /* Meta */
  .meta-item {
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* ── Small phones (≤400px) ── */
@media (max-width: 400px) {
  .hero-inner {
    padding: 40px 16px 48px;
    gap: 1rem;
  }

  .hero-photo img {
    width: 72px;
    height: 72px;
  }

  .container {
    padding: 44px 16px;
  }

  .logo-text {
    font-size: 1rem;
  }
}

/* ── Romania Fact of the Day Widget ─────────────────────────── */
#ro-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

#ro-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#ro-toggle:hover {
  background: var(--gold);
  transform: scale(1.08);
}
@media (hover: none) {
  #ro-toggle:hover {
    background: var(--navy);
    transform: none;
  }
}

#ro-panel {
  position: absolute;
  bottom: 64px;
  right: 0;
  width: 320px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
#ro-panel.ro-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.ro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
}
.ro-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ro-body {
  position: relative;
  padding: 1.1rem 1.1rem 1rem;
}


.ro-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.ro-fact-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: block;
}

.ro-fact-img[hidden] {
  display: none !important;
}

.ro-fact-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0;
  min-height: 80px;
}


@media (max-width: 540px) {
  #ro-panel {
    width: calc(100vw - 3rem);
  }
}
