/* ===== IMPORT FONT ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --hue: 250;

  /* Colors */
  --accent:         hsl(var(--hue), 90%, 60%);
  --accent-alt:     hsl(var(--hue), 70%, 48%);
  --accent-glow:    hsla(var(--hue), 90%, 60%, 0.25);
  --accent-subtle:  hsla(var(--hue), 90%, 60%, 0.08);

  --title-color:    hsl(220, 20%, 96%);
  --text-color:     hsl(220, 12%, 65%);
  --text-muted:     hsl(220, 10%, 45%);

  --bg:             hsl(222, 20%, 10%);
  --surface:        hsl(222, 18%, 14%);
  --surface-alt:    hsl(222, 16%, 18%);
  --border:         hsla(220, 20%, 50%, 0.12);

  /* Nav glassmorphism */
  --nav-bg:         hsla(222, 22%, 8%, 0.55);
  --nav-blur:       blur(20px) saturate(180%);
  --nav-border:     hsla(220, 20%, 80%, 0.08);

  /* Typography */
  --body-font:      'Inter', sans-serif;
  --fs-xxl:         clamp(2rem, 5vw, 3.5rem);
  --fs-xl:          clamp(1.5rem, 3vw, 2.25rem);
  --fs-lg:          clamp(1.1rem, 2vw, 1.5rem);
  --fs-md:          1rem;
  --fs-sm:          0.875rem;
  --fs-xs:          0.75rem;

  --fw-light:   300;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;

  /* Spacing */
  --header-h: 4rem;

  /* Z-index */
  --z-fixed:   100;
  --z-tooltip:  10;

  /* Radius */
  --r-sm:  0.5rem;
  --r-md:  1rem;
  --r-lg:  1.5rem;
  --r-xl:  2rem;
  --r-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body-font);
  font-size: var(--fs-md);
  background-color: var(--bg);
  color: var(--text-color);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--fw-semi);
  line-height: 1.25;
}

ul { list-style: none; }
a  { text-decoration: none; }

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

input, textarea, button {
  font-family: var(--body-font);
  font-size: var(--fs-md);
  outline: none;
  border: none;
}

/* ===== LAYOUT HELPERS ===== */
.container {
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
}

.grid { display: grid; gap: 1.5rem; }
.flex { display: flex; }

.section {
  padding-block: 6rem 2rem;
}

.section_subtitle {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0.4rem;
}

.section_title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  text-align: center;
  color: var(--title-color);
  margin-bottom: 3rem;
}

.main { overflow: hidden; }

/* ===== BUTTON ===== */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 1.75rem;
  border-radius: var(--r-full);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  letter-spacing: 0.03em;
  transition: box-shadow 0.35s var(--ease-out), transform 0.3s var(--ease-out), background 0.3s;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-alt);
  box-shadow: 0 8px 32px var(--accent-glow);
  transform: translateY(-2px);
}

/* ===== HEADER / NAV ===== */
.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: var(--z-fixed);
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
  /* Start fully transparent */
  background: transparent;
}

/* Once page scrolls — glassmorphism kicks in */
.header.blur-header {
  background: var(--nav-bg);
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  border-bottom-color: var(--nav-border);
  box-shadow: 0 1px 40px hsla(222, 30%, 5%, 0.4);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav_logo {
  font-size: 1.1rem;
  font-weight: var(--fw-bold);
  color: var(--title-color);
  letter-spacing: -0.02em;
}

.nav_logo span { color: var(--accent); }

.nav_list {
  display: flex;
  column-gap: 2.5rem;
}

.nav_link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-color);
  position: relative;
  transition: color 0.3s;
}

.nav_link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: var(--r-full);
  transition: width 0.3s var(--ease-out);
}

.nav_link:hover,
.nav_link.active-link {
  color: var(--title-color);
}

.nav_link:hover::after,
.nav_link.active-link::after {
  width: 100%;
}

.nav_toggle,
.nav_close {
  display: none;
  font-size: 1.4rem;
  color: var(--title-color);
  cursor: pointer;
  transition: color 0.3s;
}

.nav_toggle:hover,
.nav_close:hover { color: var(--accent); }

/* ===== HOME ===== */
.home {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse 80% 60% at 70% 40%, hsla(var(--hue), 70%, 30%, 0.18) 0%, transparent 70%),
              var(--surface);
}

.home_container {
  padding-block: calc(var(--header-h) + 3rem) 4rem;
  grid-template-columns: 1fr;
  align-items: center;
  row-gap: 3rem;
}

.home_content { row-gap: 2.5rem; }

.home_data { text-align: center; }

.home_subtitle {
  font-size: var(--fs-lg);
  font-weight: var(--fw-light);
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.home_subtitle span {
  color: var(--accent);
  font-weight: var(--fw-semi);
}

.home_title {
  font-size: var(--fs-xxl);
  font-weight: var(--fw-bold);
  color: var(--title-color);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.home_education {
  font-size: var(--fs-lg);
  font-weight: var(--fw-light);
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.home_description {
  font-size: var(--fs-md);
  color: var(--text-color);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.home_social {
  display: flex;
  justify-content: center;
  column-gap: 1rem;
}

.home_social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--accent);
  font-size: 1.2rem;
  transition: background 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}

.home_social-link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.home_image { justify-self: center; }

.home_blob {
  width: clamp(280px, 50vw, 480px);
  filter: drop-shadow(0 20px 60px hsla(var(--hue), 80%, 50%, 0.25));
}

/* ===== ABOUT ===== */
.about { background: var(--bg); }

.about_container {
  row-gap: 3rem;
  align-items: center;
}

.about_data { text-align: center; }

.about_description {
  margin-bottom: 2rem;
  max-width: 480px;
  margin-inline: auto;
}

.about_image { justify-self: center; }

.about_blob {
  width: clamp(280px, 45vw, 480px);
}

.about_blob path { stroke: var(--accent); }

/* ===== SKILLS ===== */
.skills { background: var(--surface); }

.skills_container {
  padding-bottom: 2rem;
  row-gap: 3.5rem;
}

.skills_data { text-align: center; }

.skills_description {
  margin-bottom: 2rem;
  max-width: 440px;
  margin-inline: auto;
}

.skills_content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  justify-content: center;
}

.skills_group {
  display: grid;
  row-gap: 0.75rem;
  list-style: none;
}

.skills_group-label {
  text-align: left;
  margin-bottom: 0.5rem;
}

.skills_items {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--title-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skills_items::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ===== SERVICES ===== */
.services_container {
  row-gap: 1.5rem;
  padding-block: 1rem;
}

.services_card {
  text-align: center;
  background: var(--surface);
  padding: 2.5rem 2rem;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
  cursor: default;
}

.services_card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px hsla(var(--hue), 70%, 40%, 0.15);
}

.service_icon {
  display: block;
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.services_title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semi);
  margin-bottom: 0.75rem;
}

.service_description {
  font-size: var(--fs-sm);
  color: var(--text-color);
  line-height: 1.65;
}

/* ===== PROJECTS ===== */
.projects { background: var(--surface); }

.projects_container {
  row-gap: 1.5rem;
  padding-block: 1rem;
}

.projects_card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.project_img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.projects_card:hover .project_img {
  transform: scale(1.06);
}

.project_modal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.5rem;
  background: linear-gradient(
    160deg,
    hsla(var(--hue), 60%, 20%, 0.7) 0%,
    hsla(var(--hue), 80%, 10%, 0.92) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.projects_card:hover .project_modal {
  opacity: 1;
}

.projects_subtitle {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.projects_title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semi);
  color: var(--title-color);
  text-align: center;
}

.projects_button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.55rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  transition: background 0.3s, transform 0.3s;
}

.projects_button:hover {
  background: var(--accent-alt);
  transform: translateY(-2px);
}

/* ===== CONTACT ===== */
.contact { background: var(--bg); }

.contact_container { padding-top: 1rem; }

.contact_form {
  display: grid;
  row-gap: 1.25rem;
  position: relative;
}

.contact_group {
  display: grid;
  row-gap: 1.25rem;
}

.contact_input,
.contact_form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--title-color);
  font-size: var(--fs-sm);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact_input::placeholder,
.contact_form textarea::placeholder {
  color: var(--text-muted);
}

.contact_input:focus,
.contact_form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact_form textarea {
  height: 12rem;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.contact_button {
  justify-self: center;
  cursor: pointer;
}

.contact_message {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  min-height: 1.2em;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--surface);
  padding-block: 4rem 2.5rem;
  border-top: 1px solid var(--border);
}

.footer_container {
  row-gap: 2rem;
  text-align: center;
}

.footer_name {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: 0.25rem;
}

.footer_name span { color: var(--accent); }

.footer_role {
  font-size: var(--fs-sm);
  color: var(--text-color);
}

.footer_social {
  display: flex;
  justify-content: center;
  column-gap: 0.85rem;
}

.footer_social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-color);
  font-size: 1.1rem;
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease-out);
}

.footer_social-link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.footer_copy {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 1rem;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--surface-alt);
  border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== SCROLL UP ===== */
.scrollup {
  position: fixed;
  right: 1.5rem;
  bottom: -5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  color: var(--accent);
  font-size: 1.1rem;
  transition: bottom 0.4s var(--ease-out), transform 0.3s, background 0.3s;
}

.scrollup:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-4px);
}

.show-scroll { bottom: 2rem; }
