/* =========================================================
   TUT MACHAR PORTFOLIO — CLEAN SHARED STYLESHEET
   Duplicate rules consolidated; page layouts and interactions
   retained. Keep this file linked from every page.
========================================================= */

/* ---------- Design tokens ---------- */
:root {
    --bg: #0b0f0c;
    --bg-deep: #050706;
    --section: #0c100e;
    --card: #121814;
    --border: #1f2923;
    --border-soft: #27332c;
    --accent: #00ff66;
    --accent-hover: #00cc52;
    --home-accent: #39d98a;
    --text: #ffffff;
    --muted: #9ca3af;
    --soft: #d1d5db;
}

/* ---------- Global reset and base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: #e0e0e0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
}

/* ---------- Shared header and navigation ---------- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
}

header h2,
header .logo,
header .logo a {
    color: var(--accent) !important;
    text-decoration: none;
}

header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 15px;
}

nav a {
    display: inline-block;
    position: relative;
    padding: 8px 20px;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

nav a.active {
    background-color: var(--accent);
    color: var(--bg) !important;
    font-weight: 700;
}

nav a:not(.active):hover {
    color: var(--accent);
    background-color: rgba(0, 255, 102, 0.1);
}

/* ---------- Shared page heading ---------- */
.page-heading {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    text-align: center;
}

.page-heading .intro,
.page-heading .section-subtitle {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.page-heading h1 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 2.8rem;
    font-weight: 700;
}

.page-heading h1 span {
    color: var(--accent);
}

.page-heading p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--muted);
}

/* ---------- Shared buttons and links ---------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: 0;
    border-radius: 8px;
    background-color: var(--accent);
    color: var(--bg);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.contact-link {
    color: var(--muted);
    font-size: 0.92rem;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.outline-button:hover,
a.outline-button:hover {
    background-color: var(--home-accent);
    color: #0b0f0c;
    border-color: var(--home-accent);
    transform: translateY(-2px);
}

/* ---------- About page ---------- */
.about-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
    padding: 30px 8% 70px;
}

.about-card {
    padding: 30px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background-color: var(--section);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: var(--home-accent);
}

.about-card h2 {
    margin-bottom: 18px;
    color: var(--text);
    font-size: 23px;
}

.about-card p {
    margin-bottom: 15px;
    color: #aeb8b1;
    font-size: 16px;
    line-height: 1.8;
}

/* Goals card spans the full row and displays its content in columns. */
.about-card:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px 25px;
}

.about-card:last-child h2 {
    grid-column: 1 / -1;
}

.about-card:last-child p {
    margin-bottom: 0;
}

.interest-list {
    margin-top: 20px;
    list-style: none;
}

.interest-list li {
    margin-bottom: 10px;
    padding: 12px 15px;
    border-left: 3px solid var(--home-accent);
    border-radius: 4px;
    background-color: var(--bg);
    color: #c4cec7;
    transition: background-color 0.3s ease;
}

.interest-list li:hover {
    background-color: var(--border-soft);
}

/* ---------- Skills page ---------- */
.skills-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 8% 80px;
}

.skill-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 35px 30px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--card);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.skill-icon {
    display: inline-block;
    width: fit-content;
    margin-bottom: 20px;
    padding: 6px 12px;
    border-radius: 6px;
    background-color: rgba(0, 255, 102, 0.1);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.skill-card h2 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 1.4rem;
}

.skill-card > p {
    flex-grow: 1;
    margin-bottom: 15px;
    color: var(--muted);
    font-size: 0.95rem;
}

.skill-card ul {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    list-style: none;
}

.skill-card li {
    position: relative;
    padding: 6px 0 6px 15px;
    color: var(--soft);
    font-size: 0.92rem;
}

.skill-card li::before {
    position: absolute;
    left: 0;
    color: var(--accent);
    content: "•";
    font-weight: bold;
}

/* ---------- Projects page ---------- */
.projects-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
    padding: 30px 8% 50px;
}

.project-card {
    min-width: 0;
    padding: 30px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background-color: var(--section);
    transition: transform 0.3s ease, border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--home-accent);
    box-shadow: 0 10px 30px rgba(57, 217, 138, 0.08);
}

.project-number {
    margin-bottom: 20px;
    color: #aeb8b1;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.project-icon {
    display: flex;
    width: 60px;
    height: 60px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background-color: var(--bg);
    color: var(--home-accent);
    font-size: 18px;
    font-weight: bold;
}

.project-card h2 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 23px;
}

.project-card > p {
    margin-bottom: 20px;
    color: #aeb8b1;
    font-size: 15px;
    line-height: 1.8;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.project-tags span {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 5px;
    background-color: var(--bg);
    color: var(--home-accent);
    font-size: 12px;
}

.project-card .project-status {
    margin-bottom: 0;
    padding-top: 15px;
    border-top: 1px solid var(--border-soft);
    color: #c4cec7;
    font-size: 13px;
}

.project-contact {
    padding: 50px 8% 70px;
    text-align: center;
}

.project-contact h2 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 28px;
}

.project-contact p {
    max-width: 600px;
    margin: 0 auto 25px;
    color: #aeb8b1;
}

/* ---------- Education page ---------- */
.education-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 30px 8% 50px;
}

.education-card {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    padding: 30px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background-color: var(--card);
    transition: transform 0.3s ease, border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    border-color: var(--home-accent);
    box-shadow: 0 8px 25px rgba(57, 217, 138, 0.12);
}

.education-icon {
    display: flex;
    min-width: 65px;
    height: 65px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--home-accent);
    border-radius: 12px;
    background-color: var(--card);
    font-size: 30px;
}

.education-content {
    flex: 1;
}

.education-level {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--home-accent);
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.education-content h2 {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 24px;
}

.education-content h3 {
    margin-bottom: 15px;
    color: var(--home-accent);
    font-size: 17px;
    font-weight: 500;
}

.education-content p {
    margin-bottom: 15px;
    color: #c4cec7;
    line-height: 1.8;
}

.education-status {
    margin-top: 15px;
    font-size: 14px;
}

.education-status span {
    color: var(--text);
    font-weight: bold;
}

.education-message {
    margin: 0 8% 60px;
    padding: 35px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background-color: var(--card);
    text-align: center;
}

.education-message h2 {
    margin-bottom: 15px;
    color: var(--home-accent);
    font-size: 27px;
}

.education-message p {
    margin-bottom: 25px;
    color: #c4cec7;
    line-height: 1.8;
}

/* ---------- Gallery page ---------- */
.gallery-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 8% 80px;
}

.gallery-card {
    display: flex;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--card);
    transition: transform 0.3s ease, border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(0, 255, 102, 0.08);
}

.gallery-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center 20%; /* Shifts the focus upward so the head is visible */
}

.gallery-card:hover img {
    transform: scale(1.04);
}

.gallery-info {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    justify-content: center;
    padding: 25px;
}

.gallery-info h2 {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 600;
}

.gallery-info p {
    color: var(--muted);
    font-size: 0.92rem;
}

.gallery-message {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 20px 80px;
    text-align: center;
}

.gallery-message h2 {
    margin-bottom: 20px;
    color: var(--text);
    font-size: 1.8rem;
    font-weight: 600;
}

.gallery-message p {
    margin-bottom: 30px;
    color: var(--muted);
}

/* ---------- Contact page ---------- */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 8% 80px;
    align-items: start;
}

.contact-info,
.contact-form-container {
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--card);
}

.contact-info h2,
.contact-form-container h2 {
    margin-bottom: 20px;
    color: var(--text);
    font-size: 1.6rem;
}

.contact-info > p {
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 0.95rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(0, 255, 102, 0.1);
    font-size: 1.4rem;
}

.contact-item h3 {
    margin-bottom: 4px;
    color: var(--text);
    font-size: 1rem;
}

.contact-item p {
    color: var(--muted);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.social-links {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.social-links h3 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 1.1rem;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--bg);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.social-icons img {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--soft);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #6b7280;
}

.form-group textarea {
    resize: vertical;
}

.contact-form-container .btn {
    width: 100%;
}

/* ---------- Shared back-to-top and footer ---------- */
.back-to-top-container {
    padding: 20px;
    text-align: center;
}

.back-to-top {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--home-accent);
    border-radius: 6px;
    background-color: var(--card);
    color: var(--home-accent);
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    background-color: var(--home-accent);
    color: var(--bg);
}

footer {
    padding: 30px;
    border-top: 1px solid var(--border);
    background-color: var(--bg);
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
}

/* =========================================================
   HOMEPAGE
========================================================= */
.home-page {
    margin: 0;
    background: #080b09;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.home-page .main-header {
    display: flex;
    width: 100%;
    min-height: 75px;
    align-items: center;
    justify-content: space-between;
    padding: 0 8%;
    border-bottom: 1px solid #1c2720;
    background: #080b09;
}

.home-page .logo a {
    color: var(--home-accent);
    font-size: 25px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.home-page .logo a:hover {
    color: #27b875;
}

.home-page .main-nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-page .main-nav a {
    position: relative;
    display: inline-block;
    padding: 8px 0;
    border-radius: 0;
    background: transparent;
    color: #dddddd;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.home-page .main-nav a:hover,
.home-page .main-nav a.active {
    background: transparent;
    color: var(--home-accent);
}

.home-page .main-nav a.active::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 5px;
    background-color: var(--home-accent);
    content: "";
}

/* Homepage hero */
.home-page .hero-section {
    display: flex;
    min-height: 620px;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    padding: 85px 10%;
}

.home-page .hero-content {
    flex: 1;
    max-width: 650px;
}

.home-page .hero-subtitle {
    margin-bottom: 22px;
    color: var(--home-accent);
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
}

.home-page .hero-content h1 {
    margin: 0 0 25px;
    color: var(--text);
    font-size: clamp(42px, 4.5vw, 60px);
    line-height: 1.15;
    letter-spacing: -1.5px;
}

.home-page .hero-content h1 span {
    display: block;
    margin-top: 8px;
    color: var(--home-accent);
}

.home-page .hero-description {
    max-width: 620px;
    margin-bottom: 15px;
    color: #b9c1bc;
    font-size: 16px;
    line-height: 1.9;
}

.home-page .hero-motto {
    margin-bottom: 20px;
    color: var(--home-accent);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.7;
    letter-spacing: 0.2px;
}

.home-page .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 32px;
}

.home-page .primary-button,
.home-page .outline-button {
    display: inline-block;
    padding: 15px 25px;
    border: 1px solid var(--home-accent);
    border-radius: 7px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.home-page .primary-button {
    background: var(--home-accent);
    color: #06140c;
}

.home-page .primary-button:hover {
    transform: translateY(-3px);
    border-color: #27b875;
    background: #27b875;
}

.home-page .primary-button span {
    margin-left: 8px;
}

.home-page .outline-button {
    background: transparent;
    color: var(--home-accent);
}

.home-page .outline-button:hover {
    transform: translateY(-3px);
    background: var(--home-accent);
    color: #06140c;
}

.home-page .hero-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.home-page .hero-interests span {
    padding: 7px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 5px;
    background-color: #111614;
    color: #b9c1bc;
    font-size: 12px;
}

/* Homepage profile image */
.home-page .hero-image-container {
    position: relative;
    display: flex;
    width: 340px;
    height: 340px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.home-page .profile-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #16c875;
    filter: blur(85px);
    opacity: 0.22;
}

.home-page .hero-profile-image {
    position: relative;
    width: 310px;
    height: 310px;
    border: 2px solid var(--home-accent);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 30px rgba(57, 217, 138, 0.15),
                0 15px 50px rgba(0, 0, 0, 0.3);
}

/* Homepage expertise */
.home-page .expertise-section {
    padding: 85px 10%;
    border-top: 1px solid #1c2720;
    background: var(--section);
}

.home-page .section-heading {
    margin-bottom: 45px;
}

.home-page .section-heading p {
    color: var(--home-accent);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.home-page .section-heading h2 {
    margin-top: 10px;
    color: var(--text);
    font-size: 34px;
}

.home-page .section-heading > span {
    display: block;
    margin-top: 10px;
    color: #aeb8b1;
    font-size: 15px;
}

.home-page .expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.home-page .expertise-card {
    padding: 32px 28px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #111614;
    transition: transform 0.3s ease, border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.home-page .expertise-card:hover {
    transform: translateY(-7px);
    border-color: var(--home-accent);
    box-shadow: 0 5px 25px rgba(57, 217, 138, 0.08);
}

.home-page .expertise-icon {
    margin-bottom: 15px;
    color: var(--home-accent);
    font-size: 30px;
    font-weight: bold;
}

.home-page .expertise-card h3 {
    margin-bottom: 12px;
    color: var(--text);
    font-size: 19px;
}

.home-page .expertise-card p {
    color: #aeb8b1;
    font-size: 14px;
    line-height: 1.8;
}

/* Homepage call to action and footer */
.home-page .home-cta {
    padding: 85px 10%;
    text-align: center;
}

.home-page .cta-subtitle {
    margin-bottom: 12px;
    color: var(--home-accent);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
}

.home-page .home-cta h2 {
    margin-bottom: 15px;
    color: var(--home-accent);
    font-size: 34px;
}

.home-page .home-cta p {
    margin-bottom: 25px;
    color: #b9c1bc;
    line-height: 1.7;
}

.home-page .home-cta p:not(.cta-subtitle) {
    max-width: 600px;
    margin: 0 auto 28px;
}

.home-page .back-to-top-container {
    padding: 20px;
    text-align: center;
}

.home-page .back-to-top {
    color: var(--home-accent);
    font-size: 13px;
    text-decoration: none;
}

.home-page .back-to-top:hover {
    color: var(--text);
}

.home-page .main-footer {
    padding: 25px 15px;
    border-top: 1px solid #1c2720;
    background: var(--bg-deep);
    text-align: center;
}

.home-page .main-footer p {
    color: var(--text);
    font-size: 13px;
}

.home-page .main-footer .footer-subtitle {
    color: #8b9890;
    font-size: 12px;
}

/* ---------- Responsive layouts ---------- */
@media (max-width: 1000px) {
    .skills-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    header {
        flex-direction: column;
        gap: 18px;
        padding: 20px 5%;
    }

    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 18px;
    }
}

@media (max-width: 900px) {
    .about-section,
    .projects-section,
    .contact-section {
        grid-template-columns: 1fr;
    }

    .home-page .main-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px 5%;
    }

    .home-page .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 18px;
    }

    .home-page .hero-section {
        gap: 40px;
        padding: 65px 7%;
    }

    .home-page .hero-image-container {
        width: 270px;
        height: 270px;
    }

    .home-page .hero-profile-image {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 650px) {
    .home-page .hero-section {
        flex-direction: column-reverse;
        gap: 35px;
        padding: 50px 6%;
        text-align: center;
    }

    .home-page .hero-content {
        max-width: 100%;
    }

    .home-page .hero-content h1 {
        font-size: 38px;
    }

    .home-page .hero-description {
        font-size: 15px;
    }

    .home-page .hero-buttons,
    .home-page .hero-interests {
        justify-content: center;
    }

    .home-page .hero-image-container {
        width: 230px;
        height: 230px;
    }

    .home-page .hero-profile-image {
        width: 210px;
        height: 210px;
    }

    .home-page .expertise-section {
        padding: 55px 6%;
    }

    .home-page .expertise-grid {
        grid-template-columns: 1fr;
    }

    .home-page .section-heading {
        text-align: center;
    }

    .home-page .section-heading h2 {
        font-size: 28px;
    }

    .home-page .home-cta {
        padding: 60px 7%;
    }

    .home-page .home-cta h2 {
        font-size: 27px;
    }

    .education-card {
        flex-direction: column;
        padding: 22px;
    }

    .education-content h2 {
        font-size: 21px;
    }

    .education-message {
        margin: 0 5% 40px;
        padding: 25px 20px;
    }

    .education-message h2 {
        font-size: 23px;
    }

    .gallery-section {
        grid-template-columns: 1fr;
        padding: 25px 5% 40px;
    }

    .gallery-card img {
        height: 230px;
    }

    .gallery-message {
        padding: 25px 20px;
    }

    .gallery-message h2 {
        font-size: 22px;
    }

    .contact-section {
        gap: 25px;
        padding: 25px 5% 40px;
    }

    .contact-info,
    .contact-form-container {
        padding: 22px;
    }

    .contact-info h2,
    .contact-form-container h2 {
        font-size: 22px;
    }

    .skills-section {
        grid-template-columns: 1fr;
        padding: 25px 5% 50px;
    }

    .skill-card {
        padding: 24px;
    }

    .projects-section {
        padding: 20px 5% 40px;
    }

    .project-card {
        padding: 22px;
    }

    .project-card h2 {
        font-size: 20px;
    }

    .project-contact {
        padding: 40px 5% 50px;
    }
}

@media (max-width: 500px) {
    header h2 {
        font-size: 24px;
    }

    header nav a {
        padding: 7px 10px;
        font-size: 13px;
    }

    .page-heading {
        padding: 40px 5% 20px;
    }

    .page-heading h1 {
        font-size: 2.1rem;
    }

    .about-section {
        padding: 20px 5% 50px;
    }

    .about-card {
        padding: 22px;
    }

    .about-card:last-child {
        grid-template-columns: 1fr;
    }

    .about-card:last-child h2 {
        grid-column: auto;
    }

    .project-contact h2 {
        font-size: 24px;
    }

    .education-section {
        padding: 20px 5% 40px;
    }
}
/* Universal Navigation Bar Styling */
header,
header.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background-color: #0b0f0c;
    border-bottom: 1px solid #1f2923;
}

nav ul,
nav.main-nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    align-items: center;
}

/* Base style for ALL navigation links */
nav ul li a,
nav.main-nav ul li a {
    display: inline-block !important;
    padding: 10px 22px !important;    /* Uniform height and width */
    border-radius: 8px !important;     /* Uniform rounded corners */
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: all 0.3s ease;
}

/* Active State (Applies identically to Home, About, Skills, etc.) */
nav ul li a.active,
nav.main-nav ul li a.active {
    background-color: #00ff66 !important;
    color: #0b0f0c !important;
    font-weight: 700 !important;
}

/* Hover effect on inactive items */
nav ul li a:not(.active):hover,
nav.main-nav ul li a:not(.active):hover {
    color: #00ff66;
    background-color: rgba(0, 255, 102, 0.1);
}