/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Colors */
:root {
  --navy: #53b0eb;
  --blue: #006aa9;
  --light-blue: #53b0eb;
  --green: #397618;
  --red: #f46351;
  --yellow: #ffc423;
  --dark: #1a1a1a;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background: #0f0f0f;
}

h1, h2, h3 {
  font-family: 'Archivo Black', sans-serif;
  text-transform: uppercase;
  line-height: 1.1;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 4rem 0;
  background: #0f0f0f;
}

.section-alt {
  background: #1a1a1a;
}

main section {
  margin-bottom: 4rem;
}

main section:last-child {
  margin-bottom: 0;
}

.hero-section {
  padding: 6rem 0 4rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: 1rem;
  color: var(--navy);
}

.hero .subtitle {
  font-size: 1.5rem;
  color: #e0e0e0;
  opacity: 0.8;
  margin-bottom: 2rem;
}

/* Tags */
.tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid;
}

.tag-blue {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.tag-green {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.tag-yellow {
  background: var(--yellow);
  color: var(--dark);
  border-color: var(--yellow);
}

.tag-red {
  background: var(--red);
  color: white;
  border-color: var(--red);
  text-decoration: none;
  transition: all 0.3s;
}

.tag-red:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 99, 81, 0.3);
}

/* Portrait */
.portrait-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait {
  width: 280px;
  height: 280px;
  border: 6px solid var(--yellow);
  border-radius: 8px;
  box-shadow: 15px 15px 0 rgba(255, 196, 35, 0.3);
  transition: all 0.3s;
  overflow: hidden;
}

.portrait:hover {
  box-shadow: 20px 20px 0 rgba(255, 196, 35, 0.4);
  transform: translate(-3px, -3px);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Section Headers */
.section-header {
  margin: 3rem auto;
  text-align: center;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.section-header .underline {
  width: 80px;
  height: 4px;
  background: var(--yellow);
  margin: 0 auto;
}

/* Section Header Color Variants */
.section-header-navy h2 { color: var(--navy); }
.section-header-blue h2 { color: var(--blue); }
.section-header-light-blue h2 { color: var(--light-blue); }
.section-header-green h2 { color: var(--green); }
.section-header-red h2 { color: var(--red); }
.section-header-yellow h2 { color: var(--yellow); }

/* Underline Color Variants */
.underline-navy { background: var(--navy) !important; }
.underline-blue { background: var(--blue) !important; }
.underline-light-blue { background: var(--light-blue) !important; }
.underline-green { background: var(--green) !important; }
.underline-red { background: var(--red) !important; }
.underline-yellow { background: var(--yellow) !important; }

/* Cards */
.card {
  background: #1a1a1a;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 2px solid #404040;
  border-radius: 8px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  color: #e0e0e0;
}

.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
}

.card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 20px rgba(0, 106, 169, 0.1);
  transform: translateY(-2px);
}

.card-top::before {
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  width: auto;
  height: 4px;
}

.card-top {
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.card-top .logo {
  margin: 0 auto 1rem;
}

.card-top .label {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.card-top .username {
  font-weight: 700;
  font-size: 1.1rem;
}

/* Card Color Variants */
.card-yellow::before { background: var(--yellow); }
.card-yellow h3 { color: var(--yellow); }
.card-yellow:hover { border-color: var(--yellow); }
.card-top.card-yellow .username { color: var(--yellow); }

.card-red::before { background: var(--red); }
.card-red h3 { color: var(--red); }
.card-red:hover { border-color: var(--red); }
.card-top.card-red .username { color: var(--red); }

.card-blue::before { background: var(--blue); }
.card-blue h3 { color: var(--blue); }
.card-blue:hover { border-color: var(--blue); }
.card-top.card-blue .username { color: var(--blue); }

.card-green::before { background: var(--green); }
.card-green h3 { color: var(--green); }
.card-green:hover { border-color: var(--green); }
.card-top.card-green .username { color: var(--green); }

/* Card Content */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header:last-child {
  margin-bottom: 0;
}

.logo {
  width: 60px;
  height: 60px;
  background: #2a2a2a;
  padding: 0.5rem;
  flex-shrink: 0;
  border-radius: 8px;
  border: 2px solid #333;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.card .subtitle {
  font-size: 1.25rem;
  color: #ccc;
  font-weight: 600;
}

.card .meta {
  font-size: 0.9rem;
  color: #999;
}

.card ul {
  list-style: none;
}

.card li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.75rem;
  color: #ccc;
}

.card li::before {
  content: '→';
  position: absolute;
  left: 0;
  font-weight: bold;
  color: var(--green);
}

.card p {
  margin-bottom: 0.75rem;
  line-height: 1.8;
  color: #ccc;
}

.card a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}

.card a:hover {
  border-bottom-color: var(--blue);
}

/* Skills */
.skill-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  vertical-align: middle;
}

.card p:has(+ .skill-tags) {
  display: inline;
  margin: 0;
}

.card p:has(+ .skill-tags) strong::after {
  content: ':';
  margin-right: 0.5rem;
}

.card .skill-tags {
  display: inline;
}

.card .skill-tags::after {
  content: '';
  display: block;
  margin-bottom: 1rem;
}

.skill-tag {
  background: rgba(244, 99, 81, 0.08);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1.5px solid rgba(244, 99, 81, 0.6);
  color: #ff6b5a;
  display: inline-block;
  margin-bottom: 0.5rem;
}

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

/* Footer */
footer {
  background: var(--dark);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.footer-text {
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

/* Logo Invert */
a[href*="github"] .logo img {
  filter: brightness(0) invert(1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .tags {
    flex-direction: column;
    align-items: center;
  }

  section {
    padding: 3rem 0;
  }

  .container {
    padding: 0 1.5rem;
  }

  .portrait {
    width: 220px;
    height: 220px;
  }
}
