/* =============================================
   trushin.vip: Clean Professional Dark Theme
   Archetype: Brittany Chiang pattern (PC3)
   WCAG 2.2 AA: 4.5:1 contrast, keyboard nav, skip links
   SVG language: beautiful outline icons, stroke-based, no raster sprites
   ============================================= */

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:          #0a192f;
  --bg-light:    #112240;
  --bg-card:     #1a2744;
  --accent:      #64ffda;
  --text:        #ccd6f6;
  --text-dim:    #8892b0;
  --text-bright: #e6f1ff;
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:   'Fira Code', 'Consolas', monospace;
  --max-width:   1100px;
  --nav-width:   68px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-left: var(--nav-width);
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 1000;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Sidebar navigation ---------- */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0;
  z-index: 100;
  border-right: 1px solid rgba(100, 255, 218, 0.1);
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 2rem;
  font-family: var(--font-mono);
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

/* Each nav item: icon stacked above label text */
.nav-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
  width: 100%;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--accent);
  outline: none;
}

/* Outline SVG icon in nav: keeps horizontal orientation */
.nav-icon {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
  /* Prevent inheriting writing-mode from any parent */
  display: block;
}

/* Small vertical label below the icon */
.nav-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
  min-height: 60vh;
}

/* Section title with optional leading outline SVG icon */
.section-title {
  font-size: 1.75rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin-top: 0.5rem;
  flex-shrink: 0;
}

/* Outline SVG icon inside section titles */
.section-icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke: var(--accent);
  fill: none;
  flex-shrink: 0;
  /* Align vertically with the heading text baseline */
  position: relative;
  top: -0.05em;
}

.section-subtitle {
  color: var(--text-dim);
  margin-bottom: 3rem;
  font-size: 1rem;
}

/* ---------- Hero ---------- */
.hero-section {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 0;
}

/* Two-column hero: text left, illustration right */
.hero-container {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-label {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--text-bright);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.hero-role {
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-value {
  max-width: 520px;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Quick proof points with inline outline SVG checkmarks */
.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 2rem;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--text);
  font-family: var(--font-mono);
}

.proof-icon {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--accent);
  flex-shrink: 0;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero illustration: right column, outline SVG artwork */
.hero-visual {
  flex: 0 0 auto;
  width: 340px;
  opacity: 0.9;
}

.hero-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-primary:hover,
.btn-primary:focus {
  background: rgba(100, 255, 218, 0.1);
  outline: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--text-dim);
}

.btn-secondary:hover,
.btn-secondary:focus {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

/* Contact buttons with inline outline SVG icons */
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

/* ---------- SVG device frames (PC5 Mobile Developer Showcase) ---------- */
/* SVG device frames rendered as phone outlines for mobile projects */
.device-frame-wrapper {
  float: right;
  width: 80px;
  margin: 0 0 0.5rem 1rem;
  opacity: 0.85;
  flex-shrink: 0;
}

.svg-device-frame {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 480px) {
  .device-frame-wrapper {
    float: none;
    width: 60px;
    margin: 0 auto 0.75rem;
  }
}

/* ---------- Projects grid ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: 6px;
  padding: 1.75rem;
  border: 1px solid rgba(100, 255, 218, 0.05);
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(100, 255, 218, 0.2);
}

.project-header {
  margin-bottom: 1rem;
}

/* Row: outline SVG domain icon + tag label */
.project-header-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Outline SVG icon in project card header */
.project-icon {
  width: 1.2rem;
  height: 1.2rem;
  stroke: var(--accent);
  fill: none;
  flex-shrink: 0;
  opacity: 0.85;
}

.project-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.project-title {
  font-size: 1.2rem;
  color: var(--text-bright);
  margin: 0.25rem 0;
}

.project-company {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.project-body {
  flex: 1;
}

.project-context {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-outcomes {
  list-style: none;
  margin-bottom: 1rem;
}

.project-outcomes li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  color: var(--text);
}

.project-outcomes li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tech span {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent);
  background: rgba(100, 255, 218, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

.project-role {
  font-size: 0.82rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(100, 255, 218, 0.08);
  padding-top: 0.75rem;
  margin-top: auto;
}

/* ---------- Additional projects ---------- */
.subsection-title {
  font-size: 1.1rem;
  color: var(--text-bright);
  margin: 2.5rem 0 1rem;
  font-family: var(--font-mono);
  opacity: 0.85;
}

.additional-projects {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.additional-projects li {
  background: var(--bg-card);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(100, 255, 218, 0.05);
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}

.additional-projects li strong {
  color: var(--text-bright);
}

.project-tech-inline {
  display: block;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent);
  opacity: 0.7;
  margin-top: 0.35rem;
}

/* ---------- Skills grid ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

/* Skill group title with leading outline SVG icon */
.skill-group-title {
  color: var(--accent);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Outline SVG icon in skill group headers */
.skill-icon {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

.skill-list {
  list-style: none;
}

.skill-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--text);
}

.skill-list li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Case study ---------- */
.case-study-card {
  background: var(--bg-card);
  border-radius: 6px;
  padding: 2rem;
  border: 1px solid rgba(100, 255, 218, 0.08);
  max-width: 820px;
}

.case-study-label {
  color: var(--accent);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 1.25rem 0 0.5rem;
}

.case-study-label:first-child {
  margin-top: 0;
}

.case-study-card p {
  color: var(--text);
}

.case-study-list {
  list-style: none;
  margin: 1rem 0;
}

.case-study-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.case-study-list li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.case-study-link {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-dim);
}

.case-study-link a {
  color: var(--accent);
}

.case-study-link a:hover,
.case-study-link a:focus {
  text-decoration: underline;
}

/* ---------- Trust grid ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.trust-group {
  background: var(--bg-card);
  border-radius: 6px;
  padding: 1.5rem;
  border: 1px solid rgba(100, 255, 218, 0.05);
}

/* Trust group title with leading outline SVG icon */
.trust-group-title {
  color: var(--accent);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Outline SVG icon in trust group headers */
.trust-icon {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

.trust-list {
  list-style: none;
}

.trust-list li {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.trust-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ---------- Contact ---------- */
#contact {
  text-align: center;
}

#contact .section-title {
  justify-content: center;
}

#contact .section-title::after {
  display: none;
}

#contact .section-subtitle {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(100, 255, 218, 0.08);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  /* Hide hero illustration on smaller screens: layout stays clean */
  .hero-visual {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-width: 0px;
  }

  body {
    padding-left: 0;
    /* Bottom padding for mobile nav */
    padding-bottom: 64px;
  }

  .sidebar-nav {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 0.5rem 0.75rem;
    border-right: none;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
    background: rgba(10, 25, 47, 0.96);
    backdrop-filter: blur(10px);
    overflow-x: auto;
  }

  .nav-brand {
    margin-bottom: 0;
    margin-right: 0.75rem;
    flex-shrink: 0;
  }

  .nav-links {
    flex-direction: row;
    gap: 0;
    width: auto;
    flex: 1;
    justify-content: space-around;
  }

  /* On mobile bottom nav: icon + horizontal label */
  .nav-links a {
    padding: 0.4rem 0.5rem;
    gap: 0.2rem;
  }

  .nav-label {
    writing-mode: horizontal-tb;
    font-size: 0.5rem;
    letter-spacing: 0.05em;
  }

  .section {
    padding: 3rem 0;
  }

  .hero-section {
    min-height: calc(100vh - 60px);
  }

  .container {
    padding: 0 1.25rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Focus visible (keyboard only) ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .project-card {
    transition: none;
  }
}
