

:root {
  --bg-color: #fbfcfc;
  --color: #141c3a;
  --text-color: #45556C;

  /* basic colors */
  --color-red-light: #f8e8f3;
  --color-yellow-light: #f8f5e8;
  --color-green-light: #e8f8ed;
  --color-blue-light: #d6eaf8;

  --color-purple: #7c7cff;
  --color-purple-light: #a5b4fc;
  --color-red: #FB2C36;
  --color-red-light: #FFC9C9;
  --color-green: #05DF72;
  --color-orange: #FF8904;
  --color-orange-light: #FFD6A7;
  /* --color-green-light: #B9F8CF; */

  --color-underline: #7843E9;

  /* shadow */
  --shadow-logo: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  --shadow-header: rgba(23, 23, 23, 0.05) 0 0 0 1px;
  --shadow-1: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
  --shadow-2: rgba(67, 71, 85, 0.27) 0px 0px 0.25em, rgba(90, 125, 188, 0.05) 0px 0.25em 1em;

  --radius-1: 6px;
  --radius-2: 10px;
}

/* dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    /* --bg-color: #0f1325;
    --color: #e6e9f8;
    --color-red-light: #40283a;
    --color-yellow-light: #3c3623;
    --color-green-light: #203c2a;
    --color-blue-light: #1c2c40;
    --shadow-header: rgba(0,0,0,0.4) 0 0 0 1px;
    --shadow-logo: rgba(0,0,0,0.5) 0 2px 8px 0;
    --surface-1: #121734;
    --surface-2: #192042; */
  }
}

html {
  color-scheme: light dark;
}

body {
  font-family: 'Montserrat', sans-serif, arial;
  font-optical-sizing: auto;
  font-style: normal;
  background-color: var(--bg-color);
  color: var(--color);
  margin: 0;
  padding: 0 20px;

  background-image:
    linear-gradient(to right, #ddd 1px, transparent 1px),
    linear-gradient(to bottom, #ddd 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,1));
  background-size: 20px 20px;
  /* min-height: 100vh; */
}

p {
  margin: 0;
}

h1 {
  font-size: 2.5em;
}

h2 {
  font-size: 1.8em;
}

nav {
  padding: 5px 20px;
  margin: 20px 0;
  border-radius: var(--radius-2);
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-2);
  position: relative;
  min-width: calc(350px - 40px);
  background-color: var(--bg-color);
}

nav .logo img {
  width: 35px;
  box-shadow: var(--shadow-logo);
  border-radius: 50%;
  padding: 4px;
  margin-right: 35px;
}

nav .quotes p {
  font-size: 14px;
  font-style: italic;
  color: #555;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Hero quotes roller */
.quotes-roller {
  position: relative;
  height: 24px;
  overflow: hidden;
  margin: 6px 0 8px 0;
}

.quotes-roller ul {
  list-style: none;
  padding: 0;
  margin: 0;
  height: 100%;
}

.quotes-roller li {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 8px);
  opacity: 0;
  transition: opacity .35s ease, transform .35s ease;
  font-style: italic;
  color: #555;
  white-space: nowrap;
}

.quotes-roller li.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

nav .menu {
  display: flex;
  gap: 14px;
}

nav .menu a {
  color: var(--color);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-1);
}

nav .menu a:hover {
  background-color: var(--color-blue-light);
}

/* Mobile nav toggle (hamburger) */
.nav-toggle {
  display: none; /* shown on small screens */
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-1);
  background: var(--bg-color);
  box-shadow: var(--shadow-header);
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color);
}

/* Responsive layout for nav */
@media (max-width: 768px) {
  nav {
    gap: 8px;
  }

  nav .quotes { display: none; }

  .nav-toggle { display: inline-flex; }

  nav .menu {
    display: none;
    position: absolute;
    top: calc(55px + 6px);
    right: 6px;
    background: var(--bg-color);
    box-shadow: var(--shadow-2);
    border-radius: var(--radius-2);
    padding: 8px;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    z-index: 1000;
  }

  nav .menu.open { display: flex; }
  nav .menu a { padding: 8px 10px; }
}

footer {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 15px 30px 25px 30px;
  text-align: center;
  background-color: var(--bg-color);
  margin: 20px 0 0 0;
  box-shadow: var(--shadow-header);
  font-size: 0.7em;
  border-radius: var(--radius-2) var(--radius-2) 0 0;
  color: var(--color);
}

footer > div {
  flex-direction: column;
  display: flex;
  gap: 5px; 
}

footer .footer-left {
  gap: 15px;
}

footer .footer-left > div {
  display: flex;
  gap: 5px;
}

footer .footer-left div p {
  height: fit-content;
  align-self: center;
  font-weight: bold;
}

footer .footer-left img {
  width: 32px;
}

.container section {
  box-shadow: var(--shadow-2);
  position: relative;
  color: var(--color);
  padding: 20px 20px 20px 20px;
  margin: 20px 0;
  border-radius: 10px;
  min-height: 320px;
  min-width: calc(350px - 40px);
  height: fit-content;
}

.section-title {
  margin: 0 0 10px 0;
}

.profile {
  border-radius: 50%;
  border: 10px solid var(--color-yellow-light);
  position: absolute;
  bottom: -80px;
  right: calc(50% - 135px);
  z-index: 10;
}

@media (max-width: 890px) {
  .profile {
    bottom: -120px;
  }
}

/* .profile {
  position: absolute;
  left: 50%;
  bottom: clamp(-80px, 8vh, -200px);
  transform: translateX(-50%);
  aspect-ratio: 1 / 1;

  border-radius: 50%;
  border: clamp(4px, 1vw, 10px) solid var(--color-yellow-light);

  z-index: 10;
} */

.skills {
  display: flex;
}

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

.tag {
  font-size: 12px;
  border-radius: var(--radius-1);
  padding: 4px 8px;
  background-color: var(--color-yellow-light);
}

.absolute-container {
  position: absolute;
  display: flex;
  gap: 10px;
  top: 200px;
  right: 180px;
}

.box {
  box-shadow: var(--shadow-1);
  color: #141c3a;
  max-width: 380px;
  width: 380px;
  height: 500px;
  border-radius: 8px;
  background-color: var(--bg-color);
}

.btn {
  display: inline-block;
  font-size: 13px;
  text-decoration: none;
  color: var(--color);
  padding: 6px 10px;
  border-radius: var(--radius-1);
  box-shadow: var(--shadow-header);
  background-color: var(--bg-color);
}

.btn.primary {
  background-color: var(--color-purple);
  color: var(--bg-color)
}

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

.btn.secondary {
  background-color: var(--color-orange);
  color: var(--bg-color)
}

.btn.secondary:hover {
  background-color: var(--color-orange-light);
}

.contact-actions {
  display: inline-flex;
  gap: 10px;
  margin-top: 10px;
}

.bg-green {
  background-color: var(--color-green-light);
}

.bg-light {
  background-color: var(--bg-color);
}

.bg-blue {
  background-color: var(--color-blue-light);
}

.icon, .icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  stroke-width: 1.5;
}

.contact-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke-width: 1.5;
}

/* background imgs */
.polygon {
  background-image: url("../assets/images/Polygon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.icon-grid {
  background-image: url("../assets/images/Icon_Grid.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.curve-lines {
  background-image: url("../assets/images/Curve_Line.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

section {
  scroll-margin-top: 6rem;
}

section.about-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;

  align-items: center;
  text-align: center;

  max-width: 700px;
  margin: 10rem auto 0;
  padding: 2rem;
  min-height: fit-content;
}

section.about-section p {
  display: block;
  text-align: center;
  color: var(--text-color);
  font-weight: 500;
  max-width: 80rem;
  margin: auto;
  line-height: 1.6;
}

.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
}

/** Contact Section */
section.contact-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;

  align-items: center;
  text-align: center;

  max-width: 700px;
  margin: 0rem auto 0;
  padding: 2rem;
  min-height: fit-content;
}

section.about-section p {
  display: block;
  text-align: center;
  color: var(--text-color);
  font-weight: 500;
  max-width: 80rem;
  margin: auto;
  line-height: 1.6;
}

/** Footer contacts */
.footer-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 15px;
}

.footer-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 18px;
}

.footer-contact ul li a {
  color: var(--color);
  text-decoration: none;
}

.footer-contact ul li a:hover {
  color: var(--color-purple);
}

/** Projects Section */
section.projects-section {
  box-shadow: inset;
  background-color: transparent;
  box-shadow: none;
  margin: 0 auto;
  padding: 4rem 0 4rem 0;
}

.projects-section p {
  display: block;
  color: var(--color);
  font-weight: 500;
  max-width: 80rem;
  margin: auto;
  line-height: 1.6;
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 12px;
  margin-top: 2rem;
}

.project-card {
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-2);
  background-color: var(--bg-color);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card header h3 {
  margin: 0 0 6px 0;
}

.project-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}


/** Skills Section */

section.skills-section {
  box-shadow: inset;
  background-color: transparent;
  box-shadow: none;
  margin: 0 auto;
  padding: 4rem 0 4rem 0;
}

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

.skill-card {
  padding: 1.5rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-2);
  align-items: center;
}

.skill-card h3 {
  font-size: 1.5em;
  font-weight: 600;
  text-align: center;
  position: relative;
}

.skill-card h3::after {
  content: '';
  position: absolute;
  top: calc(100% + 0.8rem);
  height: 5px;
  width: 3rem;
  background: var(--color-underline);
  left: 50%;
  transform: translateX(-50%);
  border-radius: 5px;
  z-index: 10;
}

.skill-title {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.skill-description {
  text-align: center;
  display: block;
  text-align: center;
  color: var(--text-color);
  font-size: 1.2rem;
  font-weight: 500;
  max-width: 80rem;
  margin: auto;
  line-height: 1.6;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.skill-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-purple), var(--color-purple-light));
  border-radius: 999px;
}

.skill-bar-fill.level-1 {
  background: linear-gradient(90deg, var(--color-red), var(--color-red-light));
  width: 33%; }
.skill-bar-fill.level-2 { width: 66%; }
.skill-bar-fill.level-3 { 
  background: linear-gradient(90deg, var(--color-green), var(--color-green-light));
  width: 100%; }

@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  section.projects-section {
    padding: 2rem 0 2rem 0;
  }
  section.skills-section {
    padding: 2rem 0 2rem 0;
  }
}