/* Digital CV - Final Version */

/* Global Styles */
:root {
  --bg: #0b1220;
  --surface: #101a2f;
  --surface--2: #0f172a;
  --text: #e6edf7;
  --muted: #b7c3d6;
  --accent: #38bdf8;
  --accent-2: #a78bfa;
  --border: rgba(230, 237, 247, 0.12);

  --shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  --gap: 18px;
  --radius: 16px;
}

.page {
  min-height: 100vh;
}

/* Light Theme Override */
.theme-toggle:checked~.page {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f1f5ff;

  --text: #0f172a;
  --muted: #475569;

  --accent: #2563eb;
  --accent-2: #7c3aed;

  --border: rgba(15, 23, 42, 0.12);
}

/* Icon Swap */
.theme-toggle-label .toggle-icon::before {
  content: "☀️";
}

.theme-toggle:checked+.theme-toggle-label .toggle-icon::before {
  content: "🌙";
}

.theme-toggle-label .toggle-text::before {
  content: "Light";
}

.theme-toggle:checked+.theme-toggle-label .toggle-text::before {
  content: "Dark";
}


/* Box Model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Base Layout */
html {
  font-size: 16px;
}

body {
  margin: 24px;
  padding: 24px;
  border: 2px solid rbga(255, 255, 255, 0.08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  background: radial-gradient(1200px 700px at 20% 0%, rgba(56, 189, 248, 0.15), transparent 55%),
    radial-gradient(900px 600px at 80% 20%, rgba(167, 139, 250, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
}

body>* {
  max-width: 980px;
  margin: 0 auto var(--gap) auto;
}

/* Theme Toggle */
.theme-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Floating Toggle */
.theme-toggle-label {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 999;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);

  background: rgba(255, 255, 255, 0.06);
  color: var(--text);

  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;

  /* Animation Polish */
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.theme-toggle-label:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.10);
}

.toggle-icon {
  font-size: 1rem;
}

.toggle-text {
  font-weight: 750;
  font-size: 0.95rem;
}



/* Card Blocks */
header,
section,
footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  animation: fadeUp 600ms ease both;
}

section {
  animation-delay: 80ms;
}

footer {
  animation-delay: 120ms;
}

header {
  position: relative;
  min-height: 220px;
  overflow: hidden;
}

/* Profile Image */
header img {
  position: absolute;
  top: 20px;
  left: 20px;

  width: 160px;
  height: 160px;
  object-fit: cover;

  border-radius: 50%;
  border: 3px solid var(--accent);
  padding: 4px;

  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);

  /* Micro Interaction*/
  transition: transform 220ms ease, box-shadow 220ms ease;
}

header img:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

/* Name Centered */
header h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text);
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.5px;
  text-align: center;

  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);

  /* Subtle Scale Animation */
  animation: popIn 700ms ease both;
}

/* Contact Info Bottom-Right */
header nav {
  position: absolute;
  right: 20px;
  bottom: 20px;

  text-align: right;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Headings Hierarchy + Styling */
h2 {
  margin: 0 0 10px 0;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  /* Depth */
  text-shadow: 0 1px 10px rgba(56, 189, 248, 0.18);
}

h3 {
  margin: 14px 0 6px 0;
  font-size: 1.1rem;
  color: var(--accent);
}

h4 {
  margin: 10px 0 6px 0;
  font-size: 1rem;
  color: var(--muted);
}

h2,
h3,
h4 {
  padding-bottom: 8px;
}

/* 
   Text + Lists
    */
p {
  margin: 0 0 10px 0;
}

.summary p {
  color: var(--muted);
}

ul {
  margin: 8px 0 12px 18px;
  padding: 0;
}

li {
  margin: 6px 0;
  color: var(--muted);
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 650;

  transition: color 180ms ease, transform 180ms ease;
}

a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

thead th {
  text-align: left;
  padding: 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

/* Contact Form — Flexbox Layout */
.contact form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.contact label {
  font-weight: 650;
  color: var(--muted);
}

/* Inputs: Consistent Sizing*/
.contact input[type="text"],
.contact input[type="email"],
.contact input[type="radio"],
.contact select,
.contact textarea {
  font-family: inherit;
}

/* Text Inputs, Select, Textarea */
.contact input[type="text"],
.contact input[type="email"],
.contact select,
.contact textarea {
  width: min(720px, 100%);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);

  /* Animation on Focus */
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.contact input[type="text"]:focus,
.contact input[type="email"]:focus,
.contact select:focus,
.contact textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
  transform: translateY(-1px);
}

/* Buttons Alignment */
.contact input[type="submit"],
.contact input[type="reset"] {
  width: fit-content;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 750;
  color: var(--text);

  transition: transform 180ms ease, background 180ms ease;
}

/* Hover Animation */
.contact input[type="submit"] {
  background: rgba(56, 189, 248, 0.14);
}

.contact input[type="reset"] {
  background: rgba(255, 255, 255, 0.06);
}

.contact input[type="submit"]:hover,
.contact input[type="reset"]:hover {
  transform: translateY(-2px);
  background: rgba(167, 139, 250, 0.16);
}

/* Footer Polish */
footer p {
  margin: 0 0 10px 0;
  color: var(--muted);
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

footer li {
  margin: 6px 0;
}

/* RESPONSIVENESS  */
/* Tablet: 768px */
@media (max-width: 768px) {
  body {
    margin: 16px;
    padding: 16px;
  }

  header {
    min-height: 260px;
  }

  header img {
    width: 130px;
    height: 130px;
  }

  header h1 {
    font-size: 1.7rem;
    width: 92%;
  }
}

/* Mobile: 480px */
@media (max-width: 480px) {
  body {
    margin: 12px;
    padding: 12px;
  }

  header {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  header img,
  header h1,
  header nav {
    position: static;
    transform: none;
  }

  header img {
    width: 110px;
    height: 110px;
    align-self: flex-start;
  }

  header h1 {
    font-size: 1.5rem;
    text-align: left;
    animation: none;
  }

  header nav {
    text-align: left;
    font-size: 0.95rem;
  }

  /* Scroll-friendly Table */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Buttons */
  .contact input[type="submit"],
  .contact input[type="reset"] {
    width: 100%;
    text-align: center;
  }
}

/* ANIMATIONS */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}