:root {
  --green: #3c8453;
  --green-light: #e8f5ed;
  --green-dark: #2a5e3a;
  --charcoal: #1e1e1e;
  --mid: #555555;
  --light: #f7f5f2;
  --white: #ffffff;
  --border: #e2ddd8;
  --header-bg: rgba(247, 245, 242, 0.85);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.14);
  --radius: 16px;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", sans-serif;
}

body.dark-mode {
  --charcoal: #f7f5f2;
  --mid: #a3a3a3;
  --light: #121212;
  --white: #1e1e1e;
  --border: #333333;
  --green-light: #1c3324;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.7);
  --header-bg: rgba(18, 18, 18, 0.85);
}

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

.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

html {
  scroll-behavior: smooth;
}
body {
  background: var(--light);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}

/* HEADER */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  padding: 14px 32px;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease;
}

.header-name {
  color: var(--charcoal);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease;
}

.header-links a {
  color: var(--mid);
  position: relative;
  text-decoration: none;
  transition: color 0.4s ease;
}

.header-links a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  width: 0;
  left: 0;
  height: 1.75px;
  background: var(--charcoal);
  transition: width 0.4s ease-in-out;
}

.header-links a:hover {
  color: var(--charcoal);
}

.header-links a:hover::after {
  width: 100%;
}

.header-links.open {
  display: flex;
}

.resume-btn {
  background: var(--charcoal);
  color: var(--white) !important;
  padding: 7px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: transform 0.4s ease-in-out;
}

.resume-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: translateX(-100%);
  transition: transform 0.4s ease-in-out;
  z-index: -1;
}

.resume-btn:hover {
  transform: translateY(-2px);
}

.resume-btn:hover::before {
  transform: translateX(0);
}

.toggle-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: background-color 0.2s ease-in-out;
}

.toggle-button {
  background: none;
  border: none;
  color: var(--charcoal);
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  outline: none;
}

.toggle-button i {
  position: absolute;
  transition:
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.6s ease;
}

.sun-icon {
  transform: translateY(0) rotate(0deg);
  opacity: 1;
}

.moon-icon {
  transform: translateY(30px) rotate(-90deg);
  opacity: 0;
}

body.dark-mode .sun-icon {
  transform: translateY(30px) rotate(-90deg);
  opacity: 0;
}

body.dark-mode .moon-icon {
  transform: translateY(0) rotate(0deg);
  opacity: 1;
}

/* HERO SECTION */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 80px 60px;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid #b2d9bc;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 32px;
  width: fit-content;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  color: var(--green);
  background: var(--green);
  border-radius: 999px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(60, 132, 83, 0.5);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(60, 132, 83, 0);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
}

.hero-title em {
  font-style: italic;
  color: var(--green);
}

.cursor {
  color: var(--green);
  font-style: normal;
  animation: blink 0.9s infinite;
  margin-top: -10px;
}

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

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--mid);
  margin-bottom: 40px;
  max-width: 620px;
}

.hero-cta {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-work {
  background-color: var(--charcoal);
  color: var(--light);
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    background 0.2s,
    transform 0.2s;
}

.btn-work:hover {
  background: var(--green);
  transform: translateY(-2px);
}

.btn-linkedin {
  border: 1.5px solid var(--border);
  color: var(--charcoal);
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  background: transparent;
  transition:
    border-color 0.2s,
    color 0.2s,
    transform 0.2s;
}

.btn-linkedin:hover {
  border: 1.5px solid var(--green);
  color: var(--green);
  transform: translateY(-2px);
}

/*SECTIONS*/
.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 40px;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--charcoal);
  margin-bottom: 40px;
  line-height: 1.2;
}

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

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

.about-links {
  display: flex;
  gap: 20px;
}

.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--charcoal);
  border-bottom: 2px solid var(--border);
  padding-bottom: 4px;
}

.about-links a:hover {
  color: var(--green);
  border-color: var(--green);
  transform: translateY(-2px);
  transition: all 0.2s ease-in-out;
}

.about-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 75px;
}

.card-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition:
    box-shadow 0.2s,
    transform 0.2s,
    background-color 0.4s ease,
    border-color 0.4s ease;
}

.card-stat:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-stat span {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--green);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

.card-stat p {
  font-size: 0.9rem;
  color: var(--mid);
  font-weight: 500;
}

/*SKIILS*/
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--charcoal);
  transition: all 0.2s ease;
  cursor: default;
}

.skill-chip:hover {
  background: var(--green-light);
  border-color: #b2d9bc;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.skill-chip i {
  color: var(--green);
  font-size: 1rem;
}

/*PROJECTS*/
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition:
    box-shadow 0.2s ease-in-out,
    transform 0.2s,
    background-color 0.4s ease-in-out,
    border-color 0.4s ease-in-out;
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-tag {
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05rem;
}

.project-links {
  display: flex;
  gap: 14px;
}

.project-links a {
  color: var(--mid);
  font-size: 1rem;
  transition:
    color 0.2s,
    transform 0.2;
}

.project-links a:hover {
  color: var(--green);
  transform: translateY(-2px);
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--charcoal);
}

.project-card p {
  font-size: 0.88rem;
  color: var(--mid);
  margin-bottom: 20px;
  line-height: 1.65;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tech span {
  background: var(--light);
  color: var(--mid);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
}

/*EXPERIENCE*/
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--green);
  transition: background 0.2s;
}

.timeline-item:hover .timeline-dot {
  background: var(--green);
}

.timeline-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition:
    box-shadow 0.2s,
    transform 0.2s,
    background-color 0.4s ease,
    border-color 0.4s ease;
}

.timeline-item:hover .timeline-content {
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 6px 0 2px;
  color: var(--charcoal);
}

.timeline-company {
  font-size: 0.82rem;
  color: var(--mid);
  font-weight: 600;
  margin-bottom: 10px !important;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--mid);
}

/*CONTACt*/
.contact-box {
  background: var(--charcoal);
  border-radius: 24px;
  padding: 64px 56px;
  text-align: center;
  color: white;
}

.contact-box h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 16px;
}

.contact-box p {
  color: var(--mid);
  max-width: 480px;
  margin: 0 auto 36px;
  font-size: 0.97rem;
}

.btn-primary {
  padding: 14px 24px;
  margin-bottom: 36px;
  border-radius: 999px;
  background: var(--white);
  color: var(--charcoal);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--green);
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
}

.contact-socials a {
  color: var(--mid);
  font-size: 1.4rem;
  transition:
    color 0.2s,
    transform 0.2s;
}

.contact-socials a:hover {
  color: var(--white);
  transform: translateY(-3px);
}

/*FOOTER*/
.footer {
  text-align: center;
  padding: 32px;
  font-size: 0.82rem;
  color: var(--mid);
  border-top: 1px solid var(--border);
}

/*RESPONSIVE*/
@media (max-width: 768px) {
  .hero {
    padding: 60px 28px 40px;
    min-height: 80vh;
  }
  .section {
    padding: 60px 24px;
  }
  .hamburger {
    display: flex;
  }
  .header-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 28px 24px;
    box-shadow: var(--shadow);
  }
  .header-links.open {
    display: flex;
  }
  .header-links a {
    padding: 10px 0;
    width: 100%;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .header-links a:last-child {
    border-bottom: none;
    margin-top: 8px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .contact-box {
    padding: 40px 24px;
  }
}

/* --- SCALING FOR LAPTOPS & MONITORS --- */

/* For standard laptops (1024px and up) */
@media (min-width: 1024px) {
  html {
    font-size: 18px; 
  }
  .hero {
    max-width: 1000px;
  }
  .section {
    max-width: 1100px;
  }
}

/* For larger laptops and desktop monitors (1440px and up) */
@media (min-width: 1440px) {
  html {
    font-size: 20px;
  }
  .hero {
    max-width: 1100px;
  }
  .section {
    max-width: 1200px;
  }
}
