/*
Theme Name: Project 2 Theme
Theme URI: https://github.com/your-repo/project-2-theme
Author: Your Name
Author URI: https://example.com
Description: My DGL233 Project 2 Classic Theme. A portfolio theme with yellow accent, custom header/footer, front-page sections, Contact Form 7 support, and 404 template.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.4
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: project2
Tags: custom-logo, custom-menu, featured-images, portfolio, one-column, responsive-layout
*/

:root {
	--color-bg: #ffbe0b;
	--color-text: #0b132b;
	--color-surface: rgba(255, 255, 255, 0.9);
	--color-accent: #023047;
	--radius: 12px;
	--container-width: 1100px;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--color-text);
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
	min-height: 100vh;
	background: var(--color-bg);
}

/* Basic layout */
.site-main {
	width: 100%;
}

.hero,
.section,
.cta {
	padding: 2.25rem 1rem;
}

.hero {
	padding-top: 2.5rem;
}

/* Typography */
h1 {
	font-size: clamp(2rem, 4vw, 3.25rem);
	line-height: 1.1;
	margin: 0 0 0.75rem;
}

h2 {
	font-size: clamp(1.25rem, 2.5vw, 1.75rem);
	line-height: 1.2;
	margin: 0 0 0.65rem;
}

p {
	line-height: 1.6;
	margin: 0 0 0.65rem;
}

/* CTA + Buttons */
.hero__button,
.cta__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 1.75rem;
	padding: 0.8rem 1.25rem;
	border-radius: var(--radius);
	background: var(--color-accent);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	transition: transform 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
	box-shadow: 0 2px 8px rgba(2, 48, 71, 0.2);
}

.hero__button:hover,
.cta__button:hover {
	transform: translateY(-2px);
	opacity: 0.98;
	box-shadow: 0 4px 14px rgba(2, 48, 71, 0.28);
}

.cta {
	margin: 0 auto;
	max-width: var(--container-width);
	margin-top: 2.5rem;
}

.cta + .section {
	margin-top: 2rem;
}

.cta__heading {
	margin-top: 0;
}

/* Hero + CTA copy rhythm (tight title→intro, clear space before buttons) */
.hero__heading {
	margin-bottom: 0.35rem;
	letter-spacing: -0.02em;
}

.hero__intro {
	max-width: 42rem;
}

.hero__intro > *:first-child {
	margin-top: 0;
}

.hero__intro p:last-child,
.cta__text p:last-child {
	margin-bottom: 0;
}

/* Sections */
.section {
	margin: 0 auto;
	max-width: var(--container-width);
}

.section__content {
	background: var(--color-surface);
	border-radius: var(--radius);
	padding: 1.25rem 1rem;
}

/* Header + Footer spacing */
header,
footer {
	padding: 1.25rem 1rem;
}

.site-header {
	border-bottom: 1px solid rgba(2, 48, 71, 0.1);
}

header,
footer,
main {
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
}

/*
 * Header layout (all breakpoints):
 * — Wide: logo left, nav right (single row).
 * — Narrow: logo left, hamburger right; menu opens below (vertical on mobile, horizontal on tablet).
 */
.site-header__inner {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto;
	align-items: center;
	column-gap: 1rem;
	row-gap: 0.75rem;
}

/* Hamburger button (narrow screens only — hidden on wide desktop) */
.nav-toggle {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	grid-column: 2;
	grid-row: 1;
	justify-self: end;
	width: 44px;
	height: 44px;
	min-width: 44px;
	flex-shrink: 0;
	padding: 0;
	background: rgba(2, 48, 71, 0.15);
	border: 2px solid rgba(2, 48, 71, 0.4);
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
	background: rgba(2, 48, 71, 0.25);
	border-color: rgba(2, 48, 71, 0.6);
}

.nav-toggle__bar {
	display: block;
	width: 22px;
	height: 3px;
	margin: 0 auto;
	background: var(--color-accent);
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

/* Nav: second row on narrow screens; first row left on wide */
.site-nav {
	grid-column: 1 / -1;
	grid-row: 2;
	width: 100%;
}

.site-nav:not(.is-open) .site-nav__menu {
	display: none;
}

.site-nav.is-open .site-nav__menu {
	display: flex;
}

/* Tablet: when hamburger opens, show nav in a horizontal row */
@media (min-width: 768px) and (max-width: 1023px) {
	.site-nav.is-open .site-nav__menu {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: flex-start;
		gap: 0.5rem;
	}

	.site-nav.is-open .site-nav__menu .menu-item a {
		padding: 0.5rem 0.85rem;
		font-size: 0.9375rem;
	}
}

.site-branding {
	grid-column: 1;
	grid-row: 1;
	justify-self: start;
	min-width: 0;
	margin-left: 0;
	text-align: left;
}

.site-branding__link {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
}

.custom-logo {
	height: auto;
	max-height: 72px;
	width: auto;
}

.site-nav__menu,
.footer-nav__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.site-nav__menu .menu-item a,
.footer-nav__menu .menu-item a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 0.9rem;
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.75);
	color: var(--color-accent);
	text-decoration: none;
	font-weight: 700;
}

.site-nav__menu .menu-item a:hover,
.footer-nav__menu .menu-item a:hover {
	background: rgba(255, 255, 255, 0.95);
}

.site-footer__inner {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Wide desktop: single row — logo left, nav right */
@media (min-width: 1024px) {
	.site-header__inner {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-start;
		gap: 1rem;
	}

	.nav-toggle {
		display: none;
	}

	.site-branding {
		grid-column: unset;
		grid-row: unset;
		justify-self: unset;
		order: 1;
		flex-shrink: 0;
		margin: 0;
		text-align: left;
	}

	.site-branding__link {
		justify-content: flex-start;
	}

	.site-nav {
		grid-column: unset;
		grid-row: unset;
		order: 2;
		flex: 0 1 auto;
		width: auto;
		min-width: 0;
		margin: 0;
		margin-left: auto;
	}

	.site-nav:not(.is-open) .site-nav__menu,
	.site-nav .site-nav__menu {
		display: flex;
	}

	.site-nav__menu {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: flex-end;
		align-items: center;
		gap: 0.5rem;
	}

	.site-nav__menu .menu-item a {
		padding: 0.5rem 0.85rem;
		font-size: 0.9375rem;
		font-weight: 600;
		box-shadow: 0 1px 3px rgba(2, 48, 71, 0.08);
	}

	/* Desktop content polish */
	.hero {
		padding-top: 2.75rem;
		padding-bottom: 3rem;
	}

	.hero__intro {
		font-size: 1.0625rem;
		line-height: 1.65;
		max-width: 40rem;
	}

	.cta {
		padding-top: 2.75rem;
		padding-bottom: 3rem;
	}

	.cta__text {
		max-width: 40rem;
		font-size: 1.0625rem;
		line-height: 1.65;
	}

	.hero__button,
	.cta__button {
		margin-top: 2rem;
		padding: 0.85rem 1.4rem;
		font-size: 1rem;
	}

	.cta + .section {
		margin-top: 5rem;
	}

	.section {
		padding: 2.5rem 1.5rem;
	}

	.section > h2 {
		margin-bottom: 0.85rem;
		font-size: 1.5rem;
		letter-spacing: -0.015em;
	}

	.section__content {
		padding: 1.5rem 1.35rem;
		box-shadow: 0 2px 16px rgba(2, 48, 71, 0.06);
	}
}

@media (min-width: 768px) {
	.site-footer__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.footer-nav__menu {
		flex-direction: row;
	}
}

/* Profile */
.profile {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: flex-start;
}

.profile__avatar {
	width: 120px;
	height: 120px;
	border-radius: 999px;
	object-fit: cover;
	border: 4px solid rgba(255, 255, 255, 0.55);
}

.profile__name {
	margin: 0;
	font-size: 1.8rem;
}

.profile__bio {
	max-width: 70ch;
}

.profile__line {
	margin: 0.25rem 0 0;
}

.profile__link {
	color: var(--color-accent);
	font-weight: 700;
	text-decoration: none;
}

/* Experience */
.experience-list,
.education-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.experience-card,
.education-card {
	background: rgba(255, 255, 255, 0.75);
	border-radius: var(--radius);
	padding: 1rem;
}

.experience-card__title,
.education-card__school {
	margin: 0 0 0.35rem;
	font-size: 1.1rem;
}

.experience-card__company {
	margin: 0;
	font-weight: 700;
}

.experience-card__dates,
.experience-card__subtitle {
	margin: 0.25rem 0 0;
	opacity: 0.85;
}

/* Skills */
.skills-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.skill-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: rgba(2, 48, 71, 0.12);
	color: var(--color-accent);
	border-radius: 999px;
	padding: 0.45rem 0.8rem;
	font-weight: 700;
	font-size: 0.95rem;
}

.skill-pill__level {
	opacity: 0.85;
	font-weight: 600;
}

/* Projects */
.projects-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.project-card {
	background: rgba(255, 255, 255, 0.75);
	border-radius: var(--radius);
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.project-card__image {
	width: 100%;
	height: 190px;
	object-fit: cover;
	border-radius: calc(var(--radius) - 4px);
	background: rgba(255, 255, 255, 0.4);
}

.project-card__title {
	margin: 0;
	font-size: 1.25rem;
}

.project-card__desc {
	opacity: 0.95;
}

.project-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.25rem;
}

.project-tag {
	display: inline-flex;
	background: rgba(2, 48, 71, 0.18);
	color: var(--color-accent);
	border-radius: 8px;
	padding: 0.35rem 0.6rem;
	font-weight: 800;
	font-size: 0.85rem;
}

.project-card__link {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.6rem 0.9rem;
	border-radius: var(--radius);
	background: var(--color-accent);
	color: #fff;
	text-decoration: none;
	font-weight: 800;
}

/* Contact */
.contact__heading {
	margin: 0 0 0.5rem;
}

.contact__line,
.contact__text {
	margin: 0 0 0.5rem;
}

/* Responsive projects */
@media (min-width: 768px) {
	.projects-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.projects-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Project card placeholder (no image) */
.project-card__placeholder {
	width: 100%;
	height: 190px;
	background: rgba(255, 255, 255, 0.4);
	border-radius: calc(var(--radius) - 4px);
}

/* ===== 404 Page ===== */
.site-main--404 {
	padding-top: 2rem;
}

.error-404 {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 2.25rem 1rem;
	text-align: center;
}

.error-404__message {
	display: inline-block;
	padding: 2rem 2.5rem;
	background: var(--color-surface);
	border-radius: var(--radius);
	box-shadow: 0 2px 16px rgba(2, 48, 71, 0.06);
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	font-weight: 600;
	color: var(--color-text);
	margin: 0;
}

.site-main--404 .cta {
	margin-top: 2rem;
}

/* ===== Contact Page Template ===== */
.site-main--contact .contact-page {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 2.25rem 1rem;
}

.contact-page__header {
	margin-bottom: 1.5rem;
}

.contact-page__title {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3rem);
}

.contact-page__content {
	background: var(--color-surface);
	border-radius: var(--radius);
	padding: 2rem 1.25rem;
	box-shadow: 0 2px 16px rgba(2, 48, 71, 0.06);
}

.contact-page__intro {
	margin-bottom: 1.5rem;
	max-width: 42rem;
}

.contact-page__intro p:last-child {
	margin-bottom: 0;
}

.contact-page__content > *:first-child {
	margin-top: 0;
}

.contact-page__content > *:last-child {
	margin-bottom: 0;
}

/* Contact Form 7 styling */
.contact-page .wpcf7 {
	max-width: 42rem;
	margin-top: 1.5rem;
}

.contact-page .wpcf7-form p {
	margin: 0 0 1.25rem;
}

.contact-page .wpcf7-form p:last-of-type {
	margin-bottom: 0;
}

.contact-page .wpcf7-form-control {
	width: 100%;
	max-width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	font-family: inherit;
	line-height: 1.5;
	color: var(--color-text);
	background: #fff;
	border: 2px solid rgba(2, 48, 71, 0.15);
	border-radius: calc(var(--radius) - 4px);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.contact-page .wpcf7-form-control:focus {
	outline: none;
	border-color: var(--color-accent);
	box-shadow: 0 0 0 3px rgba(2, 48, 71, 0.12);
}

.contact-page .wpcf7-form-control::placeholder {
	color: rgba(11, 19, 43, 0.5);
}

.contact-page textarea.wpcf7-form-control {
	min-height: 140px;
	resize: vertical;
}

.contact-page .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.5rem;
	padding: 0.8rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	font-family: inherit;
	color: #fff;
	background: var(--color-accent);
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	transition: transform 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
	box-shadow: 0 2px 8px rgba(2, 48, 71, 0.2);
}

.contact-page .wpcf7-submit:hover {
	transform: translateY(-2px);
	opacity: 0.98;
	box-shadow: 0 4px 14px rgba(2, 48, 71, 0.28);
}

.contact-page .wpcf7-response-output {
	margin: 1.5rem 0 0 !important;
	padding: 1rem 1.25rem !important;
	border: none !important;
	border-radius: var(--radius);
	font-size: 0.95rem;
}

.contact-page .wpcf7-mail-sent-ok {
	background: rgba(46, 125, 50, 0.15);
	color: #1b5e20;
}

.contact-page .wpcf7-validation-errors,
.contact-page .wpcf7-mail-sent-ng {
	background: rgba(211, 47, 47, 0.1);
	color: #b71c1c;
}

.contact-page .wpcf7-not-valid-tip {
	font-size: 0.875rem;
	color: #b71c1c;
	margin-top: 0.35rem;
}

@media (min-width: 768px) {
	.contact-page__content {
		padding: 2.5rem 2rem;
	}

	.contact-page .wpcf7-form p {
		margin-bottom: 1.5rem;
	}
}