/* 
Digital CV Styling
 */

/* Color palette variables */

:root {
  --bg: #0b1220;
  --surface: #101a2f;
  --surface-2: #0f172a;

  --text: #e6edf7;
  --muted: #b7c3d6;

  --accent: #38bdf8;
  --accent-2: #a78bfa;
  --border: rgba(230, 237, 247, 0.12);
}

/* Global Box Model  */
/* Base reset + readable defaults */
*,
*::before,
*::after {
  box-sizing: border-box;
}


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

body {
  margin: 24px;
  padding: 24px;
  border: 2px solid var(--border);
  background-color: var(--bg);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
  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);
}

/* Layout */

/* Limit line length for readability */
body>* {
  max-width: 800px;
  margin: 0 auto 18px auto;
}

section,
header,
footer {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 18px;
}

/* Sections: Margin & Padding */

section {
  /* margin: 24px 0; */
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background-color: var(--surface);
}

/* Header Flexbox Layout
   - Image: top-left
   - Name: centered
   - Contact nav: bottom-right
 */

header {
  display: flex;
  position: relative;
  min-height: 220px;

  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background-color: var(--surface);
}

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

  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;

  /* Polishing */
  border: 3px solid var(--accent);
  padding: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Name  */
header h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  /* Typography */
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.5px;
  text-align: center;

  /* Depth */
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

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

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


/* Headings */
h2 {
  margin: 0 0 10px 0;
  font-size: 1.35rem;

  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1px;

  text-shadow: 0 1px 10px rgba(56, 189, 248, 0.18);
}

h3 {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
}

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

/* Header Text Spacing */
h2,
h3,
h4 {
  padding-bottom: 8px;
}

/* Fix spacing around headings inside lists  */
li h3,
li h4 {
  margin-top: 10px;
}

/* Text */
p {
  margin: 0 0 10px 0;
  color: var(--text);
}

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

ul {
  margin: 8px 12px 10px 10px;
  padding-left: 20px;
  list-style-type: disc;
}

li {
  margin: 6px 6px;
}

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

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

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

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

tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  vertical-align: top;
  font-size: 0.95rem;
}

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

/* Forms for Contact Section */

/* Contact Form — Flex Layout */

.contact form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

/* Labels */
.contact label {
  font-weight: 600;
  color: var(--muted);
}

/* Inputs */
.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);
}

/* Radio Options*/
.contact input[type="radio"] {
  margin-right: 8px;
}


.contact .radio-group {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.contact .form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact input[type="submit"],
.contact input[type="reset"] {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 700;
}

input[type="submit"]:hover,
input[type="reset"]:hover {
  background: var(--muted);
  color: var(--bg);
}

footer {
  margin-top: 32px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
}

footer p {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

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

footer ul li {
  margin: 6px 0;
}

/* Mobile Adjustments  */

@media (max-width: 640px) {
  body {
    padding: 14px;
  }

  header {
    min-height: 320px;
    /* extra height so elements don’t collide */
  }

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

  body>* {
    margin: 0 auto 12px auto;
  }

  header h1 {
    font-size: 2rem;
    width: 90%;
  }
}