@charset "UTF-8";
/* =========================================
   FPGA Beginners Guide - Organized Styles
   ========================================= */

/* =========================================
   CSS Variables
   ========================================= */
:root {
  /* Colors */
  --primary-blue: #0D3780;
  --accent-blue: #00A0E9;
  --cpu-purple: #667eea;
  --gpu-red: #f5576c;
  --fpga-yellow: #f1b80a;
  --asic-teal: #00a38a;
  
  /* Backgrounds */
  --bg-light: #f8f9fb;
  --bg-lighter: #f5f8fb;
  --bg-white: #ffffff;
  --bg-gray: #f8f9fa;
  
  /* Text Colors */
  --text-dark: #2c3e50;
  --text-medium: #555;
  --text-light: #666;
  --text-gray: #999;
  
  /* Spacing */
  --space-xs: 5px;
  --space-sm: 10px;
  --space-md: 20px;
  --space-lg: 30px;
  --space-xl: 40px;
  
  /* Font Sizes */
  --font-sm: 0.9rem;
  --font-base: 1rem;
  --font-md: 1.05rem;
  --font-lg: 1.2rem;
  --font-xl: 1.3rem;
  --font-2xl: 1.6rem;
  
  /* Borders */
  --border-color: #ddd;
  --border-light: #e0e0e0;
  --border-gray: #ccc;
  
  /* Shadows */
  --shadow-inset: inset 0 0 0 2px rgba(0, 0, 0, 0.05);
  --shadow-inset-light: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  --shadow-inset-strong: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* =========================================
   Base Styles
   ========================================= */
#articledetail {
  letter-spacing: -0.01em;
}

article {
  padding: 0;
  border-width: 0;
  border-style: none;
}

article#main p {
  line-height: 1.9;
}

#articledetail li,
#articledetail ol li {
  line-height: 1.8;
}

#articledetail li:last-child,
#articledetail dd:last-child {
  margin-bottom: 0;
}

/* =========================================
   Typography
   ========================================= */
#articledetail h2 {
  font-size: var(--font-2xl);
  margin-top: 4rem;
  padding-left: var(--space-md);
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
}

#articledetail h3 {
  font-size: var(--font-xl);
  padding-left: 2px;
  padding-bottom: 0.2rem;
  margin-top: 0;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

#articledetail h4 {
  font-size: var(--font-lg);
  margin-top: 0;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

#articledetail h5::before,
#articledetail h5::after {
  content: none;
  display: none;
}

/* =========================================
   Table of Contents
   ========================================= */
.toc-custom-variation {
  background-color: var(--bg-gray);
  padding: 25px;
  border-left: 5px solid var(--primary-blue);
}

#articledetail .toc-custom-variation h2 {
  margin: 0 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid #e1e4e8;
  border-left: 0;
}

#articledetail .toc-custom-variation ol {
  margin-bottom: 0;
  counter-reset: toc-counter;
}

#articledetail .toc-custom-variation > ol > li {
  counter-increment: toc-counter;
  font-size: var(--font-md);
  font-weight: bold;
}

#articledetail .toc-custom-variation > ol > li::before {
  content: counter(toc-counter) ". ";
}

#articledetail .toc-custom-variation ol ol {
  counter-reset: sub-counter;
  margin: 2px 0 var(--space-sm);
}

#articledetail .toc-custom-variation ol ol li {
  counter-increment: sub-counter;
  font-size: var(--font-base);
  font-weight: normal;
  line-height: 1.6;
}

#articledetail .toc-custom-variation ol ol li::before {
  content: counter(toc-counter, decimal) "-" counter(sub-counter, decimal) ". ";
  left: -1.8em;
}

#articledetail .toc-custom-variation li a {
  color: #1E1E1E;
  text-decoration: none;
}

#articledetail .toc-custom-variation li a:hover {
  color: #00A2CB;
  text-decoration: underline;
}

/* =========================================
   Info Box Components
   ========================================= */
.info-box {
  border: 2px solid var(--accent-blue);
  background: var(--bg-white);
  padding: 25px 25px 25px var(--space-lg);
  position: relative;
}

.info-label {
  position: absolute;
  top: -20px;
  left: 22px;
  background: var(--bg-white);
  padding: 0 12px;
  font-weight: bold;
  font-size: var(--font-lg);
  letter-spacing: 0.02em;
  color: var(--accent-blue);
}

.info-label::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 8px;
}

.info-box.-structure .info-label::before {
  content: '\f2db';
}

.info-box.-pipeline .info-label::before {
  content: '\f085';
}

article#main .info-box.-pipeline p {
  font-size: var(--font-base);
}

.info-item {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-sm);
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.info-item ul {
  padding-left: var(--space-md);
}

#articledetail .info-item ul li {
  margin-bottom: 0;
  color: var(--text-dark);
}

/* =========================================
   Processor Cards (CPU/GPU/FPGA/ASIC)
   ========================================= */
.processor-intro .container {
  padding: 0 var(--space-xl);
}

.processor-intro .card {
  border-radius: 12px;
  padding: var(--space-lg);
  background-color: var(--bg-light);
  box-shadow: var(--shadow-inset);
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  margin-bottom: 2rem;
}

.processor-intro .icon {
  flex-shrink: 0;
}

.processor-intro .card-content .title {
  font-size: 26px;
  font-weight: bold;
  color: #333;
}

.processor-intro .subtitle {
  font-size: 17px;
  font-weight: 600;
  margin-top: -10px;
}

.processor-intro .card-cpu .subtitle {
  color: var(--cpu-purple);
}

.processor-intro .card-gpu .subtitle {
  color: var(--gpu-red);
}

.processor-intro .card-fpga .subtitle {
  color: var(--fpga-yellow);
}

.processor-intro .card-asic .subtitle {
  color: var(--asic-teal);
}

.processor-intro .content {
  line-height: 1.8;
  font-size: 15px;
}

/* =========================================
   Processor Method (処理方法の比較)
   ========================================= */
.processor-method .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: 0 var(--space-md);
}

.processor-method .card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: start;
  gap: 32px;
  padding: var(--space-lg);
  border-radius: 12px;
  background-color: var(--bg-light);
  box-shadow: var(--shadow-inset);
}

.processor-method .card .left {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.8;
}

.processor-method .card .left .processor-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: var(--space-sm);
}

.processor-method .card .left .processor-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.processor-method .card .left .processor-name {
  font-size: 26px;
  font-weight: bold;
  color: #333;
}

#articledetail .processor-method .card .left h5 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  padding-left: 0;
}

#articledetail .processor-method .card.cpu .left h5,
#articledetail .processor-method .card.cpu .right figcaption {
  color: var(--cpu-purple);
}

#articledetail .processor-method .card.gpu .left h5,
#articledetail .processor-method .card.gpu .right figcaption {
  color: var(--gpu-red);
}

#articledetail .processor-method .card.fpga .left h5,
#articledetail .processor-method .card.fpga .right figcaption {
  color: var(--fpga-yellow);
}

article#main .processor-method .card .left p {
  line-height: 1.8;
  font-size: 15px;
}

.processor-method .card .right {
  text-align: center;
}

.processor-method .card .right .column-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.processor-method .card .right img {
  width: auto;
}

#articledetail .processor-method .card .right figure {
  margin-bottom: 0;
}

#articledetail .processor-method .card .right figcaption {
  font-size: var(--font-base);
  margin-top: 12px;
  font-weight: bold;
}

article#main .processor-method .card .right p {
  font-size: var(--font-sm);
  color: var(--text-medium);
  margin-top: 6px;
  line-height: 1.6;
}

/* =========================================
   FPGA Skills Section
   ========================================= */
.fpga-block {
  padding: 25px 25px 25px var(--space-lg);
  background-color: var(--bg-light);
  box-shadow: var(--shadow-inset);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.fpga-block.weak {
  border-left: 6px solid rgba(245, 87, 108, 0.8);
}

.fpga-block.strong {
  border-left: 6px solid rgba(0, 160, 233, 0.8);
}

.fpga-topic {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 15px;
}

#articledetail .fpga-topic h4 {
  font-size: var(--font-lg);
  margin: 0;
  color: var(--text-dark);
}

.fpga-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

#articledetail .fpga-tags li {
  background: var(--bg-white);
  border-radius: 6px;
  padding: 4px 12px;
  box-shadow: var(--shadow-inset-strong);
  font-size: var(--font-sm);
  color: #444;
  list-style-type: none;
  margin-left: 0;
  margin-bottom: 0;
}

article#main .fpga-block p {
  margin-bottom: 0;
  font-size: var(--font-base);
}

.fpga-details {
  margin-top: var(--space-md);
}

#articledetail .fpga-details dt {
  margin-top: 15px;
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-dark);
  padding-left: 0;
}

#articledetail .fpga-details dt:first-child {
  margin-top: 0;
}

#articledetail .fpga-details dt span {
  color: var(--accent-blue);
  margin-right: 6px;
}

#articledetail .fpga-details dd {
  margin-left: 0;
  margin-top: 1px;
  padding-left: 28px;
  color: var(--text-medium);
  font-size: 0.95rem;
}

/* =========================================
   Case Study Section
   ========================================= */
.case-study {
  margin-bottom: 2rem;
}

.case-list {
  margin-left: var(--space-md);
}

#articledetail .case-list dt {
  padding-left: 15px;
  position: relative;
  color: var(--primary-blue);
}

#articledetail .case-list dt:first-of-type {
  margin-top: 0;
}

#articledetail .case-list dt::before {
  content: '';
  position: absolute;
  left: 0;
  top: 45%;
  width: 5px;
  height: 5px;
  background: var(--accent-blue);
  border-radius: 50%;
}

#articledetail .case-list dd ul {
  margin-top: var(--space-xs);
  padding-left: var(--space-md);
}

#articledetail .case-list dd ul li {
  position: relative;
  padding-left: 15px;
  list-style: none;
  margin-left: 0;
}

#articledetail .case-list dd ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-medium);
}

/* =========================================
   Summary Section
   ========================================= */
.summary-wrapper {
  background: var(--bg-lighter);
  border: 3px dashed var(--accent-blue);
  border-radius: 12px;
  padding: var(--space-lg);
  margin-bottom: 2rem;
}

.summary-wrapper .summary-box {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow-inset-light);
}

.summary-wrapper .summary-box:last-child {
  margin-bottom: 0;
}

#articledetail .summary-wrapper .summary-box h3 {
  font-size: var(--font-lg);
  color: var(--primary-blue);
  border-left: 4px solid var(--accent-blue);
  padding-left: 12px;
  margin-bottom: 0.5rem;
  border-bottom: none;
  line-height: 1.2;
}

#articledetail .summary-box h3::after {
  display: none;
}

.summary-box ul {
  padding-left: var(--space-md);
}

#articledetail .summary-box ul li::marker {
  color: var(--accent-blue);
}

#articledetail .summary-box ul li {
  margin-bottom: 0;
}

#articledetail .summary-box ul li ul li {
  list-style-type: none;
  margin-left: 0;
}

/* =========================================
   Definition Lists
   ========================================= */
#articledetail dt {
  font-weight: 600;
  font-size: var(--font-md);
  padding-left: 12px;
  color: var(--text-dark);
}

#articledetail dd {
  margin-left: 16px;
  margin-bottom: var(--space-sm);
  margin-top: -5px;
  color: var(--text-medium);
  line-height: 1.7;
}

#articledetail .marker-dot dt {
  padding-left: 15px;
  position: relative;
}

#articledetail .marker-dot dt::before {
  content: '';
  position: absolute;
  left: 0;
  top: 45%;
  width: 5px;
  height: 5px;
  background: #333;
  border-radius: 50%;
}

#articledetail .style-black dt {
  border-left-color: #333;
}

.box-gray-list {
  border: 2px solid var(--border-gray);
}

/* =========================================
   Tables & Figures
   ========================================= */
table th,
table td {
  line-height: 1.8;
}

.table-result {
  width: calc(100% - 20px);
  margin-left: auto;
}

.table-result th,
.table-result td {
  border: 1px solid var(--border-color);
  padding: 0.6em 0.8em;
  text-align: center;
  line-height: 1.4;
}

.table-result th {
  background: var(--primary-blue);
  color: white;
  width: 30%;
}

.table-result td:first-child {
  background: #f0f8ff;
  font-weight: bold;
  color: var(--text-dark);
}

figcaption,
caption {
  color: var(--text-light);
  margin-bottom: var(--space-xs);
}

.common_fancy.-icon > a img {
  margin: 0 auto;
}

.common_fancy.-icon .legend {
  position: absolute;
  right: -8%;
  bottom: 0;
  text-align: left;
  font-size: 0.9em;
  color: var(--text-medium);
  background-color: #f9f9f9;
  padding: 0.8em 1em;
  border: 1px solid var(--border-light);
}

#articledetail .common_fancy.-icon .legend ul li {
  list-style-type: none;
  margin-left: 0;
  margin-bottom: 0;
}

/* =========================================
   Media & Video
   ========================================= */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border: 1px solid #1e1e1e;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* =========================================
   Sources & Links
   ========================================= */
.source {
  font-size: var(--font-sm);
  color: var(--text-light);
}

#articledetail .source .common_link > a {
  color: var(--text-light);
}

#articledetail .source li {
  list-style-type: none;
  margin-left: 0;
  margin-bottom: 3px;
}

/* =========================================
   Buttons
   ========================================= */
.common_btn {
  max-width: 600px;
  margin-top: 0;
}

#articledetail a.btn {
  color: white;
  background-color: var(--primary-blue);
  border-radius: 5px;
  padding: 3rem 50px;
}

@media (pointer: fine) {
  #articledetail a.btn:hover {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    background-color: white;
  }
}

/* =========================================
   Utility Classes
   ========================================= */
.ib {
  display: inline-block;
}

.mb-0,
article#main p.mb-0 {
  margin-bottom: 0;
}

.mb-5,
article#main p.mb-5 {
  margin-bottom: 5px;
}

.mb-10,
article#main p.mb-10 {
  margin-bottom: 10px;
}

.mb-20,
article#main p.mb-20 {
  margin-bottom: 20px;
}

article#main p.mb-1_6 {
  margin-bottom: 1.6rem;
}

.mb-2,
article#main p.mb-2 {
  margin-bottom: 2rem;
}

.mb-2_5,
article#main p.mb-2_5 {
  margin-bottom: 2.5rem;
}

article#main p.mb-6 {
  margin-bottom: 6rem;
}

/* =========================================
   Media Queries - Desktop (992px+)
   ========================================= */
@media only screen and (min-width: 992px) {
  #articledetail h2 {
    margin-left: -25px;
  }

  #articledetail ol li {
    margin-left: 2.8rem;
    padding-left: 4px;
  }

  article .img-fixed img {
    width: auto;
  }

  .source {
    display: flex;
    justify-content: flex-end;
  }

  .box-gray-list {
    padding: 1.1rem 1.5rem 1.2rem;
  }

  .w-750 {
    width: 750px;
    margin: 0 auto 1.6rem;
  }

  .l_contents.-design .common_fancy.-icon > a.icon-left::before {
    left: 12%;
  }

  .ml-20 {
    margin-left: var(--space-md);
  }
  
  .fpga-skill {
    width: 800px;
    margin: 0 auto;
  }
}

/* =========================================
   Media Queries - Tablet (768px - 991px)
   ========================================= */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .box-gray-list {
    padding: 1.1rem 1.5rem 1.2rem;
  }

  article .img-fixed img {
    width: auto;
  }

  .common_fancy.-icon > a::before {
    display: none;
  }

  .common_fancy.-icon > a {
    text-decoration: none;
  }

  .w-750 {
    width: 750px;
    margin: 0 auto 1.6rem;
  }

  .ml-20 {
    margin-left: var(--space-md);
  }

  .common_fancy.-icon .legend {
    position: static;
    margin-top: var(--space-md);
  }

  .processor-intro .card {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================
   Media Queries - Mobile (767px and below)
   ========================================= */
@media only screen and (max-width: 767px) {
  .box-gray-list {
    padding: var(--space-md);
  }

  #articledetail dd {
    margin: 0 0 var(--space-md) 0;
  }

  .common_fancy.-icon > a::before {
    display: none;
  }

  .common_fancy.-icon > a {
    text-decoration: none;
  }

  .common_fancy.-icon .legend {
    position: static;
    margin-top: var(--space-md);
  }

  .processor-intro .card {
    flex-direction: column;
    text-align: center;
  }

  .processor-method .card {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-md);
  }

  .fpga-block {
    padding: var(--space-md);
  }

  .fpga-topic {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}