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

html {
  scroll-behavior: smooth;
}

body {
  background-color: #F5F2EC;
  color: #2C2A24;
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
  color: #1A1A2E;
}

/*  SHARED LAYOUT  */
.section-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 90px 0;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #C9A84C;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: 2.4rem;
  margin-bottom: 0.8rem;
}

.section-subtitle {
  color: #7A7568;
  font-size: 1rem;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

/* BUTTONS  */
.btn-primary {
  display: inline-block;
  background-color: #1A1A2E;
  color: #F5F2EC;
  padding: 0.8rem 1.8rem;
  border-radius: 48px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px solid #1A1A2E;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary:hover {
  background-color: #C9A84C;
  border-color: #C9A84C;
  color: #1A1A2E;
}

.btn-outline {
  display: inline-block;
  background-color: transparent;
  color: #1A1A2E;
  padding: 0.8rem 1.8rem;
  border-radius: 42px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px solid #1A1A2E;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.btn-outline:hover {
  background-color: #1A1A2E;
  color: #F5F2EC;
}

/* NAV / HEADER */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(245, 242, 236, 0.95);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  /* z-index replaced by stacking: just ensure header comes last in source or use a high value the simple way */
  position: fixed;
  top: 0; left: 0; right: 0;
  background-color: #F5F2EC;
  border-bottom: 1px solid #E0DDD0;
}

#navbar.scrolled {
  box-shadow: 0 2px 14px rgba(26, 26, 46, 0.08);
}

.nav-container {
  max-width: 1060px;
  margin: 0 auto;
  /* push logo all the way to the left edge with less left padding */
  padding: 1.1rem 1.5rem 1.1rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #1A1A2E;
}

.logo-dot {
  color: #C9A84C;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: #7A7568;
  transition: color 0.25s ease;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #C9A84C;
  transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.active {
  color: #1A1A2E;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.mobile-menu {
  display: none;
  background-color: #F5F2EC;
  border-top: 1px solid #E0DDD0;
  padding: 1rem 1.5rem;
}

.mobile-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #2C2A24;
  display: block;
  padding: 0.4rem 0;
  border-bottom: 1px solid #E0DDD0;
  transition: color 0.25s ease;
}
.mobile-link:hover { color: #C9A84C; }

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: #F5F2EC;
}
.hero-content {
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  padding-top: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-text {
  flex: 1;
}

.hero-photo {
  flex-shrink: 0;
  width: 280px;
  height: 320px;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
  border: 3px solid #C9A84C;
  display: block;
}

.hero-greeting {
  font-size: 0.9rem;
  font-weight: 500;
  color: #C9A84C;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-name {
  font-size: 5rem;
  font-weight: 900;
  color: #1A1A2E;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
  line-height: 1;
}

.hero-name-accent {
  color: #C9A84C;
}

.hero-tagline {
  font-size: 1.2rem;
  color: #1A1A2E;
  margin-bottom: 0.5rem;
}

.hero-sub {
  font-size: 0.95rem;
  color: #7A7568;
  margin-bottom: 2rem;
}

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

/*  ABOUT */
.about {
  background-color: #1A1A2E;
}

.about .section-label { color: #C9A84C; }
.about .section-title { color: #F5F2EC; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  margin-top: 2rem;
}

.about-intro {
  font-size: 1.1rem;
  color: #E8D5A3;
  margin-bottom: 1.2rem;
}

.about-text p {
  color: rgba(245, 242, 236, 0.72);
  margin-bottom: 1rem;
}

.about-text strong {
  color: #C9A84C;
}

.about-details {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.detail-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #C9A84C;
  font-weight: 500;
  display: block;
  margin-bottom: 0.15rem;
}

.detail-value {
  font-size: 0.88rem;
  color: rgba(245, 242, 236, 0.75);
}


.skills-block {
  background-color: rgba(245, 242, 236, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 7px;
  padding: 1.5rem;
  align-self: start;
}

.skills-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  color: #F5F2EC;
  margin-bottom: 0.9rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill-item {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(245, 242, 236, 0.85);
  background-color: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 5px;
  padding: 0.3rem 0.7rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.skill-item:hover {
  background-color: rgba(201, 168, 76, 0.22);
  border-color: rgba(201, 168, 76, 0.6);
}

/* Education */
.education-section {
  margin-top: 4rem;
}

.edu-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  color: #F5F2EC;
  margin-bottom: 2rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.25);
}

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

.timeline-item {
  padding: 0 0 1.8rem 0;
}

.timeline-dot { display: none; }

.timeline-year {
  font-size: 0.72rem;
  font-weight: 500;
  color: #C9A84C;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
}

.timeline-content h4 {
  font-size: 1rem;
  color: #F5F2EC;
  margin-bottom: 0.3rem;
}

.timeline-content p {
  font-size: 0.88rem;
  color: rgba(245, 242, 236, 0.55);
  line-height: 1.6;
}

/* PROJECTS */
.projects {
  background-color: #F5F2EC;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background-color: #EDEAD9;
  border: 1px solid #E0DDD0;
  border-radius: 60px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(26, 26, 46, 0.1);
}

.project-card--dark {
  background-color: #1A1A2E;
  border-color: rgba(201, 168, 76, 0.2);
}

.project-tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #C9A84C;
}

.project-name {
  font-size: 1.1rem;
  color: #1A1A2E;
  line-height: 1.3;
}
.project-card--dark .project-name { color: #F5F2EC; }

.project-desc {
  font-size: 0.88rem;
  color: #7A7568;
  line-height: 1.65;
  flex: 1;
}
.project-card--dark .project-desc { color: rgba(245, 242, 236, 0.6); }

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tool-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 17px;
  background-color: #E0DDD0;
  color: #7A7568;
}
.project-card--dark .tool-tag {
  background-color: rgba(201, 168, 76, 0.1);
  color: #E8D5A3;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: #1A1A2E;
  transition: color 0.25s ease;
  align-self: flex-start;
}
.project-link:hover { color: #C9A84C; }
.project-card--dark .project-link { color: #C9A84C; }

/* CONTACT */
.contact {
  background-color: #1A1A2E;
}
.contact .section-label { color: #C9A84C; }
.contact .section-title { color: #F5F2EC; }
.contact .section-subtitle { color: rgba(245, 242, 236, 0.55); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: rgba(245, 242, 236, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 7px;
  padding: 1rem 1.2rem;
  transition: border-color 0.25s ease;
}
.contact-card:hover { border-color: rgba(201, 168, 76, 0.4); }

.contact-icon {
  font-size: 1.1rem;
  min-width: 24px;
}

.contact-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #C9A84C;
  font-weight: 500;
  display: block;
  margin-bottom: 0.2rem;
}

.contact-value {
  font-size: 0.9rem;
  color: rgba(245, 242, 236, 0.8);
  display: block;
  transition: color 0.25s ease;
}
a.contact-value:hover { color: #C9A84C; }

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(245, 242, 236, 0.65);
}

.form-group input,
.form-group textarea {
  background-color: rgba(245, 242, 236, 0.05);
  border: 1px solid rgba(245, 242, 236, 0.12);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: #F5F2EC;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s ease;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: #C9A84C;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(245, 242, 236, 0.28);
}

.form-error {
  font-size: 0.75rem;
  color: #e05c5c;
  min-height: 0.9rem;
}

.form-success {
  display: none;
  background-color: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 5px;
  padding: 0.9rem 1rem;
  font-size: 0.88rem;
  color: #E8D5A3;
  text-align: center;
}
.form-success.visible { display: block; }

/* FOOTER */
.footer {
  background-color: #141427;
}

.footer-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem 0 1.8rem;
  border-bottom: 1px solid rgba(245, 242, 236, 0.07);
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand p {
  font-size: 0.82rem;
  color: rgba(245, 242, 236, 0.4);
  margin-top: 0.4rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.85rem;
  color: rgba(245, 242, 236, 0.5);
  transition: color 0.25s ease;
}
.footer-nav a:hover { color: #C9A84C; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
  font-size: 0.8rem;
  color: rgba(245, 242, 236, 0.4);
}

.back-to-top {
  font-size: 0.8rem;
  color: #C9A84C;
  transition: opacity 0.25s ease;
}
.back-to-top:hover { opacity: 0.7; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-content { flex-direction: column-reverse; align-items: flex-start; gap: 2rem; }
  .hero-photo { width: 200px; height: 230px; align-self: center; }
  .hero-name { font-size: 3.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  section { padding: 65px 0; }
  .hero-content { padding-top: 100px; }
  .about-details { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-bottom { flex-direction: column; gap: 0.6rem; text-align: center; }
  .section-title { font-size: 1.9rem; }
}

.cv-btn {
  width: 100%;
  text-align: center;
  color: #C9A84C;
  border-color: #C9A84C;
  margin-top: 0.5rem;
  font-size: 0.88rem;
}
.cv-btn:hover {
  background-color: #C9A84C;
  color: #1A1A2E;
}