/* style.css - Jonathan Bardolf Portfolio */

:root {
  --text: #1a1711;
  --bg-1: #FFFAED;
  --bg-2: #E8DCC8;
  --muted: #9D9584;
  --accent: #956B45;
  --panel: #F8F4E2;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Georgia, Garamond, 'Times New Roman', serif;
  color: var(--text);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
}

/* Layout Container */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px;
  background: transparent;
}

/* Header and Navigation */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 8px;
  position: relative;
}

.name {
  font-weight: 800;
  font-size: clamp(28px, 5vw, 44px);
}

/* Navigation - Liquid Glass Dropdown */
nav {
  position: absolute;
  right: 24px;
  top: 64px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  z-index: 60;
  width: 220px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  transition: all 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 36px rgba(26, 23, 17, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  font-family: Georgia, Garamond, 'Times New Roman', serif;
}

nav.open {
  max-height: 420px;
  opacity: 1;
  padding: 10px;
}

nav a {
  display: block;
  color: var(--text);
  text-decoration: none;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  position: relative;
  font-family: Georgia, Garamond, 'Times New Roman', serif;
}

nav a span {
  position: relative;
  display: inline-block;
}

nav a span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  width: 0;
  transition: width 0.22s ease;
}

nav a:hover span::after,
nav a:focus span::after {
  width: 100%;
}

nav a:hover {
  background: rgba(26, 23, 17, 0.02);
  box-shadow: 0 8px 24px rgba(26, 23, 17, 0.06);
}

nav a.active {
  background: rgba(149, 107, 69, 0.12);
  color: var(--accent);
  font-weight: 600;
}

nav a.active span::after {
  width: 100%;
}

/* Menu Button */
#menu-btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 0;
  background: var(--accent);
  color: var(--panel);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-family: Georgia, Garamond, 'Times New Roman', serif;
}

#menu-btn svg {
  color: var(--panel);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
}

#menu-btn.active svg,
#menu-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Content Container - Subbackground */
.content-box {
  background: #FBF9F0;
  margin: 40px 80px;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid rgba(26, 23, 17, 0.08);
  box-shadow: 0 4px 12px rgba(26, 23, 17, 0.04);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s ease forwards;
}

/* Social Media Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
}

.social-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease;
  cursor: pointer;
}

.social-icon:hover {
  transform: scale(1.3);
}

.social-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--accent);
}

/* Hero Section */
.intro {
  background: var(--panel);
  padding: 28px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60vh;
}

.about {
  margin-top: 20px;
  color: var(--muted);
}

/* Cards Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}

/* Card Component */
.card {
  background: var(--panel);
  padding: 18px;
  border-radius: 10px;
  border: 1px solid rgba(26, 23, 17, 0.06);
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s ease forwards;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.grid .card:nth-child(1) {
  animation-delay: 120ms;
}

.grid .card:nth-child(2) {
  animation-delay: 220ms;
}

.grid .card:nth-child(3) {
  animation-delay: 320ms;
}

.grid .card:nth-child(4) {
  animation-delay: 420ms;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-10px);
  }
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 36px rgba(26, 23, 17, 0.16);
  border-color: rgba(26, 23, 17, 0.18);
}

.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Cards Grid (for projects/experiences) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.cards .card {
  background: var(--panel);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(26, 23, 17, 0.06);
  opacity: 1;
  transform: none;
  animation: none;
}

/* Experience/Item Cards */
.item {
  background: var(--panel);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(26, 23, 17, 0.06);
  margin-bottom: 12px;
}

/* Call to Action Button */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 12px;
  padding: 6px 10px;
  background: var(--accent);
  color: var(--panel);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  max-width: 140px;
  white-space: nowrap;
}

.cta:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 36px rgba(26, 23, 17, 0.16);
  border-color: rgba(26, 23, 17, 0.18);
}

/* Form Styles */
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(26, 23, 17, 0.12);
  background: transparent;
  color: var(--text);
  outline: none;
  transition: box-shadow 0.14s ease, border-color 0.14s ease;
  font-family: inherit;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: var(--muted);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(26, 23, 17, 0.06);
}

/* Buttons */
.btn {
  background: var(--accent);
  color: var(--panel);
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(26, 23, 17, 0.16);
}

/* Profile Picture - About Page */
.profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, #956B45, #A0826D);
  float: right;
  margin-left: 40px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--panel);
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Blog Post Accordion */
.blog-post {
  margin-bottom: 16px;
}

.blog-title {
  background: var(--panel);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(26, 23, 17, 0.06);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.22s ease;
  user-select: none;
}

.blog-title:hover {
  box-shadow: 0 4px 12px rgba(26, 23, 17, 0.08);
  border-color: rgba(26, 23, 17, 0.12);
}

.blog-title h3 {
  margin: 0;
  font-size: 18px;
}

.blog-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease;
}

.blog-toggle svg {
  width: 100%;
  height: 100%;
  stroke: var(--accent);
}

.blog-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.22s ease;
  background: var(--panel);
  border: 1px solid rgba(26, 23, 17, 0.06);
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.blog-content.open {
  max-height: 2400px;
}

.blog-content-inner {
  padding: 20px;
  color: #6b6358;
  line-height: 1.6;
}

.img-spoiler-btn {
  background: none;
  border: 1px solid rgba(26, 23, 17, 0.15);
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  color: var(--accent);
  font-size: 14px;
  font-family: Georgia, Garamond, 'Times New Roman', serif;
  transition: all 0.22s ease;
  margin-top: 12px;
}

.img-spoiler-btn:hover {
  background: var(--bg-2);
}

.img-spoiler-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.img-spoiler.open .img-spoiler-content {
  max-height: 500px;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.skill-tag {
  background: var(--panel);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(26, 23, 17, 0.06);
  text-align: center;
  font-size: 14px;
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s ease forwards;
  transition: all 0.22s ease;
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 23, 17, 0.08);
  border-color: rgba(26, 23, 17, 0.12);
}

.skills-section {
  flex: 1;
}

.skills-section h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: var(--text);
}

.skills-sections-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 12px;
}

/* Tags for Interests Page */
.tags-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.tag {
  display: inline-block;
  background: var(--panel);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(26, 23, 17, 0.06);
  text-align: center;
  font-size: 14px;
  user-select: none;
  transition: all 0.22s ease;
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 23, 17, 0.08);
  border-color: rgba(26, 23, 17, 0.12);
}

/* Thank You Page */
.thank-you-wrap {
  max-width: 820px;
  margin: 60px auto;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94));
  border-radius: 12px;
  border: 1px solid rgba(26, 23, 17, 0.06);
  text-align: center;
  box-shadow: 0 12px 36px rgba(26, 23, 17, 0.06);
}

/* Mobile Button - Compact Layout Toggle */
.mobile-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--panel);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(26, 23, 17, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mobile-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--panel);
  fill: none;
}

.mobile-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(26, 23, 17, 0.25);
}

.mobile-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(26, 23, 17, 0.15);
}

/* Compact Mobile View Mode */
body.compact-view {
  --compact-padding: 16px;
}

body.compact-view .wrap,
body.compact-view .container {
  padding: 20px 12px;
  max-width: 100%;
}

body.compact-view .content-box {
  margin: 16px 0;
  padding: 16px;
}

body.compact-view header {
  padding-top: 12px;
  padding-bottom: 4px;
}

body.compact-view .name {
  font-size: clamp(20px, 4vw, 32px);
}

body.compact-view nav {
  width: 160px;
}

body.compact-view .grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

body.compact-view .intro {
  min-height: auto;
  padding: 16px;
}

body.compact-view .cards {
  grid-template-columns: 1fr;
}

body.compact-view .skills-sections-wrapper {
  grid-template-columns: 1fr;
  gap: 20px;
}

body.compact-view .tags-container {
  grid-template-columns: repeat(2, 1fr);
}

body.compact-view h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

body.compact-view h2 {
  font-size: 18px;
  margin-top: 16px !important;
  margin-bottom: 8px !important;
}

body.compact-view .item {
  padding: 12px;
  margin-bottom: 8px;
}

body.compact-view footer {
  margin-top: 16px;
  font-size: 12px;
}

/* Footer */
footer {
  color: var(--muted);
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.3s forwards;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 720px) {
  nav {
    right: 16px;
    top: 60px;
    width: 200px;
  }

  header {
    padding-bottom: 0;
  }

  .intro {
    min-height: calc(100vh - 120px);
  }

  .wrap {
    padding: 32px 20px;
  }

  .container {
    padding: 32px 20px;
  }

}

@media (max-width: 520px) {
  .wrap {
    padding: 28px 16px;
  }

  .container {
    padding: 28px 16px;
  }

}
