:root {
  --font-display: 'Roboto', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
  --color-black: #000000;
  --color-white: #ffffff;
  --grid-color: rgba(0, 0, 0, 0.06); 
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-mono);
  background-color: #fcfcfc;
  background-image: 
    linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--color-black);
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Main Container */
.cv-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: 100vh;
}

@media (min-width: 1024px) {
  .cv-container {
    padding: 80px 40px;
  }
}

/* Header */
.header-section {
  margin-bottom: 80px;
  border-bottom: 4px solid var(--color-black);
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (min-width: 900px) {
  .header-section {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.profile-block {
  max-width: 600px;
}

.profile-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.8rem;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  letter-spacing: -1px;
}

.profile-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: #444;
  margin: 0;
  background: var(--color-black);
  color: var(--color-white);
  display: inline-block;
  padding: 4px 12px;
}

.contact-block {
  text-align: left;
}

@media (min-width: 900px) {
  .contact-block {
    text-align: right;
  }
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.contact-list a {
  border-bottom: 1px solid #ccc;
  transition: all 0.2s;
}

.contact-list a:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

/* Main Layout */
.main-layout {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

@media (min-width: 900px) {
  .main-layout {
    flex-direction: row;
    gap: 80px;
  }
}

.primary-col {
  flex: 3; /* ~75% */
}

.sidebar-col {
  flex: 1; /* ~25% */
}

/* Sections */
.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  text-transform: uppercase;
  border-bottom: 2px solid var(--color-black);
  padding-bottom: 15px;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
}

/* Experience List */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.experience-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {
  .experience-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 30px;
  }
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #666;
  padding-top: 6px;
  font-weight: 500;
}

.exp-content {
  display: flex;
  flex-direction: column;
}

.exp-header {
  margin-bottom: 12px;
}

.exp-role {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

.exp-company-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid var(--color-black);
  padding: 2px 8px;
  margin-top: 4px;
}

.exp-desc {
  font-size: 0.95rem;
  color: #222;
  margin: 0;
  text-align: justify;
  line-height: 1.7;
}

/* Education */
.education-item {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.education-item:last-child {
  border-bottom: none;
}

.edu-degree {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 4px 0;
}

.edu-school {
  font-size: 0.9rem;
  color: #444;
}

/* Skills */
.skills-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.skill-group h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin: 0 0 15px 0;
  border-left: 4px solid var(--color-black);
  padding-left: 10px;
}

.skill-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-group li {
  font-size: 0.85rem;
  margin-bottom: 6px;
  padding-left: 14px;
  position: relative;
}

.skill-group li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #999;
}

/* Floating Print Button */
.floating-print-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background-color: var(--color-black);
  color: var(--color-white);
  border: none;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 9999;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.floating-print-btn:hover {
  background-color: #222;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.floating-print-btn:active {
  transform: translateY(0);
}

/* Footer */
.footer {
  margin-top: 100px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  font-size: 0.75rem;
  color: #888;
  display: flex;
  justify-content: space-between;
}

/* Print Optimization */
@media print {
  @page {
    margin: 1.2cm;
    size: auto;
  }

  body {
    background: white !important;
    background-image: none !important;
    font-size: 10pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .cv-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    min-height: auto;
  }

  .floating-print-btn {
    display: none !important;
  }

  .header-section {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #000;
    padding-bottom: 20px;
    margin-bottom: 30px;
  }
  
  .contact-block {
    text-align: right;
  }

  .main-layout {
    display: flex;
    flex-direction: row;
    gap: 40px;
  }

  .primary-col {
    flex: 3;
  }

  .sidebar-col {
    flex: 1;
  }

  .experience-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .section-title {
    border-bottom: 2px solid #000;
  }

  .exp-company-tag {
    border: 1px solid #000;
  }

  a {
    text-decoration: none;
    color: #000;
  }

  a[href]:after {
    content: none !important;
  }
  
  .footer {
    margin-top: 40px;
  }
}