/*
Theme Name: DevUp Studio
Theme URI: https://wpdevup.com
Author: DevUp Studio
Author URI: https://wpdevup.com
Description: A modern, block-friendly WordPress theme for full-stack engineering studios. Converted from the DevUp Studio HTML design with a clean green palette, Geist typography and a three-per-row blog card grid.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: devup-studio
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready, three-columns
*/

/* ------------------------------------------------------------------
   The visual design is driven by Tailwind (Play CDN) + the theme
   config in functions.php. This file holds the base tokens, custom
   keyframes and scroll-reveal styles that Tailwind does not provide.
------------------------------------------------------------------ */

:root { --radius: 0.4375rem; color-scheme: light; }

body {
  background: oklch(0.99 0.005 150);
  color: oklch(0.21 0.02 160);
  -webkit-font-smoothing: antialiased;
}

/* Keyframes ------------------------------------------------------- */
@keyframes float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float-y-slow { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }
@keyframes bubble-pop { 0% { opacity: 0; transform: translateY(10px) scale(0.92); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes blob-drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(20px,-18px) scale(1.06); }
  66% { transform: translate(-16px,14px) scale(0.96); }
}

.animate-float { animation: float-y 5s ease-in-out infinite; }
.animate-float-slow { animation: float-y-slow 8s ease-in-out infinite; }
.animate-bubble-pop { animation: bubble-pop 0.5s cubic-bezier(0.22,1,0.36,1) both; }
.animate-blob { animation: blob-drift 14s ease-in-out infinite; }

/* Scroll reveal --------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
  will-change: opacity, transform;
}
.reveal.show { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .animate-float, .animate-float-slow, .animate-blob { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Rich-text (post/page content) ---------------------------------- */
.entry-content > * + * { margin-top: 1.15rem; }
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 2rem;
}
.entry-content h1 { font-size: 2rem; }
.entry-content h2 { font-size: 1.6rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content h4 { font-size: 1.1rem; }
.entry-content p,
.entry-content li { line-height: 1.75; color: oklch(0.3 0.02 160); }
.entry-content a { color: oklch(0.66 0.16 152); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { opacity: .85; }
.entry-content ul { list-style: disc; padding-left: 1.4rem; }
.entry-content ol { list-style: decimal; padding-left: 1.4rem; }
.entry-content blockquote {
  border-left: 3px solid oklch(0.66 0.16 152);
  padding: 0.25rem 0 0.25rem 1.1rem;
  color: oklch(0.52 0.03 158);
  font-style: italic;
}
.entry-content img { border-radius: var(--radius); height: auto; max-width: 100%; }
.entry-content pre {
  background: oklch(0.21 0.02 160);
  color: oklch(0.99 0.01 150);
  padding: 1rem 1.15rem;
  border-radius: calc(var(--radius) * 1.4);
  overflow-x: auto;
  font-family: "Geist Mono", monospace;
  font-size: 0.85rem;
}
.entry-content code {
  font-family: "Geist Mono", monospace;
  font-size: 0.85em;
}
.entry-content :not(pre) > code {
  background: oklch(0.96 0.01 155);
  padding: 0.15em 0.4em;
  border-radius: calc(var(--radius) * 0.6);
}
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td {
  border: 1px solid rgba(10, 20, 15, 0.07);
  padding: 0.6rem 0.8rem;
  text-align: left;
}

/* WP core alignment / caption helpers ---------------------------- */
.alignleft { float: left; margin: 0.3rem 1.2rem 1rem 0; }
.alignright { float: right; margin: 0.3rem 0 1rem 1.2rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 0.8rem; color: oklch(0.52 0.03 158); text-align: center; margin-top: 0.4rem; }
.sticky, .gallery-caption, .bypostauthor { display: block; }

/* Comments -------------------------------------------------------- */
.comment-list,
.comment-list .children { list-style: none; margin: 0; padding: 0; }

/* Nested replies: indented with a soft rail. */
.comment-list .children {
  margin-top: 1.5rem;
  margin-left: 1rem;
  padding-left: 1.25rem;
  border-left: 2px solid rgba(10, 20, 15, 0.07);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 640px) { .comment-list .children { margin-left: 1.75rem; } }

.comment-body { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.comment-body:hover {
  border-color: oklch(0.66 0.16 152 / 0.35);
  box-shadow: 0 6px 20px -12px oklch(0.66 0.16 152 / 0.35);
}

.comment .avatar {
  height: 44px; width: 44px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: oklch(0.96 0.01 155);
}
.comment .says { display: none; }
.comment .fn { font-style: normal; }
.comment .fn a { color: inherit; text-decoration: none; }
.comment .fn a:hover { color: oklch(0.66 0.16 152); }

/* Post author's own comments get a subtle highlight. */
.comment.bypostauthor > .comment-body {
  border-color: oklch(0.66 0.16 152 / 0.4);
  background: oklch(0.93 0.05 153 / 0.28);
}

.comment-content p { margin: 0 0 0.6rem; line-height: 1.7; }
.comment-content p:last-child { margin-bottom: 0; }

/* Reply / edit actions rendered as small pills. */
.comment-reply-link,
.comment-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  border: 1px solid rgba(10, 20, 15, 0.07);
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: oklch(0.52 0.03 158);
  text-decoration: none;
  transition: all 0.2s ease;
}
.comment-reply-link:hover,
.comment-edit-link:hover {
  border-color: oklch(0.66 0.16 152 / 0.4);
  color: oklch(0.66 0.16 152);
  background: oklch(0.93 0.05 153 / 0.35);
}

/* Comment form --------------------------------------------------- */
.comment-respond .logged-in-as,
.comment-respond .logged-in-as a { font-size: 0.85rem; color: oklch(0.52 0.03 158); }
.comment-respond .logged-in-as a { color: oklch(0.66 0.16 152); }

.comment-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(10, 20, 15, 0.07);
  background: oklch(1 0 0);
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  color: oklch(0.21 0.02 160);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.comment-form textarea { min-height: 8rem; resize: vertical; }
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  border-color: oklch(0.66 0.16 152);
  box-shadow: 0 0 0 3px oklch(0.66 0.16 152 / 0.15);
}
.comment-form .required { color: oklch(0.66 0.16 152); }
.comment-notes,
.comment-form-cookies-consent label {
  font-size: 0.8rem;
  font-weight: 400;
  color: oklch(0.52 0.03 158);
}
.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.comment-form-cookies-consent input { margin-top: 0.15rem; }
.comment-form-cookies-consent label { margin-bottom: 0; }

/* Accessibility: skip link + screen-reader text ------------------- */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; position: absolute !important;
  word-wrap: normal !important;
}
.skip-link:focus {
  position: fixed; top: 1rem; left: 1rem; z-index: 100000;
  background: oklch(0.66 0.16 152); color: #fff;
  padding: 0.6rem 1rem; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 600;
}

/* ===== Comment form ===== */
.comment-respond .comment-reply-title,
.comment-respond h3 {
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0 0 1rem;
}

.comment-respond .logged-in-as,
.comment-respond .logged-in-as a { font-size: 0.85rem; color: oklch(0.52 0.03 158); }
.comment-respond .logged-in-as a { color: oklch(0.66 0.16 152); }

/* Spacing between fields */
#commentform { display: flex; flex-direction: column; gap: 1rem; }
#commentform p { margin: 0; }

/* Labels */
#commentform label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: oklch(0.21 0.02 160);
}

/* Inputs + textarea */
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
	width: 100%;
	border-radius: var(--radius, 0.4375rem);
	border: 1px solid rgba(10, 20, 15, 0.07);
	background: oklch(1 0 0);
	padding: 0.6rem 0.8rem;
	font: inherit;
	font-size: 0.9rem;
	color: oklch(0.21 0.02 160);
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	resize: none
}
#commentform textarea { min-height: 8rem; resize: vertical; }

#commentform input[type="text"]:focus,
#commentform input[type="email"]:focus,
#commentform input[type="url"]:focus,
#commentform textarea:focus {
	border-color: oklch(0.66 0.16 152);
	box-shadow: 0 0 0 3px oklch(0.66 0.16 152 / 0.15);
}
#commentform input::placeholder,
#commentform textarea::placeholder { color: oklch(0.52 0.03 158); }

/* Required asterisk + notes */
#commentform .required { color: oklch(0.66 0.16 152); }
.comment-notes { font-size: 0.8rem; font-weight: 400; color: oklch(0.52 0.03 158); }

/* Cookies-consent row */
.comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
}
.comment-form-cookies-consent input { margin-top: 0.15rem; }
.comment-form-cookies-consent label {
	margin-bottom: 0;
	font-size: 0.8rem;
	font-weight: 400;
	color: oklch(0.52 0.03 158);
}

/* Submit button */
.comment-form .form-submit input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 2.75rem;
	padding: 0 1.5rem;
	border: 0;
	border-radius: 9999px;
	background: oklch(0.66 0.16 152);
	color: oklch(0.99 0.01 150);
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
#commentform.form-submit input[type="submit"]:hover { background: oklch(0.66 0.16 152 / 0.85); }