/* ==========================================================================
   1. FONT DECLARATIONS & ROOT VARIABLES
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local(''), url('fonts/inter/inter-28pt-regular.woff2') format('woff2');
}


@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local(''), url('fonts/inter/inter-28pt-bold.woff2') format('woff2');
}

/* Muted Blue-Gray Color Palette */
:root {
  /* Light Mode */
  --bg-light: #f1f4f7;
  --text-light: #35495e;
  --button-bg-light: #415f7c;
  --button-icon-light: #f1f4f7;

  /* Dark Mode */
  --bg-dark: #1f2a35;
  --text-dark: #dce3ea;
  --button-bg-dark: #dce3ea;
  --button-icon-dark: #1f2a35;

  /* Universal */
  --accent-color: #7293b5;

  /* Shadows */
  --shadow-light: 0 4px 6px rgba(53, 73, 94, 0.15);
  --shadow-light-hover: 0 8px 12px rgba(53, 73, 94, 0.22);
  --shadow-dark: 0 4px 6px rgba(0, 0, 0, 0.25);
  --shadow-dark-hover: 0 8px 12px rgba(0, 0, 0, 0.4);
}


/* ==========================================================================
   2. GLOBAL STYLES & THEME SETUP
   ========================================================================== */

html {
  font-family: 'Inter', sans-serif;
}

.theme-transition {
  transition: background-color 0.4s ease, color 0.4s ease;
}

body {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* --- Light Mode --- */
html[data-theme='light'] {
  background-color: var(--bg-light);
  color: var(--text-light);
}

html[data-theme='light'] .icon-button {
  background-color: var(--button-bg-light);
  color: var(--button-icon-light);
  box-shadow: var(--shadow-light);
}

html[data-theme='light'] .icon-button:hover {
  box-shadow: var(--shadow-light-hover);
}

/* --- Dark Mode --- */
html[data-theme='dark'] {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

html[data-theme='dark'] .icon-button {
  background-color: var(--button-bg-dark);
  color: var(--button-icon-dark);
  box-shadow: var(--shadow-dark);
}

html[data-theme='dark'] .icon-button:hover {
  box-shadow: var(--shadow-dark-hover);
}


/* ==========================================================================
   3. COMPONENT STYLES
   ========================================================================== */

.container {
  text-align: center;
  padding: 20px;
  max-width: 500px;
  width: 90%;
}

.profile-header .name {
  margin-bottom: 0.2em;
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 3em);
}

.separator {
  width: 60px;
  height: 3px;
  margin: 0 auto 15px auto;
  background-color: var(--accent-color);
  transition: background-color 0.4s ease;
  border-radius: 5px;
}

.profile-header .title {
  margin-top: 0;
  font-weight: 400;
  font-size: clamp(1rem, 4vw, 1.5em);
}

.action-buttons {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.icon-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease-out;
  position: relative;
  /* Needed for icon stacking */
}

.icon-button:hover {
  transform: translateY(-4px);
}

/* Styles for Feather Icons */
.icon-button svg {
  width: 30px;
  height: 30px;
  stroke-width: 2;
}

.icon-button:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 3px;
}


/* ==========================================================================
   4. THEME TOGGLE ANIMATION
   ========================================================================== */

/* Position both sun and moon icons in the center of the button */
#theme-toggle svg {
  position: absolute;
  transition: transform 0.4s ease-in-out, opacity 0.3s ease-in-out;
}

/* --- In Light Mode --- */
html[data-theme='light'] .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}

html[data-theme='light'] .icon-moon {
  opacity: 0;
  transform: rotate(90deg);
}

/* --- In Dark Mode --- */
html[data-theme='dark'] .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

html[data-theme='dark'] .icon-sun {
  opacity: 0;
  transform: rotate(-90deg);
}
